Skip to main content
Smedi
Associate III
May 5, 2020
Question

How to add new uboot environment variable in yocto linux

  • May 5, 2020
  • 1 reply
  • 2258 views

Hello,

I am using STM32MP157C-DK2 evalution board and I successfully booted the board with STM yocto,now I was trying to add a new environment variable in the Uboot.But I was not able to get how to do that.Can anyone suggest how to do this.

Regards

Srikanth.

This topic has been closed for replies.

1 reply

mleo
Visitor II
May 6, 2020

Hello Srikanth,

E.g. you can carefully adapt following patch file - look for CONFIG_EXTRA_ENV_SETTINGS:

/layers/meta-st/meta-st-stm32mp/recipes-bsp/u-boot/u-boot-stm32mp/0005-ARM-v2018.11-stm32mp-r1-MISC.patch

After rebuild you can also verify that your new varible was correctly added in your build directory

/build-openstlinuxweston-stm32mp1/tmp-glibc/work-shared/stm32mp1/uboot-source/include/configs/stm32mp1.h

Best regards,

Milan

Smedi
SmediAuthor
Associate III
May 9, 2020

Hai mleo,

Thanks for the reply I found the patch file in the path suggested by I came to know from that patch yocto is getting some of the uboot environment variables like kernel_addr..etc.But I was new to this yocto can you help me how to add my variable and generate the patch file to get the uboot environment variable.

Regards

Srikanth.