[Yocto] Preset u-boot variables for the first boot?

Hi
I’m using Yocto / OpenEmbedded to generate iomages for our KTS based on Colibr-T20.
Our KTS touchscreen is a portrait resolution 480x800.
Everytime I flash a new image to the device, I need to initialize a variable in the bootloader, as follow:

setenv vidargs 'video=tegrafb0:480x800M-16@60'
saveenv    

Although it takes me onbly few seconds to achieve it, I would like to know if there’s a way to have these values already setup in some u-boot* files generated by Yocto ?
So that the values are already set for the first boot ?

Karim

There are a couple steps you can take. First you can define the default vidargs setting in the Colibri T20 U-boot header. This change can be applied with a patch by adding it to the Yocto project U-boot recipe. Example of patching the u-boot environment with a yocto recipe is provided in the following webinar:

You may also make it part of a production flashing script to reset the environment variables to those defined by default in the U-boot source and then explicitly set vidargs as you demonstrated above, but automated by a script. An example of a production programming script for Linux.

Hi Brandon,

Thanks a lot for your suggestions !
Firstly, I followed the first option: patching the boot header file and have the correct variable when the boot is flashed.

The last link might also interrest me in a “production environment”.

Thanks a lot.
K.