配置文件:
[PROFILE]
PLAYER=MX53 Linux Update
VERSION=2
[OPERATIONS]
UTP_UPDATE=OS Firmware,120,1
[OS Firmware]
UCL_INSTALL_SECTION=MX53-Loco
ucl文件:
<CMD type="boot" body="BootStrap" file ="u-boot-mx53-loco.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 class/mtd,mtd0,/dev/mtd0"/>
<CMD type="push" body="mknod class/mtd,mtd1,/dev/mtd1"/>
<CMD type="push" body="mknod class/mtd,mtd2,/dev/mtd2"/>
<!--<CMD type="push" body="mknod class/mtd,mtd3,/dev/mtd3"/>-->
<!--<CMD type="push" body="mknod class/mtd,mtd4,/dev/mtd4"/> -->
<CMD type="push" body="mknod block,mtdblock0,/dev/mtdblock0,block"/>
<CMD type="push" body="mknod block,mtdblock1,/dev/mtdblock1,block"/>
<CMD type="push" body="mknod block,mtdblock2,/dev/mtdblock2,block"/>
<!--<CMD type="push" body="mknod block,mtdblock3,/dev/mtdblock3,block"/>-->
<!--<CMD type="push" body="mknod block,mtdblock4,/dev/mtdblock4,block"/>-->
<CMD type="push" body="send" file="files/u-boot.bin">Sending U-Boot</CMD>
<CMD type="push" body="$ kobs-ng init --chip_0_device_path=/dev/mtd2 $FILE">Flashing Bootloader</CMD>
<CMD type="push" body="$ flash_eraseall /dev/mtd0">Erasing Kernel partition</CMD>
<CMD type="push" body="send" file="files/uImage">Sending Kernel Image</CMD>
<CMD type="push" body="$ nandwrite /dev/mtd0 -p $FILE">Flashing Kernel</CMD>
<CMD type="push" body="$ flash_eraseall /dev/mtd4">Erasing rootfs partition</CMD>
<CMD type="push" body="$ mkdir -p /mnt/mtdblock4"/>
<CMD type="push" body="$ mount -t jffs2 /dev/mtdblock4 /mnt/mtdblock4"/>
<CMD type="push" body="pipe tar -jxv -C /mnt/mtdblock4" file="files/rootfs.tar.bz2">Sending and writting rootfs</CMD>
<CMD type="push" body="frf">Finishing rootfs write</CMD>
<CMD type="push" body="$ umount /mnt/mtdblock4">Unmounting rootfs partition</CMD>
<CMD type="push" body="$ echo Update Complete!">Done</CMD>
|