Hi Rohit:
Ubuntu and Yocto configuration differ in several places mentioned below:
- the Ubuntu parameter and Yocto parameter in U-boot is different, and you'd better burn the u-boot image provided by the Yocto into iNAND when booting Yocto using the MFGTool.
- the Ubuntu partition map is different from Yocto.
When booting the Ubuntu, u-boot image is located starting from the 1KB address of SD Card, and uImage is located starting from 1MB address of SD Card, and filesystem is located in the first partition, whose type is ext.
When booting the Yocto, u-boot image is located starting from the 1KB address of SD Card, while uImage is stored in the first partition, whose type is FAT and filesystem is located in the second partition, whose type is ext.
I print the Yocto's u-boot parameter:
baudrate=115200
boot_fdt=try
bootcmd=mmc dev ${mmcdev};if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run ni
bootcmd_mfg=run mfgtool_args;bootm ${loadaddr} ${initrd_addr} ${fdt_addr};
bootdelay=1
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
ethact=FEC
ethaddr=00:04:9f:02:19:3c
ethprime=FEC
fdt_addr=0x18000000
fdt_file=imx6q-sabresd.dtb
fdt_high=0xffffffff
initrd_addr=0x12C00000
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x12000000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}
mfgtool_args=setenv bootargs console=ttymxc0,115200 rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F g_mass_storage.idPr
mmcargs=setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot}
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootm ${loadaddr} - ${fdt_addr}; else if ;
mmcdev=1
mmcpart=1
mmcroot=/dev/mmcblk0p2 rootwait rw
netargs=setenv bootargs console=${console},${baudrate} ${smp} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${uimage}; if test ${boot_fd;
script=boot.scr
uimage=uImage
So in order to boot the yocto into the iNAND, here is the referenced partition table :
partition 1 FAT (store the uImage and .dtb file)
partition 2 ext (store the filesystem)
you need manually create the first (FAT)partition and second(ext) partition, store the corresponding file into the partition.
if you wish to burn the Yocto into the iNAND using the MFGTool, I suggest that you need to modify the configuration in the MFGTool.
in <mfgtool dir>/Profiles/MX6Q Linux Update/OS Firmware/ucl2.xml
take the Sabre-SD for example.
<LIST name="Sabre-SD" desc="Choose SD as media">
<CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mx6q-sabresd.bin" >Loading U-boot</CMD>
<CMD state="BootStrap" type="load" file="uImage" address="0x10800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD>
<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>
<!-- -->
<CMD state="Updater" type="push" body="mknod block,mmcblk1,/dev/mmcblk1,block"/>
<CMD state="Updater" type="push" body="send" file="mksdcard.sh.tar">Sending partition shell</CMD>
<CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
<CMD state="Updater" type="push" body="$ sh mksdcard.sh /dev/mmcblk1"> Partitioning...</CMD>
<CMD state="Updater" type="push" body="mknod block/mmcblk1,mmcblk1p1,/dev/mmcblk1p1,block"/>
<CMD state="Updater" type="push" body="send" file="files/u-boot-mx6q-sabresd.bin">Sending u-boot.bin</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk1 bs=1k seek=1 skip=1 conv=fsync">write u-boot.bin to sd card</CMD>
<CMD state="Updater" type="push" body="send" file="files/uImage">Sending kernel uImage</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk1 bs=1M seek=1 conv=fsync">write kernel image to sd card</CMD>
<CMD state="Updater" type="push" body="$ mkfs.ext3 -j /dev/mmcblk1p1">Formatting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk1p1"/>
<CMD state="Updater" type="push" body="$ mount -t ext3 /dev/mmcblk1p1 /mnt/mmcblk1p1"/>
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk1p1" file="files/rootfs.tar.bz2">Sending and writting rootfs</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
<CMD state="Updater" type="push" body="$ umount /mnt/mmcblk1p1">Unmounting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>
you need to modify the xml script to do the following thing:
1. dd the u-boot image into the iNAND
2. create the first (FAT)partition and second(ext) partition, store the uImage and .dtb file into the FAT partition, store the filesystem files into the ext2 parition.
Before the MFGTool support the Yocto officially, this is gone be a little bit compliated for the beginners.