Change u-Boot variable from user-space

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Change u-Boot variable from user-space

ソリューションへジャンプ
3,036件の閲覧回数
khang_letruong
Senior Contributor III

Dear Community,

I would like to know if there's simple wait to change the fdtfile variable from user-space, please ? My user-case is that I would like to switch the dtb for the selected camera sensor without entering u-Boot's prompt.

I saw the method of using fw_printenv/fw_setenv and it seems that one needs to append the u-boot-fw-utils into image's rootfs :

 

IMAGE_INSTALL_append  += " u-boot-fw-utils"

 

Is that the correct and enough way?

Thanks in advance and best regards,

Khang

0 件の賞賛
返信
1 解決策
3,009件の閲覧回数
khang_letruong
Senior Contributor III

Hi @chinnnu ,

Thanks for your answers. In fact, I am able to change u-Boot's variable from Linux user-space with the adding of  u-boot-fw-utils to make appear fw_printenv/fw_setenv in the rootfs as in my initial post.

Regards,
K.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
3,010件の閲覧回数
khang_letruong
Senior Contributor III

Hi @chinnnu ,

Thanks for your answers. In fact, I am able to change u-Boot's variable from Linux user-space with the adding of  u-boot-fw-utils to make appear fw_printenv/fw_setenv in the rootfs as in my initial post.

Regards,
K.

0 件の賞賛
返信
3,014件の閲覧回数
chinnnu
Contributor I

Hello.... In order to modify the uboot environment variables from user space we will need a program called fw_setenv, we can compile this program ourselves from the u-boot sources, follow the instructions in this wiki page and then proceed to compile with (don't modify the .h file as it says in the tools/env/README file): regards mrtv technical team.

make env 
cp fw_printenv fw_setenv

The next thing we will need is the fw_env.config file with the appropiate settings for our board. Here comes the confusion In this file you have to specify: MTD device name Device Offset Environment Size Flash sector size Number of sectors (ignored in NOR)

0 件の賞賛
返信
3,014件の閲覧回数
chinnnu
Contributor I

Hello.... In order to modify the uboot environment variables from user space we will need a program called fw_setenv, we can compile this program ourselves from the u-boot sources, follow the instructions in this wiki page and then proceed to compile with (don't modify the .h file as it says in the tools/env/README file):

0 件の賞賛
返信