bootm和bootz的命令和uImage、zImage的关联

1.u-boot.elf == u-boot,  可以单独用uboot编译出来再利用petalinux制作BOOT.BIN
1.1 编译BOOT.BIN的命令

petalinux-package --boot --fsbl zynq_fsbl.elf --fpga system.bit --u-boot
fast@fast-virtual-machine:~$ petalinux-package --boot --fsbl zynq_fsbl.elf --fpga system.bit
--u-boot
INFO: File in BOOT BIN: "/home/xxx/zedboardPrj/images/linux/zynq_fsbl.elf"
INFO: File in BOOT BIN: "/home/xxx/zedboardPrj/images/linux/system.bit"
INFO: File in BOOT BIN: "/home/xxx/zedboardPrj/images/linux/u-boot.elf"
INFO: Generating zynq binary package BOOT.BIN...

2.petalinux生成的文件系统镜像没有ramdisk文件,但可以用"rootfs.cpio.gz.u-boot" 文件代替

cp rootfs.cpio.gz.u-boot uramdisk.image.gz

 

3.bootm和bootz的不同地方

bootm用于加载uImage和ramdisk

bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address};

bootz用于加载zImage和ext4文件系统

bootz ${kernel_load_address} - ${devicetree_load_address}


#zImage 启动信息

run sdboot_zImage 
Copying Linux from MMC flash to RAM...
reading zImage
4165032 bytes read in 266 ms (14.9 MiB/s)
Read dtb file ...
reading devicetree.dtb
9846 bytes read in 13 ms (739.3 KiB/s)
## Flattened Device Tree blob at 02000000
   Booting using the fdt blob at 0x2000000
   Loading Device Tree to 1eb14000, end 1eb19675 ... OK


Starting kernel ...

#uImage ramdisk启动信息

Zynq> run sdboot_ramdisk 
Device: sdhci@e0100000
Manufacturer ID: 3
OEM: 5344
Name: SS08G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
** Unable to read file uEnv.txt **
Copying Linux from SD to RAM...
reading uImage
3757760 bytes read in 241 ms (14.9 MiB/s)
reading devicetree.dtb
9846 bytes read in 14 ms (686.5 KiB/s)
reading uramdisk.image.gz
856999 bytes read in 76 ms (10.8 MiB/s)
## Booting kernel from Legacy Image at 02080000 ...
   Image Name:   Linux-4.9.0-xilinx
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3757696 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 04000000 ...
   Image Name:   
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    856935 Bytes = 836.9 KiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
   Booting using the fdt blob at 0x2000000
   Loading Kernel Image ... OK
   Loading Ramdisk to 1ea48000, end 1eb19367 ... OK
   Loading Device Tree to 1ea42000, end 1ea47675 ... OK

Starting kernel ...

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值