Skip to content
Snippets Groups Projects
README 189 KiB
Newer Older
Wolfgang Denk's avatar
Wolfgang Denk committed

		See also: doc/README.Modem

Board initialization settings:
------------------------------

During Initialization u-boot calls a number of board specific functions
to allow the preparation of board specific prerequisites, e.g. pin setup
before drivers are initialized. To enable these callbacks the
following configuration macros have to be defined. Currently this is
architecture specific, so please check arch/your_architecture/lib/board.c
typically in board_init_f() and board_init_r().

- CONFIG_BOARD_EARLY_INIT_F: Call board_early_init_f()
- CONFIG_BOARD_EARLY_INIT_R: Call board_early_init_r()
- CONFIG_BOARD_LATE_INIT: Call board_late_init()
- CONFIG_BOARD_POSTCLK_INIT: Call board_postclk_init()
Wolfgang Denk's avatar
Wolfgang Denk committed

Configuration Settings:
-----------------------

- CONFIG_SYS_LONGHELP: Defined when you want long help messages included;
Wolfgang Denk's avatar
Wolfgang Denk committed
		undefine this when you're short of memory.

Peter Tyser's avatar
Peter Tyser committed
- CONFIG_SYS_HELP_CMD_WIDTH: Defined when you want to override the default
		width of the commands listed in the 'help' command output.

- CONFIG_SYS_PROMPT:	This is what U-Boot prints on the console to
Wolfgang Denk's avatar
Wolfgang Denk committed
		prompt for user input.

- CONFIG_SYS_CBSIZE:	Buffer size for input from the Console
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_PBSIZE:	Buffer size for Console output
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_MAXARGS:	max. Number of arguments accepted for monitor commands
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_BARGSIZE: Buffer size for Boot Arguments which are passed to
Wolfgang Denk's avatar
Wolfgang Denk committed
		the application (usually a Linux kernel) when it is
		booted

- CONFIG_SYS_BAUDRATE_TABLE:
Wolfgang Denk's avatar
Wolfgang Denk committed
		List of legal baudrate settings for this board.

- CONFIG_SYS_CONSOLE_INFO_QUIET
Wolfgang Denk's avatar
Wolfgang Denk committed
		Suppress display of console information at boot.
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_CONSOLE_IS_IN_ENV
Wolfgang Denk's avatar
Wolfgang Denk committed
		If the board specific function
			extern int overwrite_console (void);
		returns 1, the stdin, stderr and stdout are switched to the
Wolfgang Denk's avatar
Wolfgang Denk committed
		serial port, else the settings in the environment are used.

- CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
Wolfgang Denk's avatar
Wolfgang Denk committed
		Enable the call to overwrite_console().
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_CONSOLE_ENV_OVERWRITE
Wolfgang Denk's avatar
Wolfgang Denk committed
		Enable overwrite of previous console environment settings.

- CONFIG_SYS_MEMTEST_START, CONFIG_SYS_MEMTEST_END:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Begin and End addresses of the area used by the
		simple memory test.

- CONFIG_SYS_ALT_MEMTEST:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Enable an alternate, more extensive memory test.
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_MEMTEST_SCRATCH:
		Scratch address used by the alternate memory test
		You only need to set this if address zero isn't writeable

- CONFIG_SYS_MEM_TOP_HIDE (PPC only):
		If CONFIG_SYS_MEM_TOP_HIDE is defined in the board config header,
		this specified memory area will get subtracted from the top
		(end) of RAM and won't get "touched" at all by U-Boot. By
		fixing up gd->ram_size the Linux kernel should gets passed
		the now "corrected" memory size and won't touch it either.
		This should work for arch/ppc and arch/powerpc. Only Linux
		board ports in arch/powerpc with bootwrapper support that
		recalculate the memory size from the SDRAM controller setup
		will have to get fixed in Linux additionally.

		This option can be used as a workaround for the 440EPx/GRx
		CHIP 11 errata where the last 256 bytes in SDRAM shouldn't
		be touched.

		WARNING: Please make sure that this value is a multiple of
		the Linux page size (normally 4k). If this is not the case,
		then the end address of the Linux memory will be located at a
		non page size aligned address and this could cause major
		problems.

- CONFIG_SYS_LOADS_BAUD_CHANGE:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Enable temporary baudrate change while serial download

- CONFIG_SYS_SDRAM_BASE:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Physical start address of SDRAM. _Must_ be 0 here.

- CONFIG_SYS_MBIO_BASE:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Physical start address of Motherboard I/O (if using a
		Cogent motherboard)

- CONFIG_SYS_FLASH_BASE:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Physical start address of Flash memory.

- CONFIG_SYS_MONITOR_BASE:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Physical start address of boot monitor code (set by
		make config files to be same as the text base address
		(CONFIG_SYS_TEXT_BASE) used when linking) - same as
		CONFIG_SYS_FLASH_BASE when booting from flash.
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_MONITOR_LEN:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Size of memory reserved for monitor code, used to
		determine _at_compile_time_ (!) if the environment is
		embedded within the U-Boot image, or in a separate
		flash sector.
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_MALLOC_LEN:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Size of DRAM reserved for malloc() use.

- CONFIG_SYS_BOOTM_LEN:
		Normally compressed uImages are limited to an
		uncompressed size of 8 MBytes. If this is not enough,
		you can define CONFIG_SYS_BOOTM_LEN in your board config file
		to adjust this setting to your needs.

- CONFIG_SYS_BOOTMAPSZ:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Maximum size of memory mapped by the startup code of
		the Linux kernel; all data that must be processed by
		the Linux kernel (bd_info, boot arguments, FDT blob if
		used) must be put below this limit, unless "bootm_low"
		enviroment variable is defined and non-zero. In such case
		all data for the Linux kernel must be between "bootm_low"
		and "bootm_low" + CONFIG_SYS_BOOTMAPSZ.	 The environment
		variable "bootm_mapsize" will override the value of
		CONFIG_SYS_BOOTMAPSZ.  If CONFIG_SYS_BOOTMAPSZ is undefined,
		then the value in "bootm_size" will be used instead.
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_BOOT_RAMDISK_HIGH:
		Enable initrd_high functionality.  If defined then the
		initrd_high feature is enabled and the bootm ramdisk subcommand
		is enabled.

- CONFIG_SYS_BOOT_GET_CMDLINE:
		Enables allocating and saving kernel cmdline in space between
		"bootm_low" and "bootm_low" + BOOTMAPSZ.

- CONFIG_SYS_BOOT_GET_KBD:
		Enables allocating and saving a kernel copy of the bd_info in
		space between "bootm_low" and "bootm_low" + BOOTMAPSZ.

- CONFIG_SYS_MAX_FLASH_BANKS:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Max number of Flash memory banks

- CONFIG_SYS_MAX_FLASH_SECT:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Max number of sectors on a Flash chip

- CONFIG_SYS_FLASH_ERASE_TOUT:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Timeout for Flash erase operations (in ms)

- CONFIG_SYS_FLASH_WRITE_TOUT:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Timeout for Flash write operations (in ms)

- CONFIG_SYS_FLASH_LOCK_TOUT
		Timeout for Flash set sector lock bit operation (in ms)

- CONFIG_SYS_FLASH_UNLOCK_TOUT
		Timeout for Flash clear lock bits operation (in ms)

- CONFIG_SYS_FLASH_PROTECTION
		If defined, hardware flash sectors protection is used
		instead of U-Boot software protection.

- CONFIG_SYS_DIRECT_FLASH_TFTP:
Wolfgang Denk's avatar
Wolfgang Denk committed

		Enable TFTP transfers directly to flash memory;
		without this option such a download has to be
		performed in two steps: (1) download to RAM, and (2)
		copy from RAM to flash.

		The two-step approach is usually more reliable, since
		you can check if the download worked before you erase
		the flash, but in some situations (when system RAM is
		too limited to allow for a temporary copy of the
Wolfgang Denk's avatar
Wolfgang Denk committed
		downloaded image) this option may be very useful.

- CONFIG_SYS_FLASH_CFI:
		Define if the flash driver uses extra elements in the
		common flash structure for storing flash geometry.

		This option also enables the building of the cfi_flash driver
		in the drivers directory
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_FLASH_CFI_MTD
		This option enables the building of the cfi_mtd driver
		in the drivers directory. The driver exports CFI flash
		to the MTD layer.

- CONFIG_SYS_FLASH_USE_BUFFER_WRITE
		Use buffered writes to flash.

- CONFIG_FLASH_SPANSION_S29WS_N
		s29ws-n MirrorBit flash has non-standard addresses for buffered
		write commands.

- CONFIG_SYS_FLASH_QUIET_TEST
		If this option is defined, the common CFI flash doesn't
		print it's warning upon not recognized FLASH banks. This
		is useful, if some of the configured banks are only
		optionally available.

- CONFIG_FLASH_SHOW_PROGRESS
		If defined (must be an integer), print out countdown
		digits and dots.  Recommended value: 45 (9..1) for 80
		column displays, 15 (3..1) for 40 column displays.

- CONFIG_SYS_RX_ETH_BUFFER:
		Defines the number of Ethernet receive buffers. On some
		Ethernet controllers it is recommended to set this value
Stefan Roese's avatar
Stefan Roese committed
		to 8 or even higher (EEPRO100 or 405 EMAC), since all
		buffers can be full shortly after enabling the interface
		on high Ethernet traffic.
Stefan Roese's avatar
Stefan Roese committed
		Defaults to 4 if not defined.

Wolfgang Denk's avatar
Wolfgang Denk committed
	Maximum number of entries in the hash table that is used
	internally to store the environment settings. The default
	setting is supposed to be generous and should work in most
	cases. This setting can be used to tune behaviour; see
	lib/hashtable.c for details.
- CONFIG_ENV_FLAGS_LIST_DEFAULT
- CONFIG_ENV_FLAGS_LIST_STATIC
	Enable validation of the values given to enviroment variables when
	calling env set.  Variables can be restricted to only decimal,
	hexadecimal, or boolean.  If CONFIG_CMD_NET is also defined,
	the variables can also be restricted to IP address or MAC address.

	The format of the list is:
		type_attribute = [s|d|x|b|i|m]
		access_atribute = [a|r|o|c]
		attributes = type_attribute[access_atribute]
		entry = variable_name[:attributes]
		list = entry[,list]

	The type attributes are:
		s - String (default)
		d - Decimal
		x - Hexadecimal
		b - Boolean ([1yYtT|0nNfF])
		i - IP address
		m - MAC address

	The access attributes are:
		a - Any (default)
		r - Read-only
		o - Write-once
		c - Change-default

	- CONFIG_ENV_FLAGS_LIST_DEFAULT
		Define this to a list (string) to define the ".flags"
		envirnoment variable in the default or embedded environment.

	- CONFIG_ENV_FLAGS_LIST_STATIC
		Define this to a list (string) to define validation that
		should be done if an entry is not found in the ".flags"
		environment variable.  To override a setting in the static
		list, simply add an entry for the same variable name to the
		".flags" variable.

- CONFIG_ENV_ACCESS_IGNORE_FORCE
	If defined, don't allow the -f switch to env set override variable
	access flags.

- CONFIG_SYS_GENERIC_BOARD
	This selects the architecture-generic board system instead of the
	architecture-specific board files. It is intended to move boards
	to this new framework over time. Defining this will disable the
	arch/foo/lib/board.c file and use common/board_f.c and
	common/board_r.c instead. To use this option your architecture
	must support it (i.e. must define __HAVE_ARCH_GENERIC_BOARD in
	its config.mk file). If you find problems enabling this option on
	your board please report the problem and send patches!

- CONFIG_SYS_SYM_OFFSETS
	This is set by architectures that use offsets for link symbols
	instead of absolute values. So bss_start is obtained using an
	offset _bss_start_ofs from CONFIG_SYS_TEXT_BASE, rather than
	directly. You should not need to touch this setting.


Wolfgang Denk's avatar
Wolfgang Denk committed
The following definitions that deal with the placement and management
of environment data (variable area); in general, we support the
following configurations:

- CONFIG_BUILD_ENVCRC:

	Builds up envcrc with the target environment so that external utils
	may easily extract it and embed it in final U-Boot images.

Wolfgang Denk's avatar
Wolfgang Denk committed

	Define this if the environment is in flash memory.

	a) The environment occupies one whole flash sector, which is
	   "embedded" in the text segment with the U-Boot code. This
	   happens usually with "bottom boot sector" or "top boot
	   sector" type flash chips, which have several smaller
	   sectors at the start or the end. For instance, such a
	   layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In
	   such a case you would place the environment in one of the
	   4 kB sectors - with U-Boot code before and after it. With
	   "top boot sector" type flash chips, you would put the
	   environment in one of the last sectors, leaving a gap
	   between U-Boot and the environment.

Wolfgang Denk's avatar
Wolfgang Denk committed

	   Offset of environment data (variable area) to the
	   beginning of flash memory; for instance, with bottom boot
	   type flash chips the second sector can be used: the offset
	   for this sector is given here.

	   CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE.
Wolfgang Denk's avatar
Wolfgang Denk committed

Wolfgang Denk's avatar
Wolfgang Denk committed

	   This is just another way to specify the start address of
	   the flash sector containing the environment (instead of
Wolfgang Denk's avatar
Wolfgang Denk committed

	- CONFIG_ENV_SECT_SIZE:
Wolfgang Denk's avatar
Wolfgang Denk committed

	   Size of the sector containing the environment.


	b) Sometimes flash chips have few, equal sized, BIG sectors.
	   In such a case you don't want to spend a whole sector for
	   the environment.

Wolfgang Denk's avatar
Wolfgang Denk committed

	   If you use this in combination with CONFIG_ENV_IS_IN_FLASH
	   and CONFIG_ENV_SECT_SIZE, you can specify to use only a part
Wolfgang Denk's avatar
Wolfgang Denk committed
	   of this flash sector for the environment. This saves
	   memory for the RAM copy of the environment.

	   It may also save flash memory if you decide to use this
	   when your environment is "embedded" within U-Boot code,
	   since then the remainder of the flash sector could be used
	   for U-Boot code. It should be pointed out that this is
	   STRONGLY DISCOURAGED from a robustness point of view:
	   updating the environment in flash makes it always
	   necessary to erase the WHOLE sector. If something goes
	   wrong before the contents has been restored from a copy in
	   RAM, your target system will be dead.

	- CONFIG_ENV_ADDR_REDUND
	  CONFIG_ENV_SIZE_REDUND
Wolfgang Denk's avatar
Wolfgang Denk committed

	   These settings describe a second storage area used to hold
	   a redundant copy of the environment data, so that there is
	   a valid backup copy in case there is a power failure during
	   a "saveenv" operation.
Wolfgang Denk's avatar
Wolfgang Denk committed

BE CAREFUL! Any changes to the flash layout, and some changes to the
source code will make it necessary to adapt <board>/u-boot.lds*
accordingly!


Wolfgang Denk's avatar
Wolfgang Denk committed

	Define this if you have some non-volatile memory device
	(NVRAM, battery buffered SRAM) which you want to use for the
	environment.

	- CONFIG_ENV_ADDR:
	- CONFIG_ENV_SIZE:
Wolfgang Denk's avatar
Wolfgang Denk committed

	  These two #defines are used to determine the memory area you
Wolfgang Denk's avatar
Wolfgang Denk committed
	  want to use for environment. It is assumed that this memory
	  can just be read and written to, without any special
	  provision.

BE CAREFUL! The first access to the environment happens quite early
in U-Boot initalization (when we try to get the setting of for the
console baudrate). You *MUST* have mapped your NVRAM area then, or
Wolfgang Denk's avatar
Wolfgang Denk committed
U-Boot will hang.

Please note that even with NVRAM we still use a copy of the
environment in RAM: we could work on NVRAM directly, but we want to
keep settings there always unmodified except somebody uses "saveenv"
to save the current settings.


Wolfgang Denk's avatar
Wolfgang Denk committed

	Use this if you have an EEPROM or similar serial access
	device and a driver for it.

	- CONFIG_ENV_OFFSET:
	- CONFIG_ENV_SIZE:
Wolfgang Denk's avatar
Wolfgang Denk committed

	  These two #defines specify the offset and size of the
	  environment area within the total memory of your EEPROM.

	- CONFIG_SYS_I2C_EEPROM_ADDR:
Wolfgang Denk's avatar
Wolfgang Denk committed
	  If defined, specified the chip address of the EEPROM device.
	  The default address is zero.

	- CONFIG_SYS_EEPROM_PAGE_WRITE_BITS:
Wolfgang Denk's avatar
Wolfgang Denk committed
	  If defined, the number of bits used to address bytes in a
	  single page in the EEPROM device.  A 64 byte page, for example
	  would require six bits.

	- CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS:
Wolfgang Denk's avatar
Wolfgang Denk committed
	  If defined, the number of milliseconds to delay between
	  page writes.	The default is zero milliseconds.
Wolfgang Denk's avatar
Wolfgang Denk committed

	- CONFIG_SYS_I2C_EEPROM_ADDR_LEN:
Wolfgang Denk's avatar
Wolfgang Denk committed
	  The length in bytes of the EEPROM memory array address.  Note
	  that this is NOT the chip address length!

	- CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW:
	  EEPROM chips that implement "address overflow" are ones
	  like Catalyst 24WC04/08/16 which has 9/10/11 bits of
	  address and the extra bits end up in the "chip address" bit
	  slots. This makes a 24WC08 (1Kbyte) chip look like four 256
	  byte chips.

	  Note that we consider the length of the address field to
	  still be one byte because the extra address bits are hidden
	  in the chip address.

	- CONFIG_SYS_EEPROM_SIZE:
Wolfgang Denk's avatar
Wolfgang Denk committed
	  The size in bytes of the EEPROM device.

Heiko Schocher's avatar
Heiko Schocher committed
	- CONFIG_ENV_EEPROM_IS_ON_I2C
	  define this, if you have I2C and SPI activated, and your
	  EEPROM, which holds the environment, is on the I2C bus.

	- CONFIG_I2C_ENV_EEPROM_BUS
	  if you have an Environment on an EEPROM reached over
	  I2C muxes, you can define here, how to reach this
	  EEPROM. For example:

Wolfgang Denk's avatar
Wolfgang Denk committed
	  #define CONFIG_I2C_ENV_EEPROM_BUS	  "pca9547:70:d\0"
Heiko Schocher's avatar
Heiko Schocher committed

	  EEPROM which holds the environment, is reached over
	  a pca9547 i2c mux with address 0x70, channel 3.
Wolfgang Denk's avatar
Wolfgang Denk committed

	Define this if you have a DataFlash memory device which you
	want to use for the environment.

	- CONFIG_ENV_OFFSET:
	- CONFIG_ENV_ADDR:
	- CONFIG_ENV_SIZE:

	  These three #defines specify the offset and size of the
	  environment area within the total memory of your DataFlash placed
	  at the specified address.

- CONFIG_ENV_IS_IN_REMOTE:

	Define this if you have a remote memory space which you
	want to use for the local device's environment.

	- CONFIG_ENV_ADDR:
	- CONFIG_ENV_SIZE:

	  These two #defines specify the address and size of the
	  environment area within the remote memory space. The
	  local device can get the environment from remote memory

BE CAREFUL! For some special cases, the local device can not use
"saveenv" command. For example, the local device will get the
environment stored in a remote NOR flash by SRIO or PCIE link,
but it can not erase, write this NOR flash by SRIO or PCIE interface.

	Define this if you have a NAND device which you want to use
	for the environment.

	- CONFIG_ENV_OFFSET:
	- CONFIG_ENV_SIZE:

	  These two #defines specify the offset and size of the environment
	  area within the first NAND device.  CONFIG_ENV_OFFSET must be
	  aligned to an erase block boundary.
	- CONFIG_ENV_OFFSET_REDUND (optional):
	  This setting describes a second storage area of CONFIG_ENV_SIZE
	  size used to hold a redundant copy of the environment data, so
	  that there is a valid backup copy in case there is a power failure
	  during a "saveenv" operation.	 CONFIG_ENV_OFFSET_RENDUND must be
	  aligned to an erase block boundary.

	- CONFIG_ENV_RANGE (optional):

	  Specifies the length of the region in which the environment
	  can be written.  This should be a multiple of the NAND device's
	  block size.  Specifying a range with more erase blocks than
	  are needed to hold CONFIG_ENV_SIZE allows bad blocks within
	  the range to be avoided.

	- CONFIG_ENV_OFFSET_OOB (optional):

	  Enables support for dynamically retrieving the offset of the
	  environment from block zero's out-of-band data.  The
	  "nand env.oob" command can be used to record this offset.
	  Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
	  using CONFIG_ENV_OFFSET_OOB.
- CONFIG_NAND_ENV_DST

	Defines address in RAM to which the nand_spl code should copy the
	environment. If redundant environment is used, it will be copied to
	CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE.

- CONFIG_SYS_SPI_INIT_OFFSET
Wolfgang Denk's avatar
Wolfgang Denk committed

	Defines offset to the initial SPI buffer area in DPRAM. The
	area is used at an early stage (ROM part) if the environment
	is configured to reside in the SPI EEPROM: We need a 520 byte
	scratch DPRAM area. It is used between the two initialization
	calls (spi_init_f() and spi_init_r()). A value of 0xB00 seems
	to be a good choice since it makes it far enough from the
	start of the data area as well as from the stack pointer.

Bruce Adler's avatar
Bruce Adler committed
Please note that the environment is read-only until the monitor
Wolfgang Denk's avatar
Wolfgang Denk committed
has been relocated to RAM and a RAM copy of the environment has been
created; also, when using EEPROM you will have to use getenv_f()
Wolfgang Denk's avatar
Wolfgang Denk committed
until then to read environment variables.

The environment is protected by a CRC32 checksum. Before the monitor
is relocated into RAM, as a result of a bad CRC you will be working
with the compiled-in default environment - *silently*!!! [This is
necessary, because the first environment variable we need is the
"baudrate" setting for the console - if we have a bad CRC, we don't
have any device yet where we could complain.]
Wolfgang Denk's avatar
Wolfgang Denk committed

Note: once the monitor has been relocated, then it will complain if
the default environment is used; a new CRC is computed as soon as you
use the "saveenv" command to store a valid environment.
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_FAULT_ECHO_LINK_DOWN:
		Echo the inverted Ethernet link state to the fault LED.
		Note: If this option is active, then CONFIG_SYS_FAULT_MII_ADDR
		      also needs to be defined.

- CONFIG_SYS_FAULT_MII_ADDR:
		MII address of the PHY to check for the Ethernet link state.
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_NS16550_MIN_FUNCTIONS:
		Define this if you desire to only have use of the NS16550_init
		and NS16550_putc functions for the serial driver located at
		drivers/serial/ns16550.c.  This option is useful for saving
		space for already greatly restricted images, including but not
		limited to NAND_SPL configurations.

- CONFIG_DISPLAY_BOARDINFO
		Display information about the board that U-Boot is running on
		when U-Boot starts up. The board function checkboard() is called
		to do this.

- CONFIG_DISPLAY_BOARDINFO_LATE
		Similar to the previous option, but display this information
		later, once stdio is running and output goes to the LCD, if
		present.

Wolfgang Denk's avatar
Wolfgang Denk committed
Low Level (hardware related) configuration options:
---------------------------------------------------
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_CACHELINE_SIZE:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Cache Line Size of the CPU.

- CONFIG_SYS_DEFAULT_IMMR:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Default address of the IMMR after system reset.
		Needed on some 8260 systems (MPC8260ADS, PQ2FADS-ZU,
		and RPXsuper) to be able to adjust the position of
		the IMMR register after a reset.
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_CCSRBAR_DEFAULT:
		Default (power-on reset) physical address of CCSR on Freescale
		PowerPC SOCs.

- CONFIG_SYS_CCSRBAR:
		Virtual address of CCSR.  On a 32-bit build, this is typically
		the same value as CONFIG_SYS_CCSRBAR_DEFAULT.

		CONFIG_SYS_DEFAULT_IMMR must also be set to this value,
		for cross-platform code that uses that macro instead.

- CONFIG_SYS_CCSRBAR_PHYS:
		Physical address of CCSR.  CCSR can be relocated to a new
		physical address, if desired.  In this case, this macro should
		be set to that address.	 Otherwise, it should be set to the
		same value as CONFIG_SYS_CCSRBAR_DEFAULT.  For example, CCSR
		is typically relocated on 36-bit builds.  It is recommended
		that this macro be defined via the _HIGH and _LOW macros:

		#define CONFIG_SYS_CCSRBAR_PHYS ((CONFIG_SYS_CCSRBAR_PHYS_HIGH
			* 1ull) << 32 | CONFIG_SYS_CCSRBAR_PHYS_LOW)

- CONFIG_SYS_CCSRBAR_PHYS_HIGH:
		Bits 33-36 of CONFIG_SYS_CCSRBAR_PHYS.	This value is typically
		either 0 (32-bit build) or 0xF (36-bit build).	This macro is
		used in assembly code, so it must not contain typecasts or
		integer size suffixes (e.g. "ULL").

- CONFIG_SYS_CCSRBAR_PHYS_LOW:
		Lower 32-bits of CONFIG_SYS_CCSRBAR_PHYS.  This macro is
		used in assembly code, so it must not contain typecasts or
		integer size suffixes (e.g. "ULL").

- CONFIG_SYS_CCSR_DO_NOT_RELOCATE:
		If this macro is defined, then CONFIG_SYS_CCSRBAR_PHYS will be
		forced to a value that ensures that CCSR is not relocated.

- Floppy Disk Support:
		CONFIG_SYS_FDC_DRIVE_NUMBER

		the default drive number (default value 0)

		CONFIG_SYS_ISA_IO_STRIDE
		defines the spacing between FDC chipset registers
		(default value 1)

		CONFIG_SYS_ISA_IO_OFFSET
		defines the offset of register from address. It
		depends on which part of the data bus is connected to
		the FDC chipset. (default value 0)
		If CONFIG_SYS_ISA_IO_STRIDE CONFIG_SYS_ISA_IO_OFFSET and
		CONFIG_SYS_FDC_DRIVE_NUMBER are undefined, they take their
		default value.
		if CONFIG_SYS_FDC_HW_INIT is defined, then the function
		fdc_hw_init() is called at the beginning of the FDC
		setup. fdc_hw_init() must be provided by the board
		source code. It is used to make hardware dependant
		initializations.
- CONFIG_IDE_AHB:
		Most IDE controllers were designed to be connected with PCI
		interface. Only few of them were designed for AHB interface.
		When software is doing ATA command and data transfer to
		IDE devices through IDE-AHB controller, some additional
		registers accessing to these kind of IDE-AHB controller
		is requierd.

- CONFIG_SYS_IMMR:	Physical address of the Internal Memory.
Wolfgang Denk's avatar
Wolfgang Denk committed
		DO NOT CHANGE unless you know exactly what you're
		doing! (11-4) [MPC8xx/82xx systems only]
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_INIT_RAM_ADDR:
Wolfgang Denk's avatar
Wolfgang Denk committed

		Start address of memory area that can be used for
Wolfgang Denk's avatar
Wolfgang Denk committed
		initial data and stack; please note that this must be
		writable memory that is working WITHOUT special
		initialization, i. e. you CANNOT use normal RAM which
		will become available only after programming the
		memory controller and running certain initialization
		sequences.

		U-Boot uses the following memory types:
		- MPC8xx and MPC8260: IMMR (internal memory of the CPU)
		- MPC824X: data cache
		- PPC4xx:  data cache

- CONFIG_SYS_GBL_DATA_OFFSET:
Wolfgang Denk's avatar
Wolfgang Denk committed

		Offset of the initial data structure in the memory
		area defined by CONFIG_SYS_INIT_RAM_ADDR. Usually
		CONFIG_SYS_GBL_DATA_OFFSET is chosen such that the initial
Wolfgang Denk's avatar
Wolfgang Denk committed
		data is located at the end of the available space
		(sometimes written as (CONFIG_SYS_INIT_RAM_SIZE -
		CONFIG_SYS_INIT_DATA_SIZE), and the initial stack is just
		below that area (growing from (CONFIG_SYS_INIT_RAM_ADDR +
		CONFIG_SYS_GBL_DATA_OFFSET) downward.
Wolfgang Denk's avatar
Wolfgang Denk committed

	Note:
		On the MPC824X (or other systems that use the data
		cache for initial memory) the address chosen for
		CONFIG_SYS_INIT_RAM_ADDR is basically arbitrary - it must
Wolfgang Denk's avatar
Wolfgang Denk committed
		point to an otherwise UNUSED address space between
		the top of RAM and the start of the PCI space.

- CONFIG_SYS_SIUMCR:	SIU Module Configuration (11-6)
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_SYPCR:	System Protection Control (11-9)
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_TBSCR:	Time Base Status and Control (11-26)
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_PISCR:	Periodic Interrupt Status and Control (11-31)
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_PLPRCR:	PLL, Low-Power, and Reset Control Register (15-30)
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_SCCR:	System Clock and reset Control Register (15-27)
Wolfgang Denk's avatar
Wolfgang Denk committed

- CONFIG_SYS_OR_TIMING_SDRAM:
Wolfgang Denk's avatar
Wolfgang Denk committed
		SDRAM timing

- CONFIG_SYS_MAMR_PTA:
Wolfgang Denk's avatar
Wolfgang Denk committed
		periodic timer for refresh

- CONFIG_SYS_DER:	Debug Event Register (37-47)
Wolfgang Denk's avatar
Wolfgang Denk committed

- FLASH_BASE0_PRELIM, FLASH_BASE1_PRELIM, CONFIG_SYS_REMAP_OR_AM,
  CONFIG_SYS_PRELIM_OR_AM, CONFIG_SYS_OR_TIMING_FLASH, CONFIG_SYS_OR0_REMAP,
  CONFIG_SYS_OR0_PRELIM, CONFIG_SYS_BR0_PRELIM, CONFIG_SYS_OR1_REMAP, CONFIG_SYS_OR1_PRELIM,
  CONFIG_SYS_BR1_PRELIM:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Memory Controller Definitions: BR0/1 and OR0/1 (FLASH)

- SDRAM_BASE2_PRELIM, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE,
  CONFIG_SYS_OR_TIMING_SDRAM, CONFIG_SYS_OR2_PRELIM, CONFIG_SYS_BR2_PRELIM,
  CONFIG_SYS_OR3_PRELIM, CONFIG_SYS_BR3_PRELIM:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM)

- CONFIG_SYS_MAMR_PTA, CONFIG_SYS_MPTPR_2BK_4K, CONFIG_SYS_MPTPR_1BK_4K, CONFIG_SYS_MPTPR_2BK_8K,
  CONFIG_SYS_MPTPR_1BK_8K, CONFIG_SYS_MAMR_8COL, CONFIG_SYS_MAMR_9COL:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Machine Mode Register and Memory Periodic Timer
		Prescaler definitions (SDRAM timing)

- CONFIG_SYS_I2C_UCODE_PATCH, CONFIG_SYS_I2C_DPMEM_OFFSET [0x1FC0]:
Wolfgang Denk's avatar
Wolfgang Denk committed
		enable I2C microcode relocation patch (MPC8xx);
		define relocation offset in DPRAM [DSP2]

- CONFIG_SYS_SMC_UCODE_PATCH, CONFIG_SYS_SMC_DPMEM_OFFSET [0x1FC0]:
		enable SMC microcode relocation patch (MPC8xx);
		define relocation offset in DPRAM [SMC1]

- CONFIG_SYS_SPI_UCODE_PATCH, CONFIG_SYS_SPI_DPMEM_OFFSET [0x1FC0]:
Wolfgang Denk's avatar
Wolfgang Denk committed
		enable SPI microcode relocation patch (MPC8xx);
		define relocation offset in DPRAM [SCC4]

- CONFIG_SYS_USE_OSCCLK:
Wolfgang Denk's avatar
Wolfgang Denk committed
		Use OSCM clock mode on MBX8xx board. Be careful,
		wrong setting might damage your board. Read
		doc/README.MBX before setting this variable!

- CONFIG_SYS_CPM_POST_WORD_ADDR: (MPC8xx, MPC8260 only)
		Offset of the bootmode word in DPRAM used by post
		(Power On Self Tests). This definition overrides
		#define'd default value in commproc.h resp.
		cpm_8260.h.
- CONFIG_SYS_PCI_SLV_MEM_LOCAL, CONFIG_SYS_PCI_SLV_MEM_BUS, CONFIG_SYS_PICMR0_MASK_ATTRIB,
  CONFIG_SYS_PCI_MSTR0_LOCAL, CONFIG_SYS_PCIMSK0_MASK, CONFIG_SYS_PCI_MSTR1_LOCAL,
  CONFIG_SYS_PCIMSK1_MASK, CONFIG_SYS_PCI_MSTR_MEM_LOCAL, CONFIG_SYS_PCI_MSTR_MEM_BUS,
  CONFIG_SYS_CPU_PCI_MEM_START, CONFIG_SYS_PCI_MSTR_MEM_SIZE, CONFIG_SYS_POCMR0_MASK_ATTRIB,
  CONFIG_SYS_PCI_MSTR_MEMIO_LOCAL, CONFIG_SYS_PCI_MSTR_MEMIO_BUS, CPU_PCI_MEMIO_START,
  CONFIG_SYS_PCI_MSTR_MEMIO_SIZE, CONFIG_SYS_POCMR1_MASK_ATTRIB, CONFIG_SYS_PCI_MSTR_IO_LOCAL,
  CONFIG_SYS_PCI_MSTR_IO_BUS, CONFIG_SYS_CPU_PCI_IO_START, CONFIG_SYS_PCI_MSTR_IO_SIZE,
  CONFIG_SYS_POCMR2_MASK_ATTRIB: (MPC826x only)
		Overrides the default PCI memory map in arch/powerpc/cpu/mpc8260/pci.c if set.
- CONFIG_PCI_DISABLE_PCIE:
		Disable PCI-Express on systems where it is supported but not
		required.

- CONFIG_PCI_ENUM_ONLY
		Only scan through and get the devices on the busses.
		Don't do any setup work, presumably because someone or
		something has already done it, and we don't need to do it
		a second time.	Useful for platforms that are pre-booted
		by coreboot or similar.

- CONFIG_SYS_SRIO:
		Chip has SRIO or not

- CONFIG_SRIO1:
		Board has SRIO 1 port available

- CONFIG_SRIO2:
		Board has SRIO 2 port available

- CONFIG_SYS_SRIOn_MEM_VIRT:
		Virtual Address of SRIO port 'n' memory region

- CONFIG_SYS_SRIOn_MEM_PHYS:
		Physical Address of SRIO port 'n' memory region

- CONFIG_SYS_SRIOn_MEM_SIZE:
		Size of SRIO port 'n' memory region

- CONFIG_SYS_NDFC_16
		Defined to tell the NDFC that the NAND chip is using a
		16 bit bus.

- CONFIG_SYS_NDFC_EBC0_CFG
		Sets the EBC0_CFG register for the NDFC. If not defined
		a default value will be used.

- CONFIG_SPD_EEPROM
		Get DDR timing information from an I2C EEPROM. Common
		with pluggable memory modules such as SODIMMs

  SPD_EEPROM_ADDRESS
		I2C address of the SPD EEPROM

- CONFIG_SYS_SPD_BUS_NUM
		If SPD EEPROM is on an I2C bus other than the first
		one, specify here. Note that the value must resolve
		to something your driver can deal with.
- CONFIG_SYS_DDR_RAW_TIMING
		Get DDR timing information from other than SPD. Common with
		soldered DDR chips onboard without SPD. DDR raw timing
		parameters are extracted from datasheet and hard-coded into
		header files or board specific files.

- CONFIG_FSL_DDR_INTERACTIVE
		Enable interactive DDR debugging. See doc/README.fsl-ddr.

- CONFIG_SYS_83XX_DDR_USES_CS0
		Only for 83xx systems. If specified, then DDR should
		be configured using CS0 and CS1 instead of CS2 and CS3.
- CONFIG_ETHER_ON_FEC[12]
		Define to enable FEC[12] on a 8xx series processor.

- CONFIG_FEC[12]_PHY
		Define to the hardcoded PHY address which corresponds
Wolfgang Denk's avatar
Wolfgang Denk committed
		to the given FEC; i. e.
			#define CONFIG_FEC1_PHY 4
		means that the PHY with address 4 is connected to FEC1

		When set to -1, means to probe for first available.

- CONFIG_FEC[12]_PHY_NORXERR
		The PHY does not have a RXERR line (RMII only).
		(so program the FEC to ignore it).

- CONFIG_RMII
		Enable RMII mode for all FECs.
		Note that this is a global option, we can't
		have one FEC in standard MII mode and another in RMII mode.

- CONFIG_CRC32_VERIFY
		Add a verify option to the crc32 command.
		The syntax is:

		=> crc32 -v <address> <count> <crc32>

		Where address/count indicate a memory area
		and crc32 is the correct crc32 which the
		area should have.

- CONFIG_LOOPW
		Add the "loopw" memory command. This only takes effect if
		the memory commands are activated globally (CONFIG_CMD_MEM).
- CONFIG_MX_CYCLIC
		Add the "mdc" and "mwc" memory commands. These are cyclic
		"md/mw" commands.
		Examples:

Wolfgang Denk's avatar
Wolfgang Denk committed
		=> mdc.b 10 4 500
		This command will print 4 bytes (10,11,12,13) each 500 ms.

Wolfgang Denk's avatar
Wolfgang Denk committed
		=> mwc.l 100 12345678 10
		This command will write 12345678 to address 100 all 10 ms.

Wolfgang Denk's avatar
Wolfgang Denk committed
		This only takes effect if the memory commands are activated
- CONFIG_SKIP_LOWLEVEL_INIT
		[ARM, NDS32, MIPS only] If this variable is defined, then certain
		low level initializations (like setting up the memory
		controller) are omitted and/or U-Boot does not
		relocate itself into RAM.

		Normally this variable MUST NOT be defined. The only
		exception is when U-Boot is loaded (to RAM) by some
		other boot loader or by a debugger which performs
		these initializations itself.
- CONFIG_SPL_BUILD
		Modifies the behaviour of start.S when compiling a loader
		that is executed before the actual U-Boot. E.g. when
		compiling a NAND SPL.
- CONFIG_ARCH_MAP_SYSMEM
		Generally U-Boot (and in particular the md command) uses
		effective address. It is therefore not necessary to regard
		U-Boot address as virtual addresses that need to be translated
		to physical addresses. However, sandbox requires this, since
		it maintains its own little RAM buffer which contains all
		addressable memory. This option causes some memory accesses
		to be mapped through map_sysmem() / unmap_sysmem().

- CONFIG_USE_ARCH_MEMCPY
  CONFIG_USE_ARCH_MEMSET
		If these options are used a optimized version of memcpy/memset will
		be used if available. These functions may be faster under some
		conditions but may increase the binary size.

- CONFIG_X86_RESET_VECTOR
		If defined, the x86 reset vector code is included. This is not
		needed when U-Boot is running from Coreboot.
- CONFIG_SYS_MPUCLK
		Defines the MPU clock speed (in MHz).

		NOTE : currently only supported on AM335x platforms.
Freescale QE/FMAN Firmware Support:
-----------------------------------

The Freescale QUICCEngine (QE) and Frame Manager (FMAN) both support the
loading of "firmware", which is encoded in the QE firmware binary format.
This firmware often needs to be loaded during U-Boot booting, so macros
are used to identify the storage device (NOR flash, SPI, etc) and the address
within that device.

- CONFIG_SYS_QE_FMAN_FW_ADDR
	The address in the storage device where the firmware is located.  The
	meaning of this address depends on which CONFIG_SYS_QE_FW_IN_xxx macro
	is also specified.

- CONFIG_SYS_QE_FMAN_FW_LENGTH
	The maximum possible size of the firmware.  The firmware binary format
	has a field that specifies the actual size of the firmware, but it
	might not be possible to read any part of the firmware unless some
	local storage is allocated to hold the entire firmware first.

- CONFIG_SYS_QE_FMAN_FW_IN_NOR
	Specifies that QE/FMAN firmware is located in NOR flash, mapped as
	normal addressable memory via the LBC.  CONFIG_SYS_FMAN_FW_ADDR is the
	virtual address in NOR flash.

- CONFIG_SYS_QE_FMAN_FW_IN_NAND
	Specifies that QE/FMAN firmware is located in NAND flash.
	CONFIG_SYS_FMAN_FW_ADDR is the offset within NAND flash.

- CONFIG_SYS_QE_FMAN_FW_IN_MMC
	Specifies that QE/FMAN firmware is located on the primary SD/MMC
	device.  CONFIG_SYS_FMAN_FW_ADDR is the byte offset on that device.

- CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH
	Specifies that QE/FMAN firmware is located on the primary SPI
	device.  CONFIG_SYS_FMAN_FW_ADDR is the byte offset on that device.

- CONFIG_SYS_QE_FMAN_FW_IN_REMOTE
	Specifies that QE/FMAN firmware is located in the remote (master)
	memory space.	CONFIG_SYS_FMAN_FW_ADDR is a virtual address which
	can be mapped from slave TLB->slave LAW->slave SRIO or PCIE outbound
	window->master inbound window->master LAW->the ucode address in
	master's memory space.
Wolfgang Denk's avatar
Wolfgang Denk committed
Building the Software:
======================

Building U-Boot has been tested in several native build environments
and in many different cross environments. Of course we cannot support
all possibly existing versions of cross development tools in all
(potentially obsolete) versions. In case of tool chain problems we
recommend to use the ELDK (see http://www.denx.de/wiki/DULG/ELDK)
which is extensively used to build and test U-Boot.
Wolfgang Denk's avatar
Wolfgang Denk committed

If you are not using a native environment, it is assumed that you
have GNU cross compiling tools available in your path. In this case,
you must set the environment variable CROSS_COMPILE in your shell.
Note that no changes to the Makefile or any other source files are
necessary. For example using the ELDK on a 4xx CPU, please enter:
Wolfgang Denk's avatar
Wolfgang Denk committed

	$ CROSS_COMPILE=ppc_4xx-
	$ export CROSS_COMPILE
Wolfgang Denk's avatar
Wolfgang Denk committed

Note: If you wish to generate Windows versions of the utilities in
      the tools directory you can use the MinGW toolchain
      (http://www.mingw.org).  Set your HOST tools to the MinGW
      toolchain and execute 'make tools'.  For example:

       $ make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools

      Binaries such as tools/mkimage.exe will be created which can
      be executed on computers running Windows.

U-Boot is intended to be simple to build. After installing the
sources you must configure U-Boot for one specific board type. This
Wolfgang Denk's avatar
Wolfgang Denk committed
is done by typing:

	make NAME_config

where "NAME_config" is the name of one of the existing configu-
rations; see boards.cfg for supported names.
Note: for some board special configuration names may exist; check if
      additional information is available from the board vendor; for