i.MX51 EVK Changing Env

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX51 EVK Changing Env

i.MX51 EVK Changing Env

Changing the storage for U-boot environment variables

 

U-Boot on Freescale BSP has a compiling option that allows you to choose the storage for environment variables.

 

1 - Extract the u-boot source using LTIB:

./ltib -m prep -p u-boot 
 

2 - The source will be extracted to <ltib path>/rpm/BUILD/u-boot-2009.08

 

3 - On u-Boot source locate the i.MXEVK config file, <ltib path>/rpm/BUILD/u-boot-2009.08/include/configs/mx51_bbg.h

 

4 - To change the storage of variables environment to SD card, on this file, comment out CONFIG_FSL_ENV_IN_SF and define CONFIG_FSL_ENV_IN_MMC:

 

//#define CONFIG_FSL_ENV_IN_SF

 

#define CONFIG_FSL_ENV_IN_MMC

5 - Adjust CONFIG_ENV_SECT_SIZE and CONFIG_ENV_OFFSET accordingly. Recall that sd card read block size is 512B.

 

For example:

 

#define CONFIG_ENV_SECT_SIZE (256 * 512)

 

#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE

 

#if defined(CONFIG_FSL_ENV_IN_MMC)

 

#define CONFIG_ENV_IS_IN_MMC 1 #define CONFIG_ENV_OFFSET (1023 * 512)

 

6 - Save the file.

 

7 - Recompile u-boot:

./ltib -m scbuild -p u-boot 
 

8 - Your new compiled u-boot image will be saved at: <ltib path>/rpm/BUILD/u-boot-2009.08/u-boot.bin

Labels (1)
No ratings
Version history
Last update:
‎09-10-2020 02:55 AM
Updated by: