How does NAND boot to get boot variables from boot partition?

cancel
Showing results for 
Search instead for 
Did you mean: 

How does NAND boot to get boot variables from boot partition?

118 Views
Contributor II

Hi,

I have u-boot and u-boot environment in imx6ull NAND MTD partitions:

0: boot 0x00400000 0x00000000 0
1: ubootenv 0x00100000 0x00400000 0

After running zImage-initramfs to use kob to install u-boot.imx-nand to iMX6ULL MTD partition 0 boot, how will the NAND boot to get bootargs and bootcmd from boot partition?

Many blogs advised not to use setenv in u-boot or fw_setenv in Linux, but to get boot variables from the u-boot, but how?

Appreciate your advice how to get boot varaiables from the u-boot.imx-nand.

Thank you.

Labels (3)
Tags (1)
0 Kudos
3 Replies

5 Views
NXP TechSupport
NXP TechSupport

Hi jupiter

one can look at "defined(CONFIG_ENV_IS_IN_NAND" in

mx6ullevk.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 Kudos

5 Views
Contributor II

Hi igor,

Thanks for the response. this is a iMX6ULL EVK customized board, I have already set up the NAND ENV parameters in mx6ullevk.h based on following customized ubootenv partition in NAND:

0: boot 0x00400000 0x00000000 0


1: ubootenv 0x00100000 0x00400000 0

$ cat mx6ullevk.h

.........

#define CONFIG_ENV_OFFSET 0x400000


#define CONFIG_ENV_SECT_SIZE 0x100000


#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE

........

Did I get wrong for setting up ENV_OFFSET and ENV_SECT_SIZE based on the ubootenv NAND partition offset and size? I did notice your reference u-boot source version is 2019 where my u-boot version is 2018 defined by Zeus meta-freescale.

Thank you.

Kind regards,

jupiter

0 Kudos

5 Views
NXP TechSupport
NXP TechSupport

Hi jupiter

 

this is general uboot question and may be posted on uboot mail list

U-Boot Info Page 

 

Best regards
igor

0 Kudos