[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Solved: cubox-i does not boot after upgrade to bullseye



Am Mittwoch, 29. Dezember 2021, 22:18:31 CET schrieb Vagrant Cascadian:
> On 2021-12-29, Rainer Dorsch wrote:
> > Am Mittwoch, 29. Dezember 2021, 19:33:20 CET schrieb Vagrant Cascadian:
> >> If you've used "saveenv" to save the u-boot environment variables, even
> >> if you upgrade u-boot, the environment will remain frozen in the state
> >> when you ran "saveenv".
> >> 
> >> I strongly discourage using "saveenv" as this makes upgrading u-boot
> >> more difficult as you end up with inconsistent values between the u-boot
> >> version you're running and the environment you've saved.  This will
> >> often work fine, although as you've discovered, sometimes updates to the
> >> environment fixes bugs.
> >> 
> >> You have to erase or overwrite the environment area on the microSD to
> >> get new defaults; not sure off the top of my head where exactly this is
> >> for the cubox-i.
> >> 
> >> If there is no saved environment, u-boot uses built-in defaults from the
> >> version of u-boot you're running.
> > 
> > Wouldn't
> > 
> > => env default -a
> > 
> > enforce a reset to a default environment
> > 
> > https://www.vermasachin.com/posts/3-u-boot-environment-variables/
> 
> Only for the running u-boot, it will load from the environment at next
> boot... and if you use saveenv, it will save exactly that
> environment... and possibly some other quirks such as missing or changed
> auto-detected environment variables at boot which can cause
> inconsistancies if you then run saveenv.
> 
> To really reset it for the cubox-i, you need to overwrite at least the
> beginning of address 0xFE000 on your boot media:
> 
>   $ grep ENV configs/mx6cuboxi_defconfig
>   CONFIG_ENV_SIZE=0x2000
>   CONFIG_ENV_OFFSET=0xFE000
> 
> The mx6cuboxi defconfig should also be findable in
> /usr/share/doc/u-boot-imx/configs/ if you have u-boot-imx:armhf
> 

Hmm....to delete the user environment I tried:

# dd if=/dev/zero of=/dev/mmcblk1 bs=512 seek=127 count=16 conv=fsync

(for reference:
root@bc-text:~# ls -l /dev/mmcblk1
brw-rw---- 1 root disk 179, 0 Jul 13 19:29 /dev/mmcblk1
root@bc-text:~# ls -l /dev/mmcblk0
ls: cannot access '/dev/mmcblk0': No such file or directory
root@bc-text:~# 

root@bc-text:/usr/share/doc/u-boot-imx# zgrep CONFIG_ENV_OFFSET /usr/share/
doc/u-boot-imx/configs/config.mx6cuboxi.gz 
CONFIG_ENV_OFFSET=0xFE000
root@bc-text:/usr/share/doc/u-boot-imx# zgrep CONFIG_ENV_SIZE /usr/share/doc/
u-boot-imx/configs/config.mx6cuboxi.gz 
CONFIG_ENV_SIZE=0x2000
root@bc-text:/usr/share/doc/u-boot-imx#

>>> 0xFE00/512
127.0
>>> 
)

and ended with

U-Boot SPL 2021.01+dfsg-5 (May 23 2021 - 04:32:45 +0000)
WDT:   Not found!
Trying to boot from MMC1
mmc_load_image_raw_sector: mmc block read error
spl_load_image_ext: ext4fs mount err - 0
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

(I tried this on a test microSD, so it does not matter if I break the 
installation)

Do you see what went wrong?


Thanks
Rainer


-- 
Rainer Dorsch
http://bokomoko.de/



Reply to: