[U-Boot] environment reliability after "env default -f -a"

Sam Protsenko semen.protsenko at linaro.org
Thu Nov 15 20:02:47 UTC 2018


Hi all,

It was noticed that after resetting the U-Boot environment ("env
default -f -a") some variables are missing, and being added back after
"reset". E.g. in my case it's next variables:

    board_name=am57xx_evm_reva3
    ethaddr=fc:0f:4b:7b:27:9c
    fastboot.board_rev=A.3A
    fastboot.cpu=DRA752
    fastboot.secure=GP
    fastboot.userdata_size=2352351
    fdtcontroladdr=fdf0d188
    scsidevs=0
    serial#=0c0090170f6e0122
    stderr=serial at 48020000
    stdin=serial at 48020000
    stdout=serial at 48020000
    ver=U-Boot 2018.11-00028-g3ad6ba7780 (Nov 15 2018 - 21:17:57 +0200)

Most likely those variables are being set on board_late_init(), so we
don't see them after "env default -f -a".

My question is: do we rely on environment to be the same after doing
"env default -f -a", comparing to environment after reboot? If so,
should I provide some sort of env callback to run corresponding
routines on "env default" event (like [1])?

P.S. As I understand, we don't rely on this. But I didn't find this in
documentation, so asking just to be completely sure.

Thanks!

[1] https://pastebin.ubuntu.com/p/z9bhsJ9cTG/


More information about the U-Boot mailing list