How to change enviroment variables in FSPI U-Boot?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to change enviroment variables in FSPI U-Boot?

跳至解决方案
1,595 次查看
q325mg
Contributor II

Hello,

First, what am trying to achive is to have the bootloader in the SPI Flash and the root file system at eMMC:

I already created the bootloader and my i.MX 8QuadXPlus MEK boots from the SPI Flash, see this post for additional detalis, and now when my board boots it tries to find and SD card to continue te boot process, but my intention is to have the root file system at the eMMC memory.

If I modify the next enviroment variables:

setenv mmcdev '0'
setenv mmcroot '/dev/mmcblk0p2 rootwait rw'
‍‍

And doing a:

saveenv‍‍
boot

the board continue booting with Linux from eMMC but after restarting my system, the values of mmcdev and mmcroot are lost even when I did the saveenv, so the board tries to find again the SD card for booting Linux

So my questions:

* is this is the correct way to achieve to have the bootloader in the SPI Flash and the root file system at eMMC?

* If so, the how I can modify my envorment variables to have the correct values and not lost at every restart?

Thanks

0 项奖励
回复
1 解答
1,531 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Isaias

one can look at #define CONFIG_SYS_MMC_ENV_DEV    in

imx8qxp_mek.h\configs\include - uboot-imx - i.MX U-Boot 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,532 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Isaias

one can look at #define CONFIG_SYS_MMC_ENV_DEV    in

imx8qxp_mek.h\configs\include - uboot-imx - i.MX U-Boot 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,531 次查看
q325mg
Contributor II

Thanks

In case any one needs, these instructions: TipsAndTricks/Patching the source for a recipe - Yocto Project made easier to modify and compile the recipe and code inside the Yocto enviroment

0 项奖励
回复