Vim_Uboot_170121 for SD card uses emmc storage backend

I’ve erased the eMMC storage by:

sudo dd if=dev/zero of=/dev/mmcblk1 bs=1M count=100

but afterwards I was unable to save changes to the uboot environment when starting from uSD card.

The Vim_Uboot_161008 u-boot version for uSD cards doesn’t have this issue.

I tested it with the Vim_Uboot_161008 u-boot version for uSD cards, it also was unable to save changes to the uboot environment.

kvim#setenv ipaddr 192.168.1.251
kvim#saveenv
Saving Environment to aml-storage...
get partition info failed !!

kvim#tftp 12000000 kvim.dtb
kvim#store dtb write 12000000
kvim#setenv ipaddr 192.168.1.251
kvim#saveenv
Saving Environment to aml-storage...
mmc env offset: 0x27400000 
Writing to MMC(1)... done

If you erase the eMMC storage by
sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=100
The all informations is erased include the dtb that it is need for saving changes to the uboot environment.
You need to download the dtb before you save changes to the uboot environment.
About how to download the dtb , You can reference to this

Yes I know. I’ve done this successfully with the 161008 version stored on uSD card, but I was was unable to do this with the 170121 version stored on uSD card, because this version tried to access the u-boot partitions on eMMC (instead of uSD) which have been wiped before. You may try this by yourself once again with the 170121 version.

I have done this successfully with the 170121 version.

kvim#setenv ipaddr 192.168.1.251
kvim#saveenv
Saving Environment to aml-storage...
mmc env offset: 0x27400000 
Writing to MMC(1)... done

You may try this again with 170121 version and provide the log message.
Thanks.

Strange enough I wasn’t able able to reproduce this issue, I’ll close it from now on.

I know what I’ve done wrong. I’ve created the first partition starting at sector 0x800 (2048) instead of sector 0x6A000 (=0xd400000 / 0x200). So creating the file system on the boot partition damages the u-boot partition table and restoring the u-boot partition table (i.e. store dtb ...) damages the boot file system, yielding any kind of strange error massages.