PowerPC下uboot命令

简介: PowerPC下uboot命令

gcc  -print-libxxx-file-name ,如:   -print-libgcc-file-name  会输出libgcc所在的目录

tftp在线从虚拟机加载uImage, Fs, dtb:

uboot下执行以下命令将对文件加载到到嵌入式设备内存中:


方法: tftp  MemoryAddress  FileName


//

tftp 0x1000000 uImage_file;
tftp 0x3000000 dtb_file;
tftp 0x4000000 rootfs_file;


然后执行 bootm 0x1000000 0x4000000 0x3000000,系统就会从指定的内存去加载系统并启动。


2. 固化系统到flash


固化后的系统就可以直接自动启动不需要人工加载干预了,步骤如下:

tftp 0x100000 u-boot
tftp 0x200000 fman
tftp 0x300000  RCW

protect off all; erase all;    //擦除所有flash的页


cp.b 100000 eff40000 c0000  //字节拷贝,源地址位0x100000, 目的地址0xeff40000 ,长度为0xc0000,文件长度在执行tftp加载到                                                    //内存的命令时候会有打印输出可以查看到

cp.b 200000 eff00000 10000
cp.b 300000 e8000000 100

到这里uboot已经固化到nor flash了,重启板卡,uboot将从norflash穹启动,下面开始固化系统:


tftp 0x1000000 uImage_file
tftp 0x3000000 dtb_file
tftp 0x4000000 rootfs_file
protect off all;

erase E9300000 +321BC76  //rootfs  E9300000是要擦除的flash起始地址,321BC77  是要擦除的长度


erase E8800000 +956dd      //dtb
erase  E8020000 +3c0d26   //uImage


擦除完flash后开始从内存拷贝系统到flash中


cp.b 1000000 E8020000 3c0d26  (uImage)
cp.b 3000000  E8800000 956d     //dtb
cp.b 4000000 E9300000 321BC76 //rootfs


到此系统就固化到flash中了。需要自动加载还需要做最后一步,编辑bootcmd


editenv bootcmd


bootcmd=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate
$othbootargs;setenv ramdiskaddr 0x02000000;setenv fdtaddr0x00c00000;setenv loadaddr 
0x1000000;bootm $loadaddr $ramdiskaddr $fdtaddr


将loadaddr ramdiskaddr fdtaddr地址分别改为实际的flash对应的地址,这里是0xE8020000

0xE9300000  0xE8800000
目录
相关文章
|
4月前
|
Linux 网络安全 Windows
smart210 烧写uboot、uImage和rootfs
smart210 烧写uboot、uImage和rootfs
|
9月前
|
存储 编译器 Linux
完全理解ARM启动流程:Uboot-Kernel
完全理解ARM启动流程:Uboot-Kernel
683 0
|
9月前
|
Linux 编译器 Windows
【Linux】新唐NUC977系统编译及烧写流程
【Linux】新唐NUC977系统编译及烧写流程
145 0
|
存储 数据库
飞腾uboot命令简单介绍
飞腾uboot命令简单介绍
1063 0
飞腾uboot命令简单介绍
|
Linux 数据安全/隐私保护 Windows
在Exynos4412上使用SD卡烧写Linux
在Exynos4412上使用SD卡烧写Linux
在Exynos4412上使用SD卡烧写Linux
uboot on qemu
1, download uboot ftp://ftp.denx.de/pub/u-boot/   2, compile uboot make vexpress_ca9x4_config   export ARCH=arm   export CROSS_COMPILE=arm-linux-gnuea...
1035 0
|
Ubuntu Linux
【ARM】一步一步移植Linux Kernel 2.6.13到板子
1环境搭建所需材料 2环境搭建所需材料之间的关系 3所使用的开发板 4译内核 1修改makefile 2拷贝配置文件 3编译得到zImage 4把zImage转成uImage 5开发板串口连接 6uboot设置 7通过tftp服务器下载uImage 8启动内核...
2088 0