Qiang Li - Mpu Se

MFGTool profile to update ubuntu image on iMX53 SMD board -blog archive

Discussion created by Qiang Li - Mpu Se Employee on Jul 30, 2012

Updated to MFGTool profile file "Mfgtools-Rel-11.09.01\Profiles\MX53 Linux Update\OS Firmware\ucl.xml"


<LIST name="MX53SMD-eMMC4.4-ubuntu" desc="Choose eMMC4.4 as media">
<CMD type="boot" body="BootStrap" file ="u-boot-mx53-smd.bin" >Read from DDR script from U-Boot to init DDR Memory.</CMD>
<CMD type="load" file="uImage" address="0x70800000"
    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Doing Kernel.</CMD>
<CMD type="load" file="initramfs.cpio.gz.uboot" address="0x70B00000"
    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Doing Initramfs.</CMD> 
<CMD type="jump" > Jumping to OS image. </CMD>
<CMD type="find" body="Updater" timeout="180"/>

<CMD type="push" body="mknod block,mmcblk0,/dev/mmcblk0,block"/>
<CMD type="push" body="send" file="mksdcard.sh.tar">Sending partition shell</CMD>
<CMD type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
<CMD type="push" body="$ sh mksdcard.sh /dev/mmcblk0"> Partitioning...</CMD>
<CMD type="push" body="mknod block/mmcblk0,mmcblk0p1,/dev/mmcblk0p1,block"/>
  Comment the following 1 command if only flashing bootloader to normal parition for normal boot
<CMD type="push" body="$ echo 1 > /sys/devices/platform/mxsdhci.2/mmc_host/mmc2/mmc2:0001/boot_config">access boot partition 1</CMD>
<CMD type="push" body="send" file="files/u-boot-mx53-smd.bin">Sending U-Boot</CMD>
<CMD type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2 skip=2">write U-Boot to sd card</CMD>
  Comment the following 2 command if only flashing bootloader to normal parition for normal boot
<CMD type="push" body="$ echo 8 > /sys/devices/platform/mxsdhci.2/mmc_host/mmc2/mmc2:0001/boot_config">access user partition,and enable boot partion1 to boot</CMD>
<CMD type="push" body="$ echo 2 > /sys/devices/platform/mxsdhci.2/mmc_host/mmc2/mmc2:0001/boot_bus_config">Set boot width is 8bits</CMD>
<CMD type="push" body="send" file="files/uImage">Sending kernel uImage</CMD>
<CMD type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2048">write kernel image to sd card</CMD>
<CMD type="push" body="$ mkfs.ext3 -j /dev/mmcblk0p1">Formatting rootfs partition</CMD>
<CMD type="push" body="$ mkdir -p /mnt/mmcblk0p1"/>
<CMD type="push" body="$ mount -t ext3 /dev/mmcblk0p1 /mnt/mmcblk0p1"/>
<CMD type="push" body="pipe tar -zxv -C /mnt/mmcblk0p1" file="files/lucid_1108.tar.gz">Sending and writting rootfs</CMD>
<CMD type="push" body="frf">Finishing rootfs write</CMD>
<CMD type="push" body="$ umount /mnt/mmcblk0p1">Unmounting rootfs partition</CMD>
<CMD type="push" body="$ echo Update Complete!">Done</CMD>