How to change enviroment variables in FSPI U-Boot?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change enviroment variables in FSPI U-Boot?

Jump to solution
96 Views
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 Kudos
1 Solution
32 Views
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
33 Views
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
32 Views
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 Kudos