i.MX51 EVK Changing Env

Document created by jesseg Employee on Jul 30, 2012Last modified by Jodi Paul on May 15, 2013
Version 4Show Document
  • View in full screen mode

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

Attachments

    Outcomes