[U-Boot] Bug in saveenv handling?
for-gmane at mutluit.com
Tue Apr 9 21:21:44 UTC 2019
U.Mutlu wrote on 04/09/2019 11:01 PM:
> U.Mutlu wrote on 04/09/2019 10:53 PM:
>> Frank Wunderlich wrote on 04/09/2019 09:39 PM:
>>> this looks for me like the CONFIG_ENV_OFFSET+CONFIG_ENV_SIZE is overlapping
>>> uboots code
>>> can you post these values and position of uboot and its size for your device?
$ ls -l u-boot-sunxi-with-spl.bin
-rw-r--r-- 1 xy xy 479836 Apr 9 17:55 u-boot-sunxi-with-spl.bin
I used the following to write u-boot to the SD card (/dev/sdb):
# dd if=/dev/zero of=/dev/sdb bs=1k count=1023 seek=1
# dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
If you need more data let me know pls.
>>> which env-storage do you use (EMV_IN_MMC or ENV_FAT)?
>> I looked up in the .config file:
>> # U-Boot 2019.04-rc4 Configuration
>> $ grep CONFIG_ENV_OFFSET .config
>> $ grep CONFIG_ENV_SIZE .config
>> $ grep EMV_IN_MMC .config
> Maybe EMV_ is a typo and should rather be ENV_ ?
> $ grep -i EMV_ .config
> $ grep -i ENV_ .config
> # CONFIG_SYS_CONSOLE_ENV_OVERWRITE is not set
> # CONFIG_SPL_ENV_SUPPORT is not set
> # CONFIG_CMD_ENV_CALLBACK is not set
> # CONFIG_CMD_ENV_FLAGS is not set
> # CONFIG_ENV_IS_IN_EEPROM is not set
> # CONFIG_ENV_IS_IN_EXT4 is not set
> # CONFIG_ENV_IS_IN_FLASH is not set
> # CONFIG_ENV_IS_IN_MMC is not set
> # CONFIG_ENV_IS_IN_NAND is not set
> # CONFIG_ENV_IS_IN_NVRAM is not set
> # CONFIG_ENV_IS_IN_ONENAND is not set
> # CONFIG_ENV_IS_IN_REMOTE is not set
> # CONFIG_ENV_IS_IN_SPI_FLASH is not set
> # CONFIG_ENV_IS_IN_UBI is not set
> # CONFIG_USE_DEFAULT_ENV_FILE is not set
> # CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set
>> $ grep ENV_FAT .config
>> I guess the uboot.env is a hidden file, but occassionally (esp. after
>> saveenv & reboot) I see this file as a normal file in /, not hidden.
>> I used "Lamobo_R1_defconfig" as basis and made just a few
>> irrelevant minor changes in make menuconfig.
>> It's actually a Banana Pi R1 board.
>>>> Gesendet: Dienstag, 09. April 2019 um 21:05 Uhr
>>>> Von: "U.Mutlu" <for-gmane at mutluit.com>
>>>> It seems u-boot has overwritten parts of itself on the storage medium (uSD
>>>> with FAT boot partition).
More information about the U-Boot