fw_env.config - finding the location of uboot.env

Electronic Consult

Hello all,

I'm in the process of implementing an A/B update strategy on an SD card using swupdate & the tools provided by libubootenv-bin. 

The issue is finding the location of uboot.env to (manually) configure etc/fw_env.config. I've tried so far include checking the default env location config in .config (it wasn't set) & modifications to the env recipe which did give me UBOOT_ENV_SIZE:

do_compile_append() {
    if [ -e "${ENV_FILEPATH}/${MACHINE}.txt" ]; then
        echo "Compile U-Boot environment for ${MACHINE}"
        ${B}/tools/mkenvimage ${MKENVIMAGE_EXTRA_ARGS} -s ${UBOOT_ENV_SIZE} ${ENV_FILEPATH}/${MACHINE}.txt -o ${ENV_FILENAME}
        echo "UBOOT_ENV_SIZE = ${UBOOT_ENV_SIZE}"  # Outputted 0x4000
        echo "No custom environment available for ${MACHINE}."

do_deploy_append() {
    if [ -e  ${B}/${ENV_FILENAME} ]; then
        install -Dm 0644 ${B}/${ENV_FILENAME} ${DEPLOYDIR}

My boot partition:

-rw-r--r-- 1    23469 Apr  6  2011 BOOT.BIN
-rw-r--r-- 1    5076348 Apr  6  2011 sama5d4_xplained.itb
-rw-r--r-- 1   595228 Apr  6  2011 u-boot.bin
-rw-r--r-- 1   16384 Apr  6  2011 uboot.env

with device listed as:

I had a look for uboot shell command that might output the location but without success.

Can anyone suggest a solution?

Many thanks