mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
uboot: import first variable from auxiliary environment
The U-Boot env file is generated by mkenvimage, which prefixes the variable data with a 4-byte CRC32 by default. ixpreboot.sh previously imported it with `env import -b` as per uboot docs(-b assume binary format (’0’ separated, “00” terminated).), which treats the buffer as raw binary and does not strip the CRC. As a result the first variable's name is parsed a part of CRC. Later variables import correctly because by then the parser is past the CRC. Switching to `env import -c` as per uboot docs (-c assume checksum protected environment format.) makes U-Boot validate and strip the CRC before parsing, so the first variable imports under its real name. Tested on: - QEMU Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
ebb37732f4
commit
4be5217a36
@@ -33,7 +33,7 @@ for tgt in "${boot_targets}"; do
|
||||
setexpr ixmenu_n ${ixmenu_n} + 1
|
||||
|
||||
if load ${devtype} ${devnum}:${auxpart} ${loadaddr} /uboot.env; then
|
||||
env import -b ${loadaddr} ${filesize} BOOT_ORDER DEBUG ethact
|
||||
env import -c ${loadaddr} ${filesize} BOOT_ORDER DEBUG ethact
|
||||
fi
|
||||
|
||||
if test -n "${DEBUG}"; then
|
||||
|
||||
Reference in New Issue
Block a user