This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

335x uboot从emmc启动zImage



1.当uboot从emmc启动时,看到有如下配置代码:

mmc dev 1

if mmc rescan; then

setenv mmcdev 1

setenv devtype mmc

setenv bootpart 1:2

run findfdt

run mmcboot

可见emmc配置为mmc1时,设定启动分区为emmc的第2个分区。但是在格式化emmc时,将其格式化为2个分区,第一个为FAT分区,里面放有uEnv.txt, 设备树,zImage等;第二个分区为EXT4分区,存放解压后的rootfs。

2.在执行mmcboot时,还有如下配置:

bootdir=/boot

bootfile=zImage

loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}

可见,uboot加载到loadaddr中的zImage来自mmc 1:2  /boot/zImage,这个正是emmc第二个分区文件系统/boot目录下的zImage。

问题是:如果uboot从emmc第二个EXT4分区的/boot目录下加载zImage,为什么还要格式化第一个FAT分区,存放设备树,zImage呢?且后面更新zImage,也不会更新文件系统,那这样,uboot启动的就不是修改后的zImage,而仍是/boot目录下的zImage。

/****************************************************/

请高手帮忙回答,非常感谢,不知道的请不要乱回答