AnsweredAssumed Answered

U-boot cannot cover by using mfgtool

Question asked by tsung li wang on Aug 21, 2018
Latest reply on Aug 22, 2018 by Diego Adrian Cuevas

Hi community,


I'm working on i.MX6 Quad sabre-SD platform and build Android 6 as my image.

Here is the situation now.

On the first burning image, u-boot seems working well.

And I tried to change the u-boot environment via console and saveenv to change environment settings.


After that I tried to update image via mfgtool to cover the u-boot environment which I had changed before.

However it did not success, u-boot environment is still the same.


The strange thing is that mfgtool still show burning success to me.

Below is my ucl2.xml.

<STATE name="BootStrap" dev="MX6D" vid="15A2" pid="0061"/>
<STATE name="BootStrap" dev="MX6Q" vid="15A2" pid="0054"/>
<STATE name="Updater" dev="MSC" vid="066F" pid="37FF"/>
<LIST name="eMMC-Android" desc="Choose eMMC as media">
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6q%plus%%board%_sd.imx" ifdev="MX6Q">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6dl%plus%%board%_sd.imx" ifdev="MX6D">Loading U-boot</CMD>

<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>

<CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>

<CMD state="BootStrap" type="load" file="firmware/zImage-imx6q-%board%%ldo%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6dl-%board%%ldo%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6D">Loading device tree.</CMD>

<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

<!-- create partition -->
<CMD state="Updater" type="push" body="send" file="">Sending partition shell</CMD>
<CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
<CMD state="Updater" type="push" body="$ sh /dev/mmcblk%mmc%"> Partitioning...</CMD>

<!-- burn uboot -->
<CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=768 conv=fsync count=512">clear u-boot arg</CMD>
<CMD state="Updater" type="push" body="$ echo 0 > /sys/block/mmcblk%mmc%boot0/force_ro">access boot partition 1</CMD>
<CMD state="Updater" type="push" body="send" file="files/android/%folder%/u-boot-imx%soc%%ldo%.imx" >Sending u-boot.bin</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%boot0 bs=512 seek=2 ">write U-Boot to sd card</CMD>
<CMD state="Updater" type="push" body="$ echo 1 > /sys/block/mmcblk%mmc%boot0/force_ro"> re-enable read-only access </CMD>
<CMD state="Updater" type="push" body="$ sync">Sync file system</CMD>

<!-- burn kernel -->
<CMD state="Updater" type="push" body="$ mmc bootpart enable 1 1 /dev/mmcblk%mmc%">enable boot partion 1 to boot</CMD>
<CMD state="Updater" type="push" body="$ ls -l /dev/mmc* ">Formatting sd partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/android/%folder%/boot-imx%soc%%ldo%.img" >Sending and writting boot.img</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%p1">write boot.img</CMD>

<!-- burn system -->
<CMD state="Updater" type="push" body="$ mkfs.ext4 -E nodiscard /dev/mmcblk%mmc%p5">Formatting system partition</CMD>
<CMD state="Updater" type="push" body="$ mkfs.ext4 -E nodiscard /dev/mmcblk%mmc%p6">Formatting cache partition</CMD>
<CMD state="Updater" type="push" body="$ mkfs.ext4 -E nodiscard /dev/mmcblk%mmc%p7">Formatting device partition</CMD>
<CMD state="Updater" type="push" body="$ mount -o remount,size=1500M rootfs /">change size of tmpfs</CMD>
<CMD state="Updater" type="push" body="send" file="files/android/%folder%/system.img" >Sending system.img</CMD>
<CMD state="Updater" type="push" body="$ simg2img $FILE /dev/mmcblk%mmc%p5">writting sparse system.img</CMD>

<!-- Write userdata.img is optional, for some customer this is needed, but it's optional. -->
<!-- Also, userdata.img will have android unit test, you can use this to do some auto test. -->
<!-- <CMD state="Updater" type="push" ="ignore" body="pipe dd of=/dev/mmcblk0p7" file="file/android/userdate.img"> Sending userdata.img(optional) </CMD>
<CMD state="Updater" type="push" body="frf">flush the memory.</CMD> -->

<!-- burn recovery -->
<CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk%mmc%p2 bs=512" file="files/android/%folder%/recovery-imx%soc%%ldo%.img">Sending and writting recovery.img</CMD>
<CMD state="Updater" type="push" body="$ sync">Sync file system</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>

<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>



How can I solve this problem?

Please help!

 Thanks in Advanced!