how to erase uboot env section on emmc via linux command

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to erase uboot env section on emmc via linux command

2,771 Views
才俊欧
Contributor III

I used L3.14.28 and u-boot-2014 to start my imx6s board.

If I didn't made a mistake, the uboot code in  u-boot/include/configs/mx6sabre_common.h shows the uboot args section in emmc:
#if defined CONFIG_ENV_IS_IN_MMC :
   #define CONFIG_ENV_SIZE (8 * 1024)
   #define CONFIG_ENV_OFFSET (8 * 64 * 1024)

In mfg tool's config file uc12.xml , I see the uboot section is :

      /dev/mmcblk$mmcboot0 bs=512 seek=2

so my shell to write uboot is:     

   ##clear u-boot arg
   dd if=/dev/zero of=/dev/mmcblk3 bs=1k seek=512 conv=fsync count=8

   ##burn uboot
   echo 0 > /sys/block/mmcblk3boot0/force_ro
   dd if=$FILE of=/dev/mmcblk3boot0 bs=512 seek=2
   echo 1 > /sys/block/mmcblk3boot0/force_ro
   echo 8 > /sys/block/mmcblk3/device/boot_config

First, I burn an init uboot, and set its bootdelay=1;

Then I boot system, run the shell and reset my board, I confirmed the uboot is updated, but the enviroment not erased.

the bootdelay still equal 1.

Why?

Tags (3)
0 Kudos
1 Reply

1,708 Views
才俊欧
Contributor III

It's my fault, the defult bootdelay was set to 1 in  file ./include/configs/mx6sabre_common.h.

0 Kudos