Skip to content
Snippets Groups Projects
README 213 KiB
Newer Older
	- CONFIG_ENV_SIZE:

	  These two #defines specify the offset and size of the environment
	  area within the specified MMC device.

	  If offset is positive (the usual case), it is treated as relative to
	  the start of the MMC partition. If offset is negative, it is treated
	  as relative to the end of the MMC partition. This can be useful if
	  your board may be fitted with different MMC devices, which have
	  different sizes for the MMC partitions, and you always want the
	  environment placed at the very end of the partition, to leave the
	  maximum possible space before it, to store other data.

	  These two values are in units of bytes, but must be aligned to an
	  MMC sector boundary.

	- CONFIG_ENV_OFFSET_REDUND (optional):

	  Specifies a second storage area, of CONFIG_ENV_SIZE size, used to
	  hold a redundant copy of the environment data. This provides a
	  valid backup copy in case the other copy is corrupted, e.g. due
	  to a power failure during a "saveenv" operation.

	  This value may also be positive or negative; this is handled in the
	  same way as CONFIG_ENV_OFFSET.

	  This value is also in units of bytes, but must also be aligned to
	  an MMC sector boundary.

	- CONFIG_ENV_SIZE_REDUND (optional):

	  This value need not be set, even when CONFIG_ENV_OFFSET_REDUND is
	  set. If this value is set, it must be set to the same value as
	  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.

- CONFIG_BOARD_SIZE_LIMIT:
		Maximum size of the U-Boot image. When defined, the
		build system checks that the actual size does not
		exceed it.

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-dependent
		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
- 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 -
		GENERATED_GBL_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_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.

		Only scan through and get the devices on the buses.
		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_PCI_INDIRECT_BRIDGE:
		Enable support for indirect PCI bridges.

- 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_SRIO_PCIE_BOOT_MASTER
		Board can support master function for Boot from SRIO and PCIE

- 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_NAND_BUSWIDTH_16BIT
		Defined to tell the NAND controller that the NAND chip is using
		a 16 bit bus.
		Not all NAND drivers use this symbol.
		Example of drivers that use it:
		- drivers/mtd/nand/ndfc.c
		- drivers/mtd/nand/mxc_nand.c

- 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_FSL_DDR_SYNC_REFRESH
		Enable sync of refresh for multiple controllers.

- CONFIG_FSL_DDR_BIST
		Enable built-in memory test for Freescale DDR controllers.

- 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_SKIP_LOWLEVEL_INIT_ONLY
		[ARM926EJ-S only] This allows just the call to lowlevel_init()
		to be skipped. The normal CP15 init (such as enabling the
		instruction cache) is still performed.

- 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_TPL_BUILD
		Modifies the behaviour of start.S  when compiling a loader
		that is executed after the SPL and before the actual U-Boot.
		It is loaded by the SPL.

- CONFIG_SYS_MPC85XX_NO_RESETVEC
		Only for 85xx systems. If this variable is specified, the section
		.resetvec is not kept and the section .bootpg is placed in the
		previous 4k of the .text section.

- 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_X86_RESET_VECTOR
		If defined, the x86 reset vector code is included. This is not
		needed when U-Boot is running from Coreboot.
- CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC:
		Enables the RTC32K OSC on AM33xx based plattforms

- CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
		Option to disable subpage write in NAND driver
		driver that uses this:
		drivers/mtd/nand/davinci_nand.c

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_FMAN_FW_ADDR
	The address in the storage device where the FMAN microcode is located.  The
	meaning of this address depends on which CONFIG_SYS_QE_FW_IN_xxx macro
	is also specified.

- CONFIG_SYS_QE_FW_ADDR
	The address in the storage device where the QE microcode 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_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.
Freescale Layerscape Management Complex Firmware Support:
---------------------------------------------------------
The Freescale Layerscape Management Complex (MC) supports the loading of
"firmware".
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_FSL_MC_ENET
	Enable the MC driver for Layerscape SoCs.

Freescale Layerscape Debug Server Support:
-------------------------------------------
The Freescale Layerscape Debug Server Support supports the loading of
"Debug Server firmware" and triggering SP boot-rom.
This firmware often needs to be loaded during U-Boot booting.

- CONFIG_SYS_MC_RSV_MEM_ALIGN
	Define alignment of reserved memory MC requires
Reproducible builds
-------------------

In order to achieve reproducible builds, timestamps used in the U-Boot build
process have to be set to a fixed value.

This is done using the SOURCE_DATE_EPOCH environment variable.
SOURCE_DATE_EPOCH is to be set on the build host's shell, not as a configuration
option for U-Boot or an environment variable in U-Boot.

SOURCE_DATE_EPOCH should be set to a number of seconds since the epoch, in UTC.

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:

Wolfgang Denk's avatar
Wolfgang Denk committed

where "NAME_defconfig" 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
      instance, the TQM823L systems are available without (standard)
      or with LCD support. You can select such additional "features"
      when choosing the configuration, i. e.
	- will configure for a plain TQM823L, i. e. no LCD support

	- will configure for a TQM823L with U-Boot console on LCD

      etc.


Finally, type "make all", and you should get some working U-Boot
images ready for download to / installation on your system:

- "u-boot.bin" is a raw binary image
- "u-boot" is an image in ELF binary format
- "u-boot.srec" is in Motorola S-Record format

By default the build is performed locally and the objects are saved
in the source directory. One of the two methods can be used to change
this behavior and build U-Boot to some external directory:

1. Add O= to the make command line invocations:

	make O=/tmp/build distclean
2. Set environment variable KBUILD_OUTPUT to point to the desired location:
	export KBUILD_OUTPUT=/tmp/build
Note that the command line "O=" setting overrides the KBUILD_OUTPUT environment

Please be aware that the Makefiles assume you are using GNU make, so
for instance on NetBSD you might need to use "gmake" instead of
native "make".


If the system board that you have is not listed, then you will need
to port U-Boot to your hardware platform. To do this, follow these
steps:

1.  Create a new directory to hold your board specific code. Add any
    files you need. In your board directory, you will need at least
    the "Makefile" and a "<board>.c".
2.  Create a new configuration file "include/configs/<board>.h" for
    your board.
3.  If you're porting U-Boot to a new CPU, then also create a new
    directory to hold your CPU specific code. Add any files you need.
4.  Run "make <board>_defconfig" with your new name.
5.  Type "make", and you should get a working "u-boot.srec" file
    to be installed on your target system.
6.  Debug and solve any problems that might arise.
    [Of course, this last step is much harder than it sounds.]


Testing of U-Boot Modifications, Ports to New Hardware, etc.:
==============================================================

If you have modified U-Boot sources (for instance added a new board
or support for new devices, a new CPU, etc.) you are expected to
provide feedback to the other developers. The feedback normally takes
the form of a "patch", i. e. a context diff against a certain (latest
official or latest in the git repository) version of U-Boot sources.
But before you submit such a patch, please verify that your modifi-
cation did not break existing code. At least make sure that *ALL* of
the supported boards compile WITHOUT ANY compiler warnings. To do so,
just run the buildman script (tools/buildman/buildman), which will
configure and build U-Boot for ALL supported system. Be warned, this
will take a while. Please see the buildman README, or run 'buildman -H'
for documentation.
See also "U-Boot Porting Guide" below.


Monitor Commands - Overview:
============================

go	- start application at address 'addr'
run	- run commands in an environment variable
bootm	- boot application image from memory
bootp	- boot image via network using BootP/TFTP protocol
bootz   - boot zImage from memory
tftpboot- boot image via network using TFTP protocol
	       and env variables "ipaddr" and "serverip"
	       (and eventually "gatewayip")
tftpput - upload a file via network using TFTP protocol
rarpboot- boot image via network using RARP/TFTP protocol
diskboot- boot from IDE devicebootd   - boot default, i.e., run 'bootcmd'
loads	- load S-Record file over serial line
loadb	- load binary file over serial line (kermit mode)
md	- memory display
mm	- memory modify (auto-incrementing)
nm	- memory modify (constant address)
mw	- memory write (fill)
cp	- memory copy
cmp	- memory compare
crc32	- checksum calculation
i2c	- I2C sub-system
sspi	- SPI utility commands
base	- print or set address offset
printenv- print environment variables
setenv	- set environment variables
saveenv - save environment variables to persistent storage
protect - enable or disable FLASH write protection
erase	- erase FLASH memory
flinfo	- print FLASH memory information
nand	- NAND memory operations (see doc/README.nand)
bdinfo	- print Board Info structure
iminfo	- print header information for application image
coninfo - print console devices and informations
ide	- IDE sub-system
loop	- infinite loop on address range
loopw	- infinite write loop on address range
mtest	- simple RAM test
icache	- enable or disable instruction cache
dcache	- enable or disable data cache
reset	- Perform RESET of the CPU
echo	- echo args to console
version - print monitor version
help	- print online help
?	- alias for 'help'


Monitor Commands - Detailed Description:
========================================

TODO.

For now: just type "help <command>".


Environment Variables:
======================

U-Boot supports user configuration using Environment Variables which
can be made persistent by saving to Flash memory.
Wolfgang Denk's avatar
Wolfgang Denk committed

Environment Variables are set using "setenv", printed using
"printenv", and saved to Flash using "saveenv". Using "setenv"
without a value can be used to delete a variable from the
environment. As long as you don't save the environment you are
working with an in-memory copy. In case the Flash area containing the
environment is erased by accident, a default environment is provided.
Wolfgang Denk's avatar
Wolfgang Denk committed

Some configuration options can be set using Environment Variables.

List of environment variables (most likely not complete):
Wolfgang Denk's avatar
Wolfgang Denk committed

  baudrate	- see CONFIG_BAUDRATE
Wolfgang Denk's avatar
Wolfgang Denk committed

  bootdelay	- see CONFIG_BOOTDELAY
Wolfgang Denk's avatar
Wolfgang Denk committed

  bootcmd	- see CONFIG_BOOTCOMMAND
  bootargs	- Boot arguments when booting an RTOS image
Wolfgang Denk's avatar
Wolfgang Denk committed

  bootfile	- Name of the image to load with TFTP
Wolfgang Denk's avatar
Wolfgang Denk committed

  bootm_low	- Memory range available for image processing in the bootm
		  command can be restricted. This variable is given as
		  a hexadecimal number and defines lowest address allowed
		  for use by the bootm command. See also "bootm_size"
		  environment variable. Address defined by "bootm_low" is
		  also the base of the initial memory mapping for the Linux
		  kernel -- see the description of CONFIG_SYS_BOOTMAPSZ and
		  bootm_mapsize.

  bootm_mapsize - Size of the initial memory mapping for the Linux kernel.
		  This variable is given as a hexadecimal number and it
		  defines the size of the memory region starting at base
		  address bootm_low that is accessible by the Linux kernel
		  during early boot.  If unset, CONFIG_SYS_BOOTMAPSZ is used
		  as the default value if it is defined, and bootm_size is
		  used otherwise.

  bootm_size	- Memory range available for image processing in the bootm
		  command can be restricted. This variable is given as
		  a hexadecimal number and defines the size of the region
		  allowed for use by the bootm command. See also "bootm_low"
		  environment variable.

  updatefile	- Location of the software update file on a TFTP server, used
		  by the automatic software update feature. Please refer to
		  documentation in doc/README.update for more details.

  autoload	- if set to "no" (any string beginning with 'n'),
		  "bootp" will just load perform a lookup of the
		  configuration from the BOOTP server, but not try to
		  load any image using TFTP
Wolfgang Denk's avatar
Wolfgang Denk committed

  autostart	- if set to "yes", an image loaded using the "bootp",
		  "rarpboot", "tftpboot" or "diskboot" commands will
		  be automatically started (by internally calling
		  "bootm")
		  If set to "no", a standalone image passed to the
		  "bootm" command will be copied to the load address
		  (and eventually uncompressed), but NOT be started.
		  This can be used to load and uncompress arbitrary
		  data.
Wolfgang Denk's avatar
Wolfgang Denk committed

  fdt_high	- if set this restricts the maximum address that the
		  flattened device tree will be copied into upon boot.
		  For example, if you have a system with 1 GB memory
		  at physical address 0x10000000, while Linux kernel
		  only recognizes the first 704 MB as low memory, you
		  may need to set fdt_high as 0x3C000000 to have the
		  device tree blob be copied to the maximum address
		  of the 704 MB low memory, so that Linux kernel can
		  access it during the boot procedure.

		  If this is set to the special value 0xFFFFFFFF then
		  the fdt will not be copied at all on boot.  For this
		  to work it must reside in writable memory, have
		  sufficient padding on the end of it for u-boot to
		  add the information it needs into it, and the memory
		  must be accessible by the kernel.

  fdtcontroladdr- if set this is the address of the control flattened
		  device tree used by U-Boot when CONFIG_OF_CONTROL is
		  defined.

  i2cfast	- (PPC405GP|PPC405EP only)
		  if set to 'y' configures Linux I2C driver for fast
		  mode (400kHZ). This environment variable is used in
		  initialization code. So, for changes to be effective
		  it must be saved and board must be reset.

  initrd_high	- restrict positioning of initrd images:
		  If this variable is not set, initrd images will be
		  copied to the highest possible address in RAM; this
		  is usually what you want since it allows for
		  maximum initrd size. If for some reason you want to
		  make sure that the initrd image is loaded below the
		  CONFIG_SYS_BOOTMAPSZ limit, you can set this environment
		  variable to a value of "no" or "off" or "0".
		  Alternatively, you can set it to a maximum upper
		  address to use (U-Boot will still check that it
		  does not overwrite the U-Boot stack and data).
Wolfgang Denk's avatar
Wolfgang Denk committed

		  For instance, when you have a system with 16 MB
		  RAM, and want to reserve 4 MB from use by Linux,
		  you can do this by adding "mem=12M" to the value of
		  the "bootargs" variable. However, now you must make
		  sure that the initrd image is placed in the first
		  12 MB as well - this can be done with
Wolfgang Denk's avatar
Wolfgang Denk committed

		  setenv initrd_high 00c00000
Wolfgang Denk's avatar
Wolfgang Denk committed

		  If you set initrd_high to 0xFFFFFFFF, this is an
		  indication to U-Boot that all addresses are legal
		  for the Linux kernel, including addresses in flash
		  memory. In this case U-Boot will NOT COPY the
		  ramdisk at all. This may be useful to reduce the
		  boot time on your system, but requires that this
		  feature is supported by your Linux kernel.
Wolfgang Denk's avatar
Wolfgang Denk committed

  ipaddr	- IP address; needed for tftpboot command
Wolfgang Denk's avatar
Wolfgang Denk committed

  loadaddr	- Default load address for commands like "bootp",
		  "rarpboot", "tftpboot", "loadb" or "diskboot"
Wolfgang Denk's avatar
Wolfgang Denk committed

  loads_echo	- see CONFIG_LOADS_ECHO
  serverip	- TFTP server IP address; needed for tftpboot command
  bootretry	- see CONFIG_BOOT_RETRY_TIME
  bootdelaykey	- see CONFIG_AUTOBOOT_DELAY_STR
  bootstopkey	- see CONFIG_AUTOBOOT_STOP_STR
Wolfgang Denk's avatar
Wolfgang Denk committed

  ethprime	- controls which interface is used first.
Wolfgang Denk's avatar
Wolfgang Denk committed

  ethact	- controls which interface is currently active.
		  For example you can do the following
Wolfgang Denk's avatar
Wolfgang Denk committed

		  => setenv ethact FEC
		  => ping 192.168.0.1 # traffic sent on FEC
		  => setenv ethact SCC
		  => ping 10.0.0.1 # traffic sent on SCC
Wolfgang Denk's avatar
Wolfgang Denk committed

  ethrotate	- When set to "no" U-Boot does not go through all
		  available network interfaces.
		  It just stays at the currently selected interface.

  netretry	- When set to "no" each network operation will
		  either succeed or fail without retrying.
		  When set to "once" the network operation will
		  fail when all the available network interfaces
		  are tried once without success.
		  Useful on scripts which control the retry operation
		  themselves.
Wolfgang Denk's avatar
Wolfgang Denk committed

  npe_ucode	- set load address for the NPE microcode
  silent_linux  - If set then Linux will be told to boot silently, by
		  changing the console to be empty. If "yes" it will be
		  made silent. If "no" it will not be made silent. If
		  unset, then it will be made silent if the U-Boot console
		  is silent.

  tftpsrcp	- If this is set, the value is used for TFTP's
  tftpdstp	- If this is set, the value is used for TFTP's UDP
		  destination port instead of the Well Know Port 69.

  tftpblocksize - Block size to use for TFTP transfers; if not set,
		  we use the TFTP server's default block size

  tftptimeout	- Retransmission timeout for TFTP packets (in milli-
		  seconds, minimum value is 1000 = 1 second). Defines
		  when a packet is considered to be lost so it has to
		  be retransmitted. The default is 5000 = 5 seconds.
		  Lowering this value may make downloads succeed
		  faster in networks with high packet loss rates or
		  with unreliable TFTP servers.

  tftptimeoutcountmax	- maximum count of TFTP timeouts (no
		  unit, minimum value = 0). Defines how many timeouts
		  can happen during a single file transfer before that
		  transfer is aborted. The default is 10, and 0 means
		  'no timeouts allowed'. Increasing this value may help
		  downloads succeed with high packet loss rates, or with
		  unreliable TFTP servers or client hardware.

  vlan		- When set to a value < 4095 the traffic over
		  Ethernet is encapsulated/received over 802.1q
		  VLAN tagged frames.
Wolfgang Denk's avatar
Wolfgang Denk committed

  bootpretryperiod	- Period during which BOOTP/DHCP sends retries.
		  Unsigned value, in milliseconds. If not set, the period will
		  be either the default (28000), or a value based on
		  CONFIG_NET_RETRY_COUNT, if defined. This value has
		  precedence over the valu based on CONFIG_NET_RETRY_COUNT.

The following image location variables contain the location of images
used in booting. The "Image" column gives the role of the image and is
not an environment variable name. The other columns are environment
variable names. "File Name" gives the name of the file on a TFTP
server, "RAM Address" gives the location in RAM the image will be
loaded to, and "Flash Location" gives the image's address in NOR
flash or offset in NAND flash.

*Note* - these variables don't have to be defined for all boards, some
boards currently use other variables for these purposes, and some
boards use these variables for other purposes.

Image		    File Name	     RAM Address       Flash Location
-----		    ---------	     -----------       --------------
u-boot		    u-boot	     u-boot_addr_r     u-boot_addr
Linux kernel	    bootfile	     kernel_addr_r     kernel_addr
device tree blob    fdtfile	     fdt_addr_r	       fdt_addr
ramdisk		    ramdiskfile	     ramdisk_addr_r    ramdisk_addr
The following environment variables may be used and automatically
updated by the network boot commands ("bootp" and "rarpboot"),
depending the information provided by your boot server:
Wolfgang Denk's avatar
Wolfgang Denk committed

  bootfile	- see above
  dnsip		- IP address of your Domain Name Server
  dnsip2	- IP address of your secondary Domain Name Server
  gatewayip	- IP address of the Gateway (Router) to use
  hostname	- Target hostname
  ipaddr	- see above
  netmask	- Subnet Mask
  rootpath	- Pathname of the root filesystem on the NFS server
  serverip	- see above
There are two special Environment Variables:
  serial#	- contains hardware identification information such
		  as type string and/or serial number
  ethaddr	- Ethernet address
Wolfgang Denk's avatar
Wolfgang Denk committed

These variables can be set only once (usually during manufacturing of
the board). U-Boot refuses to delete or overwrite these variables
once they have been set once.
Wolfgang Denk's avatar
Wolfgang Denk committed

Further special Environment Variables:
  ver		- Contains the U-Boot version string as printed
		  with the "version" command. This variable is
		  readonly (see CONFIG_VERSION_VARIABLE).
Please note that changes to some configuration parameters may take
only effect after the next boot (yes, that's just like Windoze :-).
Callback functions for environment variables:
---------------------------------------------

For some environment variables, the behavior of u-boot needs to change
when their values are changed.  This functionality allows functions to
be associated with arbitrary variables.  On creation, overwrite, or
deletion, the callback will provide the opportunity for some side
effect to happen or for the change to be rejected.

The callbacks are named and associated with a function using the
U_BOOT_ENV_CALLBACK macro in your board or driver code.

These callbacks are associated with variables in one of two ways.  The
static list can be added to by defining CONFIG_ENV_CALLBACK_LIST_STATIC
in the board configuration to a string that defines a list of
associations.  The list must be in the following format:

	entry = variable_name[:callback_name]
	list = entry[,list]

If the callback name is not specified, then the callback is deleted.
Spaces are also allowed anywhere in the list.

Callbacks can also be associated by defining the ".callbacks" variable