AnsweredAssumed Answered

IMX.258 uboot and uImage update without Mfgtool

Question asked by recep yigitbasi on Jun 21, 2017
Latest reply on Jun 21, 2017 by recep yigitbasi

Hi Everyone.


I have an IMX.258 board and I want to update u-boot and uImage without MfgTool. Previously, board is programmed with Mtgtool. I can access to telnet console. u-boot and uImage files in filesystem.


rootfs has nandwrite and flash_eraseall commands and ability to write flash is successful. After write process, I am getting a dump with nanddump command. I am able to see the same file contents.


Mfgtool ucl.xm file contents here;(This is working)


<LIST name="UpdateUImage" desc="update kernel">
<CMD type="find" body="BootStrap" timeout="60"/>
<CMD type="init" body="Memory" file ="mx25ddr2.xml" />
<CMD type="load" file="uImage" address="0x80100000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Doing preLoad."</CMD>
<CMD type="load" file="initramfs.cpio.gz.uboot" address="0x80800000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Doing preLoad."</CMD>
<CMD type="load" file="u-boot.bin" address="0x83F00000" loadSection="OTH" setSection="APP" HasFlashHeader="TRUE" >Loading OS image.</CMD>
<CMD type="jump" > Jumping to OS image. </CMD>
<CMD type="find" body="Updater" timeout="180"> Wait for MSC device. </CMD>
<CMD type="push" body="mknod class/mtd,mtd0,/dev/mtd0">create new node: MTD0 </CMD>
<CMD type="push" body="mknod class/mtd,mtd1,/dev/mtd1">create new node: MTD1 </CMD>
<CMD type="push" body="mknod class/mtd,mtd2,/dev/mtd2">create new node: MTD2 </CMD>
<CMD type="push" body="mknod class/misc,ubi_ctrl,/dev/ubi_ctrl">create new node: ubi_ctrl </CMD>
<CMD type="push" body="$ flash_eraseall /dev/mtd0">Erasing image partition</CMD>
<CMD type="push" body="$ flash_eraseall /dev/mtd1">Erasing kernel partition</CMD>


<CMD type="push" body="$ echo 1 > /sys/devices/platform/mxc_nandv2_flash.0/disable_bi_swap">disable bi swap</CMD>
<CMD type="push" body="send" file="files/u-boot-signed.bin">Sending signed u-boot.bin</CMD>
<CMD type="push" body="$ nandwrite /dev/mtd0 $FILE -p">Flashing firmware</CMD>
<CMD type="push" body="$ echo 0 > /sys/devices/platform/mxc_nandv2_flash.0/disable_bi_swap">enable bi swap</CMD>

<CMD type="push" body="$ free && echo 3 > /proc/sys/vm/drop_caches && free" timeout="60">release memory</CMD>

<CMD type="push" body="send" file="files/uImage">Sending uImage</CMD>
<CMD type="push" body="$ nandwrite /dev/mtd1 $FILE -p">Flashing firmware</CMD>

<CMD type="push" body="frf">Finish Flashing NAND</CMD>
<CMD type="push" body="$ echo Update Complete!">Done</CMD>

Similarly, I am using these commands to program uboot and uImage in runtime(This is not working)

flash_eraseall /dev/mtd0
flash_eraseall /dev/mtd1
nandwrite /dev/mtd0 /home/user/u-boot-signed.bin -p
nandwrite /dev/mtd1 /home/user/uImage -p


But OS is not booting because after power off and power on, device is opened in programming mode. 



*Files using for programming are the same for both cases.(image files in filesystem and Mfgtool image files)

*Without u-boot write, only uImage write is working and booting successfully


Your suggestions are appreciated. Thank you