[U-Boot] erasing u-boot from u-boot

I'm working with a 2015.04 version of U-Boot, I have it flashed on a i.MX6 DualLite based device in eMMC. I'm now trying to blow away that version of U-Boot from within U-Boot itself (so the device goes back into Serial Download mode).
I've tried erasing the mmc0 (eMMC), the command works, but for some reason every time I power cycle the device U-Boot is still present. How do I delete it?
=> mmc info Device: FSL_SDHC Manufacturer ID: 1e OEM: 1ff Name: TSEMM Tran Speed: 52000000 Rd Block Len: 512 MMC version 4.5 High Capacity: Yes Capacity: 3.5 GiB Bus Width: 8-bit Erase Group Size: 512 KiB HC WP Group Size: 8 MiB User Capacity: 3.5 GiB ENH WRREL User Enhanced Start: 0 Bytes User Enhanced Size: 3.5 GiB Boot Capacity: 4 MiB ENH RPMB Capacity: 4 MiB ENH => => mmc dev switch to partitions #0, OK mmc0(part 0) is current device => => mmc erase 2 8
MMC erase: dev # 0, block # 2, count 8 ...
Caution! Your devices Erase group is 0x400 The erase range would be change to 0x0~0x3ff
8 blocks erased: OK
Thanks. -Mike

On Mon, Jul 18, 2016 at 06:23:10PM +0000, Mike.Worster@Emerson.com wrote:
I'm working with a 2015.04 version of U-Boot, I have it flashed on a i.MX6 DualLite based device in eMMC. I'm now trying to blow away that version of U-Boot from within U-Boot itself (so the device goes back into Serial Download mode).
I've tried erasing the mmc0 (eMMC), the command works, but for some reason every time I power cycle the device U-Boot is still present. How do I delete it?
If you burned u-boot using mfgtool, the uboot will be burned into boot partition. However when uboot boots up, it will switch to user partition. You need to switch to read/write/erase boot partition in u-boot.
Regards, Peng.
=> mmc info Device: FSL_SDHC Manufacturer ID: 1e OEM: 1ff Name: TSEMM Tran Speed: 52000000 Rd Block Len: 512 MMC version 4.5 High Capacity: Yes Capacity: 3.5 GiB Bus Width: 8-bit Erase Group Size: 512 KiB HC WP Group Size: 8 MiB User Capacity: 3.5 GiB ENH WRREL User Enhanced Start: 0 Bytes User Enhanced Size: 3.5 GiB Boot Capacity: 4 MiB ENH RPMB Capacity: 4 MiB ENH => => mmc dev switch to partitions #0, OK mmc0(part 0) is current device => => mmc erase 2 8
MMC erase: dev # 0, block # 2, count 8 ...
Caution! Your devices Erase group is 0x400 The erase range would be change to 0x0~0x3ff
8 blocks erased: OK
Thanks. -Mike _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Hi Peng,
On Mon, Jul 18, 2016 at 10:48 PM, Peng Fan van.freenix@gmail.com wrote:
If you burned u-boot using mfgtool, the uboot will be burned into boot partition. However when uboot boots up, it will switch to user partition. You need to switch to read/write/erase boot partition in u-boot.
What are the commands you would suggest in this case?
I am able to flash the eMMC via dfu commands (like described in board/warp/README).
What method do you use in order to switch to read/write/erase boot partition in U-Boot?
Thanks

Hi Fabio,
On Mon, Jul 18, 2016 at 10:59:43PM -0300, Fabio Estevam wrote:
Hi Peng,
On Mon, Jul 18, 2016 at 10:48 PM, Peng Fan van.freenix@gmail.com wrote:
If you burned u-boot using mfgtool, the uboot will be burned into boot partition. However when uboot boots up, it will switch to user partition. You need to switch to read/write/erase boot partition in u-boot.
What are the commands you would suggest in this case?
I am able to flash the eMMC via dfu commands (like described in board/warp/README).
If you do not use mfgtool, all is ok.
If you use mfgtool, it will burn uboot to boot partition, not user partition.
What method do you use in order to switch to read/write/erase boot partition in U-Boot?
See: mmc partconf dev boot_ack boot_partition partition_access
You can use "mmc partconf 2 1 1 1" "erase uboot" "mmc partconf 2 1 1 0"
Not verified.
Regards, Peng.
Thanks
participants (3)
-
Fabio Estevam
-
Mike.Worster@Emerson.com
-
Peng Fan