[TEZI] u-boot update

Hi all,

During Toradex Easy Installer process :

  • Is u-boot stored in emmc of apalis
    module replaced by the one stored on
    USB stick ?
  • Or we have to proceed by
    this way ? link text. If so,
    “Then u-boot will adopt the default
    environment setting compiled from
    u-boot source code where you can add
    what you want.” do you talk about
    u-boot that we put in the directory
    of our custom image ? (SPL +
    u-boot.imx ?)

Cause I try to update uboot vidargs variable (edit with yocto append recipe) and it doesn’t seem to work.

Thanks

During Toradex Easy Installer process :

Is u-boot stored in emmc of apalis module replaced by the one stored on USB stick ?

Yes.

Or we have to proceed by this way ? link text. If so, “Then u-boot will adopt the default environment setting compiled from u-boot source code where you can add what you want.” do you talk about u-boot that we put in the directory of our custom image ? (SPL + u-boot.imx ?)

Those are really two separate things. While U-Boot does get replaced as mentioned above U-Boot’s environment is not affected by that and would need separate erasing if desired/required.

Cause I try to update uboot vidargs variable (edit with yocto append recipe) and it doesn’t seem to work.

Then it probably does re-use whatever U-Boot environment still stored on the eMMC. It will only fall back to using U-Boot’s built-in one in case none is found on flash.

Ok but does u-boot stored on USB stick come with its own environment variables ?
What is the way to proceed ? I mean, to change u-boot default environment with TEZI process ?

Ok but does U-Boot stored on USB stick come with its own environment variables?

Yes, any U-Boot binary has its own default compiled-in but it will only be used if no environment is already found on flash.

What is the way to proceed? I mean, to change U-Boot default environment with TEZI process?

The Toradex Easy Install has nothing per se to do with any U-Boot default environment really. So if you desire to modify the default environment make sure to compile that one into your U-Boot binary and make sure no environment is stored on flash in order for your custom built-in one to really get used.

To resume :
If we erase the actual default environment by transfering a blank file (like it described in the other post), u-boot default environment will disappear and it will be replaced by the default environment of new compiled u-boot ?

To resume : If we erase the actual default environment by transfering a blank file (like it described in the other post), u-boot default environment will disappear and it will be replaced by the default environment of new compiled u-boot ?

Yes.

Ok so I may have an issue in the application of the patch :

    diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
    index 8dce5af..ff0ab7f 100644
    --- a/include/configs/apalis_imx6.h
    +++ b/include/configs/apalis_imx6.h
    @@ -286,10 +286,10 @@
     		"load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \
     		"source ${loadaddr}\0" \
     	"splashpos=m,m\0" \
    -	"vidargs=mxc_hdmi.only_cea=1 " \
    -		"video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 " \
    -		"video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off " \
    -		"fbmem=32M\0 "
    +	"vidargs=video=mxcfb0:dev=ldb,if=LVDS888 " \
    +		"video=mxcfb1:dev=hdmi,1280x1024M@60,if=RGB24 " \
    +		"video=mxcfb2:off video=mxcfb3:off " \
    +		"bmem=128M\0 "
     
     /* Miscellaneous configurable options */
     #define CONFIG_SYS_LONGHELP

Tree :
recipe-bsp:

  • u-boot : u-boot-toradex_git.bbapend + u-boot-toradex directory
  • u-boot-toradex : uboot-env.patch

Content of u-boot-toradex_git.bbapend :

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "\
	file://uboot-env.patch \
"

This patch is provided by an append recipe file named u-boot-toradex_git.bbappend in a custom layer that is correctly added in the bblayer.conf.

Then I deploy SPL + u-boot/imx files in the USB directory in compliance of TEZI requirement. image.json file has an entry to put an empty file in u-boot environment variable. I then flash the apalis module by enter in recovery mode in u-boot to have TEZI UI.

U-boot environment variables remain the default one.

EDIT : There was an error in my bbappend file name. That’s ok now. Thanks for your help

You are very welcome and thanks for letting us know.

Note that if there is a environment written to the flash U-Boot will favor the one on flash over the compiled-in. (e.g. when somebody in development used saveenv…)

Future Toradex Easy Installer (see Issue #21484) will have a method to erase the complete flash before writing the new image, which guarantees that there is no environment present on the flash and U-Boot will fall back to the compiled-in environment.