xref: /OK3568_Linux_fs/u-boot/README (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#
2*4882a593Smuzhiyun# (C) Copyright 2000 - 2013
3*4882a593Smuzhiyun# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun# SPDX-License-Identifier:	GPL-2.0+
6*4882a593Smuzhiyun#
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunSummary:
9*4882a593Smuzhiyun========
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunThis directory contains the source code for U-Boot, a boot loader for
12*4882a593SmuzhiyunEmbedded boards based on PowerPC, ARM, MIPS and several other
13*4882a593Smuzhiyunprocessors, which can be installed in a boot ROM and used to
14*4882a593Smuzhiyuninitialize and test the hardware or to download and run application
15*4882a593Smuzhiyuncode.
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunThe development of U-Boot is closely related to Linux: some parts of
18*4882a593Smuzhiyunthe source code originate in the Linux source tree, we have some
19*4882a593Smuzhiyunheader files in common, and special provision has been made to
20*4882a593Smuzhiyunsupport booting of Linux images.
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunSome attention has been paid to make this software easily
23*4882a593Smuzhiyunconfigurable and extendable. For instance, all monitor commands are
24*4882a593Smuzhiyunimplemented with the same call interface, so that it's very easy to
25*4882a593Smuzhiyunadd new commands. Also, instead of permanently adding rarely used
26*4882a593Smuzhiyuncode (for instance hardware test utilities) to the monitor, you can
27*4882a593Smuzhiyunload and run it dynamically.
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunStatus:
31*4882a593Smuzhiyun=======
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunIn general, all boards for which a configuration option exists in the
34*4882a593SmuzhiyunMakefile have been tested to some extent and can be considered
35*4882a593Smuzhiyun"working". In fact, many of them are used in production systems.
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunIn case of problems see the CHANGELOG file to find out who contributed
38*4882a593Smuzhiyunthe specific port. In addition, there are various MAINTAINERS files
39*4882a593Smuzhiyunscattered throughout the U-Boot source identifying the people or
40*4882a593Smuzhiyuncompanies responsible for various boards and subsystems.
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunNote: As of August, 2010, there is no longer a CHANGELOG file in the
43*4882a593Smuzhiyunactual U-Boot source tree; however, it can be created dynamically
44*4882a593Smuzhiyunfrom the Git log using:
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun	make CHANGELOG
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunWhere to get help:
50*4882a593Smuzhiyun==================
51*4882a593Smuzhiyun
52*4882a593SmuzhiyunIn case you have questions about, problems with or contributions for
53*4882a593SmuzhiyunU-Boot, you should send a message to the U-Boot mailing list at
54*4882a593Smuzhiyun<u-boot@lists.denx.de>. There is also an archive of previous traffic
55*4882a593Smuzhiyunon the mailing list - please search the archive before asking FAQ's.
56*4882a593SmuzhiyunPlease see http://lists.denx.de/pipermail/u-boot and
57*4882a593Smuzhiyunhttp://dir.gmane.org/gmane.comp.boot-loaders.u-boot
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunWhere to get source code:
61*4882a593Smuzhiyun=========================
62*4882a593Smuzhiyun
63*4882a593SmuzhiyunThe U-Boot source code is maintained in the Git repository at
64*4882a593Smuzhiyungit://www.denx.de/git/u-boot.git ; you can browse it online at
65*4882a593Smuzhiyunhttp://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=summary
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunThe "snapshot" links on this page allow you to download tarballs of
68*4882a593Smuzhiyunany version you might be interested in. Official releases are also
69*4882a593Smuzhiyunavailable for FTP download from the ftp://ftp.denx.de/pub/u-boot/
70*4882a593Smuzhiyundirectory.
71*4882a593Smuzhiyun
72*4882a593SmuzhiyunPre-built (and tested) images are available from
73*4882a593Smuzhiyunftp://ftp.denx.de/pub/u-boot/images/
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun
76*4882a593SmuzhiyunWhere we come from:
77*4882a593Smuzhiyun===================
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun- start from 8xxrom sources
80*4882a593Smuzhiyun- create PPCBoot project (http://sourceforge.net/projects/ppcboot)
81*4882a593Smuzhiyun- clean up code
82*4882a593Smuzhiyun- make it easier to add custom boards
83*4882a593Smuzhiyun- make it possible to add other [PowerPC] CPUs
84*4882a593Smuzhiyun- extend functions, especially:
85*4882a593Smuzhiyun  * Provide extended interface to Linux boot loader
86*4882a593Smuzhiyun  * S-Record download
87*4882a593Smuzhiyun  * network boot
88*4882a593Smuzhiyun  * PCMCIA / CompactFlash / ATA disk / SCSI ... boot
89*4882a593Smuzhiyun- create ARMBoot project (http://sourceforge.net/projects/armboot)
90*4882a593Smuzhiyun- add other CPU families (starting with ARM)
91*4882a593Smuzhiyun- create U-Boot project (http://sourceforge.net/projects/u-boot)
92*4882a593Smuzhiyun- current project page: see http://www.denx.de/wiki/U-Boot
93*4882a593Smuzhiyun
94*4882a593Smuzhiyun
95*4882a593SmuzhiyunNames and Spelling:
96*4882a593Smuzhiyun===================
97*4882a593Smuzhiyun
98*4882a593SmuzhiyunThe "official" name of this project is "Das U-Boot". The spelling
99*4882a593Smuzhiyun"U-Boot" shall be used in all written text (documentation, comments
100*4882a593Smuzhiyunin source files etc.). Example:
101*4882a593Smuzhiyun
102*4882a593Smuzhiyun	This is the README file for the U-Boot project.
103*4882a593Smuzhiyun
104*4882a593SmuzhiyunFile names etc. shall be based on the string "u-boot". Examples:
105*4882a593Smuzhiyun
106*4882a593Smuzhiyun	include/asm-ppc/u-boot.h
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun	#include <asm/u-boot.h>
109*4882a593Smuzhiyun
110*4882a593SmuzhiyunVariable names, preprocessor constants etc. shall be either based on
111*4882a593Smuzhiyunthe string "u_boot" or on "U_BOOT". Example:
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun	U_BOOT_VERSION		u_boot_logo
114*4882a593Smuzhiyun	IH_OS_U_BOOT		u_boot_hush_start
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun
117*4882a593SmuzhiyunVersioning:
118*4882a593Smuzhiyun===========
119*4882a593Smuzhiyun
120*4882a593SmuzhiyunStarting with the release in October 2008, the names of the releases
121*4882a593Smuzhiyunwere changed from numerical release numbers without deeper meaning
122*4882a593Smuzhiyuninto a time stamp based numbering. Regular releases are identified by
123*4882a593Smuzhiyunnames consisting of the calendar year and month of the release date.
124*4882a593SmuzhiyunAdditional fields (if present) indicate release candidates or bug fix
125*4882a593Smuzhiyunreleases in "stable" maintenance trees.
126*4882a593Smuzhiyun
127*4882a593SmuzhiyunExamples:
128*4882a593Smuzhiyun	U-Boot v2009.11	    - Release November 2009
129*4882a593Smuzhiyun	U-Boot v2009.11.1   - Release 1 in version November 2009 stable tree
130*4882a593Smuzhiyun	U-Boot v2010.09-rc1 - Release candidate 1 for September 2010 release
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun
133*4882a593SmuzhiyunDirectory Hierarchy:
134*4882a593Smuzhiyun====================
135*4882a593Smuzhiyun
136*4882a593Smuzhiyun/arch			Architecture specific files
137*4882a593Smuzhiyun  /arc			Files generic to ARC architecture
138*4882a593Smuzhiyun  /arm			Files generic to ARM architecture
139*4882a593Smuzhiyun  /m68k			Files generic to m68k architecture
140*4882a593Smuzhiyun  /microblaze		Files generic to microblaze architecture
141*4882a593Smuzhiyun  /mips			Files generic to MIPS architecture
142*4882a593Smuzhiyun  /nds32		Files generic to NDS32 architecture
143*4882a593Smuzhiyun  /nios2		Files generic to Altera NIOS2 architecture
144*4882a593Smuzhiyun  /openrisc		Files generic to OpenRISC architecture
145*4882a593Smuzhiyun  /powerpc		Files generic to PowerPC architecture
146*4882a593Smuzhiyun  /sandbox		Files generic to HW-independent "sandbox"
147*4882a593Smuzhiyun  /sh			Files generic to SH architecture
148*4882a593Smuzhiyun  /x86			Files generic to x86 architecture
149*4882a593Smuzhiyun/api			Machine/arch independent API for external apps
150*4882a593Smuzhiyun/board			Board dependent files
151*4882a593Smuzhiyun/cmd			U-Boot commands functions
152*4882a593Smuzhiyun/common			Misc architecture independent functions
153*4882a593Smuzhiyun/configs		Board default configuration files
154*4882a593Smuzhiyun/disk			Code for disk drive partition handling
155*4882a593Smuzhiyun/doc			Documentation (don't expect too much)
156*4882a593Smuzhiyun/drivers		Commonly used device drivers
157*4882a593Smuzhiyun/dts			Contains Makefile for building internal U-Boot fdt.
158*4882a593Smuzhiyun/examples		Example code for standalone applications, etc.
159*4882a593Smuzhiyun/fs			Filesystem code (cramfs, ext2, jffs2, etc.)
160*4882a593Smuzhiyun/include		Header Files
161*4882a593Smuzhiyun/lib			Library routines generic to all architectures
162*4882a593Smuzhiyun/Licenses		Various license files
163*4882a593Smuzhiyun/net			Networking code
164*4882a593Smuzhiyun/post			Power On Self Test
165*4882a593Smuzhiyun/scripts		Various build scripts and Makefiles
166*4882a593Smuzhiyun/test			Various unit test files
167*4882a593Smuzhiyun/tools			Tools to build S-Record or U-Boot images, etc.
168*4882a593Smuzhiyun
169*4882a593SmuzhiyunSoftware Configuration:
170*4882a593Smuzhiyun=======================
171*4882a593Smuzhiyun
172*4882a593SmuzhiyunConfiguration is usually done using C preprocessor defines; the
173*4882a593Smuzhiyunrationale behind that is to avoid dead code whenever possible.
174*4882a593Smuzhiyun
175*4882a593SmuzhiyunThere are two classes of configuration variables:
176*4882a593Smuzhiyun
177*4882a593Smuzhiyun* Configuration _OPTIONS_:
178*4882a593Smuzhiyun  These are selectable by the user and have names beginning with
179*4882a593Smuzhiyun  "CONFIG_".
180*4882a593Smuzhiyun
181*4882a593Smuzhiyun* Configuration _SETTINGS_:
182*4882a593Smuzhiyun  These depend on the hardware etc. and should not be meddled with if
183*4882a593Smuzhiyun  you don't know what you're doing; they have names beginning with
184*4882a593Smuzhiyun  "CONFIG_SYS_".
185*4882a593Smuzhiyun
186*4882a593SmuzhiyunPreviously, all configuration was done by hand, which involved creating
187*4882a593Smuzhiyunsymbolic links and editing configuration files manually. More recently,
188*4882a593SmuzhiyunU-Boot has added the Kbuild infrastructure used by the Linux kernel,
189*4882a593Smuzhiyunallowing you to use the "make menuconfig" command to configure your
190*4882a593Smuzhiyunbuild.
191*4882a593Smuzhiyun
192*4882a593Smuzhiyun
193*4882a593SmuzhiyunSelection of Processor Architecture and Board Type:
194*4882a593Smuzhiyun---------------------------------------------------
195*4882a593Smuzhiyun
196*4882a593SmuzhiyunFor all supported boards there are ready-to-use default
197*4882a593Smuzhiyunconfigurations available; just type "make <board_name>_defconfig".
198*4882a593Smuzhiyun
199*4882a593SmuzhiyunExample: For a TQM823L module type:
200*4882a593Smuzhiyun
201*4882a593Smuzhiyun	cd u-boot
202*4882a593Smuzhiyun	make TQM823L_defconfig
203*4882a593Smuzhiyun
204*4882a593SmuzhiyunNote: If you're looking for the default configuration file for a board
205*4882a593Smuzhiyunyou're sure used to be there but is now missing, check the file
206*4882a593Smuzhiyundoc/README.scrapyard for a list of no longer supported boards.
207*4882a593Smuzhiyun
208*4882a593SmuzhiyunSandbox Environment:
209*4882a593Smuzhiyun--------------------
210*4882a593Smuzhiyun
211*4882a593SmuzhiyunU-Boot can be built natively to run on a Linux host using the 'sandbox'
212*4882a593Smuzhiyunboard. This allows feature development which is not board- or architecture-
213*4882a593Smuzhiyunspecific to be undertaken on a native platform. The sandbox is also used to
214*4882a593Smuzhiyunrun some of U-Boot's tests.
215*4882a593Smuzhiyun
216*4882a593SmuzhiyunSee board/sandbox/README.sandbox for more details.
217*4882a593Smuzhiyun
218*4882a593Smuzhiyun
219*4882a593SmuzhiyunBoard Initialisation Flow:
220*4882a593Smuzhiyun--------------------------
221*4882a593Smuzhiyun
222*4882a593SmuzhiyunThis is the intended start-up flow for boards. This should apply for both
223*4882a593SmuzhiyunSPL and U-Boot proper (i.e. they both follow the same rules).
224*4882a593Smuzhiyun
225*4882a593SmuzhiyunNote: "SPL" stands for "Secondary Program Loader," which is explained in
226*4882a593Smuzhiyunmore detail later in this file.
227*4882a593Smuzhiyun
228*4882a593SmuzhiyunAt present, SPL mostly uses a separate code path, but the function names
229*4882a593Smuzhiyunand roles of each function are the same. Some boards or architectures
230*4882a593Smuzhiyunmay not conform to this.  At least most ARM boards which use
231*4882a593SmuzhiyunCONFIG_SPL_FRAMEWORK conform to this.
232*4882a593Smuzhiyun
233*4882a593SmuzhiyunExecution typically starts with an architecture-specific (and possibly
234*4882a593SmuzhiyunCPU-specific) start.S file, such as:
235*4882a593Smuzhiyun
236*4882a593Smuzhiyun	- arch/arm/cpu/armv7/start.S
237*4882a593Smuzhiyun	- arch/powerpc/cpu/mpc83xx/start.S
238*4882a593Smuzhiyun	- arch/mips/cpu/start.S
239*4882a593Smuzhiyun
240*4882a593Smuzhiyunand so on. From there, three functions are called; the purpose and
241*4882a593Smuzhiyunlimitations of each of these functions are described below.
242*4882a593Smuzhiyun
243*4882a593Smuzhiyunlowlevel_init():
244*4882a593Smuzhiyun	- purpose: essential init to permit execution to reach board_init_f()
245*4882a593Smuzhiyun	- no global_data or BSS
246*4882a593Smuzhiyun	- there is no stack (ARMv7 may have one but it will soon be removed)
247*4882a593Smuzhiyun	- must not set up SDRAM or use console
248*4882a593Smuzhiyun	- must only do the bare minimum to allow execution to continue to
249*4882a593Smuzhiyun		board_init_f()
250*4882a593Smuzhiyun	- this is almost never needed
251*4882a593Smuzhiyun	- return normally from this function
252*4882a593Smuzhiyun
253*4882a593Smuzhiyunboard_init_f():
254*4882a593Smuzhiyun	- purpose: set up the machine ready for running board_init_r():
255*4882a593Smuzhiyun		i.e. SDRAM and serial UART
256*4882a593Smuzhiyun	- global_data is available
257*4882a593Smuzhiyun	- stack is in SRAM
258*4882a593Smuzhiyun	- BSS is not available, so you cannot use global/static variables,
259*4882a593Smuzhiyun		only stack variables and global_data
260*4882a593Smuzhiyun
261*4882a593Smuzhiyun	Non-SPL-specific notes:
262*4882a593Smuzhiyun	- dram_init() is called to set up DRAM. If already done in SPL this
263*4882a593Smuzhiyun		can do nothing
264*4882a593Smuzhiyun
265*4882a593Smuzhiyun	SPL-specific notes:
266*4882a593Smuzhiyun	- you can override the entire board_init_f() function with your own
267*4882a593Smuzhiyun		version as needed.
268*4882a593Smuzhiyun	- preloader_console_init() can be called here in extremis
269*4882a593Smuzhiyun	- should set up SDRAM, and anything needed to make the UART work
270*4882a593Smuzhiyun	- these is no need to clear BSS, it will be done by crt0.S
271*4882a593Smuzhiyun	- must return normally from this function (don't call board_init_r()
272*4882a593Smuzhiyun		directly)
273*4882a593Smuzhiyun
274*4882a593SmuzhiyunHere the BSS is cleared. For SPL, if CONFIG_SPL_STACK_R is defined, then at
275*4882a593Smuzhiyunthis point the stack and global_data are relocated to below
276*4882a593SmuzhiyunCONFIG_SPL_STACK_R_ADDR. For non-SPL, U-Boot is relocated to run at the top of
277*4882a593Smuzhiyunmemory.
278*4882a593Smuzhiyun
279*4882a593Smuzhiyunboard_init_r():
280*4882a593Smuzhiyun	- purpose: main execution, common code
281*4882a593Smuzhiyun	- global_data is available
282*4882a593Smuzhiyun	- SDRAM is available
283*4882a593Smuzhiyun	- BSS is available, all static/global variables can be used
284*4882a593Smuzhiyun	- execution eventually continues to main_loop()
285*4882a593Smuzhiyun
286*4882a593Smuzhiyun	Non-SPL-specific notes:
287*4882a593Smuzhiyun	- U-Boot is relocated to the top of memory and is now running from
288*4882a593Smuzhiyun		there.
289*4882a593Smuzhiyun
290*4882a593Smuzhiyun	SPL-specific notes:
291*4882a593Smuzhiyun	- stack is optionally in SDRAM, if CONFIG_SPL_STACK_R is defined and
292*4882a593Smuzhiyun		CONFIG_SPL_STACK_R_ADDR points into SDRAM
293*4882a593Smuzhiyun	- preloader_console_init() can be called here - typically this is
294*4882a593Smuzhiyun		done by selecting CONFIG_SPL_BOARD_INIT and then supplying a
295*4882a593Smuzhiyun		spl_board_init() function containing this call
296*4882a593Smuzhiyun	- loads U-Boot or (in falcon mode) Linux
297*4882a593Smuzhiyun
298*4882a593Smuzhiyun
299*4882a593Smuzhiyun
300*4882a593SmuzhiyunConfiguration Options:
301*4882a593Smuzhiyun----------------------
302*4882a593Smuzhiyun
303*4882a593SmuzhiyunConfiguration depends on the combination of board and CPU type; all
304*4882a593Smuzhiyunsuch information is kept in a configuration file
305*4882a593Smuzhiyun"include/configs/<board_name>.h".
306*4882a593Smuzhiyun
307*4882a593SmuzhiyunExample: For a TQM823L module, all configuration settings are in
308*4882a593Smuzhiyun"include/configs/TQM823L.h".
309*4882a593Smuzhiyun
310*4882a593Smuzhiyun
311*4882a593SmuzhiyunMany of the options are named exactly as the corresponding Linux
312*4882a593Smuzhiyunkernel configuration options. The intention is to make it easier to
313*4882a593Smuzhiyunbuild a config tool - later.
314*4882a593Smuzhiyun
315*4882a593Smuzhiyun
316*4882a593SmuzhiyunThe following options need to be configured:
317*4882a593Smuzhiyun
318*4882a593Smuzhiyun- CPU Type:	Define exactly one, e.g. CONFIG_MPC85XX.
319*4882a593Smuzhiyun
320*4882a593Smuzhiyun- Board Type:	Define exactly one, e.g. CONFIG_MPC8540ADS.
321*4882a593Smuzhiyun
322*4882a593Smuzhiyun- Marvell Family Member
323*4882a593Smuzhiyun		CONFIG_SYS_MVFS		- define it if you want to enable
324*4882a593Smuzhiyun					  multiple fs option at one time
325*4882a593Smuzhiyun					  for marvell soc family
326*4882a593Smuzhiyun
327*4882a593Smuzhiyun- 85xx CPU Options:
328*4882a593Smuzhiyun		CONFIG_SYS_PPC64
329*4882a593Smuzhiyun
330*4882a593Smuzhiyun		Specifies that the core is a 64-bit PowerPC implementation (implements
331*4882a593Smuzhiyun		the "64" category of the Power ISA). This is necessary for ePAPR
332*4882a593Smuzhiyun		compliance, among other possible reasons.
333*4882a593Smuzhiyun
334*4882a593Smuzhiyun		CONFIG_SYS_FSL_TBCLK_DIV
335*4882a593Smuzhiyun
336*4882a593Smuzhiyun		Defines the core time base clock divider ratio compared to the
337*4882a593Smuzhiyun		system clock.  On most PQ3 devices this is 8, on newer QorIQ
338*4882a593Smuzhiyun		devices it can be 16 or 32.  The ratio varies from SoC to Soc.
339*4882a593Smuzhiyun
340*4882a593Smuzhiyun		CONFIG_SYS_FSL_PCIE_COMPAT
341*4882a593Smuzhiyun
342*4882a593Smuzhiyun		Defines the string to utilize when trying to match PCIe device
343*4882a593Smuzhiyun		tree nodes for the given platform.
344*4882a593Smuzhiyun
345*4882a593Smuzhiyun		CONFIG_SYS_FSL_ERRATUM_A004510
346*4882a593Smuzhiyun
347*4882a593Smuzhiyun		Enables a workaround for erratum A004510.  If set,
348*4882a593Smuzhiyun		then CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV and
349*4882a593Smuzhiyun		CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY must be set.
350*4882a593Smuzhiyun
351*4882a593Smuzhiyun		CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV
352*4882a593Smuzhiyun		CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV2 (optional)
353*4882a593Smuzhiyun
354*4882a593Smuzhiyun		Defines one or two SoC revisions (low 8 bits of SVR)
355*4882a593Smuzhiyun		for which the A004510 workaround should be applied.
356*4882a593Smuzhiyun
357*4882a593Smuzhiyun		The rest of SVR is either not relevant to the decision
358*4882a593Smuzhiyun		of whether the erratum is present (e.g. p2040 versus
359*4882a593Smuzhiyun		p2041) or is implied by the build target, which controls
360*4882a593Smuzhiyun		whether CONFIG_SYS_FSL_ERRATUM_A004510 is set.
361*4882a593Smuzhiyun
362*4882a593Smuzhiyun		See Freescale App Note 4493 for more information about
363*4882a593Smuzhiyun		this erratum.
364*4882a593Smuzhiyun
365*4882a593Smuzhiyun		CONFIG_A003399_NOR_WORKAROUND
366*4882a593Smuzhiyun		Enables a workaround for IFC erratum A003399. It is only
367*4882a593Smuzhiyun		required during NOR boot.
368*4882a593Smuzhiyun
369*4882a593Smuzhiyun		CONFIG_A008044_WORKAROUND
370*4882a593Smuzhiyun		Enables a workaround for T1040/T1042 erratum A008044. It is only
371*4882a593Smuzhiyun		required during NAND boot and valid for Rev 1.0 SoC revision
372*4882a593Smuzhiyun
373*4882a593Smuzhiyun		CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY
374*4882a593Smuzhiyun
375*4882a593Smuzhiyun		This is the value to write into CCSR offset 0x18600
376*4882a593Smuzhiyun		according to the A004510 workaround.
377*4882a593Smuzhiyun
378*4882a593Smuzhiyun		CONFIG_SYS_FSL_DSP_DDR_ADDR
379*4882a593Smuzhiyun		This value denotes start offset of DDR memory which is
380*4882a593Smuzhiyun		connected exclusively to the DSP cores.
381*4882a593Smuzhiyun
382*4882a593Smuzhiyun		CONFIG_SYS_FSL_DSP_M2_RAM_ADDR
383*4882a593Smuzhiyun		This value denotes start offset of M2 memory
384*4882a593Smuzhiyun		which is directly connected to the DSP core.
385*4882a593Smuzhiyun
386*4882a593Smuzhiyun		CONFIG_SYS_FSL_DSP_M3_RAM_ADDR
387*4882a593Smuzhiyun		This value denotes start offset of M3 memory which is directly
388*4882a593Smuzhiyun		connected to the DSP core.
389*4882a593Smuzhiyun
390*4882a593Smuzhiyun		CONFIG_SYS_FSL_DSP_CCSRBAR_DEFAULT
391*4882a593Smuzhiyun		This value denotes start offset of DSP CCSR space.
392*4882a593Smuzhiyun
393*4882a593Smuzhiyun		CONFIG_SYS_FSL_SINGLE_SOURCE_CLK
394*4882a593Smuzhiyun		Single Source Clock is clocking mode present in some of FSL SoC's.
395*4882a593Smuzhiyun		In this mode, a single differential clock is used to supply
396*4882a593Smuzhiyun		clocks to the sysclock, ddrclock and usbclock.
397*4882a593Smuzhiyun
398*4882a593Smuzhiyun		CONFIG_SYS_CPC_REINIT_F
399*4882a593Smuzhiyun		This CONFIG is defined when the CPC is configured as SRAM at the
400*4882a593Smuzhiyun		time of U-Boot entry and is required to be re-initialized.
401*4882a593Smuzhiyun
402*4882a593Smuzhiyun		CONFIG_DEEP_SLEEP
403*4882a593Smuzhiyun		Indicates this SoC supports deep sleep feature. If deep sleep is
404*4882a593Smuzhiyun		supported, core will start to execute uboot when wakes up.
405*4882a593Smuzhiyun
406*4882a593Smuzhiyun- Generic CPU options:
407*4882a593Smuzhiyun		CONFIG_SYS_BIG_ENDIAN, CONFIG_SYS_LITTLE_ENDIAN
408*4882a593Smuzhiyun
409*4882a593Smuzhiyun		Defines the endianess of the CPU. Implementation of those
410*4882a593Smuzhiyun		values is arch specific.
411*4882a593Smuzhiyun
412*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR
413*4882a593Smuzhiyun		Freescale DDR driver in use. This type of DDR controller is
414*4882a593Smuzhiyun		found in mpc83xx, mpc85xx, mpc86xx as well as some ARM core
415*4882a593Smuzhiyun		SoCs.
416*4882a593Smuzhiyun
417*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR_ADDR
418*4882a593Smuzhiyun		Freescale DDR memory-mapped register base.
419*4882a593Smuzhiyun
420*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR_EMU
421*4882a593Smuzhiyun		Specify emulator support for DDR. Some DDR features such as
422*4882a593Smuzhiyun		deskew training are not available.
423*4882a593Smuzhiyun
424*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDRC_GEN1
425*4882a593Smuzhiyun		Freescale DDR1 controller.
426*4882a593Smuzhiyun
427*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDRC_GEN2
428*4882a593Smuzhiyun		Freescale DDR2 controller.
429*4882a593Smuzhiyun
430*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDRC_GEN3
431*4882a593Smuzhiyun		Freescale DDR3 controller.
432*4882a593Smuzhiyun
433*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDRC_GEN4
434*4882a593Smuzhiyun		Freescale DDR4 controller.
435*4882a593Smuzhiyun
436*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDRC_ARM_GEN3
437*4882a593Smuzhiyun		Freescale DDR3 controller for ARM-based SoCs.
438*4882a593Smuzhiyun
439*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR1
440*4882a593Smuzhiyun		Board config to use DDR1. It can be enabled for SoCs with
441*4882a593Smuzhiyun		Freescale DDR1 or DDR2 controllers, depending on the board
442*4882a593Smuzhiyun		implemetation.
443*4882a593Smuzhiyun
444*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR2
445*4882a593Smuzhiyun		Board config to use DDR2. It can be enabled for SoCs with
446*4882a593Smuzhiyun		Freescale DDR2 or DDR3 controllers, depending on the board
447*4882a593Smuzhiyun		implementation.
448*4882a593Smuzhiyun
449*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR3
450*4882a593Smuzhiyun		Board config to use DDR3. It can be enabled for SoCs with
451*4882a593Smuzhiyun		Freescale DDR3 or DDR3L controllers.
452*4882a593Smuzhiyun
453*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR3L
454*4882a593Smuzhiyun		Board config to use DDR3L. It can be enabled for SoCs with
455*4882a593Smuzhiyun		DDR3L controllers.
456*4882a593Smuzhiyun
457*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR4
458*4882a593Smuzhiyun		Board config to use DDR4. It can be enabled for SoCs with
459*4882a593Smuzhiyun		DDR4 controllers.
460*4882a593Smuzhiyun
461*4882a593Smuzhiyun		CONFIG_SYS_FSL_IFC_BE
462*4882a593Smuzhiyun		Defines the IFC controller register space as Big Endian
463*4882a593Smuzhiyun
464*4882a593Smuzhiyun		CONFIG_SYS_FSL_IFC_LE
465*4882a593Smuzhiyun		Defines the IFC controller register space as Little Endian
466*4882a593Smuzhiyun
467*4882a593Smuzhiyun		CONFIG_SYS_FSL_IFC_CLK_DIV
468*4882a593Smuzhiyun		Defines divider of platform clock(clock input to IFC controller).
469*4882a593Smuzhiyun
470*4882a593Smuzhiyun		CONFIG_SYS_FSL_LBC_CLK_DIV
471*4882a593Smuzhiyun		Defines divider of platform clock(clock input to eLBC controller).
472*4882a593Smuzhiyun
473*4882a593Smuzhiyun		CONFIG_SYS_FSL_PBL_PBI
474*4882a593Smuzhiyun		It enables addition of RCW (Power on reset configuration) in built image.
475*4882a593Smuzhiyun		Please refer doc/README.pblimage for more details
476*4882a593Smuzhiyun
477*4882a593Smuzhiyun		CONFIG_SYS_FSL_PBL_RCW
478*4882a593Smuzhiyun		It adds PBI(pre-boot instructions) commands in u-boot build image.
479*4882a593Smuzhiyun		PBI commands can be used to configure SoC before it starts the execution.
480*4882a593Smuzhiyun		Please refer doc/README.pblimage for more details
481*4882a593Smuzhiyun
482*4882a593Smuzhiyun		CONFIG_SPL_FSL_PBL
483*4882a593Smuzhiyun		It adds a target to create boot binary having SPL binary in PBI format
484*4882a593Smuzhiyun		concatenated with u-boot binary.
485*4882a593Smuzhiyun
486*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR_BE
487*4882a593Smuzhiyun		Defines the DDR controller register space as Big Endian
488*4882a593Smuzhiyun
489*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR_LE
490*4882a593Smuzhiyun		Defines the DDR controller register space as Little Endian
491*4882a593Smuzhiyun
492*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY
493*4882a593Smuzhiyun		Physical address from the view of DDR controllers. It is the
494*4882a593Smuzhiyun		same as CONFIG_SYS_DDR_SDRAM_BASE for  all Power SoCs. But
495*4882a593Smuzhiyun		it could be different for ARM SoCs.
496*4882a593Smuzhiyun
497*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR_INTLV_256B
498*4882a593Smuzhiyun		DDR controller interleaving on 256-byte. This is a special
499*4882a593Smuzhiyun		interleaving mode, handled by Dickens for Freescale layerscape
500*4882a593Smuzhiyun		SoCs with ARM core.
501*4882a593Smuzhiyun
502*4882a593Smuzhiyun		CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS
503*4882a593Smuzhiyun		Number of controllers used as main memory.
504*4882a593Smuzhiyun
505*4882a593Smuzhiyun		CONFIG_SYS_FSL_OTHER_DDR_NUM_CTRLS
506*4882a593Smuzhiyun		Number of controllers used for other than main memory.
507*4882a593Smuzhiyun
508*4882a593Smuzhiyun		CONFIG_SYS_FSL_HAS_DP_DDR
509*4882a593Smuzhiyun		Defines the SoC has DP-DDR used for DPAA.
510*4882a593Smuzhiyun
511*4882a593Smuzhiyun		CONFIG_SYS_FSL_SEC_BE
512*4882a593Smuzhiyun		Defines the SEC controller register space as Big Endian
513*4882a593Smuzhiyun
514*4882a593Smuzhiyun		CONFIG_SYS_FSL_SEC_LE
515*4882a593Smuzhiyun		Defines the SEC controller register space as Little Endian
516*4882a593Smuzhiyun
517*4882a593Smuzhiyun- MIPS CPU options:
518*4882a593Smuzhiyun		CONFIG_SYS_INIT_SP_OFFSET
519*4882a593Smuzhiyun
520*4882a593Smuzhiyun		Offset relative to CONFIG_SYS_SDRAM_BASE for initial stack
521*4882a593Smuzhiyun		pointer. This is needed for the temporary stack before
522*4882a593Smuzhiyun		relocation.
523*4882a593Smuzhiyun
524*4882a593Smuzhiyun		CONFIG_SYS_MIPS_CACHE_MODE
525*4882a593Smuzhiyun
526*4882a593Smuzhiyun		Cache operation mode for the MIPS CPU.
527*4882a593Smuzhiyun		See also arch/mips/include/asm/mipsregs.h.
528*4882a593Smuzhiyun		Possible values are:
529*4882a593Smuzhiyun			CONF_CM_CACHABLE_NO_WA
530*4882a593Smuzhiyun			CONF_CM_CACHABLE_WA
531*4882a593Smuzhiyun			CONF_CM_UNCACHED
532*4882a593Smuzhiyun			CONF_CM_CACHABLE_NONCOHERENT
533*4882a593Smuzhiyun			CONF_CM_CACHABLE_CE
534*4882a593Smuzhiyun			CONF_CM_CACHABLE_COW
535*4882a593Smuzhiyun			CONF_CM_CACHABLE_CUW
536*4882a593Smuzhiyun			CONF_CM_CACHABLE_ACCELERATED
537*4882a593Smuzhiyun
538*4882a593Smuzhiyun		CONFIG_SYS_XWAY_EBU_BOOTCFG
539*4882a593Smuzhiyun
540*4882a593Smuzhiyun		Special option for Lantiq XWAY SoCs for booting from NOR flash.
541*4882a593Smuzhiyun		See also arch/mips/cpu/mips32/start.S.
542*4882a593Smuzhiyun
543*4882a593Smuzhiyun		CONFIG_XWAY_SWAP_BYTES
544*4882a593Smuzhiyun
545*4882a593Smuzhiyun		Enable compilation of tools/xway-swap-bytes needed for Lantiq
546*4882a593Smuzhiyun		XWAY SoCs for booting from NOR flash. The U-Boot image needs to
547*4882a593Smuzhiyun		be swapped if a flash programmer is used.
548*4882a593Smuzhiyun
549*4882a593Smuzhiyun- ARM options:
550*4882a593Smuzhiyun		CONFIG_SYS_EXCEPTION_VECTORS_HIGH
551*4882a593Smuzhiyun
552*4882a593Smuzhiyun		Select high exception vectors of the ARM core, e.g., do not
553*4882a593Smuzhiyun		clear the V bit of the c1 register of CP15.
554*4882a593Smuzhiyun
555*4882a593Smuzhiyun		COUNTER_FREQUENCY
556*4882a593Smuzhiyun		Generic timer clock source frequency.
557*4882a593Smuzhiyun
558*4882a593Smuzhiyun		COUNTER_FREQUENCY_REAL
559*4882a593Smuzhiyun		Generic timer clock source frequency if the real clock is
560*4882a593Smuzhiyun		different from COUNTER_FREQUENCY, and can only be determined
561*4882a593Smuzhiyun		at run time.
562*4882a593Smuzhiyun
563*4882a593Smuzhiyun- Tegra SoC options:
564*4882a593Smuzhiyun		CONFIG_TEGRA_SUPPORT_NON_SECURE
565*4882a593Smuzhiyun
566*4882a593Smuzhiyun		Support executing U-Boot in non-secure (NS) mode. Certain
567*4882a593Smuzhiyun		impossible actions will be skipped if the CPU is in NS mode,
568*4882a593Smuzhiyun		such as ARM architectural timer initialization.
569*4882a593Smuzhiyun
570*4882a593Smuzhiyun- Linux Kernel Interface:
571*4882a593Smuzhiyun		CONFIG_CLOCKS_IN_MHZ
572*4882a593Smuzhiyun
573*4882a593Smuzhiyun		U-Boot stores all clock information in Hz
574*4882a593Smuzhiyun		internally. For binary compatibility with older Linux
575*4882a593Smuzhiyun		kernels (which expect the clocks passed in the
576*4882a593Smuzhiyun		bd_info data to be in MHz) the environment variable
577*4882a593Smuzhiyun		"clocks_in_mhz" can be defined so that U-Boot
578*4882a593Smuzhiyun		converts clock data to MHZ before passing it to the
579*4882a593Smuzhiyun		Linux kernel.
580*4882a593Smuzhiyun		When CONFIG_CLOCKS_IN_MHZ is defined, a definition of
581*4882a593Smuzhiyun		"clocks_in_mhz=1" is automatically included in the
582*4882a593Smuzhiyun		default environment.
583*4882a593Smuzhiyun
584*4882a593Smuzhiyun		CONFIG_MEMSIZE_IN_BYTES		[relevant for MIPS only]
585*4882a593Smuzhiyun
586*4882a593Smuzhiyun		When transferring memsize parameter to Linux, some versions
587*4882a593Smuzhiyun		expect it to be in bytes, others in MB.
588*4882a593Smuzhiyun		Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes.
589*4882a593Smuzhiyun
590*4882a593Smuzhiyun		CONFIG_OF_LIBFDT
591*4882a593Smuzhiyun
592*4882a593Smuzhiyun		New kernel versions are expecting firmware settings to be
593*4882a593Smuzhiyun		passed using flattened device trees (based on open firmware
594*4882a593Smuzhiyun		concepts).
595*4882a593Smuzhiyun
596*4882a593Smuzhiyun		CONFIG_OF_LIBFDT
597*4882a593Smuzhiyun		 * New libfdt-based support
598*4882a593Smuzhiyun		 * Adds the "fdt" command
599*4882a593Smuzhiyun		 * The bootm command automatically updates the fdt
600*4882a593Smuzhiyun
601*4882a593Smuzhiyun		OF_TBCLK - The timebase frequency.
602*4882a593Smuzhiyun		OF_STDOUT_PATH - The path to the console device
603*4882a593Smuzhiyun
604*4882a593Smuzhiyun		boards with QUICC Engines require OF_QE to set UCC MAC
605*4882a593Smuzhiyun		addresses
606*4882a593Smuzhiyun
607*4882a593Smuzhiyun		CONFIG_OF_BOARD_SETUP
608*4882a593Smuzhiyun
609*4882a593Smuzhiyun		Board code has addition modification that it wants to make
610*4882a593Smuzhiyun		to the flat device tree before handing it off to the kernel
611*4882a593Smuzhiyun
612*4882a593Smuzhiyun		CONFIG_OF_SYSTEM_SETUP
613*4882a593Smuzhiyun
614*4882a593Smuzhiyun		Other code has addition modification that it wants to make
615*4882a593Smuzhiyun		to the flat device tree before handing it off to the kernel.
616*4882a593Smuzhiyun		This causes ft_system_setup() to be called before booting
617*4882a593Smuzhiyun		the kernel.
618*4882a593Smuzhiyun
619*4882a593Smuzhiyun		CONFIG_OF_IDE_FIXUP
620*4882a593Smuzhiyun
621*4882a593Smuzhiyun		U-Boot can detect if an IDE device is present or not.
622*4882a593Smuzhiyun		If not, and this new config option is activated, U-Boot
623*4882a593Smuzhiyun		removes the ATA node from the DTS before booting Linux,
624*4882a593Smuzhiyun		so the Linux IDE driver does not probe the device and
625*4882a593Smuzhiyun		crash. This is needed for buggy hardware (uc101) where
626*4882a593Smuzhiyun		no pull down resistor is connected to the signal IDE5V_DD7.
627*4882a593Smuzhiyun
628*4882a593Smuzhiyun		CONFIG_MACH_TYPE	[relevant for ARM only][mandatory]
629*4882a593Smuzhiyun
630*4882a593Smuzhiyun		This setting is mandatory for all boards that have only one
631*4882a593Smuzhiyun		machine type and must be used to specify the machine type
632*4882a593Smuzhiyun		number as it appears in the ARM machine registry
633*4882a593Smuzhiyun		(see http://www.arm.linux.org.uk/developer/machines/).
634*4882a593Smuzhiyun		Only boards that have multiple machine types supported
635*4882a593Smuzhiyun		in a single configuration file and the machine type is
636*4882a593Smuzhiyun		runtime discoverable, do not have to use this setting.
637*4882a593Smuzhiyun
638*4882a593Smuzhiyun- vxWorks boot parameters:
639*4882a593Smuzhiyun
640*4882a593Smuzhiyun		bootvx constructs a valid bootline using the following
641*4882a593Smuzhiyun		environments variables: bootdev, bootfile, ipaddr, netmask,
642*4882a593Smuzhiyun		serverip, gatewayip, hostname, othbootargs.
643*4882a593Smuzhiyun		It loads the vxWorks image pointed bootfile.
644*4882a593Smuzhiyun
645*4882a593Smuzhiyun		Note: If a "bootargs" environment is defined, it will overwride
646*4882a593Smuzhiyun		the defaults discussed just above.
647*4882a593Smuzhiyun
648*4882a593Smuzhiyun- Cache Configuration:
649*4882a593Smuzhiyun		CONFIG_SYS_ICACHE_OFF - Do not enable instruction cache in U-Boot
650*4882a593Smuzhiyun		CONFIG_SYS_DCACHE_OFF - Do not enable data cache in U-Boot
651*4882a593Smuzhiyun		CONFIG_SYS_L2CACHE_OFF- Do not enable L2 cache in U-Boot
652*4882a593Smuzhiyun
653*4882a593Smuzhiyun- Cache Configuration for ARM:
654*4882a593Smuzhiyun		CONFIG_SYS_L2_PL310 - Enable support for ARM PL310 L2 cache
655*4882a593Smuzhiyun				      controller
656*4882a593Smuzhiyun		CONFIG_SYS_PL310_BASE - Physical base address of PL310
657*4882a593Smuzhiyun					controller register space
658*4882a593Smuzhiyun
659*4882a593Smuzhiyun- Serial Ports:
660*4882a593Smuzhiyun		CONFIG_PL010_SERIAL
661*4882a593Smuzhiyun
662*4882a593Smuzhiyun		Define this if you want support for Amba PrimeCell PL010 UARTs.
663*4882a593Smuzhiyun
664*4882a593Smuzhiyun		CONFIG_PL011_SERIAL
665*4882a593Smuzhiyun
666*4882a593Smuzhiyun		Define this if you want support for Amba PrimeCell PL011 UARTs.
667*4882a593Smuzhiyun
668*4882a593Smuzhiyun		CONFIG_PL011_CLOCK
669*4882a593Smuzhiyun
670*4882a593Smuzhiyun		If you have Amba PrimeCell PL011 UARTs, set this variable to
671*4882a593Smuzhiyun		the clock speed of the UARTs.
672*4882a593Smuzhiyun
673*4882a593Smuzhiyun		CONFIG_PL01x_PORTS
674*4882a593Smuzhiyun
675*4882a593Smuzhiyun		If you have Amba PrimeCell PL010 or PL011 UARTs on your board,
676*4882a593Smuzhiyun		define this to a list of base addresses for each (supported)
677*4882a593Smuzhiyun		port. See e.g. include/configs/versatile.h
678*4882a593Smuzhiyun
679*4882a593Smuzhiyun		CONFIG_SERIAL_HW_FLOW_CONTROL
680*4882a593Smuzhiyun
681*4882a593Smuzhiyun		Define this variable to enable hw flow control in serial driver.
682*4882a593Smuzhiyun		Current user of this option is drivers/serial/nsl16550.c driver
683*4882a593Smuzhiyun
684*4882a593Smuzhiyun- Console Baudrate:
685*4882a593Smuzhiyun		CONFIG_BAUDRATE - in bps
686*4882a593Smuzhiyun		Select one of the baudrates listed in
687*4882a593Smuzhiyun		CONFIG_SYS_BAUDRATE_TABLE, see below.
688*4882a593Smuzhiyun
689*4882a593Smuzhiyun- Autoboot Command:
690*4882a593Smuzhiyun		CONFIG_BOOTCOMMAND
691*4882a593Smuzhiyun		Only needed when CONFIG_BOOTDELAY is enabled;
692*4882a593Smuzhiyun		define a command string that is automatically executed
693*4882a593Smuzhiyun		when no character is read on the console interface
694*4882a593Smuzhiyun		within "Boot Delay" after reset.
695*4882a593Smuzhiyun
696*4882a593Smuzhiyun		CONFIG_RAMBOOT and CONFIG_NFSBOOT
697*4882a593Smuzhiyun		The value of these goes into the environment as
698*4882a593Smuzhiyun		"ramboot" and "nfsboot" respectively, and can be used
699*4882a593Smuzhiyun		as a convenience, when switching between booting from
700*4882a593Smuzhiyun		RAM and NFS.
701*4882a593Smuzhiyun
702*4882a593Smuzhiyun- Bootcount:
703*4882a593Smuzhiyun		CONFIG_BOOTCOUNT_LIMIT
704*4882a593Smuzhiyun		Implements a mechanism for detecting a repeating reboot
705*4882a593Smuzhiyun		cycle, see:
706*4882a593Smuzhiyun		http://www.denx.de/wiki/view/DULG/UBootBootCountLimit
707*4882a593Smuzhiyun
708*4882a593Smuzhiyun		CONFIG_BOOTCOUNT_ENV
709*4882a593Smuzhiyun		If no softreset save registers are found on the hardware
710*4882a593Smuzhiyun		"bootcount" is stored in the environment. To prevent a
711*4882a593Smuzhiyun		saveenv on all reboots, the environment variable
712*4882a593Smuzhiyun		"upgrade_available" is used. If "upgrade_available" is
713*4882a593Smuzhiyun		0, "bootcount" is always 0, if "upgrade_available" is
714*4882a593Smuzhiyun		1 "bootcount" is incremented in the environment.
715*4882a593Smuzhiyun		So the Userspace Applikation must set the "upgrade_available"
716*4882a593Smuzhiyun		and "bootcount" variable to 0, if a boot was successfully.
717*4882a593Smuzhiyun
718*4882a593Smuzhiyun- Pre-Boot Commands:
719*4882a593Smuzhiyun		CONFIG_PREBOOT
720*4882a593Smuzhiyun
721*4882a593Smuzhiyun		When this option is #defined, the existence of the
722*4882a593Smuzhiyun		environment variable "preboot" will be checked
723*4882a593Smuzhiyun		immediately before starting the CONFIG_BOOTDELAY
724*4882a593Smuzhiyun		countdown and/or running the auto-boot command resp.
725*4882a593Smuzhiyun		entering interactive mode.
726*4882a593Smuzhiyun
727*4882a593Smuzhiyun		This feature is especially useful when "preboot" is
728*4882a593Smuzhiyun		automatically generated or modified. For an example
729*4882a593Smuzhiyun		see the LWMON board specific code: here "preboot" is
730*4882a593Smuzhiyun		modified when the user holds down a certain
731*4882a593Smuzhiyun		combination of keys on the (special) keyboard when
732*4882a593Smuzhiyun		booting the systems
733*4882a593Smuzhiyun
734*4882a593Smuzhiyun- Serial Download Echo Mode:
735*4882a593Smuzhiyun		CONFIG_LOADS_ECHO
736*4882a593Smuzhiyun		If defined to 1, all characters received during a
737*4882a593Smuzhiyun		serial download (using the "loads" command) are
738*4882a593Smuzhiyun		echoed back. This might be needed by some terminal
739*4882a593Smuzhiyun		emulations (like "cu"), but may as well just take
740*4882a593Smuzhiyun		time on others. This setting #define's the initial
741*4882a593Smuzhiyun		value of the "loads_echo" environment variable.
742*4882a593Smuzhiyun
743*4882a593Smuzhiyun- Kgdb Serial Baudrate: (if CONFIG_CMD_KGDB is defined)
744*4882a593Smuzhiyun		CONFIG_KGDB_BAUDRATE
745*4882a593Smuzhiyun		Select one of the baudrates listed in
746*4882a593Smuzhiyun		CONFIG_SYS_BAUDRATE_TABLE, see below.
747*4882a593Smuzhiyun
748*4882a593Smuzhiyun- Removal of commands
749*4882a593Smuzhiyun		If no commands are needed to boot, you can disable
750*4882a593Smuzhiyun		CONFIG_CMDLINE to remove them. In this case, the command line
751*4882a593Smuzhiyun		will not be available, and when U-Boot wants to execute the
752*4882a593Smuzhiyun		boot command (on start-up) it will call board_run_command()
753*4882a593Smuzhiyun		instead. This can reduce image size significantly for very
754*4882a593Smuzhiyun		simple boot procedures.
755*4882a593Smuzhiyun
756*4882a593Smuzhiyun- Regular expression support:
757*4882a593Smuzhiyun		CONFIG_REGEX
758*4882a593Smuzhiyun		If this variable is defined, U-Boot is linked against
759*4882a593Smuzhiyun		the SLRE (Super Light Regular Expression) library,
760*4882a593Smuzhiyun		which adds regex support to some commands, as for
761*4882a593Smuzhiyun		example "env grep" and "setexpr".
762*4882a593Smuzhiyun
763*4882a593Smuzhiyun- Device tree:
764*4882a593Smuzhiyun		CONFIG_OF_CONTROL
765*4882a593Smuzhiyun		If this variable is defined, U-Boot will use a device tree
766*4882a593Smuzhiyun		to configure its devices, instead of relying on statically
767*4882a593Smuzhiyun		compiled #defines in the board file. This option is
768*4882a593Smuzhiyun		experimental and only available on a few boards. The device
769*4882a593Smuzhiyun		tree is available in the global data as gd->fdt_blob.
770*4882a593Smuzhiyun
771*4882a593Smuzhiyun		U-Boot needs to get its device tree from somewhere. This can
772*4882a593Smuzhiyun		be done using one of the three options below:
773*4882a593Smuzhiyun
774*4882a593Smuzhiyun		CONFIG_OF_EMBED
775*4882a593Smuzhiyun		If this variable is defined, U-Boot will embed a device tree
776*4882a593Smuzhiyun		binary in its image. This device tree file should be in the
777*4882a593Smuzhiyun		board directory and called <soc>-<board>.dts. The binary file
778*4882a593Smuzhiyun		is then picked up in board_init_f() and made available through
779*4882a593Smuzhiyun		the global data structure as gd->fdt_blob.
780*4882a593Smuzhiyun
781*4882a593Smuzhiyun		CONFIG_OF_SEPARATE
782*4882a593Smuzhiyun		If this variable is defined, U-Boot will build a device tree
783*4882a593Smuzhiyun		binary. It will be called u-boot.dtb. Architecture-specific
784*4882a593Smuzhiyun		code will locate it at run-time. Generally this works by:
785*4882a593Smuzhiyun
786*4882a593Smuzhiyun			cat u-boot.bin u-boot.dtb >image.bin
787*4882a593Smuzhiyun
788*4882a593Smuzhiyun		and in fact, U-Boot does this for you, creating a file called
789*4882a593Smuzhiyun		u-boot-dtb.bin which is useful in the common case. You can
790*4882a593Smuzhiyun		still use the individual files if you need something more
791*4882a593Smuzhiyun		exotic.
792*4882a593Smuzhiyun
793*4882a593Smuzhiyun		CONFIG_OF_BOARD
794*4882a593Smuzhiyun		If this variable is defined, U-Boot will use the device tree
795*4882a593Smuzhiyun		provided by the board at runtime instead of embedding one with
796*4882a593Smuzhiyun		the image. Only boards defining board_fdt_blob_setup() support
797*4882a593Smuzhiyun		this option (see include/fdtdec.h file).
798*4882a593Smuzhiyun
799*4882a593Smuzhiyun- Watchdog:
800*4882a593Smuzhiyun		CONFIG_WATCHDOG
801*4882a593Smuzhiyun		If this variable is defined, it enables watchdog
802*4882a593Smuzhiyun		support for the SoC. There must be support in the SoC
803*4882a593Smuzhiyun		specific code for a watchdog. For the 8xx
804*4882a593Smuzhiyun		CPUs, the SIU Watchdog feature is enabled in the SYPCR
805*4882a593Smuzhiyun		register.  When supported for a specific SoC is
806*4882a593Smuzhiyun		available, then no further board specific code should
807*4882a593Smuzhiyun		be needed to use it.
808*4882a593Smuzhiyun
809*4882a593Smuzhiyun		CONFIG_HW_WATCHDOG
810*4882a593Smuzhiyun		When using a watchdog circuitry external to the used
811*4882a593Smuzhiyun		SoC, then define this variable and provide board
812*4882a593Smuzhiyun		specific code for the "hw_watchdog_reset" function.
813*4882a593Smuzhiyun
814*4882a593Smuzhiyun		CONFIG_AT91_HW_WDT_TIMEOUT
815*4882a593Smuzhiyun		specify the timeout in seconds. default 2 seconds.
816*4882a593Smuzhiyun
817*4882a593Smuzhiyun- U-Boot Version:
818*4882a593Smuzhiyun		CONFIG_VERSION_VARIABLE
819*4882a593Smuzhiyun		If this variable is defined, an environment variable
820*4882a593Smuzhiyun		named "ver" is created by U-Boot showing the U-Boot
821*4882a593Smuzhiyun		version as printed by the "version" command.
822*4882a593Smuzhiyun		Any change to this variable will be reverted at the
823*4882a593Smuzhiyun		next reset.
824*4882a593Smuzhiyun
825*4882a593Smuzhiyun- Real-Time Clock:
826*4882a593Smuzhiyun
827*4882a593Smuzhiyun		When CONFIG_CMD_DATE is selected, the type of the RTC
828*4882a593Smuzhiyun		has to be selected, too. Define exactly one of the
829*4882a593Smuzhiyun		following options:
830*4882a593Smuzhiyun
831*4882a593Smuzhiyun		CONFIG_RTC_PCF8563	- use Philips PCF8563 RTC
832*4882a593Smuzhiyun		CONFIG_RTC_MC13XXX	- use MC13783 or MC13892 RTC
833*4882a593Smuzhiyun		CONFIG_RTC_MC146818	- use MC146818 RTC
834*4882a593Smuzhiyun		CONFIG_RTC_DS1307	- use Maxim, Inc. DS1307 RTC
835*4882a593Smuzhiyun		CONFIG_RTC_DS1337	- use Maxim, Inc. DS1337 RTC
836*4882a593Smuzhiyun		CONFIG_RTC_DS1338	- use Maxim, Inc. DS1338 RTC
837*4882a593Smuzhiyun		CONFIG_RTC_DS1339	- use Maxim, Inc. DS1339 RTC
838*4882a593Smuzhiyun		CONFIG_RTC_DS164x	- use Dallas DS164x RTC
839*4882a593Smuzhiyun		CONFIG_RTC_ISL1208	- use Intersil ISL1208 RTC
840*4882a593Smuzhiyun		CONFIG_RTC_MAX6900	- use Maxim, Inc. MAX6900 RTC
841*4882a593Smuzhiyun		CONFIG_RTC_DS1337_NOOSC	- Turn off the OSC output for DS1337
842*4882a593Smuzhiyun		CONFIG_SYS_RV3029_TCR	- enable trickle charger on
843*4882a593Smuzhiyun					  RV3029 RTC.
844*4882a593Smuzhiyun
845*4882a593Smuzhiyun		Note that if the RTC uses I2C, then the I2C interface
846*4882a593Smuzhiyun		must also be configured. See I2C Support, below.
847*4882a593Smuzhiyun
848*4882a593Smuzhiyun- GPIO Support:
849*4882a593Smuzhiyun		CONFIG_PCA953X		- use NXP's PCA953X series I2C GPIO
850*4882a593Smuzhiyun
851*4882a593Smuzhiyun		The CONFIG_SYS_I2C_PCA953X_WIDTH option specifies a list of
852*4882a593Smuzhiyun		chip-ngpio pairs that tell the PCA953X driver the number of
853*4882a593Smuzhiyun		pins supported by a particular chip.
854*4882a593Smuzhiyun
855*4882a593Smuzhiyun		Note that if the GPIO device uses I2C, then the I2C interface
856*4882a593Smuzhiyun		must also be configured. See I2C Support, below.
857*4882a593Smuzhiyun
858*4882a593Smuzhiyun- I/O tracing:
859*4882a593Smuzhiyun		When CONFIG_IO_TRACE is selected, U-Boot intercepts all I/O
860*4882a593Smuzhiyun		accesses and can checksum them or write a list of them out
861*4882a593Smuzhiyun		to memory. See the 'iotrace' command for details. This is
862*4882a593Smuzhiyun		useful for testing device drivers since it can confirm that
863*4882a593Smuzhiyun		the driver behaves the same way before and after a code
864*4882a593Smuzhiyun		change. Currently this is supported on sandbox and arm. To
865*4882a593Smuzhiyun		add support for your architecture, add '#include <iotrace.h>'
866*4882a593Smuzhiyun		to the bottom of arch/<arch>/include/asm/io.h and test.
867*4882a593Smuzhiyun
868*4882a593Smuzhiyun		Example output from the 'iotrace stats' command is below.
869*4882a593Smuzhiyun		Note that if the trace buffer is exhausted, the checksum will
870*4882a593Smuzhiyun		still continue to operate.
871*4882a593Smuzhiyun
872*4882a593Smuzhiyun			iotrace is enabled
873*4882a593Smuzhiyun			Start:  10000000	(buffer start address)
874*4882a593Smuzhiyun			Size:   00010000	(buffer size)
875*4882a593Smuzhiyun			Offset: 00000120	(current buffer offset)
876*4882a593Smuzhiyun			Output: 10000120	(start + offset)
877*4882a593Smuzhiyun			Count:  00000018	(number of trace records)
878*4882a593Smuzhiyun			CRC32:  9526fb66	(CRC32 of all trace records)
879*4882a593Smuzhiyun
880*4882a593Smuzhiyun- Timestamp Support:
881*4882a593Smuzhiyun
882*4882a593Smuzhiyun		When CONFIG_TIMESTAMP is selected, the timestamp
883*4882a593Smuzhiyun		(date and time) of an image is printed by image
884*4882a593Smuzhiyun		commands like bootm or iminfo. This option is
885*4882a593Smuzhiyun		automatically enabled when you select CONFIG_CMD_DATE .
886*4882a593Smuzhiyun
887*4882a593Smuzhiyun- Partition Labels (disklabels) Supported:
888*4882a593Smuzhiyun		Zero or more of the following:
889*4882a593Smuzhiyun		CONFIG_MAC_PARTITION   Apple's MacOS partition table.
890*4882a593Smuzhiyun		CONFIG_ISO_PARTITION   ISO partition table, used on CDROM etc.
891*4882a593Smuzhiyun		CONFIG_EFI_PARTITION   GPT partition table, common when EFI is the
892*4882a593Smuzhiyun				       bootloader.  Note 2TB partition limit; see
893*4882a593Smuzhiyun				       disk/part_efi.c
894*4882a593Smuzhiyun		CONFIG_SCSI) you must configure support for at
895*4882a593Smuzhiyun		least one non-MTD partition type as well.
896*4882a593Smuzhiyun
897*4882a593Smuzhiyun- IDE Reset method:
898*4882a593Smuzhiyun		CONFIG_IDE_RESET_ROUTINE - this is defined in several
899*4882a593Smuzhiyun		board configurations files but used nowhere!
900*4882a593Smuzhiyun
901*4882a593Smuzhiyun		CONFIG_IDE_RESET - is this is defined, IDE Reset will
902*4882a593Smuzhiyun		be performed by calling the function
903*4882a593Smuzhiyun			ide_set_reset(int reset)
904*4882a593Smuzhiyun		which has to be defined in a board specific file
905*4882a593Smuzhiyun
906*4882a593Smuzhiyun- ATAPI Support:
907*4882a593Smuzhiyun		CONFIG_ATAPI
908*4882a593Smuzhiyun
909*4882a593Smuzhiyun		Set this to enable ATAPI support.
910*4882a593Smuzhiyun
911*4882a593Smuzhiyun- LBA48 Support
912*4882a593Smuzhiyun		CONFIG_LBA48
913*4882a593Smuzhiyun
914*4882a593Smuzhiyun		Set this to enable support for disks larger than 137GB
915*4882a593Smuzhiyun		Also look at CONFIG_SYS_64BIT_LBA.
916*4882a593Smuzhiyun		Whithout these , LBA48 support uses 32bit variables and will 'only'
917*4882a593Smuzhiyun		support disks up to 2.1TB.
918*4882a593Smuzhiyun
919*4882a593Smuzhiyun		CONFIG_SYS_64BIT_LBA:
920*4882a593Smuzhiyun			When enabled, makes the IDE subsystem use 64bit sector addresses.
921*4882a593Smuzhiyun			Default is 32bit.
922*4882a593Smuzhiyun
923*4882a593Smuzhiyun- SCSI Support:
924*4882a593Smuzhiyun		CONFIG_SYS_SCSI_MAX_LUN [8], CONFIG_SYS_SCSI_MAX_SCSI_ID [7] and
925*4882a593Smuzhiyun		CONFIG_SYS_SCSI_MAX_DEVICE [CONFIG_SYS_SCSI_MAX_SCSI_ID *
926*4882a593Smuzhiyun		CONFIG_SYS_SCSI_MAX_LUN] can be adjusted to define the
927*4882a593Smuzhiyun		maximum numbers of LUNs, SCSI ID's and target
928*4882a593Smuzhiyun		devices.
929*4882a593Smuzhiyun
930*4882a593Smuzhiyun		The environment variable 'scsidevs' is set to the number of
931*4882a593Smuzhiyun		SCSI devices found during the last scan.
932*4882a593Smuzhiyun
933*4882a593Smuzhiyun- NETWORK Support (PCI):
934*4882a593Smuzhiyun		CONFIG_E1000
935*4882a593Smuzhiyun		Support for Intel 8254x/8257x gigabit chips.
936*4882a593Smuzhiyun
937*4882a593Smuzhiyun		CONFIG_E1000_SPI
938*4882a593Smuzhiyun		Utility code for direct access to the SPI bus on Intel 8257x.
939*4882a593Smuzhiyun		This does not do anything useful unless you set at least one
940*4882a593Smuzhiyun		of CONFIG_CMD_E1000 or CONFIG_E1000_SPI_GENERIC.
941*4882a593Smuzhiyun
942*4882a593Smuzhiyun		CONFIG_E1000_SPI_GENERIC
943*4882a593Smuzhiyun		Allow generic access to the SPI bus on the Intel 8257x, for
944*4882a593Smuzhiyun		example with the "sspi" command.
945*4882a593Smuzhiyun
946*4882a593Smuzhiyun		CONFIG_EEPRO100
947*4882a593Smuzhiyun		Support for Intel 82557/82559/82559ER chips.
948*4882a593Smuzhiyun		Optional CONFIG_EEPRO100_SROM_WRITE enables EEPROM
949*4882a593Smuzhiyun		write routine for first time initialisation.
950*4882a593Smuzhiyun
951*4882a593Smuzhiyun		CONFIG_TULIP
952*4882a593Smuzhiyun		Support for Digital 2114x chips.
953*4882a593Smuzhiyun		Optional CONFIG_TULIP_SELECT_MEDIA for board specific
954*4882a593Smuzhiyun		modem chip initialisation (KS8761/QS6611).
955*4882a593Smuzhiyun
956*4882a593Smuzhiyun		CONFIG_NATSEMI
957*4882a593Smuzhiyun		Support for National dp83815 chips.
958*4882a593Smuzhiyun
959*4882a593Smuzhiyun		CONFIG_NS8382X
960*4882a593Smuzhiyun		Support for National dp8382[01] gigabit chips.
961*4882a593Smuzhiyun
962*4882a593Smuzhiyun- NETWORK Support (other):
963*4882a593Smuzhiyun
964*4882a593Smuzhiyun		CONFIG_DRIVER_AT91EMAC
965*4882a593Smuzhiyun		Support for AT91RM9200 EMAC.
966*4882a593Smuzhiyun
967*4882a593Smuzhiyun			CONFIG_RMII
968*4882a593Smuzhiyun			Define this to use reduced MII inteface
969*4882a593Smuzhiyun
970*4882a593Smuzhiyun			CONFIG_DRIVER_AT91EMAC_QUIET
971*4882a593Smuzhiyun			If this defined, the driver is quiet.
972*4882a593Smuzhiyun			The driver doen't show link status messages.
973*4882a593Smuzhiyun
974*4882a593Smuzhiyun		CONFIG_CALXEDA_XGMAC
975*4882a593Smuzhiyun		Support for the Calxeda XGMAC device
976*4882a593Smuzhiyun
977*4882a593Smuzhiyun		CONFIG_LAN91C96
978*4882a593Smuzhiyun		Support for SMSC's LAN91C96 chips.
979*4882a593Smuzhiyun
980*4882a593Smuzhiyun			CONFIG_LAN91C96_USE_32_BIT
981*4882a593Smuzhiyun			Define this to enable 32 bit addressing
982*4882a593Smuzhiyun
983*4882a593Smuzhiyun		CONFIG_SMC91111
984*4882a593Smuzhiyun		Support for SMSC's LAN91C111 chip
985*4882a593Smuzhiyun
986*4882a593Smuzhiyun			CONFIG_SMC91111_BASE
987*4882a593Smuzhiyun			Define this to hold the physical address
988*4882a593Smuzhiyun			of the device (I/O space)
989*4882a593Smuzhiyun
990*4882a593Smuzhiyun			CONFIG_SMC_USE_32_BIT
991*4882a593Smuzhiyun			Define this if data bus is 32 bits
992*4882a593Smuzhiyun
993*4882a593Smuzhiyun			CONFIG_SMC_USE_IOFUNCS
994*4882a593Smuzhiyun			Define this to use i/o functions instead of macros
995*4882a593Smuzhiyun			(some hardware wont work with macros)
996*4882a593Smuzhiyun
997*4882a593Smuzhiyun		CONFIG_DRIVER_TI_EMAC
998*4882a593Smuzhiyun		Support for davinci emac
999*4882a593Smuzhiyun
1000*4882a593Smuzhiyun			CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT
1001*4882a593Smuzhiyun			Define this if you have more then 3 PHYs.
1002*4882a593Smuzhiyun
1003*4882a593Smuzhiyun		CONFIG_FTGMAC100
1004*4882a593Smuzhiyun		Support for Faraday's FTGMAC100 Gigabit SoC Ethernet
1005*4882a593Smuzhiyun
1006*4882a593Smuzhiyun			CONFIG_FTGMAC100_EGIGA
1007*4882a593Smuzhiyun			Define this to use GE link update with gigabit PHY.
1008*4882a593Smuzhiyun			Define this if FTGMAC100 is connected to gigabit PHY.
1009*4882a593Smuzhiyun			If your system has 10/100 PHY only, it might not occur
1010*4882a593Smuzhiyun			wrong behavior. Because PHY usually return timeout or
1011*4882a593Smuzhiyun			useless data when polling gigabit status and gigabit
1012*4882a593Smuzhiyun			control registers. This behavior won't affect the
1013*4882a593Smuzhiyun			correctnessof 10/100 link speed update.
1014*4882a593Smuzhiyun
1015*4882a593Smuzhiyun		CONFIG_SMC911X
1016*4882a593Smuzhiyun		Support for SMSC's LAN911x and LAN921x chips
1017*4882a593Smuzhiyun
1018*4882a593Smuzhiyun			CONFIG_SMC911X_BASE
1019*4882a593Smuzhiyun			Define this to hold the physical address
1020*4882a593Smuzhiyun			of the device (I/O space)
1021*4882a593Smuzhiyun
1022*4882a593Smuzhiyun			CONFIG_SMC911X_32_BIT
1023*4882a593Smuzhiyun			Define this if data bus is 32 bits
1024*4882a593Smuzhiyun
1025*4882a593Smuzhiyun			CONFIG_SMC911X_16_BIT
1026*4882a593Smuzhiyun			Define this if data bus is 16 bits. If your processor
1027*4882a593Smuzhiyun			automatically converts one 32 bit word to two 16 bit
1028*4882a593Smuzhiyun			words you may also try CONFIG_SMC911X_32_BIT.
1029*4882a593Smuzhiyun
1030*4882a593Smuzhiyun		CONFIG_SH_ETHER
1031*4882a593Smuzhiyun		Support for Renesas on-chip Ethernet controller
1032*4882a593Smuzhiyun
1033*4882a593Smuzhiyun			CONFIG_SH_ETHER_USE_PORT
1034*4882a593Smuzhiyun			Define the number of ports to be used
1035*4882a593Smuzhiyun
1036*4882a593Smuzhiyun			CONFIG_SH_ETHER_PHY_ADDR
1037*4882a593Smuzhiyun			Define the ETH PHY's address
1038*4882a593Smuzhiyun
1039*4882a593Smuzhiyun			CONFIG_SH_ETHER_CACHE_WRITEBACK
1040*4882a593Smuzhiyun			If this option is set, the driver enables cache flush.
1041*4882a593Smuzhiyun
1042*4882a593Smuzhiyun- PWM Support:
1043*4882a593Smuzhiyun		CONFIG_PWM_IMX
1044*4882a593Smuzhiyun		Support for PWM module on the imx6.
1045*4882a593Smuzhiyun
1046*4882a593Smuzhiyun- TPM Support:
1047*4882a593Smuzhiyun		CONFIG_TPM
1048*4882a593Smuzhiyun		Support TPM devices.
1049*4882a593Smuzhiyun
1050*4882a593Smuzhiyun		CONFIG_TPM_TIS_INFINEON
1051*4882a593Smuzhiyun		Support for Infineon i2c bus TPM devices. Only one device
1052*4882a593Smuzhiyun		per system is supported at this time.
1053*4882a593Smuzhiyun
1054*4882a593Smuzhiyun			CONFIG_TPM_TIS_I2C_BURST_LIMITATION
1055*4882a593Smuzhiyun			Define the burst count bytes upper limit
1056*4882a593Smuzhiyun
1057*4882a593Smuzhiyun		CONFIG_TPM_ST33ZP24
1058*4882a593Smuzhiyun		Support for STMicroelectronics TPM devices. Requires DM_TPM support.
1059*4882a593Smuzhiyun
1060*4882a593Smuzhiyun			CONFIG_TPM_ST33ZP24_I2C
1061*4882a593Smuzhiyun			Support for STMicroelectronics ST33ZP24 I2C devices.
1062*4882a593Smuzhiyun			Requires TPM_ST33ZP24 and I2C.
1063*4882a593Smuzhiyun
1064*4882a593Smuzhiyun			CONFIG_TPM_ST33ZP24_SPI
1065*4882a593Smuzhiyun			Support for STMicroelectronics ST33ZP24 SPI devices.
1066*4882a593Smuzhiyun			Requires TPM_ST33ZP24 and SPI.
1067*4882a593Smuzhiyun
1068*4882a593Smuzhiyun		CONFIG_TPM_ATMEL_TWI
1069*4882a593Smuzhiyun		Support for Atmel TWI TPM device. Requires I2C support.
1070*4882a593Smuzhiyun
1071*4882a593Smuzhiyun		CONFIG_TPM_TIS_LPC
1072*4882a593Smuzhiyun		Support for generic parallel port TPM devices. Only one device
1073*4882a593Smuzhiyun		per system is supported at this time.
1074*4882a593Smuzhiyun
1075*4882a593Smuzhiyun			CONFIG_TPM_TIS_BASE_ADDRESS
1076*4882a593Smuzhiyun			Base address where the generic TPM device is mapped
1077*4882a593Smuzhiyun			to. Contemporary x86 systems usually map it at
1078*4882a593Smuzhiyun			0xfed40000.
1079*4882a593Smuzhiyun
1080*4882a593Smuzhiyun		CONFIG_TPM
1081*4882a593Smuzhiyun		Define this to enable the TPM support library which provides
1082*4882a593Smuzhiyun		functional interfaces to some TPM commands.
1083*4882a593Smuzhiyun		Requires support for a TPM device.
1084*4882a593Smuzhiyun
1085*4882a593Smuzhiyun		CONFIG_TPM_AUTH_SESSIONS
1086*4882a593Smuzhiyun		Define this to enable authorized functions in the TPM library.
1087*4882a593Smuzhiyun		Requires CONFIG_TPM and CONFIG_SHA1.
1088*4882a593Smuzhiyun
1089*4882a593Smuzhiyun- USB Support:
1090*4882a593Smuzhiyun		At the moment only the UHCI host controller is
1091*4882a593Smuzhiyun		supported (PIP405, MIP405); define
1092*4882a593Smuzhiyun		CONFIG_USB_UHCI to enable it.
1093*4882a593Smuzhiyun		define CONFIG_USB_KEYBOARD to enable the USB Keyboard
1094*4882a593Smuzhiyun		and define CONFIG_USB_STORAGE to enable the USB
1095*4882a593Smuzhiyun		storage devices.
1096*4882a593Smuzhiyun		Note:
1097*4882a593Smuzhiyun		Supported are USB Keyboards and USB Floppy drives
1098*4882a593Smuzhiyun		(TEAC FD-05PUB).
1099*4882a593Smuzhiyun
1100*4882a593Smuzhiyun		CONFIG_USB_EHCI_TXFIFO_THRESH enables setting of the
1101*4882a593Smuzhiyun		txfilltuning field in the EHCI controller on reset.
1102*4882a593Smuzhiyun
1103*4882a593Smuzhiyun		CONFIG_USB_DWC2_REG_ADDR the physical CPU address of the DWC2
1104*4882a593Smuzhiyun		HW module registers.
1105*4882a593Smuzhiyun
1106*4882a593Smuzhiyun- USB Device:
1107*4882a593Smuzhiyun		Define the below if you wish to use the USB console.
1108*4882a593Smuzhiyun		Once firmware is rebuilt from a serial console issue the
1109*4882a593Smuzhiyun		command "setenv stdin usbtty; setenv stdout usbtty" and
1110*4882a593Smuzhiyun		attach your USB cable. The Unix command "dmesg" should print
1111*4882a593Smuzhiyun		it has found a new device. The environment variable usbtty
1112*4882a593Smuzhiyun		can be set to gserial or cdc_acm to enable your device to
1113*4882a593Smuzhiyun		appear to a USB host as a Linux gserial device or a
1114*4882a593Smuzhiyun		Common Device Class Abstract Control Model serial device.
1115*4882a593Smuzhiyun		If you select usbtty = gserial you should be able to enumerate
1116*4882a593Smuzhiyun		a Linux host by
1117*4882a593Smuzhiyun		# modprobe usbserial vendor=0xVendorID product=0xProductID
1118*4882a593Smuzhiyun		else if using cdc_acm, simply setting the environment
1119*4882a593Smuzhiyun		variable usbtty to be cdc_acm should suffice. The following
1120*4882a593Smuzhiyun		might be defined in YourBoardName.h
1121*4882a593Smuzhiyun
1122*4882a593Smuzhiyun			CONFIG_USB_DEVICE
1123*4882a593Smuzhiyun			Define this to build a UDC device
1124*4882a593Smuzhiyun
1125*4882a593Smuzhiyun			CONFIG_USB_TTY
1126*4882a593Smuzhiyun			Define this to have a tty type of device available to
1127*4882a593Smuzhiyun			talk to the UDC device
1128*4882a593Smuzhiyun
1129*4882a593Smuzhiyun			CONFIG_USBD_HS
1130*4882a593Smuzhiyun			Define this to enable the high speed support for usb
1131*4882a593Smuzhiyun			device and usbtty. If this feature is enabled, a routine
1132*4882a593Smuzhiyun			int is_usbd_high_speed(void)
1133*4882a593Smuzhiyun			also needs to be defined by the driver to dynamically poll
1134*4882a593Smuzhiyun			whether the enumeration has succeded at high speed or full
1135*4882a593Smuzhiyun			speed.
1136*4882a593Smuzhiyun
1137*4882a593Smuzhiyun			CONFIG_SYS_CONSOLE_IS_IN_ENV
1138*4882a593Smuzhiyun			Define this if you want stdin, stdout &/or stderr to
1139*4882a593Smuzhiyun			be set to usbtty.
1140*4882a593Smuzhiyun
1141*4882a593Smuzhiyun		If you have a USB-IF assigned VendorID then you may wish to
1142*4882a593Smuzhiyun		define your own vendor specific values either in BoardName.h
1143*4882a593Smuzhiyun		or directly in usbd_vendor_info.h. If you don't define
1144*4882a593Smuzhiyun		CONFIG_USBD_MANUFACTURER, CONFIG_USBD_PRODUCT_NAME,
1145*4882a593Smuzhiyun		CONFIG_USBD_VENDORID and CONFIG_USBD_PRODUCTID, then U-Boot
1146*4882a593Smuzhiyun		should pretend to be a Linux device to it's target host.
1147*4882a593Smuzhiyun
1148*4882a593Smuzhiyun			CONFIG_USBD_MANUFACTURER
1149*4882a593Smuzhiyun			Define this string as the name of your company for
1150*4882a593Smuzhiyun			- CONFIG_USBD_MANUFACTURER "my company"
1151*4882a593Smuzhiyun
1152*4882a593Smuzhiyun			CONFIG_USBD_PRODUCT_NAME
1153*4882a593Smuzhiyun			Define this string as the name of your product
1154*4882a593Smuzhiyun			- CONFIG_USBD_PRODUCT_NAME "acme usb device"
1155*4882a593Smuzhiyun
1156*4882a593Smuzhiyun			CONFIG_USBD_VENDORID
1157*4882a593Smuzhiyun			Define this as your assigned Vendor ID from the USB
1158*4882a593Smuzhiyun			Implementors Forum. This *must* be a genuine Vendor ID
1159*4882a593Smuzhiyun			to avoid polluting the USB namespace.
1160*4882a593Smuzhiyun			- CONFIG_USBD_VENDORID 0xFFFF
1161*4882a593Smuzhiyun
1162*4882a593Smuzhiyun			CONFIG_USBD_PRODUCTID
1163*4882a593Smuzhiyun			Define this as the unique Product ID
1164*4882a593Smuzhiyun			for your device
1165*4882a593Smuzhiyun			- CONFIG_USBD_PRODUCTID 0xFFFF
1166*4882a593Smuzhiyun
1167*4882a593Smuzhiyun- ULPI Layer Support:
1168*4882a593Smuzhiyun		The ULPI (UTMI Low Pin (count) Interface) PHYs are supported via
1169*4882a593Smuzhiyun		the generic ULPI layer. The generic layer accesses the ULPI PHY
1170*4882a593Smuzhiyun		via the platform viewport, so you need both the genric layer and
1171*4882a593Smuzhiyun		the viewport enabled. Currently only Chipidea/ARC based
1172*4882a593Smuzhiyun		viewport is supported.
1173*4882a593Smuzhiyun		To enable the ULPI layer support, define CONFIG_USB_ULPI and
1174*4882a593Smuzhiyun		CONFIG_USB_ULPI_VIEWPORT in your board configuration file.
1175*4882a593Smuzhiyun		If your ULPI phy needs a different reference clock than the
1176*4882a593Smuzhiyun		standard 24 MHz then you have to define CONFIG_ULPI_REF_CLK to
1177*4882a593Smuzhiyun		the appropriate value in Hz.
1178*4882a593Smuzhiyun
1179*4882a593Smuzhiyun- MMC Support:
1180*4882a593Smuzhiyun		The MMC controller on the Intel PXA is supported. To
1181*4882a593Smuzhiyun		enable this define CONFIG_MMC. The MMC can be
1182*4882a593Smuzhiyun		accessed from the boot prompt by mapping the device
1183*4882a593Smuzhiyun		to physical memory similar to flash. Command line is
1184*4882a593Smuzhiyun		enabled with CONFIG_CMD_MMC. The MMC driver also works with
1185*4882a593Smuzhiyun		the FAT fs. This is enabled with CONFIG_CMD_FAT.
1186*4882a593Smuzhiyun
1187*4882a593Smuzhiyun		CONFIG_SH_MMCIF
1188*4882a593Smuzhiyun		Support for Renesas on-chip MMCIF controller
1189*4882a593Smuzhiyun
1190*4882a593Smuzhiyun			CONFIG_SH_MMCIF_ADDR
1191*4882a593Smuzhiyun			Define the base address of MMCIF registers
1192*4882a593Smuzhiyun
1193*4882a593Smuzhiyun			CONFIG_SH_MMCIF_CLK
1194*4882a593Smuzhiyun			Define the clock frequency for MMCIF
1195*4882a593Smuzhiyun
1196*4882a593Smuzhiyun		CONFIG_SUPPORT_EMMC_BOOT
1197*4882a593Smuzhiyun		Enable some additional features of the eMMC boot partitions.
1198*4882a593Smuzhiyun
1199*4882a593Smuzhiyun		CONFIG_SUPPORT_EMMC_RPMB
1200*4882a593Smuzhiyun		Enable the commands for reading, writing and programming the
1201*4882a593Smuzhiyun		key for the Replay Protection Memory Block partition in eMMC.
1202*4882a593Smuzhiyun
1203*4882a593Smuzhiyun- USB Device Firmware Update (DFU) class support:
1204*4882a593Smuzhiyun		CONFIG_USB_FUNCTION_DFU
1205*4882a593Smuzhiyun		This enables the USB portion of the DFU USB class
1206*4882a593Smuzhiyun
1207*4882a593Smuzhiyun		CONFIG_DFU_MMC
1208*4882a593Smuzhiyun		This enables support for exposing (e)MMC devices via DFU.
1209*4882a593Smuzhiyun
1210*4882a593Smuzhiyun		CONFIG_DFU_NAND
1211*4882a593Smuzhiyun		This enables support for exposing NAND devices via DFU.
1212*4882a593Smuzhiyun
1213*4882a593Smuzhiyun		CONFIG_DFU_RAM
1214*4882a593Smuzhiyun		This enables support for exposing RAM via DFU.
1215*4882a593Smuzhiyun		Note: DFU spec refer to non-volatile memory usage, but
1216*4882a593Smuzhiyun		allow usages beyond the scope of spec - here RAM usage,
1217*4882a593Smuzhiyun		one that would help mostly the developer.
1218*4882a593Smuzhiyun
1219*4882a593Smuzhiyun		CONFIG_SYS_DFU_DATA_BUF_SIZE
1220*4882a593Smuzhiyun		Dfu transfer uses a buffer before writing data to the
1221*4882a593Smuzhiyun		raw storage device. Make the size (in bytes) of this buffer
1222*4882a593Smuzhiyun		configurable. The size of this buffer is also configurable
1223*4882a593Smuzhiyun		through the "dfu_bufsiz" environment variable.
1224*4882a593Smuzhiyun
1225*4882a593Smuzhiyun		CONFIG_SYS_DFU_MAX_FILE_SIZE
1226*4882a593Smuzhiyun		When updating files rather than the raw storage device,
1227*4882a593Smuzhiyun		we use a static buffer to copy the file into and then write
1228*4882a593Smuzhiyun		the buffer once we've been given the whole file.  Define
1229*4882a593Smuzhiyun		this to the maximum filesize (in bytes) for the buffer.
1230*4882a593Smuzhiyun		Default is 4 MiB if undefined.
1231*4882a593Smuzhiyun
1232*4882a593Smuzhiyun		DFU_DEFAULT_POLL_TIMEOUT
1233*4882a593Smuzhiyun		Poll timeout [ms], is the timeout a device can send to the
1234*4882a593Smuzhiyun		host. The host must wait for this timeout before sending
1235*4882a593Smuzhiyun		a subsequent DFU_GET_STATUS request to the device.
1236*4882a593Smuzhiyun
1237*4882a593Smuzhiyun		DFU_MANIFEST_POLL_TIMEOUT
1238*4882a593Smuzhiyun		Poll timeout [ms], which the device sends to the host when
1239*4882a593Smuzhiyun		entering dfuMANIFEST state. Host waits this timeout, before
1240*4882a593Smuzhiyun		sending again an USB request to the device.
1241*4882a593Smuzhiyun
1242*4882a593Smuzhiyun- Android Bootloader support:
1243*4882a593Smuzhiyun		CONFIG_CMD_BOOT_ANDROID
1244*4882a593Smuzhiyun		This enables the command "boot_android" which executes the
1245*4882a593Smuzhiyun		Android Bootloader flow. Enabling CONFIG_CMD_FASTBOOT is
1246*4882a593Smuzhiyun		recommended to support the Android Fastboot protocol as part
1247*4882a593Smuzhiyun		of the bootloader.
1248*4882a593Smuzhiyun
1249*4882a593Smuzhiyun		CONFIG_ANDROID_BOOTLOADER
1250*4882a593Smuzhiyun		This enables support for the Android bootloader flow. Android
1251*4882a593Smuzhiyun		devices can boot in normal mode, recovery mode or bootloader
1252*4882a593Smuzhiyun		mode. The normal mode is the most common boot mode, but
1253*4882a593Smuzhiyun		recovery mode is often used to perform factory reset and OTA
1254*4882a593Smuzhiyun		(over-the-air) updates in the legacy updater. Also it is
1255*4882a593Smuzhiyun		possible for an Android system to request a reboot to the
1256*4882a593Smuzhiyun		"bootloader", which often means reboot to fastboot but may also
1257*4882a593Smuzhiyun		include a UI with a menu.
1258*4882a593Smuzhiyun
1259*4882a593Smuzhiyun		CONFIG_ANDROID_BOOT_IMAGE
1260*4882a593Smuzhiyun		This enables support for booting images which use the Android
1261*4882a593Smuzhiyun		image format header.
1262*4882a593Smuzhiyun
1263*4882a593Smuzhiyun- USB Device Android Fastboot support:
1264*4882a593Smuzhiyun		CONFIG_USB_FUNCTION_FASTBOOT
1265*4882a593Smuzhiyun		This enables the USB part of the fastboot gadget
1266*4882a593Smuzhiyun
1267*4882a593Smuzhiyun		CONFIG_CMD_FASTBOOT
1268*4882a593Smuzhiyun		This enables the command "fastboot" which enables the Android
1269*4882a593Smuzhiyun		fastboot mode for the platform's USB device. Fastboot is a USB
1270*4882a593Smuzhiyun		protocol for downloading images, flashing and device control
1271*4882a593Smuzhiyun		used on Android devices.
1272*4882a593Smuzhiyun		See doc/README.android-fastboot for more information.
1273*4882a593Smuzhiyun
1274*4882a593Smuzhiyun		CONFIG_FASTBOOT_BUF_ADDR
1275*4882a593Smuzhiyun		The fastboot protocol requires a large memory buffer for
1276*4882a593Smuzhiyun		downloads. Define this to the starting RAM address to use for
1277*4882a593Smuzhiyun		downloaded images.
1278*4882a593Smuzhiyun
1279*4882a593Smuzhiyun		CONFIG_FASTBOOT_BUF_SIZE
1280*4882a593Smuzhiyun		The fastboot protocol requires a large memory buffer for
1281*4882a593Smuzhiyun		downloads. This buffer should be as large as possible for a
1282*4882a593Smuzhiyun		platform. Define this to the size available RAM for fastboot.
1283*4882a593Smuzhiyun
1284*4882a593Smuzhiyun		CONFIG_FASTBOOT_FLASH
1285*4882a593Smuzhiyun		The fastboot protocol includes a "flash" command for writing
1286*4882a593Smuzhiyun		the downloaded image to a non-volatile storage device. Define
1287*4882a593Smuzhiyun		this to enable the "fastboot flash" command.
1288*4882a593Smuzhiyun
1289*4882a593Smuzhiyun		CONFIG_FASTBOOT_FLASH_MMC_DEV
1290*4882a593Smuzhiyun		The fastboot "flash" command requires additional information
1291*4882a593Smuzhiyun		regarding the non-volatile storage device. Define this to
1292*4882a593Smuzhiyun		the eMMC device that fastboot should use to store the image.
1293*4882a593Smuzhiyun
1294*4882a593Smuzhiyun		CONFIG_FASTBOOT_GPT_NAME
1295*4882a593Smuzhiyun		The fastboot "flash" command supports writing the downloaded
1296*4882a593Smuzhiyun		image to the Protective MBR and the Primary GUID Partition
1297*4882a593Smuzhiyun		Table. (Additionally, this downloaded image is post-processed
1298*4882a593Smuzhiyun		to generate and write the Backup GUID Partition Table.)
1299*4882a593Smuzhiyun		This occurs when the specified "partition name" on the
1300*4882a593Smuzhiyun		"fastboot flash" command line matches this value.
1301*4882a593Smuzhiyun		The default is "gpt" if undefined.
1302*4882a593Smuzhiyun
1303*4882a593Smuzhiyun		CONFIG_FASTBOOT_MBR_NAME
1304*4882a593Smuzhiyun		The fastboot "flash" command supports writing the downloaded
1305*4882a593Smuzhiyun		image to DOS MBR.
1306*4882a593Smuzhiyun		This occurs when the "partition name" specified on the
1307*4882a593Smuzhiyun		"fastboot flash" command line matches this value.
1308*4882a593Smuzhiyun		If not defined the default value "mbr" is used.
1309*4882a593Smuzhiyun
1310*4882a593Smuzhiyun- Journaling Flash filesystem support:
1311*4882a593Smuzhiyun		CONFIG_JFFS2_NAND
1312*4882a593Smuzhiyun		Define these for a default partition on a NAND device
1313*4882a593Smuzhiyun
1314*4882a593Smuzhiyun		CONFIG_SYS_JFFS2_FIRST_SECTOR,
1315*4882a593Smuzhiyun		CONFIG_SYS_JFFS2_FIRST_BANK, CONFIG_SYS_JFFS2_NUM_BANKS
1316*4882a593Smuzhiyun		Define these for a default partition on a NOR device
1317*4882a593Smuzhiyun
1318*4882a593Smuzhiyun- Keyboard Support:
1319*4882a593Smuzhiyun		See Kconfig help for available keyboard drivers.
1320*4882a593Smuzhiyun
1321*4882a593Smuzhiyun		CONFIG_KEYBOARD
1322*4882a593Smuzhiyun
1323*4882a593Smuzhiyun		Define this to enable a custom keyboard support.
1324*4882a593Smuzhiyun		This simply calls drv_keyboard_init() which must be
1325*4882a593Smuzhiyun		defined in your board-specific files. This option is deprecated
1326*4882a593Smuzhiyun		and is only used by novena. For new boards, use driver model
1327*4882a593Smuzhiyun		instead.
1328*4882a593Smuzhiyun
1329*4882a593Smuzhiyun- Video support:
1330*4882a593Smuzhiyun		CONFIG_FSL_DIU_FB
1331*4882a593Smuzhiyun		Enable the Freescale DIU video driver.	Reference boards for
1332*4882a593Smuzhiyun		SOCs that have a DIU should define this macro to enable DIU
1333*4882a593Smuzhiyun		support, and should also define these other macros:
1334*4882a593Smuzhiyun
1335*4882a593Smuzhiyun			CONFIG_SYS_DIU_ADDR
1336*4882a593Smuzhiyun			CONFIG_VIDEO
1337*4882a593Smuzhiyun			CONFIG_CFB_CONSOLE
1338*4882a593Smuzhiyun			CONFIG_VIDEO_SW_CURSOR
1339*4882a593Smuzhiyun			CONFIG_VGA_AS_SINGLE_DEVICE
1340*4882a593Smuzhiyun			CONFIG_VIDEO_LOGO
1341*4882a593Smuzhiyun			CONFIG_VIDEO_BMP_LOGO
1342*4882a593Smuzhiyun
1343*4882a593Smuzhiyun		The DIU driver will look for the 'video-mode' environment
1344*4882a593Smuzhiyun		variable, and if defined, enable the DIU as a console during
1345*4882a593Smuzhiyun		boot.  See the documentation file doc/README.video for a
1346*4882a593Smuzhiyun		description of this variable.
1347*4882a593Smuzhiyun
1348*4882a593Smuzhiyun- LCD Support:	CONFIG_LCD
1349*4882a593Smuzhiyun
1350*4882a593Smuzhiyun		Define this to enable LCD support (for output to LCD
1351*4882a593Smuzhiyun		display); also select one of the supported displays
1352*4882a593Smuzhiyun		by defining one of these:
1353*4882a593Smuzhiyun
1354*4882a593Smuzhiyun		CONFIG_ATMEL_LCD:
1355*4882a593Smuzhiyun
1356*4882a593Smuzhiyun			HITACHI TX09D70VM1CCA, 3.5", 240x320.
1357*4882a593Smuzhiyun
1358*4882a593Smuzhiyun		CONFIG_NEC_NL6448AC33:
1359*4882a593Smuzhiyun
1360*4882a593Smuzhiyun			NEC NL6448AC33-18. Active, color, single scan.
1361*4882a593Smuzhiyun
1362*4882a593Smuzhiyun		CONFIG_NEC_NL6448BC20
1363*4882a593Smuzhiyun
1364*4882a593Smuzhiyun			NEC NL6448BC20-08. 6.5", 640x480.
1365*4882a593Smuzhiyun			Active, color, single scan.
1366*4882a593Smuzhiyun
1367*4882a593Smuzhiyun		CONFIG_NEC_NL6448BC33_54
1368*4882a593Smuzhiyun
1369*4882a593Smuzhiyun			NEC NL6448BC33-54. 10.4", 640x480.
1370*4882a593Smuzhiyun			Active, color, single scan.
1371*4882a593Smuzhiyun
1372*4882a593Smuzhiyun		CONFIG_SHARP_16x9
1373*4882a593Smuzhiyun
1374*4882a593Smuzhiyun			Sharp 320x240. Active, color, single scan.
1375*4882a593Smuzhiyun			It isn't 16x9, and I am not sure what it is.
1376*4882a593Smuzhiyun
1377*4882a593Smuzhiyun		CONFIG_SHARP_LQ64D341
1378*4882a593Smuzhiyun
1379*4882a593Smuzhiyun			Sharp LQ64D341 display, 640x480.
1380*4882a593Smuzhiyun			Active, color, single scan.
1381*4882a593Smuzhiyun
1382*4882a593Smuzhiyun		CONFIG_HLD1045
1383*4882a593Smuzhiyun
1384*4882a593Smuzhiyun			HLD1045 display, 640x480.
1385*4882a593Smuzhiyun			Active, color, single scan.
1386*4882a593Smuzhiyun
1387*4882a593Smuzhiyun		CONFIG_OPTREX_BW
1388*4882a593Smuzhiyun
1389*4882a593Smuzhiyun			Optrex	 CBL50840-2 NF-FW 99 22 M5
1390*4882a593Smuzhiyun			or
1391*4882a593Smuzhiyun			Hitachi	 LMG6912RPFC-00T
1392*4882a593Smuzhiyun			or
1393*4882a593Smuzhiyun			Hitachi	 SP14Q002
1394*4882a593Smuzhiyun
1395*4882a593Smuzhiyun			320x240. Black & white.
1396*4882a593Smuzhiyun
1397*4882a593Smuzhiyun		CONFIG_LCD_ALIGNMENT
1398*4882a593Smuzhiyun
1399*4882a593Smuzhiyun		Normally the LCD is page-aligned (typically 4KB). If this is
1400*4882a593Smuzhiyun		defined then the LCD will be aligned to this value instead.
1401*4882a593Smuzhiyun		For ARM it is sometimes useful to use MMU_SECTION_SIZE
1402*4882a593Smuzhiyun		here, since it is cheaper to change data cache settings on
1403*4882a593Smuzhiyun		a per-section basis.
1404*4882a593Smuzhiyun
1405*4882a593Smuzhiyun
1406*4882a593Smuzhiyun		CONFIG_LCD_ROTATION
1407*4882a593Smuzhiyun
1408*4882a593Smuzhiyun		Sometimes, for example if the display is mounted in portrait
1409*4882a593Smuzhiyun		mode or even if it's mounted landscape but rotated by 180degree,
1410*4882a593Smuzhiyun		we need to rotate our content of the display relative to the
1411*4882a593Smuzhiyun		framebuffer, so that user can read the messages which are
1412*4882a593Smuzhiyun		printed out.
1413*4882a593Smuzhiyun		Once CONFIG_LCD_ROTATION is defined, the lcd_console will be
1414*4882a593Smuzhiyun		initialized with a given rotation from "vl_rot" out of
1415*4882a593Smuzhiyun		"vidinfo_t" which is provided by the board specific code.
1416*4882a593Smuzhiyun		The value for vl_rot is coded as following (matching to
1417*4882a593Smuzhiyun		fbcon=rotate:<n> linux-kernel commandline):
1418*4882a593Smuzhiyun		0 = no rotation respectively 0 degree
1419*4882a593Smuzhiyun		1 = 90 degree rotation
1420*4882a593Smuzhiyun		2 = 180 degree rotation
1421*4882a593Smuzhiyun		3 = 270 degree rotation
1422*4882a593Smuzhiyun
1423*4882a593Smuzhiyun		If CONFIG_LCD_ROTATION is not defined, the console will be
1424*4882a593Smuzhiyun		initialized with 0degree rotation.
1425*4882a593Smuzhiyun
1426*4882a593Smuzhiyun		CONFIG_LCD_BMP_RLE8
1427*4882a593Smuzhiyun
1428*4882a593Smuzhiyun		Support drawing of RLE8-compressed bitmaps on the LCD.
1429*4882a593Smuzhiyun
1430*4882a593Smuzhiyun		CONFIG_I2C_EDID
1431*4882a593Smuzhiyun
1432*4882a593Smuzhiyun		Enables an 'i2c edid' command which can read EDID
1433*4882a593Smuzhiyun		information over I2C from an attached LCD display.
1434*4882a593Smuzhiyun
1435*4882a593Smuzhiyun- Splash Screen Support: CONFIG_SPLASH_SCREEN
1436*4882a593Smuzhiyun
1437*4882a593Smuzhiyun		If this option is set, the environment is checked for
1438*4882a593Smuzhiyun		a variable "splashimage". If found, the usual display
1439*4882a593Smuzhiyun		of logo, copyright and system information on the LCD
1440*4882a593Smuzhiyun		is suppressed and the BMP image at the address
1441*4882a593Smuzhiyun		specified in "splashimage" is loaded instead. The
1442*4882a593Smuzhiyun		console is redirected to the "nulldev", too. This
1443*4882a593Smuzhiyun		allows for a "silent" boot where a splash screen is
1444*4882a593Smuzhiyun		loaded very quickly after power-on.
1445*4882a593Smuzhiyun
1446*4882a593Smuzhiyun		CONFIG_SPLASHIMAGE_GUARD
1447*4882a593Smuzhiyun
1448*4882a593Smuzhiyun		If this option is set, then U-Boot will prevent the environment
1449*4882a593Smuzhiyun		variable "splashimage" from being set to a problematic address
1450*4882a593Smuzhiyun		(see doc/README.displaying-bmps).
1451*4882a593Smuzhiyun		This option is useful for targets where, due to alignment
1452*4882a593Smuzhiyun		restrictions, an improperly aligned BMP image will cause a data
1453*4882a593Smuzhiyun		abort. If you think you will not have problems with unaligned
1454*4882a593Smuzhiyun		accesses (for example because your toolchain prevents them)
1455*4882a593Smuzhiyun		there is no need to set this option.
1456*4882a593Smuzhiyun
1457*4882a593Smuzhiyun		CONFIG_SPLASH_SCREEN_ALIGN
1458*4882a593Smuzhiyun
1459*4882a593Smuzhiyun		If this option is set the splash image can be freely positioned
1460*4882a593Smuzhiyun		on the screen. Environment variable "splashpos" specifies the
1461*4882a593Smuzhiyun		position as "x,y". If a positive number is given it is used as
1462*4882a593Smuzhiyun		number of pixel from left/top. If a negative number is given it
1463*4882a593Smuzhiyun		is used as number of pixel from right/bottom. You can also
1464*4882a593Smuzhiyun		specify 'm' for centering the image.
1465*4882a593Smuzhiyun
1466*4882a593Smuzhiyun		Example:
1467*4882a593Smuzhiyun		setenv splashpos m,m
1468*4882a593Smuzhiyun			=> image at center of screen
1469*4882a593Smuzhiyun
1470*4882a593Smuzhiyun		setenv splashpos 30,20
1471*4882a593Smuzhiyun			=> image at x = 30 and y = 20
1472*4882a593Smuzhiyun
1473*4882a593Smuzhiyun		setenv splashpos -10,m
1474*4882a593Smuzhiyun			=> vertically centered image
1475*4882a593Smuzhiyun			   at x = dspWidth - bmpWidth - 9
1476*4882a593Smuzhiyun
1477*4882a593Smuzhiyun- Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP
1478*4882a593Smuzhiyun
1479*4882a593Smuzhiyun		If this option is set, additionally to standard BMP
1480*4882a593Smuzhiyun		images, gzipped BMP images can be displayed via the
1481*4882a593Smuzhiyun		splashscreen support or the bmp command.
1482*4882a593Smuzhiyun
1483*4882a593Smuzhiyun- Run length encoded BMP image (RLE8) support: CONFIG_VIDEO_BMP_RLE8
1484*4882a593Smuzhiyun
1485*4882a593Smuzhiyun		If this option is set, 8-bit RLE compressed BMP images
1486*4882a593Smuzhiyun		can be displayed via the splashscreen support or the
1487*4882a593Smuzhiyun		bmp command.
1488*4882a593Smuzhiyun
1489*4882a593Smuzhiyun- Compression support:
1490*4882a593Smuzhiyun		CONFIG_GZIP
1491*4882a593Smuzhiyun
1492*4882a593Smuzhiyun		Enabled by default to support gzip compressed images.
1493*4882a593Smuzhiyun
1494*4882a593Smuzhiyun		CONFIG_BZIP2
1495*4882a593Smuzhiyun
1496*4882a593Smuzhiyun		If this option is set, support for bzip2 compressed
1497*4882a593Smuzhiyun		images is included. If not, only uncompressed and gzip
1498*4882a593Smuzhiyun		compressed images are supported.
1499*4882a593Smuzhiyun
1500*4882a593Smuzhiyun		NOTE: the bzip2 algorithm requires a lot of RAM, so
1501*4882a593Smuzhiyun		the malloc area (as defined by CONFIG_SYS_MALLOC_LEN) should
1502*4882a593Smuzhiyun		be at least 4MB.
1503*4882a593Smuzhiyun
1504*4882a593Smuzhiyun- MII/PHY support:
1505*4882a593Smuzhiyun		CONFIG_PHY_ADDR
1506*4882a593Smuzhiyun
1507*4882a593Smuzhiyun		The address of PHY on MII bus.
1508*4882a593Smuzhiyun
1509*4882a593Smuzhiyun		CONFIG_PHY_CLOCK_FREQ (ppc4xx)
1510*4882a593Smuzhiyun
1511*4882a593Smuzhiyun		The clock frequency of the MII bus
1512*4882a593Smuzhiyun
1513*4882a593Smuzhiyun		CONFIG_PHY_RESET_DELAY
1514*4882a593Smuzhiyun
1515*4882a593Smuzhiyun		Some PHY like Intel LXT971A need extra delay after
1516*4882a593Smuzhiyun		reset before any MII register access is possible.
1517*4882a593Smuzhiyun		For such PHY, set this option to the usec delay
1518*4882a593Smuzhiyun		required. (minimum 300usec for LXT971A)
1519*4882a593Smuzhiyun
1520*4882a593Smuzhiyun		CONFIG_PHY_CMD_DELAY (ppc4xx)
1521*4882a593Smuzhiyun
1522*4882a593Smuzhiyun		Some PHY like Intel LXT971A need extra delay after
1523*4882a593Smuzhiyun		command issued before MII status register can be read
1524*4882a593Smuzhiyun
1525*4882a593Smuzhiyun- IP address:
1526*4882a593Smuzhiyun		CONFIG_IPADDR
1527*4882a593Smuzhiyun
1528*4882a593Smuzhiyun		Define a default value for the IP address to use for
1529*4882a593Smuzhiyun		the default Ethernet interface, in case this is not
1530*4882a593Smuzhiyun		determined through e.g. bootp.
1531*4882a593Smuzhiyun		(Environment variable "ipaddr")
1532*4882a593Smuzhiyun
1533*4882a593Smuzhiyun- Server IP address:
1534*4882a593Smuzhiyun		CONFIG_SERVERIP
1535*4882a593Smuzhiyun
1536*4882a593Smuzhiyun		Defines a default value for the IP address of a TFTP
1537*4882a593Smuzhiyun		server to contact when using the "tftboot" command.
1538*4882a593Smuzhiyun		(Environment variable "serverip")
1539*4882a593Smuzhiyun
1540*4882a593Smuzhiyun		CONFIG_KEEP_SERVERADDR
1541*4882a593Smuzhiyun
1542*4882a593Smuzhiyun		Keeps the server's MAC address, in the env 'serveraddr'
1543*4882a593Smuzhiyun		for passing to bootargs (like Linux's netconsole option)
1544*4882a593Smuzhiyun
1545*4882a593Smuzhiyun- Gateway IP address:
1546*4882a593Smuzhiyun		CONFIG_GATEWAYIP
1547*4882a593Smuzhiyun
1548*4882a593Smuzhiyun		Defines a default value for the IP address of the
1549*4882a593Smuzhiyun		default router where packets to other networks are
1550*4882a593Smuzhiyun		sent to.
1551*4882a593Smuzhiyun		(Environment variable "gatewayip")
1552*4882a593Smuzhiyun
1553*4882a593Smuzhiyun- Subnet mask:
1554*4882a593Smuzhiyun		CONFIG_NETMASK
1555*4882a593Smuzhiyun
1556*4882a593Smuzhiyun		Defines a default value for the subnet mask (or
1557*4882a593Smuzhiyun		routing prefix) which is used to determine if an IP
1558*4882a593Smuzhiyun		address belongs to the local subnet or needs to be
1559*4882a593Smuzhiyun		forwarded through a router.
1560*4882a593Smuzhiyun		(Environment variable "netmask")
1561*4882a593Smuzhiyun
1562*4882a593Smuzhiyun- Multicast TFTP Mode:
1563*4882a593Smuzhiyun		CONFIG_MCAST_TFTP
1564*4882a593Smuzhiyun
1565*4882a593Smuzhiyun		Defines whether you want to support multicast TFTP as per
1566*4882a593Smuzhiyun		rfc-2090; for example to work with atftp.  Lets lots of targets
1567*4882a593Smuzhiyun		tftp down the same boot image concurrently.  Note: the Ethernet
1568*4882a593Smuzhiyun		driver in use must provide a function: mcast() to join/leave a
1569*4882a593Smuzhiyun		multicast group.
1570*4882a593Smuzhiyun
1571*4882a593Smuzhiyun- BOOTP Recovery Mode:
1572*4882a593Smuzhiyun		CONFIG_BOOTP_RANDOM_DELAY
1573*4882a593Smuzhiyun
1574*4882a593Smuzhiyun		If you have many targets in a network that try to
1575*4882a593Smuzhiyun		boot using BOOTP, you may want to avoid that all
1576*4882a593Smuzhiyun		systems send out BOOTP requests at precisely the same
1577*4882a593Smuzhiyun		moment (which would happen for instance at recovery
1578*4882a593Smuzhiyun		from a power failure, when all systems will try to
1579*4882a593Smuzhiyun		boot, thus flooding the BOOTP server. Defining
1580*4882a593Smuzhiyun		CONFIG_BOOTP_RANDOM_DELAY causes a random delay to be
1581*4882a593Smuzhiyun		inserted before sending out BOOTP requests. The
1582*4882a593Smuzhiyun		following delays are inserted then:
1583*4882a593Smuzhiyun
1584*4882a593Smuzhiyun		1st BOOTP request:	delay 0 ... 1 sec
1585*4882a593Smuzhiyun		2nd BOOTP request:	delay 0 ... 2 sec
1586*4882a593Smuzhiyun		3rd BOOTP request:	delay 0 ... 4 sec
1587*4882a593Smuzhiyun		4th and following
1588*4882a593Smuzhiyun		BOOTP requests:		delay 0 ... 8 sec
1589*4882a593Smuzhiyun
1590*4882a593Smuzhiyun		CONFIG_BOOTP_ID_CACHE_SIZE
1591*4882a593Smuzhiyun
1592*4882a593Smuzhiyun		BOOTP packets are uniquely identified using a 32-bit ID. The
1593*4882a593Smuzhiyun		server will copy the ID from client requests to responses and
1594*4882a593Smuzhiyun		U-Boot will use this to determine if it is the destination of
1595*4882a593Smuzhiyun		an incoming response. Some servers will check that addresses
1596*4882a593Smuzhiyun		aren't in use before handing them out (usually using an ARP
1597*4882a593Smuzhiyun		ping) and therefore take up to a few hundred milliseconds to
1598*4882a593Smuzhiyun		respond. Network congestion may also influence the time it
1599*4882a593Smuzhiyun		takes for a response to make it back to the client. If that
1600*4882a593Smuzhiyun		time is too long, U-Boot will retransmit requests. In order
1601*4882a593Smuzhiyun		to allow earlier responses to still be accepted after these
1602*4882a593Smuzhiyun		retransmissions, U-Boot's BOOTP client keeps a small cache of
1603*4882a593Smuzhiyun		IDs. The CONFIG_BOOTP_ID_CACHE_SIZE controls the size of this
1604*4882a593Smuzhiyun		cache. The default is to keep IDs for up to four outstanding
1605*4882a593Smuzhiyun		requests. Increasing this will allow U-Boot to accept offers
1606*4882a593Smuzhiyun		from a BOOTP client in networks with unusually high latency.
1607*4882a593Smuzhiyun
1608*4882a593Smuzhiyun- DHCP Advanced Options:
1609*4882a593Smuzhiyun		You can fine tune the DHCP functionality by defining
1610*4882a593Smuzhiyun		CONFIG_BOOTP_* symbols:
1611*4882a593Smuzhiyun
1612*4882a593Smuzhiyun		CONFIG_BOOTP_SUBNETMASK
1613*4882a593Smuzhiyun		CONFIG_BOOTP_GATEWAY
1614*4882a593Smuzhiyun		CONFIG_BOOTP_HOSTNAME
1615*4882a593Smuzhiyun		CONFIG_BOOTP_NISDOMAIN
1616*4882a593Smuzhiyun		CONFIG_BOOTP_BOOTPATH
1617*4882a593Smuzhiyun		CONFIG_BOOTP_BOOTFILESIZE
1618*4882a593Smuzhiyun		CONFIG_BOOTP_DNS
1619*4882a593Smuzhiyun		CONFIG_BOOTP_DNS2
1620*4882a593Smuzhiyun		CONFIG_BOOTP_SEND_HOSTNAME
1621*4882a593Smuzhiyun		CONFIG_BOOTP_NTPSERVER
1622*4882a593Smuzhiyun		CONFIG_BOOTP_TIMEOFFSET
1623*4882a593Smuzhiyun		CONFIG_BOOTP_VENDOREX
1624*4882a593Smuzhiyun		CONFIG_BOOTP_MAY_FAIL
1625*4882a593Smuzhiyun
1626*4882a593Smuzhiyun		CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip
1627*4882a593Smuzhiyun		environment variable, not the BOOTP server.
1628*4882a593Smuzhiyun
1629*4882a593Smuzhiyun		CONFIG_BOOTP_MAY_FAIL - If the DHCP server is not found
1630*4882a593Smuzhiyun		after the configured retry count, the call will fail
1631*4882a593Smuzhiyun		instead of starting over.  This can be used to fail over
1632*4882a593Smuzhiyun		to Link-local IP address configuration if the DHCP server
1633*4882a593Smuzhiyun		is not available.
1634*4882a593Smuzhiyun
1635*4882a593Smuzhiyun		CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS
1636*4882a593Smuzhiyun		serverip from a DHCP server, it is possible that more
1637*4882a593Smuzhiyun		than one DNS serverip is offered to the client.
1638*4882a593Smuzhiyun		If CONFIG_BOOTP_DNS2 is enabled, the secondary DNS
1639*4882a593Smuzhiyun		serverip will be stored in the additional environment
1640*4882a593Smuzhiyun		variable "dnsip2". The first DNS serverip is always
1641*4882a593Smuzhiyun		stored in the variable "dnsip", when CONFIG_BOOTP_DNS
1642*4882a593Smuzhiyun		is defined.
1643*4882a593Smuzhiyun
1644*4882a593Smuzhiyun		CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable
1645*4882a593Smuzhiyun		to do a dynamic update of a DNS server. To do this, they
1646*4882a593Smuzhiyun		need the hostname of the DHCP requester.
1647*4882a593Smuzhiyun		If CONFIG_BOOTP_SEND_HOSTNAME is defined, the content
1648*4882a593Smuzhiyun		of the "hostname" environment variable is passed as
1649*4882a593Smuzhiyun		option 12 to the DHCP server.
1650*4882a593Smuzhiyun
1651*4882a593Smuzhiyun		CONFIG_BOOTP_DHCP_REQUEST_DELAY
1652*4882a593Smuzhiyun
1653*4882a593Smuzhiyun		A 32bit value in microseconds for a delay between
1654*4882a593Smuzhiyun		receiving a "DHCP Offer" and sending the "DHCP Request".
1655*4882a593Smuzhiyun		This fixes a problem with certain DHCP servers that don't
1656*4882a593Smuzhiyun		respond 100% of the time to a "DHCP request". E.g. On an
1657*4882a593Smuzhiyun		AT91RM9200 processor running at 180MHz, this delay needed
1658*4882a593Smuzhiyun		to be *at least* 15,000 usec before a Windows Server 2003
1659*4882a593Smuzhiyun		DHCP server would reply 100% of the time. I recommend at
1660*4882a593Smuzhiyun		least 50,000 usec to be safe. The alternative is to hope
1661*4882a593Smuzhiyun		that one of the retries will be successful but note that
1662*4882a593Smuzhiyun		the DHCP timeout and retry process takes a longer than
1663*4882a593Smuzhiyun		this delay.
1664*4882a593Smuzhiyun
1665*4882a593Smuzhiyun - Link-local IP address negotiation:
1666*4882a593Smuzhiyun		Negotiate with other link-local clients on the local network
1667*4882a593Smuzhiyun		for an address that doesn't require explicit configuration.
1668*4882a593Smuzhiyun		This is especially useful if a DHCP server cannot be guaranteed
1669*4882a593Smuzhiyun		to exist in all environments that the device must operate.
1670*4882a593Smuzhiyun
1671*4882a593Smuzhiyun		See doc/README.link-local for more information.
1672*4882a593Smuzhiyun
1673*4882a593Smuzhiyun - MAC address from environment variables
1674*4882a593Smuzhiyun
1675*4882a593Smuzhiyun		FDT_SEQ_MACADDR_FROM_ENV
1676*4882a593Smuzhiyun
1677*4882a593Smuzhiyun		Fix-up device tree with MAC addresses fetched sequentially from
1678*4882a593Smuzhiyun		environment variables. This config work on assumption that
1679*4882a593Smuzhiyun		non-usable ethernet node of device-tree are either not present
1680*4882a593Smuzhiyun		or their status has been marked as "disabled".
1681*4882a593Smuzhiyun
1682*4882a593Smuzhiyun - CDP Options:
1683*4882a593Smuzhiyun		CONFIG_CDP_DEVICE_ID
1684*4882a593Smuzhiyun
1685*4882a593Smuzhiyun		The device id used in CDP trigger frames.
1686*4882a593Smuzhiyun
1687*4882a593Smuzhiyun		CONFIG_CDP_DEVICE_ID_PREFIX
1688*4882a593Smuzhiyun
1689*4882a593Smuzhiyun		A two character string which is prefixed to the MAC address
1690*4882a593Smuzhiyun		of the device.
1691*4882a593Smuzhiyun
1692*4882a593Smuzhiyun		CONFIG_CDP_PORT_ID
1693*4882a593Smuzhiyun
1694*4882a593Smuzhiyun		A printf format string which contains the ascii name of
1695*4882a593Smuzhiyun		the port. Normally is set to "eth%d" which sets
1696*4882a593Smuzhiyun		eth0 for the first Ethernet, eth1 for the second etc.
1697*4882a593Smuzhiyun
1698*4882a593Smuzhiyun		CONFIG_CDP_CAPABILITIES
1699*4882a593Smuzhiyun
1700*4882a593Smuzhiyun		A 32bit integer which indicates the device capabilities;
1701*4882a593Smuzhiyun		0x00000010 for a normal host which does not forwards.
1702*4882a593Smuzhiyun
1703*4882a593Smuzhiyun		CONFIG_CDP_VERSION
1704*4882a593Smuzhiyun
1705*4882a593Smuzhiyun		An ascii string containing the version of the software.
1706*4882a593Smuzhiyun
1707*4882a593Smuzhiyun		CONFIG_CDP_PLATFORM
1708*4882a593Smuzhiyun
1709*4882a593Smuzhiyun		An ascii string containing the name of the platform.
1710*4882a593Smuzhiyun
1711*4882a593Smuzhiyun		CONFIG_CDP_TRIGGER
1712*4882a593Smuzhiyun
1713*4882a593Smuzhiyun		A 32bit integer sent on the trigger.
1714*4882a593Smuzhiyun
1715*4882a593Smuzhiyun		CONFIG_CDP_POWER_CONSUMPTION
1716*4882a593Smuzhiyun
1717*4882a593Smuzhiyun		A 16bit integer containing the power consumption of the
1718*4882a593Smuzhiyun		device in .1 of milliwatts.
1719*4882a593Smuzhiyun
1720*4882a593Smuzhiyun		CONFIG_CDP_APPLIANCE_VLAN_TYPE
1721*4882a593Smuzhiyun
1722*4882a593Smuzhiyun		A byte containing the id of the VLAN.
1723*4882a593Smuzhiyun
1724*4882a593Smuzhiyun- Status LED:	CONFIG_LED_STATUS
1725*4882a593Smuzhiyun
1726*4882a593Smuzhiyun		Several configurations allow to display the current
1727*4882a593Smuzhiyun		status using a LED. For instance, the LED will blink
1728*4882a593Smuzhiyun		fast while running U-Boot code, stop blinking as
1729*4882a593Smuzhiyun		soon as a reply to a BOOTP request was received, and
1730*4882a593Smuzhiyun		start blinking slow once the Linux kernel is running
1731*4882a593Smuzhiyun		(supported by a status LED driver in the Linux
1732*4882a593Smuzhiyun		kernel). Defining CONFIG_LED_STATUS enables this
1733*4882a593Smuzhiyun		feature in U-Boot.
1734*4882a593Smuzhiyun
1735*4882a593Smuzhiyun		Additional options:
1736*4882a593Smuzhiyun
1737*4882a593Smuzhiyun		CONFIG_LED_STATUS_GPIO
1738*4882a593Smuzhiyun		The status LED can be connected to a GPIO pin.
1739*4882a593Smuzhiyun		In such cases, the gpio_led driver can be used as a
1740*4882a593Smuzhiyun		status LED backend implementation. Define CONFIG_LED_STATUS_GPIO
1741*4882a593Smuzhiyun		to include the gpio_led driver in the U-Boot binary.
1742*4882a593Smuzhiyun
1743*4882a593Smuzhiyun		CONFIG_GPIO_LED_INVERTED_TABLE
1744*4882a593Smuzhiyun		Some GPIO connected LEDs may have inverted polarity in which
1745*4882a593Smuzhiyun		case the GPIO high value corresponds to LED off state and
1746*4882a593Smuzhiyun		GPIO low value corresponds to LED on state.
1747*4882a593Smuzhiyun		In such cases CONFIG_GPIO_LED_INVERTED_TABLE may be defined
1748*4882a593Smuzhiyun		with a list of GPIO LEDs that have inverted polarity.
1749*4882a593Smuzhiyun
1750*4882a593Smuzhiyun- I2C Support:	CONFIG_SYS_I2C
1751*4882a593Smuzhiyun
1752*4882a593Smuzhiyun		This enable the NEW i2c subsystem, and will allow you to use
1753*4882a593Smuzhiyun		i2c commands at the u-boot command line (as long as you set
1754*4882a593Smuzhiyun		CONFIG_CMD_I2C in CONFIG_COMMANDS) and communicate with i2c
1755*4882a593Smuzhiyun		based realtime clock chips or other i2c devices. See
1756*4882a593Smuzhiyun		common/cmd_i2c.c for a description of the command line
1757*4882a593Smuzhiyun		interface.
1758*4882a593Smuzhiyun
1759*4882a593Smuzhiyun		ported i2c driver to the new framework:
1760*4882a593Smuzhiyun		- drivers/i2c/soft_i2c.c:
1761*4882a593Smuzhiyun		  - activate first bus with CONFIG_SYS_I2C_SOFT define
1762*4882a593Smuzhiyun		    CONFIG_SYS_I2C_SOFT_SPEED and CONFIG_SYS_I2C_SOFT_SLAVE
1763*4882a593Smuzhiyun		    for defining speed and slave address
1764*4882a593Smuzhiyun		  - activate second bus with I2C_SOFT_DECLARATIONS2 define
1765*4882a593Smuzhiyun		    CONFIG_SYS_I2C_SOFT_SPEED_2 and CONFIG_SYS_I2C_SOFT_SLAVE_2
1766*4882a593Smuzhiyun		    for defining speed and slave address
1767*4882a593Smuzhiyun		  - activate third bus with I2C_SOFT_DECLARATIONS3 define
1768*4882a593Smuzhiyun		    CONFIG_SYS_I2C_SOFT_SPEED_3 and CONFIG_SYS_I2C_SOFT_SLAVE_3
1769*4882a593Smuzhiyun		    for defining speed and slave address
1770*4882a593Smuzhiyun		  - activate fourth bus with I2C_SOFT_DECLARATIONS4 define
1771*4882a593Smuzhiyun		    CONFIG_SYS_I2C_SOFT_SPEED_4 and CONFIG_SYS_I2C_SOFT_SLAVE_4
1772*4882a593Smuzhiyun		    for defining speed and slave address
1773*4882a593Smuzhiyun
1774*4882a593Smuzhiyun		- drivers/i2c/fsl_i2c.c:
1775*4882a593Smuzhiyun		  - activate i2c driver with CONFIG_SYS_I2C_FSL
1776*4882a593Smuzhiyun		    define CONFIG_SYS_FSL_I2C_OFFSET for setting the register
1777*4882a593Smuzhiyun		    offset CONFIG_SYS_FSL_I2C_SPEED for the i2c speed and
1778*4882a593Smuzhiyun		    CONFIG_SYS_FSL_I2C_SLAVE for the slave addr of the first
1779*4882a593Smuzhiyun		    bus.
1780*4882a593Smuzhiyun		  - If your board supports a second fsl i2c bus, define
1781*4882a593Smuzhiyun		    CONFIG_SYS_FSL_I2C2_OFFSET for the register offset
1782*4882a593Smuzhiyun		    CONFIG_SYS_FSL_I2C2_SPEED for the speed and
1783*4882a593Smuzhiyun		    CONFIG_SYS_FSL_I2C2_SLAVE for the slave address of the
1784*4882a593Smuzhiyun		    second bus.
1785*4882a593Smuzhiyun
1786*4882a593Smuzhiyun		- drivers/i2c/tegra_i2c.c:
1787*4882a593Smuzhiyun		  - activate this driver with CONFIG_SYS_I2C_TEGRA
1788*4882a593Smuzhiyun		  - This driver adds 4 i2c buses with a fix speed from
1789*4882a593Smuzhiyun		    100000 and the slave addr 0!
1790*4882a593Smuzhiyun
1791*4882a593Smuzhiyun		- drivers/i2c/ppc4xx_i2c.c
1792*4882a593Smuzhiyun		  - activate this driver with CONFIG_SYS_I2C_PPC4XX
1793*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_PPC4XX_CH0 activate hardware channel 0
1794*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_PPC4XX_CH1 activate hardware channel 1
1795*4882a593Smuzhiyun
1796*4882a593Smuzhiyun		- drivers/i2c/i2c_mxc.c
1797*4882a593Smuzhiyun		  - activate this driver with CONFIG_SYS_I2C_MXC
1798*4882a593Smuzhiyun		  - enable bus 1 with CONFIG_SYS_I2C_MXC_I2C1
1799*4882a593Smuzhiyun		  - enable bus 2 with CONFIG_SYS_I2C_MXC_I2C2
1800*4882a593Smuzhiyun		  - enable bus 3 with CONFIG_SYS_I2C_MXC_I2C3
1801*4882a593Smuzhiyun		  - enable bus 4 with CONFIG_SYS_I2C_MXC_I2C4
1802*4882a593Smuzhiyun		  - define speed for bus 1 with CONFIG_SYS_MXC_I2C1_SPEED
1803*4882a593Smuzhiyun		  - define slave for bus 1 with CONFIG_SYS_MXC_I2C1_SLAVE
1804*4882a593Smuzhiyun		  - define speed for bus 2 with CONFIG_SYS_MXC_I2C2_SPEED
1805*4882a593Smuzhiyun		  - define slave for bus 2 with CONFIG_SYS_MXC_I2C2_SLAVE
1806*4882a593Smuzhiyun		  - define speed for bus 3 with CONFIG_SYS_MXC_I2C3_SPEED
1807*4882a593Smuzhiyun		  - define slave for bus 3 with CONFIG_SYS_MXC_I2C3_SLAVE
1808*4882a593Smuzhiyun		  - define speed for bus 4 with CONFIG_SYS_MXC_I2C4_SPEED
1809*4882a593Smuzhiyun		  - define slave for bus 4 with CONFIG_SYS_MXC_I2C4_SLAVE
1810*4882a593Smuzhiyun		If those defines are not set, default value is 100000
1811*4882a593Smuzhiyun		for speed, and 0 for slave.
1812*4882a593Smuzhiyun
1813*4882a593Smuzhiyun		- drivers/i2c/rcar_i2c.c:
1814*4882a593Smuzhiyun		  - activate this driver with CONFIG_SYS_I2C_RCAR
1815*4882a593Smuzhiyun		  - This driver adds 4 i2c buses
1816*4882a593Smuzhiyun
1817*4882a593Smuzhiyun		  - CONFIG_SYS_RCAR_I2C0_BASE for setting the register channel 0
1818*4882a593Smuzhiyun		  - CONFIG_SYS_RCAR_I2C0_SPEED for for the speed channel 0
1819*4882a593Smuzhiyun		  - CONFIG_SYS_RCAR_I2C1_BASE for setting the register channel 1
1820*4882a593Smuzhiyun		  - CONFIG_SYS_RCAR_I2C1_SPEED for for the speed channel 1
1821*4882a593Smuzhiyun		  - CONFIG_SYS_RCAR_I2C2_BASE for setting the register channel 2
1822*4882a593Smuzhiyun		  - CONFIG_SYS_RCAR_I2C2_SPEED for for the speed channel 2
1823*4882a593Smuzhiyun		  - CONFIG_SYS_RCAR_I2C3_BASE for setting the register channel 3
1824*4882a593Smuzhiyun		  - CONFIG_SYS_RCAR_I2C3_SPEED for for the speed channel 3
1825*4882a593Smuzhiyun		  - CONFIF_SYS_RCAR_I2C_NUM_CONTROLLERS for number of i2c buses
1826*4882a593Smuzhiyun
1827*4882a593Smuzhiyun		- drivers/i2c/sh_i2c.c:
1828*4882a593Smuzhiyun		  - activate this driver with CONFIG_SYS_I2C_SH
1829*4882a593Smuzhiyun		  - This driver adds from 2 to 5 i2c buses
1830*4882a593Smuzhiyun
1831*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_BASE0 for setting the register channel 0
1832*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_SPEED0 for for the speed channel 0
1833*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_BASE1 for setting the register channel 1
1834*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_SPEED1 for for the speed channel 1
1835*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_BASE2 for setting the register channel 2
1836*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_SPEED2 for for the speed channel 2
1837*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_BASE3 for setting the register channel 3
1838*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_SPEED3 for for the speed channel 3
1839*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_BASE4 for setting the register channel 4
1840*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_SPEED4 for for the speed channel 4
1841*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_SH_NUM_CONTROLLERS for number of i2c buses
1842*4882a593Smuzhiyun
1843*4882a593Smuzhiyun		- drivers/i2c/omap24xx_i2c.c
1844*4882a593Smuzhiyun		  - activate this driver with CONFIG_SYS_I2C_OMAP24XX
1845*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SPEED speed channel 0
1846*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SLAVE slave addr channel 0
1847*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SPEED1 speed channel 1
1848*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SLAVE1 slave addr channel 1
1849*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SPEED2 speed channel 2
1850*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SLAVE2 slave addr channel 2
1851*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SPEED3 speed channel 3
1852*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SLAVE3 slave addr channel 3
1853*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SPEED4 speed channel 4
1854*4882a593Smuzhiyun		  - CONFIG_SYS_OMAP24_I2C_SLAVE4 slave addr channel 4
1855*4882a593Smuzhiyun
1856*4882a593Smuzhiyun		- drivers/i2c/zynq_i2c.c
1857*4882a593Smuzhiyun		  - activate this driver with CONFIG_SYS_I2C_ZYNQ
1858*4882a593Smuzhiyun		  - set CONFIG_SYS_I2C_ZYNQ_SPEED for speed setting
1859*4882a593Smuzhiyun		  - set CONFIG_SYS_I2C_ZYNQ_SLAVE for slave addr
1860*4882a593Smuzhiyun
1861*4882a593Smuzhiyun		- drivers/i2c/s3c24x0_i2c.c:
1862*4882a593Smuzhiyun		  - activate this driver with CONFIG_SYS_I2C_S3C24X0
1863*4882a593Smuzhiyun		  - This driver adds i2c buses (11 for Exynos5250, Exynos5420
1864*4882a593Smuzhiyun		    9 i2c buses for Exynos4 and 1 for S3C24X0 SoCs from Samsung)
1865*4882a593Smuzhiyun		    with a fix speed from 100000 and the slave addr 0!
1866*4882a593Smuzhiyun
1867*4882a593Smuzhiyun		- drivers/i2c/ihs_i2c.c
1868*4882a593Smuzhiyun		  - activate this driver with CONFIG_SYS_I2C_IHS
1869*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_CH0 activate hardware channel 0
1870*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SPEED_0 speed channel 0
1871*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SLAVE_0 slave addr channel 0
1872*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_CH1 activate hardware channel 1
1873*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SPEED_1 speed channel 1
1874*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SLAVE_1 slave addr channel 1
1875*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_CH2 activate hardware channel 2
1876*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SPEED_2 speed channel 2
1877*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SLAVE_2 slave addr channel 2
1878*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_CH3 activate hardware channel 3
1879*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SPEED_3 speed channel 3
1880*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SLAVE_3 slave addr channel 3
1881*4882a593Smuzhiyun		  - activate dual channel with CONFIG_SYS_I2C_IHS_DUAL
1882*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SPEED_0_1 speed channel 0_1
1883*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SLAVE_0_1 slave addr channel 0_1
1884*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SPEED_1_1 speed channel 1_1
1885*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SLAVE_1_1 slave addr channel 1_1
1886*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SPEED_2_1 speed channel 2_1
1887*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SLAVE_2_1 slave addr channel 2_1
1888*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SPEED_3_1 speed channel 3_1
1889*4882a593Smuzhiyun		  - CONFIG_SYS_I2C_IHS_SLAVE_3_1 slave addr channel 3_1
1890*4882a593Smuzhiyun
1891*4882a593Smuzhiyun		additional defines:
1892*4882a593Smuzhiyun
1893*4882a593Smuzhiyun		CONFIG_SYS_NUM_I2C_BUSES
1894*4882a593Smuzhiyun		Hold the number of i2c buses you want to use.
1895*4882a593Smuzhiyun
1896*4882a593Smuzhiyun		CONFIG_SYS_I2C_DIRECT_BUS
1897*4882a593Smuzhiyun		define this, if you don't use i2c muxes on your hardware.
1898*4882a593Smuzhiyun		if CONFIG_SYS_I2C_MAX_HOPS is not defined or == 0 you can
1899*4882a593Smuzhiyun		omit this define.
1900*4882a593Smuzhiyun
1901*4882a593Smuzhiyun		CONFIG_SYS_I2C_MAX_HOPS
1902*4882a593Smuzhiyun		define how many muxes are maximal consecutively connected
1903*4882a593Smuzhiyun		on one i2c bus. If you not use i2c muxes, omit this
1904*4882a593Smuzhiyun		define.
1905*4882a593Smuzhiyun
1906*4882a593Smuzhiyun		CONFIG_SYS_I2C_BUSES
1907*4882a593Smuzhiyun		hold a list of buses you want to use, only used if
1908*4882a593Smuzhiyun		CONFIG_SYS_I2C_DIRECT_BUS is not defined, for example
1909*4882a593Smuzhiyun		a board with CONFIG_SYS_I2C_MAX_HOPS = 1 and
1910*4882a593Smuzhiyun		CONFIG_SYS_NUM_I2C_BUSES = 9:
1911*4882a593Smuzhiyun
1912*4882a593Smuzhiyun		 CONFIG_SYS_I2C_BUSES	{{0, {I2C_NULL_HOP}}, \
1913*4882a593Smuzhiyun					{0, {{I2C_MUX_PCA9547, 0x70, 1}}}, \
1914*4882a593Smuzhiyun					{0, {{I2C_MUX_PCA9547, 0x70, 2}}}, \
1915*4882a593Smuzhiyun					{0, {{I2C_MUX_PCA9547, 0x70, 3}}}, \
1916*4882a593Smuzhiyun					{0, {{I2C_MUX_PCA9547, 0x70, 4}}}, \
1917*4882a593Smuzhiyun					{0, {{I2C_MUX_PCA9547, 0x70, 5}}}, \
1918*4882a593Smuzhiyun					{1, {I2C_NULL_HOP}}, \
1919*4882a593Smuzhiyun					{1, {{I2C_MUX_PCA9544, 0x72, 1}}}, \
1920*4882a593Smuzhiyun					{1, {{I2C_MUX_PCA9544, 0x72, 2}}}, \
1921*4882a593Smuzhiyun					}
1922*4882a593Smuzhiyun
1923*4882a593Smuzhiyun		which defines
1924*4882a593Smuzhiyun			bus 0 on adapter 0 without a mux
1925*4882a593Smuzhiyun			bus 1 on adapter 0 with a PCA9547 on address 0x70 port 1
1926*4882a593Smuzhiyun			bus 2 on adapter 0 with a PCA9547 on address 0x70 port 2
1927*4882a593Smuzhiyun			bus 3 on adapter 0 with a PCA9547 on address 0x70 port 3
1928*4882a593Smuzhiyun			bus 4 on adapter 0 with a PCA9547 on address 0x70 port 4
1929*4882a593Smuzhiyun			bus 5 on adapter 0 with a PCA9547 on address 0x70 port 5
1930*4882a593Smuzhiyun			bus 6 on adapter 1 without a mux
1931*4882a593Smuzhiyun			bus 7 on adapter 1 with a PCA9544 on address 0x72 port 1
1932*4882a593Smuzhiyun			bus 8 on adapter 1 with a PCA9544 on address 0x72 port 2
1933*4882a593Smuzhiyun
1934*4882a593Smuzhiyun		If you do not have i2c muxes on your board, omit this define.
1935*4882a593Smuzhiyun
1936*4882a593Smuzhiyun- Legacy I2C Support:
1937*4882a593Smuzhiyun		If you use the software i2c interface (CONFIG_SYS_I2C_SOFT)
1938*4882a593Smuzhiyun		then the following macros need to be defined (examples are
1939*4882a593Smuzhiyun		from include/configs/lwmon.h):
1940*4882a593Smuzhiyun
1941*4882a593Smuzhiyun		I2C_INIT
1942*4882a593Smuzhiyun
1943*4882a593Smuzhiyun		(Optional). Any commands necessary to enable the I2C
1944*4882a593Smuzhiyun		controller or configure ports.
1945*4882a593Smuzhiyun
1946*4882a593Smuzhiyun		eg: #define I2C_INIT (immr->im_cpm.cp_pbdir |=	PB_SCL)
1947*4882a593Smuzhiyun
1948*4882a593Smuzhiyun		I2C_ACTIVE
1949*4882a593Smuzhiyun
1950*4882a593Smuzhiyun		The code necessary to make the I2C data line active
1951*4882a593Smuzhiyun		(driven).  If the data line is open collector, this
1952*4882a593Smuzhiyun		define can be null.
1953*4882a593Smuzhiyun
1954*4882a593Smuzhiyun		eg: #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |=  PB_SDA)
1955*4882a593Smuzhiyun
1956*4882a593Smuzhiyun		I2C_TRISTATE
1957*4882a593Smuzhiyun
1958*4882a593Smuzhiyun		The code necessary to make the I2C data line tri-stated
1959*4882a593Smuzhiyun		(inactive).  If the data line is open collector, this
1960*4882a593Smuzhiyun		define can be null.
1961*4882a593Smuzhiyun
1962*4882a593Smuzhiyun		eg: #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
1963*4882a593Smuzhiyun
1964*4882a593Smuzhiyun		I2C_READ
1965*4882a593Smuzhiyun
1966*4882a593Smuzhiyun		Code that returns true if the I2C data line is high,
1967*4882a593Smuzhiyun		false if it is low.
1968*4882a593Smuzhiyun
1969*4882a593Smuzhiyun		eg: #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
1970*4882a593Smuzhiyun
1971*4882a593Smuzhiyun		I2C_SDA(bit)
1972*4882a593Smuzhiyun
1973*4882a593Smuzhiyun		If <bit> is true, sets the I2C data line high. If it
1974*4882a593Smuzhiyun		is false, it clears it (low).
1975*4882a593Smuzhiyun
1976*4882a593Smuzhiyun		eg: #define I2C_SDA(bit) \
1977*4882a593Smuzhiyun			if(bit) immr->im_cpm.cp_pbdat |=  PB_SDA; \
1978*4882a593Smuzhiyun			else	immr->im_cpm.cp_pbdat &= ~PB_SDA
1979*4882a593Smuzhiyun
1980*4882a593Smuzhiyun		I2C_SCL(bit)
1981*4882a593Smuzhiyun
1982*4882a593Smuzhiyun		If <bit> is true, sets the I2C clock line high. If it
1983*4882a593Smuzhiyun		is false, it clears it (low).
1984*4882a593Smuzhiyun
1985*4882a593Smuzhiyun		eg: #define I2C_SCL(bit) \
1986*4882a593Smuzhiyun			if(bit) immr->im_cpm.cp_pbdat |=  PB_SCL; \
1987*4882a593Smuzhiyun			else	immr->im_cpm.cp_pbdat &= ~PB_SCL
1988*4882a593Smuzhiyun
1989*4882a593Smuzhiyun		I2C_DELAY
1990*4882a593Smuzhiyun
1991*4882a593Smuzhiyun		This delay is invoked four times per clock cycle so this
1992*4882a593Smuzhiyun		controls the rate of data transfer.  The data rate thus
1993*4882a593Smuzhiyun		is 1 / (I2C_DELAY * 4). Often defined to be something
1994*4882a593Smuzhiyun		like:
1995*4882a593Smuzhiyun
1996*4882a593Smuzhiyun		#define I2C_DELAY  udelay(2)
1997*4882a593Smuzhiyun
1998*4882a593Smuzhiyun		CONFIG_SOFT_I2C_GPIO_SCL / CONFIG_SOFT_I2C_GPIO_SDA
1999*4882a593Smuzhiyun
2000*4882a593Smuzhiyun		If your arch supports the generic GPIO framework (asm/gpio.h),
2001*4882a593Smuzhiyun		then you may alternatively define the two GPIOs that are to be
2002*4882a593Smuzhiyun		used as SCL / SDA.  Any of the previous I2C_xxx macros will
2003*4882a593Smuzhiyun		have GPIO-based defaults assigned to them as appropriate.
2004*4882a593Smuzhiyun
2005*4882a593Smuzhiyun		You should define these to the GPIO value as given directly to
2006*4882a593Smuzhiyun		the generic GPIO functions.
2007*4882a593Smuzhiyun
2008*4882a593Smuzhiyun		CONFIG_SYS_I2C_INIT_BOARD
2009*4882a593Smuzhiyun
2010*4882a593Smuzhiyun		When a board is reset during an i2c bus transfer
2011*4882a593Smuzhiyun		chips might think that the current transfer is still
2012*4882a593Smuzhiyun		in progress. On some boards it is possible to access
2013*4882a593Smuzhiyun		the i2c SCLK line directly, either by using the
2014*4882a593Smuzhiyun		processor pin as a GPIO or by having a second pin
2015*4882a593Smuzhiyun		connected to the bus. If this option is defined a
2016*4882a593Smuzhiyun		custom i2c_init_board() routine in boards/xxx/board.c
2017*4882a593Smuzhiyun		is run early in the boot sequence.
2018*4882a593Smuzhiyun
2019*4882a593Smuzhiyun		CONFIG_I2C_MULTI_BUS
2020*4882a593Smuzhiyun
2021*4882a593Smuzhiyun		This option allows the use of multiple I2C buses, each of which
2022*4882a593Smuzhiyun		must have a controller.	 At any point in time, only one bus is
2023*4882a593Smuzhiyun		active.	 To switch to a different bus, use the 'i2c dev' command.
2024*4882a593Smuzhiyun		Note that bus numbering is zero-based.
2025*4882a593Smuzhiyun
2026*4882a593Smuzhiyun		CONFIG_SYS_I2C_NOPROBES
2027*4882a593Smuzhiyun
2028*4882a593Smuzhiyun		This option specifies a list of I2C devices that will be skipped
2029*4882a593Smuzhiyun		when the 'i2c probe' command is issued.	 If CONFIG_I2C_MULTI_BUS
2030*4882a593Smuzhiyun		is set, specify a list of bus-device pairs.  Otherwise, specify
2031*4882a593Smuzhiyun		a 1D array of device addresses
2032*4882a593Smuzhiyun
2033*4882a593Smuzhiyun		e.g.
2034*4882a593Smuzhiyun			#undef	CONFIG_I2C_MULTI_BUS
2035*4882a593Smuzhiyun			#define CONFIG_SYS_I2C_NOPROBES {0x50,0x68}
2036*4882a593Smuzhiyun
2037*4882a593Smuzhiyun		will skip addresses 0x50 and 0x68 on a board with one I2C bus
2038*4882a593Smuzhiyun
2039*4882a593Smuzhiyun			#define CONFIG_I2C_MULTI_BUS
2040*4882a593Smuzhiyun			#define CONFIG_SYS_I2C_NOPROBES	{{0,0x50},{0,0x68},{1,0x54}}
2041*4882a593Smuzhiyun
2042*4882a593Smuzhiyun		will skip addresses 0x50 and 0x68 on bus 0 and address 0x54 on bus 1
2043*4882a593Smuzhiyun
2044*4882a593Smuzhiyun		CONFIG_SYS_SPD_BUS_NUM
2045*4882a593Smuzhiyun
2046*4882a593Smuzhiyun		If defined, then this indicates the I2C bus number for DDR SPD.
2047*4882a593Smuzhiyun		If not defined, then U-Boot assumes that SPD is on I2C bus 0.
2048*4882a593Smuzhiyun
2049*4882a593Smuzhiyun		CONFIG_SYS_RTC_BUS_NUM
2050*4882a593Smuzhiyun
2051*4882a593Smuzhiyun		If defined, then this indicates the I2C bus number for the RTC.
2052*4882a593Smuzhiyun		If not defined, then U-Boot assumes that RTC is on I2C bus 0.
2053*4882a593Smuzhiyun
2054*4882a593Smuzhiyun		CONFIG_SOFT_I2C_READ_REPEATED_START
2055*4882a593Smuzhiyun
2056*4882a593Smuzhiyun		defining this will force the i2c_read() function in
2057*4882a593Smuzhiyun		the soft_i2c driver to perform an I2C repeated start
2058*4882a593Smuzhiyun		between writing the address pointer and reading the
2059*4882a593Smuzhiyun		data.  If this define is omitted the default behaviour
2060*4882a593Smuzhiyun		of doing a stop-start sequence will be used.  Most I2C
2061*4882a593Smuzhiyun		devices can use either method, but some require one or
2062*4882a593Smuzhiyun		the other.
2063*4882a593Smuzhiyun
2064*4882a593Smuzhiyun- SPI Support:	CONFIG_SPI
2065*4882a593Smuzhiyun
2066*4882a593Smuzhiyun		Enables SPI driver (so far only tested with
2067*4882a593Smuzhiyun		SPI EEPROM, also an instance works with Crystal A/D and
2068*4882a593Smuzhiyun		D/As on the SACSng board)
2069*4882a593Smuzhiyun
2070*4882a593Smuzhiyun		CONFIG_SOFT_SPI
2071*4882a593Smuzhiyun
2072*4882a593Smuzhiyun		Enables a software (bit-bang) SPI driver rather than
2073*4882a593Smuzhiyun		using hardware support. This is a general purpose
2074*4882a593Smuzhiyun		driver that only requires three general I/O port pins
2075*4882a593Smuzhiyun		(two outputs, one input) to function. If this is
2076*4882a593Smuzhiyun		defined, the board configuration must define several
2077*4882a593Smuzhiyun		SPI configuration items (port pins to use, etc). For
2078*4882a593Smuzhiyun		an example, see include/configs/sacsng.h.
2079*4882a593Smuzhiyun
2080*4882a593Smuzhiyun		CONFIG_HARD_SPI
2081*4882a593Smuzhiyun
2082*4882a593Smuzhiyun		Enables a hardware SPI driver for general-purpose reads
2083*4882a593Smuzhiyun		and writes.  As with CONFIG_SOFT_SPI, the board configuration
2084*4882a593Smuzhiyun		must define a list of chip-select function pointers.
2085*4882a593Smuzhiyun		Currently supported on some MPC8xxx processors.	 For an
2086*4882a593Smuzhiyun		example, see include/configs/mpc8349emds.h.
2087*4882a593Smuzhiyun
2088*4882a593Smuzhiyun		CONFIG_MXC_SPI
2089*4882a593Smuzhiyun
2090*4882a593Smuzhiyun		Enables the driver for the SPI controllers on i.MX and MXC
2091*4882a593Smuzhiyun		SoCs. Currently i.MX31/35/51 are supported.
2092*4882a593Smuzhiyun
2093*4882a593Smuzhiyun		CONFIG_SYS_SPI_MXC_WAIT
2094*4882a593Smuzhiyun		Timeout for waiting until spi transfer completed.
2095*4882a593Smuzhiyun		default: (CONFIG_SYS_HZ/100)     /* 10 ms */
2096*4882a593Smuzhiyun
2097*4882a593Smuzhiyun- FPGA Support: CONFIG_FPGA
2098*4882a593Smuzhiyun
2099*4882a593Smuzhiyun		Enables FPGA subsystem.
2100*4882a593Smuzhiyun
2101*4882a593Smuzhiyun		CONFIG_FPGA_<vendor>
2102*4882a593Smuzhiyun
2103*4882a593Smuzhiyun		Enables support for specific chip vendors.
2104*4882a593Smuzhiyun		(ALTERA, XILINX)
2105*4882a593Smuzhiyun
2106*4882a593Smuzhiyun		CONFIG_FPGA_<family>
2107*4882a593Smuzhiyun
2108*4882a593Smuzhiyun		Enables support for FPGA family.
2109*4882a593Smuzhiyun		(SPARTAN2, SPARTAN3, VIRTEX2, CYCLONE2, ACEX1K, ACEX)
2110*4882a593Smuzhiyun
2111*4882a593Smuzhiyun		CONFIG_FPGA_COUNT
2112*4882a593Smuzhiyun
2113*4882a593Smuzhiyun		Specify the number of FPGA devices to support.
2114*4882a593Smuzhiyun
2115*4882a593Smuzhiyun		CONFIG_SYS_FPGA_PROG_FEEDBACK
2116*4882a593Smuzhiyun
2117*4882a593Smuzhiyun		Enable printing of hash marks during FPGA configuration.
2118*4882a593Smuzhiyun
2119*4882a593Smuzhiyun		CONFIG_SYS_FPGA_CHECK_BUSY
2120*4882a593Smuzhiyun
2121*4882a593Smuzhiyun		Enable checks on FPGA configuration interface busy
2122*4882a593Smuzhiyun		status by the configuration function. This option
2123*4882a593Smuzhiyun		will require a board or device specific function to
2124*4882a593Smuzhiyun		be written.
2125*4882a593Smuzhiyun
2126*4882a593Smuzhiyun		CONFIG_FPGA_DELAY
2127*4882a593Smuzhiyun
2128*4882a593Smuzhiyun		If defined, a function that provides delays in the FPGA
2129*4882a593Smuzhiyun		configuration driver.
2130*4882a593Smuzhiyun
2131*4882a593Smuzhiyun		CONFIG_SYS_FPGA_CHECK_CTRLC
2132*4882a593Smuzhiyun		Allow Control-C to interrupt FPGA configuration
2133*4882a593Smuzhiyun
2134*4882a593Smuzhiyun		CONFIG_SYS_FPGA_CHECK_ERROR
2135*4882a593Smuzhiyun
2136*4882a593Smuzhiyun		Check for configuration errors during FPGA bitfile
2137*4882a593Smuzhiyun		loading. For example, abort during Virtex II
2138*4882a593Smuzhiyun		configuration if the INIT_B line goes low (which
2139*4882a593Smuzhiyun		indicated a CRC error).
2140*4882a593Smuzhiyun
2141*4882a593Smuzhiyun		CONFIG_SYS_FPGA_WAIT_INIT
2142*4882a593Smuzhiyun
2143*4882a593Smuzhiyun		Maximum time to wait for the INIT_B line to de-assert
2144*4882a593Smuzhiyun		after PROB_B has been de-asserted during a Virtex II
2145*4882a593Smuzhiyun		FPGA configuration sequence. The default time is 500
2146*4882a593Smuzhiyun		ms.
2147*4882a593Smuzhiyun
2148*4882a593Smuzhiyun		CONFIG_SYS_FPGA_WAIT_BUSY
2149*4882a593Smuzhiyun
2150*4882a593Smuzhiyun		Maximum time to wait for BUSY to de-assert during
2151*4882a593Smuzhiyun		Virtex II FPGA configuration. The default is 5 ms.
2152*4882a593Smuzhiyun
2153*4882a593Smuzhiyun		CONFIG_SYS_FPGA_WAIT_CONFIG
2154*4882a593Smuzhiyun
2155*4882a593Smuzhiyun		Time to wait after FPGA configuration. The default is
2156*4882a593Smuzhiyun		200 ms.
2157*4882a593Smuzhiyun
2158*4882a593Smuzhiyun- Configuration Management:
2159*4882a593Smuzhiyun		CONFIG_BUILD_TARGET
2160*4882a593Smuzhiyun
2161*4882a593Smuzhiyun		Some SoCs need special image types (e.g. U-Boot binary
2162*4882a593Smuzhiyun		with a special header) as build targets. By defining
2163*4882a593Smuzhiyun		CONFIG_BUILD_TARGET in the SoC / board header, this
2164*4882a593Smuzhiyun		special image will be automatically built upon calling
2165*4882a593Smuzhiyun		make / buildman.
2166*4882a593Smuzhiyun
2167*4882a593Smuzhiyun		CONFIG_IDENT_STRING
2168*4882a593Smuzhiyun
2169*4882a593Smuzhiyun		If defined, this string will be added to the U-Boot
2170*4882a593Smuzhiyun		version information (U_BOOT_VERSION)
2171*4882a593Smuzhiyun
2172*4882a593Smuzhiyun- Vendor Parameter Protection:
2173*4882a593Smuzhiyun
2174*4882a593Smuzhiyun		U-Boot considers the values of the environment
2175*4882a593Smuzhiyun		variables "serial#" (Board Serial Number) and
2176*4882a593Smuzhiyun		"ethaddr" (Ethernet Address) to be parameters that
2177*4882a593Smuzhiyun		are set once by the board vendor / manufacturer, and
2178*4882a593Smuzhiyun		protects these variables from casual modification by
2179*4882a593Smuzhiyun		the user. Once set, these variables are read-only,
2180*4882a593Smuzhiyun		and write or delete attempts are rejected. You can
2181*4882a593Smuzhiyun		change this behaviour:
2182*4882a593Smuzhiyun
2183*4882a593Smuzhiyun		If CONFIG_ENV_OVERWRITE is #defined in your config
2184*4882a593Smuzhiyun		file, the write protection for vendor parameters is
2185*4882a593Smuzhiyun		completely disabled. Anybody can change or delete
2186*4882a593Smuzhiyun		these parameters.
2187*4882a593Smuzhiyun
2188*4882a593Smuzhiyun		Alternatively, if you define _both_ an ethaddr in the
2189*4882a593Smuzhiyun		default env _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default
2190*4882a593Smuzhiyun		Ethernet address is installed in the environment,
2191*4882a593Smuzhiyun		which can be changed exactly ONCE by the user. [The
2192*4882a593Smuzhiyun		serial# is unaffected by this, i. e. it remains
2193*4882a593Smuzhiyun		read-only.]
2194*4882a593Smuzhiyun
2195*4882a593Smuzhiyun		The same can be accomplished in a more flexible way
2196*4882a593Smuzhiyun		for any variable by configuring the type of access
2197*4882a593Smuzhiyun		to allow for those variables in the ".flags" variable
2198*4882a593Smuzhiyun		or define CONFIG_ENV_FLAGS_LIST_STATIC.
2199*4882a593Smuzhiyun
2200*4882a593Smuzhiyun- Protected RAM:
2201*4882a593Smuzhiyun		CONFIG_PRAM
2202*4882a593Smuzhiyun
2203*4882a593Smuzhiyun		Define this variable to enable the reservation of
2204*4882a593Smuzhiyun		"protected RAM", i. e. RAM which is not overwritten
2205*4882a593Smuzhiyun		by U-Boot. Define CONFIG_PRAM to hold the number of
2206*4882a593Smuzhiyun		kB you want to reserve for pRAM. You can overwrite
2207*4882a593Smuzhiyun		this default value by defining an environment
2208*4882a593Smuzhiyun		variable "pram" to the number of kB you want to
2209*4882a593Smuzhiyun		reserve. Note that the board info structure will
2210*4882a593Smuzhiyun		still show the full amount of RAM. If pRAM is
2211*4882a593Smuzhiyun		reserved, a new environment variable "mem" will
2212*4882a593Smuzhiyun		automatically be defined to hold the amount of
2213*4882a593Smuzhiyun		remaining RAM in a form that can be passed as boot
2214*4882a593Smuzhiyun		argument to Linux, for instance like that:
2215*4882a593Smuzhiyun
2216*4882a593Smuzhiyun			setenv bootargs ... mem=\${mem}
2217*4882a593Smuzhiyun			saveenv
2218*4882a593Smuzhiyun
2219*4882a593Smuzhiyun		This way you can tell Linux not to use this memory,
2220*4882a593Smuzhiyun		either, which results in a memory region that will
2221*4882a593Smuzhiyun		not be affected by reboots.
2222*4882a593Smuzhiyun
2223*4882a593Smuzhiyun		*WARNING* If your board configuration uses automatic
2224*4882a593Smuzhiyun		detection of the RAM size, you must make sure that
2225*4882a593Smuzhiyun		this memory test is non-destructive. So far, the
2226*4882a593Smuzhiyun		following board configurations are known to be
2227*4882a593Smuzhiyun		"pRAM-clean":
2228*4882a593Smuzhiyun
2229*4882a593Smuzhiyun			IVMS8, IVML24, SPD8xx,
2230*4882a593Smuzhiyun			HERMES, IP860, RPXlite, LWMON,
2231*4882a593Smuzhiyun			FLAGADM
2232*4882a593Smuzhiyun
2233*4882a593Smuzhiyun- Access to physical memory region (> 4GB)
2234*4882a593Smuzhiyun		Some basic support is provided for operations on memory not
2235*4882a593Smuzhiyun		normally accessible to U-Boot - e.g. some architectures
2236*4882a593Smuzhiyun		support access to more than 4GB of memory on 32-bit
2237*4882a593Smuzhiyun		machines using physical address extension or similar.
2238*4882a593Smuzhiyun		Define CONFIG_PHYSMEM to access this basic support, which
2239*4882a593Smuzhiyun		currently only supports clearing the memory.
2240*4882a593Smuzhiyun
2241*4882a593Smuzhiyun- Error Recovery:
2242*4882a593Smuzhiyun		CONFIG_NET_RETRY_COUNT
2243*4882a593Smuzhiyun
2244*4882a593Smuzhiyun		This variable defines the number of retries for
2245*4882a593Smuzhiyun		network operations like ARP, RARP, TFTP, or BOOTP
2246*4882a593Smuzhiyun		before giving up the operation. If not defined, a
2247*4882a593Smuzhiyun		default value of 5 is used.
2248*4882a593Smuzhiyun
2249*4882a593Smuzhiyun		CONFIG_ARP_TIMEOUT
2250*4882a593Smuzhiyun
2251*4882a593Smuzhiyun		Timeout waiting for an ARP reply in milliseconds.
2252*4882a593Smuzhiyun
2253*4882a593Smuzhiyun		CONFIG_NFS_TIMEOUT
2254*4882a593Smuzhiyun
2255*4882a593Smuzhiyun		Timeout in milliseconds used in NFS protocol.
2256*4882a593Smuzhiyun		If you encounter "ERROR: Cannot umount" in nfs command,
2257*4882a593Smuzhiyun		try longer timeout such as
2258*4882a593Smuzhiyun		#define CONFIG_NFS_TIMEOUT 10000UL
2259*4882a593Smuzhiyun
2260*4882a593Smuzhiyun- Command Interpreter:
2261*4882a593Smuzhiyun		CONFIG_AUTO_COMPLETE
2262*4882a593Smuzhiyun
2263*4882a593Smuzhiyun		Enable auto completion of commands using TAB.
2264*4882a593Smuzhiyun
2265*4882a593Smuzhiyun		CONFIG_SYS_PROMPT_HUSH_PS2
2266*4882a593Smuzhiyun
2267*4882a593Smuzhiyun		This defines the secondary prompt string, which is
2268*4882a593Smuzhiyun		printed when the command interpreter needs more input
2269*4882a593Smuzhiyun		to complete a command. Usually "> ".
2270*4882a593Smuzhiyun
2271*4882a593Smuzhiyun	Note:
2272*4882a593Smuzhiyun
2273*4882a593Smuzhiyun		In the current implementation, the local variables
2274*4882a593Smuzhiyun		space and global environment variables space are
2275*4882a593Smuzhiyun		separated. Local variables are those you define by
2276*4882a593Smuzhiyun		simply typing `name=value'. To access a local
2277*4882a593Smuzhiyun		variable later on, you have write `$name' or
2278*4882a593Smuzhiyun		`${name}'; to execute the contents of a variable
2279*4882a593Smuzhiyun		directly type `$name' at the command prompt.
2280*4882a593Smuzhiyun
2281*4882a593Smuzhiyun		Global environment variables are those you use
2282*4882a593Smuzhiyun		setenv/printenv to work with. To run a command stored
2283*4882a593Smuzhiyun		in such a variable, you need to use the run command,
2284*4882a593Smuzhiyun		and you must not use the '$' sign to access them.
2285*4882a593Smuzhiyun
2286*4882a593Smuzhiyun		To store commands and special characters in a
2287*4882a593Smuzhiyun		variable, please use double quotation marks
2288*4882a593Smuzhiyun		surrounding the whole text of the variable, instead
2289*4882a593Smuzhiyun		of the backslashes before semicolons and special
2290*4882a593Smuzhiyun		symbols.
2291*4882a593Smuzhiyun
2292*4882a593Smuzhiyun- Command Line Editing and History:
2293*4882a593Smuzhiyun		CONFIG_CMDLINE_EDITING
2294*4882a593Smuzhiyun
2295*4882a593Smuzhiyun		Enable editing and History functions for interactive
2296*4882a593Smuzhiyun		command line input operations
2297*4882a593Smuzhiyun
2298*4882a593Smuzhiyun- Command Line PS1/PS2 support:
2299*4882a593Smuzhiyun		CONFIG_CMDLINE_PS_SUPPORT
2300*4882a593Smuzhiyun
2301*4882a593Smuzhiyun		Enable support for changing the command prompt string
2302*4882a593Smuzhiyun		at run-time. Only static string is supported so far.
2303*4882a593Smuzhiyun		The string is obtained from environment variables PS1
2304*4882a593Smuzhiyun		and PS2.
2305*4882a593Smuzhiyun
2306*4882a593Smuzhiyun- Default Environment:
2307*4882a593Smuzhiyun		CONFIG_EXTRA_ENV_SETTINGS
2308*4882a593Smuzhiyun
2309*4882a593Smuzhiyun		Define this to contain any number of null terminated
2310*4882a593Smuzhiyun		strings (variable = value pairs) that will be part of
2311*4882a593Smuzhiyun		the default environment compiled into the boot image.
2312*4882a593Smuzhiyun
2313*4882a593Smuzhiyun		For example, place something like this in your
2314*4882a593Smuzhiyun		board's config file:
2315*4882a593Smuzhiyun
2316*4882a593Smuzhiyun		#define CONFIG_EXTRA_ENV_SETTINGS \
2317*4882a593Smuzhiyun			"myvar1=value1\0" \
2318*4882a593Smuzhiyun			"myvar2=value2\0"
2319*4882a593Smuzhiyun
2320*4882a593Smuzhiyun		Warning: This method is based on knowledge about the
2321*4882a593Smuzhiyun		internal format how the environment is stored by the
2322*4882a593Smuzhiyun		U-Boot code. This is NOT an official, exported
2323*4882a593Smuzhiyun		interface! Although it is unlikely that this format
2324*4882a593Smuzhiyun		will change soon, there is no guarantee either.
2325*4882a593Smuzhiyun		You better know what you are doing here.
2326*4882a593Smuzhiyun
2327*4882a593Smuzhiyun		Note: overly (ab)use of the default environment is
2328*4882a593Smuzhiyun		discouraged. Make sure to check other ways to preset
2329*4882a593Smuzhiyun		the environment like the "source" command or the
2330*4882a593Smuzhiyun		boot command first.
2331*4882a593Smuzhiyun
2332*4882a593Smuzhiyun		CONFIG_ENV_VARS_UBOOT_CONFIG
2333*4882a593Smuzhiyun
2334*4882a593Smuzhiyun		Define this in order to add variables describing the
2335*4882a593Smuzhiyun		U-Boot build configuration to the default environment.
2336*4882a593Smuzhiyun		These will be named arch, cpu, board, vendor, and soc.
2337*4882a593Smuzhiyun
2338*4882a593Smuzhiyun		Enabling this option will cause the following to be defined:
2339*4882a593Smuzhiyun
2340*4882a593Smuzhiyun		- CONFIG_SYS_ARCH
2341*4882a593Smuzhiyun		- CONFIG_SYS_CPU
2342*4882a593Smuzhiyun		- CONFIG_SYS_BOARD
2343*4882a593Smuzhiyun		- CONFIG_SYS_VENDOR
2344*4882a593Smuzhiyun		- CONFIG_SYS_SOC
2345*4882a593Smuzhiyun
2346*4882a593Smuzhiyun		CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
2347*4882a593Smuzhiyun
2348*4882a593Smuzhiyun		Define this in order to add variables describing certain
2349*4882a593Smuzhiyun		run-time determined information about the hardware to the
2350*4882a593Smuzhiyun		environment.  These will be named board_name, board_rev.
2351*4882a593Smuzhiyun
2352*4882a593Smuzhiyun		CONFIG_DELAY_ENVIRONMENT
2353*4882a593Smuzhiyun
2354*4882a593Smuzhiyun		Normally the environment is loaded when the board is
2355*4882a593Smuzhiyun		initialised so that it is available to U-Boot. This inhibits
2356*4882a593Smuzhiyun		that so that the environment is not available until
2357*4882a593Smuzhiyun		explicitly loaded later by U-Boot code. With CONFIG_OF_CONTROL
2358*4882a593Smuzhiyun		this is instead controlled by the value of
2359*4882a593Smuzhiyun		/config/load-environment.
2360*4882a593Smuzhiyun
2361*4882a593Smuzhiyun- TFTP Fixed UDP Port:
2362*4882a593Smuzhiyun		CONFIG_TFTP_PORT
2363*4882a593Smuzhiyun
2364*4882a593Smuzhiyun		If this is defined, the environment variable tftpsrcp
2365*4882a593Smuzhiyun		is used to supply the TFTP UDP source port value.
2366*4882a593Smuzhiyun		If tftpsrcp isn't defined, the normal pseudo-random port
2367*4882a593Smuzhiyun		number generator is used.
2368*4882a593Smuzhiyun
2369*4882a593Smuzhiyun		Also, the environment variable tftpdstp is used to supply
2370*4882a593Smuzhiyun		the TFTP UDP destination port value.  If tftpdstp isn't
2371*4882a593Smuzhiyun		defined, the normal port 69 is used.
2372*4882a593Smuzhiyun
2373*4882a593Smuzhiyun		The purpose for tftpsrcp is to allow a TFTP server to
2374*4882a593Smuzhiyun		blindly start the TFTP transfer using the pre-configured
2375*4882a593Smuzhiyun		target IP address and UDP port. This has the effect of
2376*4882a593Smuzhiyun		"punching through" the (Windows XP) firewall, allowing
2377*4882a593Smuzhiyun		the remainder of the TFTP transfer to proceed normally.
2378*4882a593Smuzhiyun		A better solution is to properly configure the firewall,
2379*4882a593Smuzhiyun		but sometimes that is not allowed.
2380*4882a593Smuzhiyun
2381*4882a593Smuzhiyun- bootcount support:
2382*4882a593Smuzhiyun		CONFIG_BOOTCOUNT_LIMIT
2383*4882a593Smuzhiyun
2384*4882a593Smuzhiyun		This enables the bootcounter support, see:
2385*4882a593Smuzhiyun		http://www.denx.de/wiki/DULG/UBootBootCountLimit
2386*4882a593Smuzhiyun
2387*4882a593Smuzhiyun		CONFIG_AT91SAM9XE
2388*4882a593Smuzhiyun		enable special bootcounter support on at91sam9xe based boards.
2389*4882a593Smuzhiyun		CONFIG_SOC_DA8XX
2390*4882a593Smuzhiyun		enable special bootcounter support on da850 based boards.
2391*4882a593Smuzhiyun		CONFIG_BOOTCOUNT_RAM
2392*4882a593Smuzhiyun		enable support for the bootcounter in RAM
2393*4882a593Smuzhiyun		CONFIG_BOOTCOUNT_I2C
2394*4882a593Smuzhiyun		enable support for the bootcounter on an i2c (like RTC) device.
2395*4882a593Smuzhiyun			CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
2396*4882a593Smuzhiyun			CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for
2397*4882a593Smuzhiyun						    the bootcounter.
2398*4882a593Smuzhiyun			CONFIG_BOOTCOUNT_ALEN = address len
2399*4882a593Smuzhiyun		CONFIG_BOOTCOUNT_EXT
2400*4882a593Smuzhiyun		enable support for the bootcounter in EXT filesystem
2401*4882a593Smuzhiyun			CONFIG_SYS_BOOTCOUNT_ADDR = RAM address used for read
2402*4882a593Smuzhiyun                                                    and write.
2403*4882a593Smuzhiyun			CONFIG_SYS_BOOTCOUNT_EXT_INTERFACE = interface
2404*4882a593Smuzhiyun			CONFIG_SYS_BOOTCOUNT_EXT_DEVPART = device and part
2405*4882a593Smuzhiyun			CONFIG_SYS_BOOTCOUNT_EXT_NAME = filename
2406*4882a593Smuzhiyun
2407*4882a593Smuzhiyun- Show boot progress:
2408*4882a593Smuzhiyun		CONFIG_SHOW_BOOT_PROGRESS
2409*4882a593Smuzhiyun
2410*4882a593Smuzhiyun		Defining this option allows to add some board-
2411*4882a593Smuzhiyun		specific code (calling a user-provided function
2412*4882a593Smuzhiyun		"show_boot_progress(int)") that enables you to show
2413*4882a593Smuzhiyun		the system's boot progress on some display (for
2414*4882a593Smuzhiyun		example, some LED's) on your board. At the moment,
2415*4882a593Smuzhiyun		the following checkpoints are implemented:
2416*4882a593Smuzhiyun
2417*4882a593Smuzhiyun
2418*4882a593SmuzhiyunLegacy uImage format:
2419*4882a593Smuzhiyun
2420*4882a593Smuzhiyun  Arg	Where			When
2421*4882a593Smuzhiyun    1	common/cmd_bootm.c	before attempting to boot an image
2422*4882a593Smuzhiyun   -1	common/cmd_bootm.c	Image header has bad	 magic number
2423*4882a593Smuzhiyun    2	common/cmd_bootm.c	Image header has correct magic number
2424*4882a593Smuzhiyun   -2	common/cmd_bootm.c	Image header has bad	 checksum
2425*4882a593Smuzhiyun    3	common/cmd_bootm.c	Image header has correct checksum
2426*4882a593Smuzhiyun   -3	common/cmd_bootm.c	Image data   has bad	 checksum
2427*4882a593Smuzhiyun    4	common/cmd_bootm.c	Image data   has correct checksum
2428*4882a593Smuzhiyun   -4	common/cmd_bootm.c	Image is for unsupported architecture
2429*4882a593Smuzhiyun    5	common/cmd_bootm.c	Architecture check OK
2430*4882a593Smuzhiyun   -5	common/cmd_bootm.c	Wrong Image Type (not kernel, multi)
2431*4882a593Smuzhiyun    6	common/cmd_bootm.c	Image Type check OK
2432*4882a593Smuzhiyun   -6	common/cmd_bootm.c	gunzip uncompression error
2433*4882a593Smuzhiyun   -7	common/cmd_bootm.c	Unimplemented compression type
2434*4882a593Smuzhiyun    7	common/cmd_bootm.c	Uncompression OK
2435*4882a593Smuzhiyun    8	common/cmd_bootm.c	No uncompress/copy overwrite error
2436*4882a593Smuzhiyun   -9	common/cmd_bootm.c	Unsupported OS (not Linux, BSD, VxWorks, QNX)
2437*4882a593Smuzhiyun
2438*4882a593Smuzhiyun    9	common/image.c		Start initial ramdisk verification
2439*4882a593Smuzhiyun  -10	common/image.c		Ramdisk header has bad	   magic number
2440*4882a593Smuzhiyun  -11	common/image.c		Ramdisk header has bad	   checksum
2441*4882a593Smuzhiyun   10	common/image.c		Ramdisk header is OK
2442*4882a593Smuzhiyun  -12	common/image.c		Ramdisk data   has bad	   checksum
2443*4882a593Smuzhiyun   11	common/image.c		Ramdisk data   has correct checksum
2444*4882a593Smuzhiyun   12	common/image.c		Ramdisk verification complete, start loading
2445*4882a593Smuzhiyun  -13	common/image.c		Wrong Image Type (not PPC Linux ramdisk)
2446*4882a593Smuzhiyun   13	common/image.c		Start multifile image verification
2447*4882a593Smuzhiyun   14	common/image.c		No initial ramdisk, no multifile, continue.
2448*4882a593Smuzhiyun
2449*4882a593Smuzhiyun   15	arch/<arch>/lib/bootm.c All preparation done, transferring control to OS
2450*4882a593Smuzhiyun
2451*4882a593Smuzhiyun  -30	arch/powerpc/lib/board.c	Fatal error, hang the system
2452*4882a593Smuzhiyun  -31	post/post.c		POST test failed, detected by post_output_backlog()
2453*4882a593Smuzhiyun  -32	post/post.c		POST test failed, detected by post_run_single()
2454*4882a593Smuzhiyun
2455*4882a593Smuzhiyun   34	common/cmd_doc.c	before loading a Image from a DOC device
2456*4882a593Smuzhiyun  -35	common/cmd_doc.c	Bad usage of "doc" command
2457*4882a593Smuzhiyun   35	common/cmd_doc.c	correct usage of "doc" command
2458*4882a593Smuzhiyun  -36	common/cmd_doc.c	No boot device
2459*4882a593Smuzhiyun   36	common/cmd_doc.c	correct boot device
2460*4882a593Smuzhiyun  -37	common/cmd_doc.c	Unknown Chip ID on boot device
2461*4882a593Smuzhiyun   37	common/cmd_doc.c	correct chip ID found, device available
2462*4882a593Smuzhiyun  -38	common/cmd_doc.c	Read Error on boot device
2463*4882a593Smuzhiyun   38	common/cmd_doc.c	reading Image header from DOC device OK
2464*4882a593Smuzhiyun  -39	common/cmd_doc.c	Image header has bad magic number
2465*4882a593Smuzhiyun   39	common/cmd_doc.c	Image header has correct magic number
2466*4882a593Smuzhiyun  -40	common/cmd_doc.c	Error reading Image from DOC device
2467*4882a593Smuzhiyun   40	common/cmd_doc.c	Image header has correct magic number
2468*4882a593Smuzhiyun   41	common/cmd_ide.c	before loading a Image from a IDE device
2469*4882a593Smuzhiyun  -42	common/cmd_ide.c	Bad usage of "ide" command
2470*4882a593Smuzhiyun   42	common/cmd_ide.c	correct usage of "ide" command
2471*4882a593Smuzhiyun  -43	common/cmd_ide.c	No boot device
2472*4882a593Smuzhiyun   43	common/cmd_ide.c	boot device found
2473*4882a593Smuzhiyun  -44	common/cmd_ide.c	Device not available
2474*4882a593Smuzhiyun   44	common/cmd_ide.c	Device available
2475*4882a593Smuzhiyun  -45	common/cmd_ide.c	wrong partition selected
2476*4882a593Smuzhiyun   45	common/cmd_ide.c	partition selected
2477*4882a593Smuzhiyun  -46	common/cmd_ide.c	Unknown partition table
2478*4882a593Smuzhiyun   46	common/cmd_ide.c	valid partition table found
2479*4882a593Smuzhiyun  -47	common/cmd_ide.c	Invalid partition type
2480*4882a593Smuzhiyun   47	common/cmd_ide.c	correct partition type
2481*4882a593Smuzhiyun  -48	common/cmd_ide.c	Error reading Image Header on boot device
2482*4882a593Smuzhiyun   48	common/cmd_ide.c	reading Image Header from IDE device OK
2483*4882a593Smuzhiyun  -49	common/cmd_ide.c	Image header has bad magic number
2484*4882a593Smuzhiyun   49	common/cmd_ide.c	Image header has correct magic number
2485*4882a593Smuzhiyun  -50	common/cmd_ide.c	Image header has bad	 checksum
2486*4882a593Smuzhiyun   50	common/cmd_ide.c	Image header has correct checksum
2487*4882a593Smuzhiyun  -51	common/cmd_ide.c	Error reading Image from IDE device
2488*4882a593Smuzhiyun   51	common/cmd_ide.c	reading Image from IDE device OK
2489*4882a593Smuzhiyun   52	common/cmd_nand.c	before loading a Image from a NAND device
2490*4882a593Smuzhiyun  -53	common/cmd_nand.c	Bad usage of "nand" command
2491*4882a593Smuzhiyun   53	common/cmd_nand.c	correct usage of "nand" command
2492*4882a593Smuzhiyun  -54	common/cmd_nand.c	No boot device
2493*4882a593Smuzhiyun   54	common/cmd_nand.c	boot device found
2494*4882a593Smuzhiyun  -55	common/cmd_nand.c	Unknown Chip ID on boot device
2495*4882a593Smuzhiyun   55	common/cmd_nand.c	correct chip ID found, device available
2496*4882a593Smuzhiyun  -56	common/cmd_nand.c	Error reading Image Header on boot device
2497*4882a593Smuzhiyun   56	common/cmd_nand.c	reading Image Header from NAND device OK
2498*4882a593Smuzhiyun  -57	common/cmd_nand.c	Image header has bad magic number
2499*4882a593Smuzhiyun   57	common/cmd_nand.c	Image header has correct magic number
2500*4882a593Smuzhiyun  -58	common/cmd_nand.c	Error reading Image from NAND device
2501*4882a593Smuzhiyun   58	common/cmd_nand.c	reading Image from NAND device OK
2502*4882a593Smuzhiyun
2503*4882a593Smuzhiyun  -60	common/env_common.c	Environment has a bad CRC, using default
2504*4882a593Smuzhiyun
2505*4882a593Smuzhiyun   64	net/eth.c		starting with Ethernet configuration.
2506*4882a593Smuzhiyun  -64	net/eth.c		no Ethernet found.
2507*4882a593Smuzhiyun   65	net/eth.c		Ethernet found.
2508*4882a593Smuzhiyun
2509*4882a593Smuzhiyun  -80	common/cmd_net.c	usage wrong
2510*4882a593Smuzhiyun   80	common/cmd_net.c	before calling net_loop()
2511*4882a593Smuzhiyun  -81	common/cmd_net.c	some error in net_loop() occurred
2512*4882a593Smuzhiyun   81	common/cmd_net.c	net_loop() back without error
2513*4882a593Smuzhiyun  -82	common/cmd_net.c	size == 0 (File with size 0 loaded)
2514*4882a593Smuzhiyun   82	common/cmd_net.c	trying automatic boot
2515*4882a593Smuzhiyun   83	common/cmd_net.c	running "source" command
2516*4882a593Smuzhiyun  -83	common/cmd_net.c	some error in automatic boot or "source" command
2517*4882a593Smuzhiyun   84	common/cmd_net.c	end without errors
2518*4882a593Smuzhiyun
2519*4882a593SmuzhiyunFIT uImage format:
2520*4882a593Smuzhiyun
2521*4882a593Smuzhiyun  Arg	Where			When
2522*4882a593Smuzhiyun  100	common/cmd_bootm.c	Kernel FIT Image has correct format
2523*4882a593Smuzhiyun -100	common/cmd_bootm.c	Kernel FIT Image has incorrect format
2524*4882a593Smuzhiyun  101	common/cmd_bootm.c	No Kernel subimage unit name, using configuration
2525*4882a593Smuzhiyun -101	common/cmd_bootm.c	Can't get configuration for kernel subimage
2526*4882a593Smuzhiyun  102	common/cmd_bootm.c	Kernel unit name specified
2527*4882a593Smuzhiyun -103	common/cmd_bootm.c	Can't get kernel subimage node offset
2528*4882a593Smuzhiyun  103	common/cmd_bootm.c	Found configuration node
2529*4882a593Smuzhiyun  104	common/cmd_bootm.c	Got kernel subimage node offset
2530*4882a593Smuzhiyun -104	common/cmd_bootm.c	Kernel subimage hash verification failed
2531*4882a593Smuzhiyun  105	common/cmd_bootm.c	Kernel subimage hash verification OK
2532*4882a593Smuzhiyun -105	common/cmd_bootm.c	Kernel subimage is for unsupported architecture
2533*4882a593Smuzhiyun  106	common/cmd_bootm.c	Architecture check OK
2534*4882a593Smuzhiyun -106	common/cmd_bootm.c	Kernel subimage has wrong type
2535*4882a593Smuzhiyun  107	common/cmd_bootm.c	Kernel subimage type OK
2536*4882a593Smuzhiyun -107	common/cmd_bootm.c	Can't get kernel subimage data/size
2537*4882a593Smuzhiyun  108	common/cmd_bootm.c	Got kernel subimage data/size
2538*4882a593Smuzhiyun -108	common/cmd_bootm.c	Wrong image type (not legacy, FIT)
2539*4882a593Smuzhiyun -109	common/cmd_bootm.c	Can't get kernel subimage type
2540*4882a593Smuzhiyun -110	common/cmd_bootm.c	Can't get kernel subimage comp
2541*4882a593Smuzhiyun -111	common/cmd_bootm.c	Can't get kernel subimage os
2542*4882a593Smuzhiyun -112	common/cmd_bootm.c	Can't get kernel subimage load address
2543*4882a593Smuzhiyun -113	common/cmd_bootm.c	Image uncompress/copy overwrite error
2544*4882a593Smuzhiyun
2545*4882a593Smuzhiyun  120	common/image.c		Start initial ramdisk verification
2546*4882a593Smuzhiyun -120	common/image.c		Ramdisk FIT image has incorrect format
2547*4882a593Smuzhiyun  121	common/image.c		Ramdisk FIT image has correct format
2548*4882a593Smuzhiyun  122	common/image.c		No ramdisk subimage unit name, using configuration
2549*4882a593Smuzhiyun -122	common/image.c		Can't get configuration for ramdisk subimage
2550*4882a593Smuzhiyun  123	common/image.c		Ramdisk unit name specified
2551*4882a593Smuzhiyun -124	common/image.c		Can't get ramdisk subimage node offset
2552*4882a593Smuzhiyun  125	common/image.c		Got ramdisk subimage node offset
2553*4882a593Smuzhiyun -125	common/image.c		Ramdisk subimage hash verification failed
2554*4882a593Smuzhiyun  126	common/image.c		Ramdisk subimage hash verification OK
2555*4882a593Smuzhiyun -126	common/image.c		Ramdisk subimage for unsupported architecture
2556*4882a593Smuzhiyun  127	common/image.c		Architecture check OK
2557*4882a593Smuzhiyun -127	common/image.c		Can't get ramdisk subimage data/size
2558*4882a593Smuzhiyun  128	common/image.c		Got ramdisk subimage data/size
2559*4882a593Smuzhiyun  129	common/image.c		Can't get ramdisk load address
2560*4882a593Smuzhiyun -129	common/image.c		Got ramdisk load address
2561*4882a593Smuzhiyun
2562*4882a593Smuzhiyun -130	common/cmd_doc.c	Incorrect FIT image format
2563*4882a593Smuzhiyun  131	common/cmd_doc.c	FIT image format OK
2564*4882a593Smuzhiyun
2565*4882a593Smuzhiyun -140	common/cmd_ide.c	Incorrect FIT image format
2566*4882a593Smuzhiyun  141	common/cmd_ide.c	FIT image format OK
2567*4882a593Smuzhiyun
2568*4882a593Smuzhiyun -150	common/cmd_nand.c	Incorrect FIT image format
2569*4882a593Smuzhiyun  151	common/cmd_nand.c	FIT image format OK
2570*4882a593Smuzhiyun
2571*4882a593Smuzhiyun- legacy image format:
2572*4882a593Smuzhiyun		CONFIG_IMAGE_FORMAT_LEGACY
2573*4882a593Smuzhiyun		enables the legacy image format support in U-Boot.
2574*4882a593Smuzhiyun
2575*4882a593Smuzhiyun		Default:
2576*4882a593Smuzhiyun		enabled if CONFIG_FIT_SIGNATURE is not defined.
2577*4882a593Smuzhiyun
2578*4882a593Smuzhiyun		CONFIG_DISABLE_IMAGE_LEGACY
2579*4882a593Smuzhiyun		disable the legacy image format
2580*4882a593Smuzhiyun
2581*4882a593Smuzhiyun		This define is introduced, as the legacy image format is
2582*4882a593Smuzhiyun		enabled per default for backward compatibility.
2583*4882a593Smuzhiyun
2584*4882a593Smuzhiyun- Standalone program support:
2585*4882a593Smuzhiyun		CONFIG_STANDALONE_LOAD_ADDR
2586*4882a593Smuzhiyun
2587*4882a593Smuzhiyun		This option defines a board specific value for the
2588*4882a593Smuzhiyun		address where standalone program gets loaded, thus
2589*4882a593Smuzhiyun		overwriting the architecture dependent default
2590*4882a593Smuzhiyun		settings.
2591*4882a593Smuzhiyun
2592*4882a593Smuzhiyun- Frame Buffer Address:
2593*4882a593Smuzhiyun		CONFIG_FB_ADDR
2594*4882a593Smuzhiyun
2595*4882a593Smuzhiyun		Define CONFIG_FB_ADDR if you want to use specific
2596*4882a593Smuzhiyun		address for frame buffer.  This is typically the case
2597*4882a593Smuzhiyun		when using a graphics controller has separate video
2598*4882a593Smuzhiyun		memory.  U-Boot will then place the frame buffer at
2599*4882a593Smuzhiyun		the given address instead of dynamically reserving it
2600*4882a593Smuzhiyun		in system RAM by calling lcd_setmem(), which grabs
2601*4882a593Smuzhiyun		the memory for the frame buffer depending on the
2602*4882a593Smuzhiyun		configured panel size.
2603*4882a593Smuzhiyun
2604*4882a593Smuzhiyun		Please see board_init_f function.
2605*4882a593Smuzhiyun
2606*4882a593Smuzhiyun- Automatic software updates via TFTP server
2607*4882a593Smuzhiyun		CONFIG_UPDATE_TFTP
2608*4882a593Smuzhiyun		CONFIG_UPDATE_TFTP_CNT_MAX
2609*4882a593Smuzhiyun		CONFIG_UPDATE_TFTP_MSEC_MAX
2610*4882a593Smuzhiyun
2611*4882a593Smuzhiyun		These options enable and control the auto-update feature;
2612*4882a593Smuzhiyun		for a more detailed description refer to doc/README.update.
2613*4882a593Smuzhiyun
2614*4882a593Smuzhiyun- MTD Support (mtdparts command, UBI support)
2615*4882a593Smuzhiyun		CONFIG_MTD_UBI_WL_THRESHOLD
2616*4882a593Smuzhiyun		This parameter defines the maximum difference between the highest
2617*4882a593Smuzhiyun		erase counter value and the lowest erase counter value of eraseblocks
2618*4882a593Smuzhiyun		of UBI devices. When this threshold is exceeded, UBI starts performing
2619*4882a593Smuzhiyun		wear leveling by means of moving data from eraseblock with low erase
2620*4882a593Smuzhiyun		counter to eraseblocks with high erase counter.
2621*4882a593Smuzhiyun
2622*4882a593Smuzhiyun		The default value should be OK for SLC NAND flashes, NOR flashes and
2623*4882a593Smuzhiyun		other flashes which have eraseblock life-cycle 100000 or more.
2624*4882a593Smuzhiyun		However, in case of MLC NAND flashes which typically have eraseblock
2625*4882a593Smuzhiyun		life-cycle less than 10000, the threshold should be lessened (e.g.,
2626*4882a593Smuzhiyun		to 128 or 256, although it does not have to be power of 2).
2627*4882a593Smuzhiyun
2628*4882a593Smuzhiyun		default: 4096
2629*4882a593Smuzhiyun
2630*4882a593Smuzhiyun		CONFIG_MTD_UBI_BEB_LIMIT
2631*4882a593Smuzhiyun		This option specifies the maximum bad physical eraseblocks UBI
2632*4882a593Smuzhiyun		expects on the MTD device (per 1024 eraseblocks). If the
2633*4882a593Smuzhiyun		underlying flash does not admit of bad eraseblocks (e.g. NOR
2634*4882a593Smuzhiyun		flash), this value is ignored.
2635*4882a593Smuzhiyun
2636*4882a593Smuzhiyun		NAND datasheets often specify the minimum and maximum NVM
2637*4882a593Smuzhiyun		(Number of Valid Blocks) for the flashes' endurance lifetime.
2638*4882a593Smuzhiyun		The maximum expected bad eraseblocks per 1024 eraseblocks
2639*4882a593Smuzhiyun		then can be calculated as "1024 * (1 - MinNVB / MaxNVB)",
2640*4882a593Smuzhiyun		which gives 20 for most NANDs (MaxNVB is basically the total
2641*4882a593Smuzhiyun		count of eraseblocks on the chip).
2642*4882a593Smuzhiyun
2643*4882a593Smuzhiyun		To put it differently, if this value is 20, UBI will try to
2644*4882a593Smuzhiyun		reserve about 1.9% of physical eraseblocks for bad blocks
2645*4882a593Smuzhiyun		handling. And that will be 1.9% of eraseblocks on the entire
2646*4882a593Smuzhiyun		NAND chip, not just the MTD partition UBI attaches. This means
2647*4882a593Smuzhiyun		that if you have, say, a NAND flash chip admits maximum 40 bad
2648*4882a593Smuzhiyun		eraseblocks, and it is split on two MTD partitions of the same
2649*4882a593Smuzhiyun		size, UBI will reserve 40 eraseblocks when attaching a
2650*4882a593Smuzhiyun		partition.
2651*4882a593Smuzhiyun
2652*4882a593Smuzhiyun		default: 20
2653*4882a593Smuzhiyun
2654*4882a593Smuzhiyun		CONFIG_MTD_UBI_FASTMAP
2655*4882a593Smuzhiyun		Fastmap is a mechanism which allows attaching an UBI device
2656*4882a593Smuzhiyun		in nearly constant time. Instead of scanning the whole MTD device it
2657*4882a593Smuzhiyun		only has to locate a checkpoint (called fastmap) on the device.
2658*4882a593Smuzhiyun		The on-flash fastmap contains all information needed to attach
2659*4882a593Smuzhiyun		the device. Using fastmap makes only sense on large devices where
2660*4882a593Smuzhiyun		attaching by scanning takes long. UBI will not automatically install
2661*4882a593Smuzhiyun		a fastmap on old images, but you can set the UBI parameter
2662*4882a593Smuzhiyun		CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT to 1 if you want so. Please note
2663*4882a593Smuzhiyun		that fastmap-enabled images are still usable with UBI implementations
2664*4882a593Smuzhiyun		without	fastmap support. On typical flash devices the whole fastmap
2665*4882a593Smuzhiyun		fits into one PEB. UBI will reserve PEBs to hold two fastmaps.
2666*4882a593Smuzhiyun
2667*4882a593Smuzhiyun		CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT
2668*4882a593Smuzhiyun		Set this parameter to enable fastmap automatically on images
2669*4882a593Smuzhiyun		without a fastmap.
2670*4882a593Smuzhiyun		default: 0
2671*4882a593Smuzhiyun
2672*4882a593Smuzhiyun		CONFIG_MTD_UBI_FM_DEBUG
2673*4882a593Smuzhiyun		Enable UBI fastmap debug
2674*4882a593Smuzhiyun		default: 0
2675*4882a593Smuzhiyun
2676*4882a593Smuzhiyun- UBIFS support
2677*4882a593Smuzhiyun		CONFIG_UBIFS_SILENCE_MSG
2678*4882a593Smuzhiyun
2679*4882a593Smuzhiyun		Make the verbose messages from UBIFS stop printing.  This leaves
2680*4882a593Smuzhiyun		warnings and errors enabled.
2681*4882a593Smuzhiyun
2682*4882a593Smuzhiyun- SPL framework
2683*4882a593Smuzhiyun		CONFIG_SPL
2684*4882a593Smuzhiyun		Enable building of SPL globally.
2685*4882a593Smuzhiyun
2686*4882a593Smuzhiyun		CONFIG_SPL_LDSCRIPT
2687*4882a593Smuzhiyun		LDSCRIPT for linking the SPL binary.
2688*4882a593Smuzhiyun
2689*4882a593Smuzhiyun		CONFIG_SPL_MAX_FOOTPRINT
2690*4882a593Smuzhiyun		Maximum size in memory allocated to the SPL, BSS included.
2691*4882a593Smuzhiyun		When defined, the linker checks that the actual memory
2692*4882a593Smuzhiyun		used by SPL from _start to __bss_end does not exceed it.
2693*4882a593Smuzhiyun		CONFIG_SPL_MAX_FOOTPRINT and CONFIG_SPL_BSS_MAX_SIZE
2694*4882a593Smuzhiyun		must not be both defined at the same time.
2695*4882a593Smuzhiyun
2696*4882a593Smuzhiyun		CONFIG_SPL_MAX_SIZE
2697*4882a593Smuzhiyun		Maximum size of the SPL image (text, data, rodata, and
2698*4882a593Smuzhiyun		linker lists sections), BSS excluded.
2699*4882a593Smuzhiyun		When defined, the linker checks that the actual size does
2700*4882a593Smuzhiyun		not exceed it.
2701*4882a593Smuzhiyun
2702*4882a593Smuzhiyun		CONFIG_SPL_TEXT_BASE
2703*4882a593Smuzhiyun		TEXT_BASE for linking the SPL binary.
2704*4882a593Smuzhiyun
2705*4882a593Smuzhiyun		CONFIG_SPL_RELOC_TEXT_BASE
2706*4882a593Smuzhiyun		Address to relocate to.  If unspecified, this is equal to
2707*4882a593Smuzhiyun		CONFIG_SPL_TEXT_BASE (i.e. no relocation is done).
2708*4882a593Smuzhiyun
2709*4882a593Smuzhiyun		CONFIG_SPL_BSS_START_ADDR
2710*4882a593Smuzhiyun		Link address for the BSS within the SPL binary.
2711*4882a593Smuzhiyun
2712*4882a593Smuzhiyun		CONFIG_SPL_BSS_MAX_SIZE
2713*4882a593Smuzhiyun		Maximum size in memory allocated to the SPL BSS.
2714*4882a593Smuzhiyun		When defined, the linker checks that the actual memory used
2715*4882a593Smuzhiyun		by SPL from __bss_start to __bss_end does not exceed it.
2716*4882a593Smuzhiyun		CONFIG_SPL_MAX_FOOTPRINT and CONFIG_SPL_BSS_MAX_SIZE
2717*4882a593Smuzhiyun		must not be both defined at the same time.
2718*4882a593Smuzhiyun
2719*4882a593Smuzhiyun		CONFIG_SPL_STACK
2720*4882a593Smuzhiyun		Adress of the start of the stack SPL will use
2721*4882a593Smuzhiyun
2722*4882a593Smuzhiyun		CONFIG_SPL_PANIC_ON_RAW_IMAGE
2723*4882a593Smuzhiyun		When defined, SPL will panic() if the image it has
2724*4882a593Smuzhiyun		loaded does not have a signature.
2725*4882a593Smuzhiyun		Defining this is useful when code which loads images
2726*4882a593Smuzhiyun		in SPL cannot guarantee that absolutely all read errors
2727*4882a593Smuzhiyun		will be caught.
2728*4882a593Smuzhiyun		An example is the LPC32XX MLC NAND driver, which will
2729*4882a593Smuzhiyun		consider that a completely unreadable NAND block is bad,
2730*4882a593Smuzhiyun		and thus should be skipped silently.
2731*4882a593Smuzhiyun
2732*4882a593Smuzhiyun		CONFIG_SPL_RELOC_STACK
2733*4882a593Smuzhiyun		Adress of the start of the stack SPL will use after
2734*4882a593Smuzhiyun		relocation.  If unspecified, this is equal to
2735*4882a593Smuzhiyun		CONFIG_SPL_STACK.
2736*4882a593Smuzhiyun
2737*4882a593Smuzhiyun		CONFIG_SYS_SPL_MALLOC_START
2738*4882a593Smuzhiyun		Starting address of the malloc pool used in SPL.
2739*4882a593Smuzhiyun		When this option is set the full malloc is used in SPL and
2740*4882a593Smuzhiyun		it is set up by spl_init() and before that, the simple malloc()
2741*4882a593Smuzhiyun		can be used if CONFIG_SYS_MALLOC_F is defined.
2742*4882a593Smuzhiyun
2743*4882a593Smuzhiyun		CONFIG_SYS_SPL_MALLOC_SIZE
2744*4882a593Smuzhiyun		The size of the malloc pool used in SPL.
2745*4882a593Smuzhiyun
2746*4882a593Smuzhiyun		CONFIG_SPL_FRAMEWORK
2747*4882a593Smuzhiyun		Enable the SPL framework under common/.  This framework
2748*4882a593Smuzhiyun		supports MMC, NAND and YMODEM loading of U-Boot and NAND
2749*4882a593Smuzhiyun		NAND loading of the Linux Kernel.
2750*4882a593Smuzhiyun
2751*4882a593Smuzhiyun		CONFIG_SPL_OS_BOOT
2752*4882a593Smuzhiyun		Enable booting directly to an OS from SPL.
2753*4882a593Smuzhiyun		See also: doc/README.falcon
2754*4882a593Smuzhiyun
2755*4882a593Smuzhiyun		CONFIG_SPL_DISPLAY_PRINT
2756*4882a593Smuzhiyun		For ARM, enable an optional function to print more information
2757*4882a593Smuzhiyun		about the running system.
2758*4882a593Smuzhiyun
2759*4882a593Smuzhiyun		CONFIG_SPL_INIT_MINIMAL
2760*4882a593Smuzhiyun		Arch init code should be built for a very small image
2761*4882a593Smuzhiyun
2762*4882a593Smuzhiyun		CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
2763*4882a593Smuzhiyun		Partition on the MMC to load U-Boot from when the MMC is being
2764*4882a593Smuzhiyun		used in raw mode
2765*4882a593Smuzhiyun
2766*4882a593Smuzhiyun		CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
2767*4882a593Smuzhiyun		Sector to load kernel uImage from when MMC is being
2768*4882a593Smuzhiyun		used in raw mode (for Falcon mode)
2769*4882a593Smuzhiyun
2770*4882a593Smuzhiyun		CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR,
2771*4882a593Smuzhiyun		CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS
2772*4882a593Smuzhiyun		Sector and number of sectors to load kernel argument
2773*4882a593Smuzhiyun		parameters from when MMC is being used in raw mode
2774*4882a593Smuzhiyun		(for falcon mode)
2775*4882a593Smuzhiyun
2776*4882a593Smuzhiyun		CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
2777*4882a593Smuzhiyun		Partition on the MMC to load U-Boot from when the MMC is being
2778*4882a593Smuzhiyun		used in fs mode
2779*4882a593Smuzhiyun
2780*4882a593Smuzhiyun		CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
2781*4882a593Smuzhiyun		Filename to read to load U-Boot when reading from filesystem
2782*4882a593Smuzhiyun
2783*4882a593Smuzhiyun		CONFIG_SPL_FS_LOAD_KERNEL_NAME
2784*4882a593Smuzhiyun		Filename to read to load kernel uImage when reading
2785*4882a593Smuzhiyun		from filesystem (for Falcon mode)
2786*4882a593Smuzhiyun
2787*4882a593Smuzhiyun		CONFIG_SPL_FS_LOAD_ARGS_NAME
2788*4882a593Smuzhiyun		Filename to read to load kernel argument parameters
2789*4882a593Smuzhiyun		when reading from filesystem (for Falcon mode)
2790*4882a593Smuzhiyun
2791*4882a593Smuzhiyun		CONFIG_SPL_MPC83XX_WAIT_FOR_NAND
2792*4882a593Smuzhiyun		Set this for NAND SPL on PPC mpc83xx targets, so that
2793*4882a593Smuzhiyun		start.S waits for the rest of the SPL to load before
2794*4882a593Smuzhiyun		continuing (the hardware starts execution after just
2795*4882a593Smuzhiyun		loading the first page rather than the full 4K).
2796*4882a593Smuzhiyun
2797*4882a593Smuzhiyun		CONFIG_SPL_SKIP_RELOCATE
2798*4882a593Smuzhiyun		Avoid SPL relocation
2799*4882a593Smuzhiyun
2800*4882a593Smuzhiyun		CONFIG_SPL_NAND_BASE
2801*4882a593Smuzhiyun		Include nand_base.c in the SPL.  Requires
2802*4882a593Smuzhiyun		CONFIG_SPL_NAND_DRIVERS.
2803*4882a593Smuzhiyun
2804*4882a593Smuzhiyun		CONFIG_SPL_NAND_DRIVERS
2805*4882a593Smuzhiyun		SPL uses normal NAND drivers, not minimal drivers.
2806*4882a593Smuzhiyun
2807*4882a593Smuzhiyun		CONFIG_SPL_NAND_IDENT
2808*4882a593Smuzhiyun		SPL uses the chip ID list to identify the NAND flash.
2809*4882a593Smuzhiyun		Requires CONFIG_SPL_NAND_BASE.
2810*4882a593Smuzhiyun
2811*4882a593Smuzhiyun		CONFIG_SPL_NAND_ECC
2812*4882a593Smuzhiyun		Include standard software ECC in the SPL
2813*4882a593Smuzhiyun
2814*4882a593Smuzhiyun		CONFIG_SPL_NAND_SIMPLE
2815*4882a593Smuzhiyun		Support for NAND boot using simple NAND drivers that
2816*4882a593Smuzhiyun		expose the cmd_ctrl() interface.
2817*4882a593Smuzhiyun
2818*4882a593Smuzhiyun		CONFIG_SPL_UBI
2819*4882a593Smuzhiyun		Support for a lightweight UBI (fastmap) scanner and
2820*4882a593Smuzhiyun		loader
2821*4882a593Smuzhiyun
2822*4882a593Smuzhiyun		CONFIG_SPL_NAND_RAW_ONLY
2823*4882a593Smuzhiyun		Support to boot only raw u-boot.bin images. Use this only
2824*4882a593Smuzhiyun		if you need to save space.
2825*4882a593Smuzhiyun
2826*4882a593Smuzhiyun		CONFIG_SPL_COMMON_INIT_DDR
2827*4882a593Smuzhiyun		Set for common ddr init with serial presence detect in
2828*4882a593Smuzhiyun		SPL binary.
2829*4882a593Smuzhiyun
2830*4882a593Smuzhiyun		CONFIG_SYS_NAND_5_ADDR_CYCLE, CONFIG_SYS_NAND_PAGE_COUNT,
2831*4882a593Smuzhiyun		CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE,
2832*4882a593Smuzhiyun		CONFIG_SYS_NAND_BLOCK_SIZE, CONFIG_SYS_NAND_BAD_BLOCK_POS,
2833*4882a593Smuzhiyun		CONFIG_SYS_NAND_ECCPOS, CONFIG_SYS_NAND_ECCSIZE,
2834*4882a593Smuzhiyun		CONFIG_SYS_NAND_ECCBYTES
2835*4882a593Smuzhiyun		Defines the size and behavior of the NAND that SPL uses
2836*4882a593Smuzhiyun		to read U-Boot
2837*4882a593Smuzhiyun
2838*4882a593Smuzhiyun		CONFIG_SPL_NAND_BOOT
2839*4882a593Smuzhiyun		Add support NAND boot
2840*4882a593Smuzhiyun
2841*4882a593Smuzhiyun		CONFIG_SYS_NAND_U_BOOT_OFFS
2842*4882a593Smuzhiyun		Location in NAND to read U-Boot from
2843*4882a593Smuzhiyun
2844*4882a593Smuzhiyun		CONFIG_SYS_NAND_U_BOOT_DST
2845*4882a593Smuzhiyun		Location in memory to load U-Boot to
2846*4882a593Smuzhiyun
2847*4882a593Smuzhiyun		CONFIG_SYS_NAND_U_BOOT_SIZE
2848*4882a593Smuzhiyun		Size of image to load
2849*4882a593Smuzhiyun
2850*4882a593Smuzhiyun		CONFIG_SYS_NAND_U_BOOT_START
2851*4882a593Smuzhiyun		Entry point in loaded image to jump to
2852*4882a593Smuzhiyun
2853*4882a593Smuzhiyun		CONFIG_SYS_NAND_HW_ECC_OOBFIRST
2854*4882a593Smuzhiyun		Define this if you need to first read the OOB and then the
2855*4882a593Smuzhiyun		data. This is used, for example, on davinci platforms.
2856*4882a593Smuzhiyun
2857*4882a593Smuzhiyun		CONFIG_SPL_RAM_DEVICE
2858*4882a593Smuzhiyun		Support for running image already present in ram, in SPL binary
2859*4882a593Smuzhiyun
2860*4882a593Smuzhiyun		CONFIG_SPL_PAD_TO
2861*4882a593Smuzhiyun		Image offset to which the SPL should be padded before appending
2862*4882a593Smuzhiyun		the SPL payload. By default, this is defined as
2863*4882a593Smuzhiyun		CONFIG_SPL_MAX_SIZE, or 0 if CONFIG_SPL_MAX_SIZE is undefined.
2864*4882a593Smuzhiyun		CONFIG_SPL_PAD_TO must be either 0, meaning to append the SPL
2865*4882a593Smuzhiyun		payload without any padding, or >= CONFIG_SPL_MAX_SIZE.
2866*4882a593Smuzhiyun
2867*4882a593Smuzhiyun		CONFIG_SPL_TARGET
2868*4882a593Smuzhiyun		Final target image containing SPL and payload.  Some SPLs
2869*4882a593Smuzhiyun		use an arch-specific makefile fragment instead, for
2870*4882a593Smuzhiyun		example if more than one image needs to be produced.
2871*4882a593Smuzhiyun
2872*4882a593Smuzhiyun		CONFIG_FIT_SPL_PRINT
2873*4882a593Smuzhiyun		Printing information about a FIT image adds quite a bit of
2874*4882a593Smuzhiyun		code to SPL. So this is normally disabled in SPL. Use this
2875*4882a593Smuzhiyun		option to re-enable it. This will affect the output of the
2876*4882a593Smuzhiyun		bootm command when booting a FIT image.
2877*4882a593Smuzhiyun
2878*4882a593Smuzhiyun- TPL framework
2879*4882a593Smuzhiyun		CONFIG_TPL
2880*4882a593Smuzhiyun		Enable building of TPL globally.
2881*4882a593Smuzhiyun
2882*4882a593Smuzhiyun		CONFIG_TPL_PAD_TO
2883*4882a593Smuzhiyun		Image offset to which the TPL should be padded before appending
2884*4882a593Smuzhiyun		the TPL payload. By default, this is defined as
2885*4882a593Smuzhiyun		CONFIG_SPL_MAX_SIZE, or 0 if CONFIG_SPL_MAX_SIZE is undefined.
2886*4882a593Smuzhiyun		CONFIG_SPL_PAD_TO must be either 0, meaning to append the SPL
2887*4882a593Smuzhiyun		payload without any padding, or >= CONFIG_SPL_MAX_SIZE.
2888*4882a593Smuzhiyun
2889*4882a593Smuzhiyun- Interrupt support (PPC):
2890*4882a593Smuzhiyun
2891*4882a593Smuzhiyun		There are common interrupt_init() and timer_interrupt()
2892*4882a593Smuzhiyun		for all PPC archs. interrupt_init() calls interrupt_init_cpu()
2893*4882a593Smuzhiyun		for CPU specific initialization. interrupt_init_cpu()
2894*4882a593Smuzhiyun		should set decrementer_count to appropriate value. If
2895*4882a593Smuzhiyun		CPU resets decrementer automatically after interrupt
2896*4882a593Smuzhiyun		(ppc4xx) it should set decrementer_count to zero.
2897*4882a593Smuzhiyun		timer_interrupt() calls timer_interrupt_cpu() for CPU
2898*4882a593Smuzhiyun		specific handling. If board has watchdog / status_led
2899*4882a593Smuzhiyun		/ other_activity_monitor it works automatically from
2900*4882a593Smuzhiyun		general timer_interrupt().
2901*4882a593Smuzhiyun
2902*4882a593Smuzhiyun
2903*4882a593SmuzhiyunBoard initialization settings:
2904*4882a593Smuzhiyun------------------------------
2905*4882a593Smuzhiyun
2906*4882a593SmuzhiyunDuring Initialization u-boot calls a number of board specific functions
2907*4882a593Smuzhiyunto allow the preparation of board specific prerequisites, e.g. pin setup
2908*4882a593Smuzhiyunbefore drivers are initialized. To enable these callbacks the
2909*4882a593Smuzhiyunfollowing configuration macros have to be defined. Currently this is
2910*4882a593Smuzhiyunarchitecture specific, so please check arch/your_architecture/lib/board.c
2911*4882a593Smuzhiyuntypically in board_init_f() and board_init_r().
2912*4882a593Smuzhiyun
2913*4882a593Smuzhiyun- CONFIG_BOARD_EARLY_INIT_F: Call board_early_init_f()
2914*4882a593Smuzhiyun- CONFIG_BOARD_EARLY_INIT_R: Call board_early_init_r()
2915*4882a593Smuzhiyun- CONFIG_BOARD_LATE_INIT: Call board_late_init()
2916*4882a593Smuzhiyun- CONFIG_BOARD_POSTCLK_INIT: Call board_postclk_init()
2917*4882a593Smuzhiyun
2918*4882a593SmuzhiyunConfiguration Settings:
2919*4882a593Smuzhiyun-----------------------
2920*4882a593Smuzhiyun
2921*4882a593Smuzhiyun- CONFIG_SYS_SUPPORT_64BIT_DATA: Defined automatically if compiled as 64-bit.
2922*4882a593Smuzhiyun		Optionally it can be defined to support 64-bit memory commands.
2923*4882a593Smuzhiyun
2924*4882a593Smuzhiyun- CONFIG_SYS_LONGHELP: Defined when you want long help messages included;
2925*4882a593Smuzhiyun		undefine this when you're short of memory.
2926*4882a593Smuzhiyun
2927*4882a593Smuzhiyun- CONFIG_SYS_HELP_CMD_WIDTH: Defined when you want to override the default
2928*4882a593Smuzhiyun		width of the commands listed in the 'help' command output.
2929*4882a593Smuzhiyun
2930*4882a593Smuzhiyun- CONFIG_SYS_PROMPT:	This is what U-Boot prints on the console to
2931*4882a593Smuzhiyun		prompt for user input.
2932*4882a593Smuzhiyun
2933*4882a593Smuzhiyun- CONFIG_SYS_CBSIZE:	Buffer size for input from the Console
2934*4882a593Smuzhiyun
2935*4882a593Smuzhiyun- CONFIG_SYS_PBSIZE:	Buffer size for Console output
2936*4882a593Smuzhiyun
2937*4882a593Smuzhiyun- CONFIG_SYS_MAXARGS:	max. Number of arguments accepted for monitor commands
2938*4882a593Smuzhiyun
2939*4882a593Smuzhiyun- CONFIG_SYS_BARGSIZE: Buffer size for Boot Arguments which are passed to
2940*4882a593Smuzhiyun		the application (usually a Linux kernel) when it is
2941*4882a593Smuzhiyun		booted
2942*4882a593Smuzhiyun
2943*4882a593Smuzhiyun- CONFIG_SYS_BAUDRATE_TABLE:
2944*4882a593Smuzhiyun		List of legal baudrate settings for this board.
2945*4882a593Smuzhiyun
2946*4882a593Smuzhiyun- CONFIG_SYS_MEMTEST_START, CONFIG_SYS_MEMTEST_END:
2947*4882a593Smuzhiyun		Begin and End addresses of the area used by the
2948*4882a593Smuzhiyun		simple memory test.
2949*4882a593Smuzhiyun
2950*4882a593Smuzhiyun- CONFIG_SYS_ALT_MEMTEST:
2951*4882a593Smuzhiyun		Enable an alternate, more extensive memory test.
2952*4882a593Smuzhiyun
2953*4882a593Smuzhiyun- CONFIG_SYS_MEMTEST_SCRATCH:
2954*4882a593Smuzhiyun		Scratch address used by the alternate memory test
2955*4882a593Smuzhiyun		You only need to set this if address zero isn't writeable
2956*4882a593Smuzhiyun
2957*4882a593Smuzhiyun- CONFIG_SYS_MEM_RESERVE_SECURE
2958*4882a593Smuzhiyun		Only implemented for ARMv8 for now.
2959*4882a593Smuzhiyun		If defined, the size of CONFIG_SYS_MEM_RESERVE_SECURE memory
2960*4882a593Smuzhiyun		is substracted from total RAM and won't be reported to OS.
2961*4882a593Smuzhiyun		This memory can be used as secure memory. A variable
2962*4882a593Smuzhiyun		gd->arch.secure_ram is used to track the location. In systems
2963*4882a593Smuzhiyun		the RAM base is not zero, or RAM is divided into banks,
2964*4882a593Smuzhiyun		this variable needs to be recalcuated to get the address.
2965*4882a593Smuzhiyun
2966*4882a593Smuzhiyun- CONFIG_SYS_MEM_TOP_HIDE:
2967*4882a593Smuzhiyun		If CONFIG_SYS_MEM_TOP_HIDE is defined in the board config header,
2968*4882a593Smuzhiyun		this specified memory area will get subtracted from the top
2969*4882a593Smuzhiyun		(end) of RAM and won't get "touched" at all by U-Boot. By
2970*4882a593Smuzhiyun		fixing up gd->ram_size the Linux kernel should gets passed
2971*4882a593Smuzhiyun		the now "corrected" memory size and won't touch it either.
2972*4882a593Smuzhiyun		This should work for arch/ppc and arch/powerpc. Only Linux
2973*4882a593Smuzhiyun		board ports in arch/powerpc with bootwrapper support that
2974*4882a593Smuzhiyun		recalculate the memory size from the SDRAM controller setup
2975*4882a593Smuzhiyun		will have to get fixed in Linux additionally.
2976*4882a593Smuzhiyun
2977*4882a593Smuzhiyun		This option can be used as a workaround for the 440EPx/GRx
2978*4882a593Smuzhiyun		CHIP 11 errata where the last 256 bytes in SDRAM shouldn't
2979*4882a593Smuzhiyun		be touched.
2980*4882a593Smuzhiyun
2981*4882a593Smuzhiyun		WARNING: Please make sure that this value is a multiple of
2982*4882a593Smuzhiyun		the Linux page size (normally 4k). If this is not the case,
2983*4882a593Smuzhiyun		then the end address of the Linux memory will be located at a
2984*4882a593Smuzhiyun		non page size aligned address and this could cause major
2985*4882a593Smuzhiyun		problems.
2986*4882a593Smuzhiyun
2987*4882a593Smuzhiyun- CONFIG_SYS_LOADS_BAUD_CHANGE:
2988*4882a593Smuzhiyun		Enable temporary baudrate change while serial download
2989*4882a593Smuzhiyun
2990*4882a593Smuzhiyun- CONFIG_SYS_SDRAM_BASE:
2991*4882a593Smuzhiyun		Physical start address of SDRAM. _Must_ be 0 here.
2992*4882a593Smuzhiyun
2993*4882a593Smuzhiyun- CONFIG_SYS_FLASH_BASE:
2994*4882a593Smuzhiyun		Physical start address of Flash memory.
2995*4882a593Smuzhiyun
2996*4882a593Smuzhiyun- CONFIG_SYS_MONITOR_BASE:
2997*4882a593Smuzhiyun		Physical start address of boot monitor code (set by
2998*4882a593Smuzhiyun		make config files to be same as the text base address
2999*4882a593Smuzhiyun		(CONFIG_SYS_TEXT_BASE) used when linking) - same as
3000*4882a593Smuzhiyun		CONFIG_SYS_FLASH_BASE when booting from flash.
3001*4882a593Smuzhiyun
3002*4882a593Smuzhiyun- CONFIG_SYS_MONITOR_LEN:
3003*4882a593Smuzhiyun		Size of memory reserved for monitor code, used to
3004*4882a593Smuzhiyun		determine _at_compile_time_ (!) if the environment is
3005*4882a593Smuzhiyun		embedded within the U-Boot image, or in a separate
3006*4882a593Smuzhiyun		flash sector.
3007*4882a593Smuzhiyun
3008*4882a593Smuzhiyun- CONFIG_SYS_MALLOC_LEN:
3009*4882a593Smuzhiyun		Size of DRAM reserved for malloc() use.
3010*4882a593Smuzhiyun
3011*4882a593Smuzhiyun- CONFIG_SYS_MALLOC_F_LEN
3012*4882a593Smuzhiyun		Size of the malloc() pool for use before relocation. If
3013*4882a593Smuzhiyun		this is defined, then a very simple malloc() implementation
3014*4882a593Smuzhiyun		will become available before relocation. The address is just
3015*4882a593Smuzhiyun		below the global data, and the stack is moved down to make
3016*4882a593Smuzhiyun		space.
3017*4882a593Smuzhiyun
3018*4882a593Smuzhiyun		This feature allocates regions with increasing addresses
3019*4882a593Smuzhiyun		within the region. calloc() is supported, but realloc()
3020*4882a593Smuzhiyun		is not available. free() is supported but does nothing.
3021*4882a593Smuzhiyun		The memory will be freed (or in fact just forgotten) when
3022*4882a593Smuzhiyun		U-Boot relocates itself.
3023*4882a593Smuzhiyun
3024*4882a593Smuzhiyun- CONFIG_SYS_MALLOC_SIMPLE
3025*4882a593Smuzhiyun		Provides a simple and small malloc() and calloc() for those
3026*4882a593Smuzhiyun		boards which do not use the full malloc in SPL (which is
3027*4882a593Smuzhiyun		enabled with CONFIG_SYS_SPL_MALLOC_START).
3028*4882a593Smuzhiyun
3029*4882a593Smuzhiyun- CONFIG_SYS_NONCACHED_MEMORY:
3030*4882a593Smuzhiyun		Size of non-cached memory area. This area of memory will be
3031*4882a593Smuzhiyun		typically located right below the malloc() area and mapped
3032*4882a593Smuzhiyun		uncached in the MMU. This is useful for drivers that would
3033*4882a593Smuzhiyun		otherwise require a lot of explicit cache maintenance. For
3034*4882a593Smuzhiyun		some drivers it's also impossible to properly maintain the
3035*4882a593Smuzhiyun		cache. For example if the regions that need to be flushed
3036*4882a593Smuzhiyun		are not a multiple of the cache-line size, *and* padding
3037*4882a593Smuzhiyun		cannot be allocated between the regions to align them (i.e.
3038*4882a593Smuzhiyun		if the HW requires a contiguous array of regions, and the
3039*4882a593Smuzhiyun		size of each region is not cache-aligned), then a flush of
3040*4882a593Smuzhiyun		one region may result in overwriting data that hardware has
3041*4882a593Smuzhiyun		written to another region in the same cache-line. This can
3042*4882a593Smuzhiyun		happen for example in network drivers where descriptors for
3043*4882a593Smuzhiyun		buffers are typically smaller than the CPU cache-line (e.g.
3044*4882a593Smuzhiyun		16 bytes vs. 32 or 64 bytes).
3045*4882a593Smuzhiyun
3046*4882a593Smuzhiyun		Non-cached memory is only supported on 32-bit ARM at present.
3047*4882a593Smuzhiyun
3048*4882a593Smuzhiyun- CONFIG_SYS_BOOTM_LEN:
3049*4882a593Smuzhiyun		Normally compressed uImages are limited to an
3050*4882a593Smuzhiyun		uncompressed size of 8 MBytes. If this is not enough,
3051*4882a593Smuzhiyun		you can define CONFIG_SYS_BOOTM_LEN in your board config file
3052*4882a593Smuzhiyun		to adjust this setting to your needs.
3053*4882a593Smuzhiyun
3054*4882a593Smuzhiyun- CONFIG_SYS_BOOTMAPSZ:
3055*4882a593Smuzhiyun		Maximum size of memory mapped by the startup code of
3056*4882a593Smuzhiyun		the Linux kernel; all data that must be processed by
3057*4882a593Smuzhiyun		the Linux kernel (bd_info, boot arguments, FDT blob if
3058*4882a593Smuzhiyun		used) must be put below this limit, unless "bootm_low"
3059*4882a593Smuzhiyun		environment variable is defined and non-zero. In such case
3060*4882a593Smuzhiyun		all data for the Linux kernel must be between "bootm_low"
3061*4882a593Smuzhiyun		and "bootm_low" + CONFIG_SYS_BOOTMAPSZ.	 The environment
3062*4882a593Smuzhiyun		variable "bootm_mapsize" will override the value of
3063*4882a593Smuzhiyun		CONFIG_SYS_BOOTMAPSZ.  If CONFIG_SYS_BOOTMAPSZ is undefined,
3064*4882a593Smuzhiyun		then the value in "bootm_size" will be used instead.
3065*4882a593Smuzhiyun
3066*4882a593Smuzhiyun- CONFIG_SYS_BOOT_RAMDISK_HIGH:
3067*4882a593Smuzhiyun		Enable initrd_high functionality.  If defined then the
3068*4882a593Smuzhiyun		initrd_high feature is enabled and the bootm ramdisk subcommand
3069*4882a593Smuzhiyun		is enabled.
3070*4882a593Smuzhiyun
3071*4882a593Smuzhiyun- CONFIG_SYS_BOOT_GET_CMDLINE:
3072*4882a593Smuzhiyun		Enables allocating and saving kernel cmdline in space between
3073*4882a593Smuzhiyun		"bootm_low" and "bootm_low" + BOOTMAPSZ.
3074*4882a593Smuzhiyun
3075*4882a593Smuzhiyun- CONFIG_SYS_BOOT_GET_KBD:
3076*4882a593Smuzhiyun		Enables allocating and saving a kernel copy of the bd_info in
3077*4882a593Smuzhiyun		space between "bootm_low" and "bootm_low" + BOOTMAPSZ.
3078*4882a593Smuzhiyun
3079*4882a593Smuzhiyun- CONFIG_SYS_MAX_FLASH_BANKS:
3080*4882a593Smuzhiyun		Max number of Flash memory banks
3081*4882a593Smuzhiyun
3082*4882a593Smuzhiyun- CONFIG_SYS_MAX_FLASH_SECT:
3083*4882a593Smuzhiyun		Max number of sectors on a Flash chip
3084*4882a593Smuzhiyun
3085*4882a593Smuzhiyun- CONFIG_SYS_FLASH_ERASE_TOUT:
3086*4882a593Smuzhiyun		Timeout for Flash erase operations (in ms)
3087*4882a593Smuzhiyun
3088*4882a593Smuzhiyun- CONFIG_SYS_FLASH_WRITE_TOUT:
3089*4882a593Smuzhiyun		Timeout for Flash write operations (in ms)
3090*4882a593Smuzhiyun
3091*4882a593Smuzhiyun- CONFIG_SYS_FLASH_LOCK_TOUT
3092*4882a593Smuzhiyun		Timeout for Flash set sector lock bit operation (in ms)
3093*4882a593Smuzhiyun
3094*4882a593Smuzhiyun- CONFIG_SYS_FLASH_UNLOCK_TOUT
3095*4882a593Smuzhiyun		Timeout for Flash clear lock bits operation (in ms)
3096*4882a593Smuzhiyun
3097*4882a593Smuzhiyun- CONFIG_SYS_FLASH_PROTECTION
3098*4882a593Smuzhiyun		If defined, hardware flash sectors protection is used
3099*4882a593Smuzhiyun		instead of U-Boot software protection.
3100*4882a593Smuzhiyun
3101*4882a593Smuzhiyun- CONFIG_SYS_DIRECT_FLASH_TFTP:
3102*4882a593Smuzhiyun
3103*4882a593Smuzhiyun		Enable TFTP transfers directly to flash memory;
3104*4882a593Smuzhiyun		without this option such a download has to be
3105*4882a593Smuzhiyun		performed in two steps: (1) download to RAM, and (2)
3106*4882a593Smuzhiyun		copy from RAM to flash.
3107*4882a593Smuzhiyun
3108*4882a593Smuzhiyun		The two-step approach is usually more reliable, since
3109*4882a593Smuzhiyun		you can check if the download worked before you erase
3110*4882a593Smuzhiyun		the flash, but in some situations (when system RAM is
3111*4882a593Smuzhiyun		too limited to allow for a temporary copy of the
3112*4882a593Smuzhiyun		downloaded image) this option may be very useful.
3113*4882a593Smuzhiyun
3114*4882a593Smuzhiyun- CONFIG_SYS_FLASH_CFI:
3115*4882a593Smuzhiyun		Define if the flash driver uses extra elements in the
3116*4882a593Smuzhiyun		common flash structure for storing flash geometry.
3117*4882a593Smuzhiyun
3118*4882a593Smuzhiyun- CONFIG_FLASH_CFI_DRIVER
3119*4882a593Smuzhiyun		This option also enables the building of the cfi_flash driver
3120*4882a593Smuzhiyun		in the drivers directory
3121*4882a593Smuzhiyun
3122*4882a593Smuzhiyun- CONFIG_FLASH_CFI_MTD
3123*4882a593Smuzhiyun		This option enables the building of the cfi_mtd driver
3124*4882a593Smuzhiyun		in the drivers directory. The driver exports CFI flash
3125*4882a593Smuzhiyun		to the MTD layer.
3126*4882a593Smuzhiyun
3127*4882a593Smuzhiyun- CONFIG_SYS_FLASH_USE_BUFFER_WRITE
3128*4882a593Smuzhiyun		Use buffered writes to flash.
3129*4882a593Smuzhiyun
3130*4882a593Smuzhiyun- CONFIG_FLASH_SPANSION_S29WS_N
3131*4882a593Smuzhiyun		s29ws-n MirrorBit flash has non-standard addresses for buffered
3132*4882a593Smuzhiyun		write commands.
3133*4882a593Smuzhiyun
3134*4882a593Smuzhiyun- CONFIG_SYS_FLASH_QUIET_TEST
3135*4882a593Smuzhiyun		If this option is defined, the common CFI flash doesn't
3136*4882a593Smuzhiyun		print it's warning upon not recognized FLASH banks. This
3137*4882a593Smuzhiyun		is useful, if some of the configured banks are only
3138*4882a593Smuzhiyun		optionally available.
3139*4882a593Smuzhiyun
3140*4882a593Smuzhiyun- CONFIG_FLASH_SHOW_PROGRESS
3141*4882a593Smuzhiyun		If defined (must be an integer), print out countdown
3142*4882a593Smuzhiyun		digits and dots.  Recommended value: 45 (9..1) for 80
3143*4882a593Smuzhiyun		column displays, 15 (3..1) for 40 column displays.
3144*4882a593Smuzhiyun
3145*4882a593Smuzhiyun- CONFIG_FLASH_VERIFY
3146*4882a593Smuzhiyun		If defined, the content of the flash (destination) is compared
3147*4882a593Smuzhiyun		against the source after the write operation. An error message
3148*4882a593Smuzhiyun		will be printed when the contents are not identical.
3149*4882a593Smuzhiyun		Please note that this option is useless in nearly all cases,
3150*4882a593Smuzhiyun		since such flash programming errors usually are detected earlier
3151*4882a593Smuzhiyun		while unprotecting/erasing/programming. Please only enable
3152*4882a593Smuzhiyun		this option if you really know what you are doing.
3153*4882a593Smuzhiyun
3154*4882a593Smuzhiyun- CONFIG_SYS_RX_ETH_BUFFER:
3155*4882a593Smuzhiyun		Defines the number of Ethernet receive buffers. On some
3156*4882a593Smuzhiyun		Ethernet controllers it is recommended to set this value
3157*4882a593Smuzhiyun		to 8 or even higher (EEPRO100 or 405 EMAC), since all
3158*4882a593Smuzhiyun		buffers can be full shortly after enabling the interface
3159*4882a593Smuzhiyun		on high Ethernet traffic.
3160*4882a593Smuzhiyun		Defaults to 4 if not defined.
3161*4882a593Smuzhiyun
3162*4882a593Smuzhiyun- CONFIG_ENV_MAX_ENTRIES
3163*4882a593Smuzhiyun
3164*4882a593Smuzhiyun	Maximum number of entries in the hash table that is used
3165*4882a593Smuzhiyun	internally to store the environment settings. The default
3166*4882a593Smuzhiyun	setting is supposed to be generous and should work in most
3167*4882a593Smuzhiyun	cases. This setting can be used to tune behaviour; see
3168*4882a593Smuzhiyun	lib/hashtable.c for details.
3169*4882a593Smuzhiyun
3170*4882a593Smuzhiyun- CONFIG_ENV_FLAGS_LIST_DEFAULT
3171*4882a593Smuzhiyun- CONFIG_ENV_FLAGS_LIST_STATIC
3172*4882a593Smuzhiyun	Enable validation of the values given to environment variables when
3173*4882a593Smuzhiyun	calling env set.  Variables can be restricted to only decimal,
3174*4882a593Smuzhiyun	hexadecimal, or boolean.  If CONFIG_CMD_NET is also defined,
3175*4882a593Smuzhiyun	the variables can also be restricted to IP address or MAC address.
3176*4882a593Smuzhiyun
3177*4882a593Smuzhiyun	The format of the list is:
3178*4882a593Smuzhiyun		type_attribute = [s|d|x|b|i|m]
3179*4882a593Smuzhiyun		access_attribute = [a|r|o|c]
3180*4882a593Smuzhiyun		attributes = type_attribute[access_attribute]
3181*4882a593Smuzhiyun		entry = variable_name[:attributes]
3182*4882a593Smuzhiyun		list = entry[,list]
3183*4882a593Smuzhiyun
3184*4882a593Smuzhiyun	The type attributes are:
3185*4882a593Smuzhiyun		s - String (default)
3186*4882a593Smuzhiyun		d - Decimal
3187*4882a593Smuzhiyun		x - Hexadecimal
3188*4882a593Smuzhiyun		b - Boolean ([1yYtT|0nNfF])
3189*4882a593Smuzhiyun		i - IP address
3190*4882a593Smuzhiyun		m - MAC address
3191*4882a593Smuzhiyun
3192*4882a593Smuzhiyun	The access attributes are:
3193*4882a593Smuzhiyun		a - Any (default)
3194*4882a593Smuzhiyun		r - Read-only
3195*4882a593Smuzhiyun		o - Write-once
3196*4882a593Smuzhiyun		c - Change-default
3197*4882a593Smuzhiyun
3198*4882a593Smuzhiyun	- CONFIG_ENV_FLAGS_LIST_DEFAULT
3199*4882a593Smuzhiyun		Define this to a list (string) to define the ".flags"
3200*4882a593Smuzhiyun		environment variable in the default or embedded environment.
3201*4882a593Smuzhiyun
3202*4882a593Smuzhiyun	- CONFIG_ENV_FLAGS_LIST_STATIC
3203*4882a593Smuzhiyun		Define this to a list (string) to define validation that
3204*4882a593Smuzhiyun		should be done if an entry is not found in the ".flags"
3205*4882a593Smuzhiyun		environment variable.  To override a setting in the static
3206*4882a593Smuzhiyun		list, simply add an entry for the same variable name to the
3207*4882a593Smuzhiyun		".flags" variable.
3208*4882a593Smuzhiyun
3209*4882a593Smuzhiyun	If CONFIG_REGEX is defined, the variable_name above is evaluated as a
3210*4882a593Smuzhiyun	regular expression. This allows multiple variables to define the same
3211*4882a593Smuzhiyun	flags without explicitly listing them for each variable.
3212*4882a593Smuzhiyun
3213*4882a593Smuzhiyun- CONFIG_ENV_ACCESS_IGNORE_FORCE
3214*4882a593Smuzhiyun	If defined, don't allow the -f switch to env set override variable
3215*4882a593Smuzhiyun	access flags.
3216*4882a593Smuzhiyun
3217*4882a593Smuzhiyun- CONFIG_USE_STDINT
3218*4882a593Smuzhiyun	If stdint.h is available with your toolchain you can define this
3219*4882a593Smuzhiyun	option to enable it. You can provide option 'USE_STDINT=1' when
3220*4882a593Smuzhiyun	building U-Boot to enable this.
3221*4882a593Smuzhiyun
3222*4882a593SmuzhiyunThe following definitions that deal with the placement and management
3223*4882a593Smuzhiyunof environment data (variable area); in general, we support the
3224*4882a593Smuzhiyunfollowing configurations:
3225*4882a593Smuzhiyun
3226*4882a593Smuzhiyun- CONFIG_BUILD_ENVCRC:
3227*4882a593Smuzhiyun
3228*4882a593Smuzhiyun	Builds up envcrc with the target environment so that external utils
3229*4882a593Smuzhiyun	may easily extract it and embed it in final U-Boot images.
3230*4882a593Smuzhiyun
3231*4882a593SmuzhiyunBE CAREFUL! The first access to the environment happens quite early
3232*4882a593Smuzhiyunin U-Boot initialization (when we try to get the setting of for the
3233*4882a593Smuzhiyunconsole baudrate). You *MUST* have mapped your NVRAM area then, or
3234*4882a593SmuzhiyunU-Boot will hang.
3235*4882a593Smuzhiyun
3236*4882a593SmuzhiyunPlease note that even with NVRAM we still use a copy of the
3237*4882a593Smuzhiyunenvironment in RAM: we could work on NVRAM directly, but we want to
3238*4882a593Smuzhiyunkeep settings there always unmodified except somebody uses "saveenv"
3239*4882a593Smuzhiyunto save the current settings.
3240*4882a593Smuzhiyun
3241*4882a593SmuzhiyunBE CAREFUL! For some special cases, the local device can not use
3242*4882a593Smuzhiyun"saveenv" command. For example, the local device will get the
3243*4882a593Smuzhiyunenvironment stored in a remote NOR flash by SRIO or PCIE link,
3244*4882a593Smuzhiyunbut it can not erase, write this NOR flash by SRIO or PCIE interface.
3245*4882a593Smuzhiyun
3246*4882a593Smuzhiyun- CONFIG_NAND_ENV_DST
3247*4882a593Smuzhiyun
3248*4882a593Smuzhiyun	Defines address in RAM to which the nand_spl code should copy the
3249*4882a593Smuzhiyun	environment. If redundant environment is used, it will be copied to
3250*4882a593Smuzhiyun	CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE.
3251*4882a593Smuzhiyun
3252*4882a593SmuzhiyunPlease note that the environment is read-only until the monitor
3253*4882a593Smuzhiyunhas been relocated to RAM and a RAM copy of the environment has been
3254*4882a593Smuzhiyuncreated; also, when using EEPROM you will have to use env_get_f()
3255*4882a593Smuzhiyununtil then to read environment variables.
3256*4882a593Smuzhiyun
3257*4882a593SmuzhiyunThe environment is protected by a CRC32 checksum. Before the monitor
3258*4882a593Smuzhiyunis relocated into RAM, as a result of a bad CRC you will be working
3259*4882a593Smuzhiyunwith the compiled-in default environment - *silently*!!! [This is
3260*4882a593Smuzhiyunnecessary, because the first environment variable we need is the
3261*4882a593Smuzhiyun"baudrate" setting for the console - if we have a bad CRC, we don't
3262*4882a593Smuzhiyunhave any device yet where we could complain.]
3263*4882a593Smuzhiyun
3264*4882a593SmuzhiyunNote: once the monitor has been relocated, then it will complain if
3265*4882a593Smuzhiyunthe default environment is used; a new CRC is computed as soon as you
3266*4882a593Smuzhiyunuse the "saveenv" command to store a valid environment.
3267*4882a593Smuzhiyun
3268*4882a593Smuzhiyun- CONFIG_SYS_FAULT_ECHO_LINK_DOWN:
3269*4882a593Smuzhiyun		Echo the inverted Ethernet link state to the fault LED.
3270*4882a593Smuzhiyun
3271*4882a593Smuzhiyun		Note: If this option is active, then CONFIG_SYS_FAULT_MII_ADDR
3272*4882a593Smuzhiyun		      also needs to be defined.
3273*4882a593Smuzhiyun
3274*4882a593Smuzhiyun- CONFIG_SYS_FAULT_MII_ADDR:
3275*4882a593Smuzhiyun		MII address of the PHY to check for the Ethernet link state.
3276*4882a593Smuzhiyun
3277*4882a593Smuzhiyun- CONFIG_NS16550_MIN_FUNCTIONS:
3278*4882a593Smuzhiyun		Define this if you desire to only have use of the NS16550_init
3279*4882a593Smuzhiyun		and NS16550_putc functions for the serial driver located at
3280*4882a593Smuzhiyun		drivers/serial/ns16550.c.  This option is useful for saving
3281*4882a593Smuzhiyun		space for already greatly restricted images, including but not
3282*4882a593Smuzhiyun		limited to NAND_SPL configurations.
3283*4882a593Smuzhiyun
3284*4882a593Smuzhiyun- CONFIG_DISPLAY_BOARDINFO
3285*4882a593Smuzhiyun		Display information about the board that U-Boot is running on
3286*4882a593Smuzhiyun		when U-Boot starts up. The board function checkboard() is called
3287*4882a593Smuzhiyun		to do this.
3288*4882a593Smuzhiyun
3289*4882a593Smuzhiyun- CONFIG_DISPLAY_BOARDINFO_LATE
3290*4882a593Smuzhiyun		Similar to the previous option, but display this information
3291*4882a593Smuzhiyun		later, once stdio is running and output goes to the LCD, if
3292*4882a593Smuzhiyun		present.
3293*4882a593Smuzhiyun
3294*4882a593Smuzhiyun- CONFIG_BOARD_SIZE_LIMIT:
3295*4882a593Smuzhiyun		Maximum size of the U-Boot image. When defined, the
3296*4882a593Smuzhiyun		build system checks that the actual size does not
3297*4882a593Smuzhiyun		exceed it.
3298*4882a593Smuzhiyun
3299*4882a593SmuzhiyunLow Level (hardware related) configuration options:
3300*4882a593Smuzhiyun---------------------------------------------------
3301*4882a593Smuzhiyun
3302*4882a593Smuzhiyun- CONFIG_SYS_CACHELINE_SIZE:
3303*4882a593Smuzhiyun		Cache Line Size of the CPU.
3304*4882a593Smuzhiyun
3305*4882a593Smuzhiyun- CONFIG_SYS_CCSRBAR_DEFAULT:
3306*4882a593Smuzhiyun		Default (power-on reset) physical address of CCSR on Freescale
3307*4882a593Smuzhiyun		PowerPC SOCs.
3308*4882a593Smuzhiyun
3309*4882a593Smuzhiyun- CONFIG_SYS_CCSRBAR:
3310*4882a593Smuzhiyun		Virtual address of CCSR.  On a 32-bit build, this is typically
3311*4882a593Smuzhiyun		the same value as CONFIG_SYS_CCSRBAR_DEFAULT.
3312*4882a593Smuzhiyun
3313*4882a593Smuzhiyun- CONFIG_SYS_CCSRBAR_PHYS:
3314*4882a593Smuzhiyun		Physical address of CCSR.  CCSR can be relocated to a new
3315*4882a593Smuzhiyun		physical address, if desired.  In this case, this macro should
3316*4882a593Smuzhiyun		be set to that address.	 Otherwise, it should be set to the
3317*4882a593Smuzhiyun		same value as CONFIG_SYS_CCSRBAR_DEFAULT.  For example, CCSR
3318*4882a593Smuzhiyun		is typically relocated on 36-bit builds.  It is recommended
3319*4882a593Smuzhiyun		that this macro be defined via the _HIGH and _LOW macros:
3320*4882a593Smuzhiyun
3321*4882a593Smuzhiyun		#define CONFIG_SYS_CCSRBAR_PHYS ((CONFIG_SYS_CCSRBAR_PHYS_HIGH
3322*4882a593Smuzhiyun			* 1ull) << 32 | CONFIG_SYS_CCSRBAR_PHYS_LOW)
3323*4882a593Smuzhiyun
3324*4882a593Smuzhiyun- CONFIG_SYS_CCSRBAR_PHYS_HIGH:
3325*4882a593Smuzhiyun		Bits 33-36 of CONFIG_SYS_CCSRBAR_PHYS.	This value is typically
3326*4882a593Smuzhiyun		either 0 (32-bit build) or 0xF (36-bit build).	This macro is
3327*4882a593Smuzhiyun		used in assembly code, so it must not contain typecasts or
3328*4882a593Smuzhiyun		integer size suffixes (e.g. "ULL").
3329*4882a593Smuzhiyun
3330*4882a593Smuzhiyun- CONFIG_SYS_CCSRBAR_PHYS_LOW:
3331*4882a593Smuzhiyun		Lower 32-bits of CONFIG_SYS_CCSRBAR_PHYS.  This macro is
3332*4882a593Smuzhiyun		used in assembly code, so it must not contain typecasts or
3333*4882a593Smuzhiyun		integer size suffixes (e.g. "ULL").
3334*4882a593Smuzhiyun
3335*4882a593Smuzhiyun- CONFIG_SYS_CCSR_DO_NOT_RELOCATE:
3336*4882a593Smuzhiyun		If this macro is defined, then CONFIG_SYS_CCSRBAR_PHYS will be
3337*4882a593Smuzhiyun		forced to a value that ensures that CCSR is not relocated.
3338*4882a593Smuzhiyun
3339*4882a593Smuzhiyun- Floppy Disk Support:
3340*4882a593Smuzhiyun		CONFIG_SYS_FDC_DRIVE_NUMBER
3341*4882a593Smuzhiyun
3342*4882a593Smuzhiyun		the default drive number (default value 0)
3343*4882a593Smuzhiyun
3344*4882a593Smuzhiyun		CONFIG_SYS_ISA_IO_STRIDE
3345*4882a593Smuzhiyun
3346*4882a593Smuzhiyun		defines the spacing between FDC chipset registers
3347*4882a593Smuzhiyun		(default value 1)
3348*4882a593Smuzhiyun
3349*4882a593Smuzhiyun		CONFIG_SYS_ISA_IO_OFFSET
3350*4882a593Smuzhiyun
3351*4882a593Smuzhiyun		defines the offset of register from address. It
3352*4882a593Smuzhiyun		depends on which part of the data bus is connected to
3353*4882a593Smuzhiyun		the FDC chipset. (default value 0)
3354*4882a593Smuzhiyun
3355*4882a593Smuzhiyun		If CONFIG_SYS_ISA_IO_STRIDE CONFIG_SYS_ISA_IO_OFFSET and
3356*4882a593Smuzhiyun		CONFIG_SYS_FDC_DRIVE_NUMBER are undefined, they take their
3357*4882a593Smuzhiyun		default value.
3358*4882a593Smuzhiyun
3359*4882a593Smuzhiyun		if CONFIG_SYS_FDC_HW_INIT is defined, then the function
3360*4882a593Smuzhiyun		fdc_hw_init() is called at the beginning of the FDC
3361*4882a593Smuzhiyun		setup. fdc_hw_init() must be provided by the board
3362*4882a593Smuzhiyun		source code. It is used to make hardware-dependent
3363*4882a593Smuzhiyun		initializations.
3364*4882a593Smuzhiyun
3365*4882a593Smuzhiyun- CONFIG_IDE_AHB:
3366*4882a593Smuzhiyun		Most IDE controllers were designed to be connected with PCI
3367*4882a593Smuzhiyun		interface. Only few of them were designed for AHB interface.
3368*4882a593Smuzhiyun		When software is doing ATA command and data transfer to
3369*4882a593Smuzhiyun		IDE devices through IDE-AHB controller, some additional
3370*4882a593Smuzhiyun		registers accessing to these kind of IDE-AHB controller
3371*4882a593Smuzhiyun		is required.
3372*4882a593Smuzhiyun
3373*4882a593Smuzhiyun- CONFIG_SYS_IMMR:	Physical address of the Internal Memory.
3374*4882a593Smuzhiyun		DO NOT CHANGE unless you know exactly what you're
3375*4882a593Smuzhiyun		doing! (11-4) [MPC8xx systems only]
3376*4882a593Smuzhiyun
3377*4882a593Smuzhiyun- CONFIG_SYS_INIT_RAM_ADDR:
3378*4882a593Smuzhiyun
3379*4882a593Smuzhiyun		Start address of memory area that can be used for
3380*4882a593Smuzhiyun		initial data and stack; please note that this must be
3381*4882a593Smuzhiyun		writable memory that is working WITHOUT special
3382*4882a593Smuzhiyun		initialization, i. e. you CANNOT use normal RAM which
3383*4882a593Smuzhiyun		will become available only after programming the
3384*4882a593Smuzhiyun		memory controller and running certain initialization
3385*4882a593Smuzhiyun		sequences.
3386*4882a593Smuzhiyun
3387*4882a593Smuzhiyun		U-Boot uses the following memory types:
3388*4882a593Smuzhiyun		- MPC8xx: IMMR (internal memory of the CPU)
3389*4882a593Smuzhiyun
3390*4882a593Smuzhiyun- CONFIG_SYS_GBL_DATA_OFFSET:
3391*4882a593Smuzhiyun
3392*4882a593Smuzhiyun		Offset of the initial data structure in the memory
3393*4882a593Smuzhiyun		area defined by CONFIG_SYS_INIT_RAM_ADDR. Usually
3394*4882a593Smuzhiyun		CONFIG_SYS_GBL_DATA_OFFSET is chosen such that the initial
3395*4882a593Smuzhiyun		data is located at the end of the available space
3396*4882a593Smuzhiyun		(sometimes written as (CONFIG_SYS_INIT_RAM_SIZE -
3397*4882a593Smuzhiyun		GENERATED_GBL_DATA_SIZE), and the initial stack is just
3398*4882a593Smuzhiyun		below that area (growing from (CONFIG_SYS_INIT_RAM_ADDR +
3399*4882a593Smuzhiyun		CONFIG_SYS_GBL_DATA_OFFSET) downward.
3400*4882a593Smuzhiyun
3401*4882a593Smuzhiyun	Note:
3402*4882a593Smuzhiyun		On the MPC824X (or other systems that use the data
3403*4882a593Smuzhiyun		cache for initial memory) the address chosen for
3404*4882a593Smuzhiyun		CONFIG_SYS_INIT_RAM_ADDR is basically arbitrary - it must
3405*4882a593Smuzhiyun		point to an otherwise UNUSED address space between
3406*4882a593Smuzhiyun		the top of RAM and the start of the PCI space.
3407*4882a593Smuzhiyun
3408*4882a593Smuzhiyun- CONFIG_SYS_SCCR:	System Clock and reset Control Register (15-27)
3409*4882a593Smuzhiyun
3410*4882a593Smuzhiyun- CONFIG_SYS_OR_TIMING_SDRAM:
3411*4882a593Smuzhiyun		SDRAM timing
3412*4882a593Smuzhiyun
3413*4882a593Smuzhiyun- CONFIG_SYS_MAMR_PTA:
3414*4882a593Smuzhiyun		periodic timer for refresh
3415*4882a593Smuzhiyun
3416*4882a593Smuzhiyun- FLASH_BASE0_PRELIM, FLASH_BASE1_PRELIM, CONFIG_SYS_REMAP_OR_AM,
3417*4882a593Smuzhiyun  CONFIG_SYS_PRELIM_OR_AM, CONFIG_SYS_OR_TIMING_FLASH, CONFIG_SYS_OR0_REMAP,
3418*4882a593Smuzhiyun  CONFIG_SYS_OR0_PRELIM, CONFIG_SYS_BR0_PRELIM, CONFIG_SYS_OR1_REMAP, CONFIG_SYS_OR1_PRELIM,
3419*4882a593Smuzhiyun  CONFIG_SYS_BR1_PRELIM:
3420*4882a593Smuzhiyun		Memory Controller Definitions: BR0/1 and OR0/1 (FLASH)
3421*4882a593Smuzhiyun
3422*4882a593Smuzhiyun- SDRAM_BASE2_PRELIM, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE,
3423*4882a593Smuzhiyun  CONFIG_SYS_OR_TIMING_SDRAM, CONFIG_SYS_OR2_PRELIM, CONFIG_SYS_BR2_PRELIM,
3424*4882a593Smuzhiyun  CONFIG_SYS_OR3_PRELIM, CONFIG_SYS_BR3_PRELIM:
3425*4882a593Smuzhiyun		Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM)
3426*4882a593Smuzhiyun
3427*4882a593Smuzhiyun- CONFIG_PCI_ENUM_ONLY
3428*4882a593Smuzhiyun		Only scan through and get the devices on the buses.
3429*4882a593Smuzhiyun		Don't do any setup work, presumably because someone or
3430*4882a593Smuzhiyun		something has already done it, and we don't need to do it
3431*4882a593Smuzhiyun		a second time.	Useful for platforms that are pre-booted
3432*4882a593Smuzhiyun		by coreboot or similar.
3433*4882a593Smuzhiyun
3434*4882a593Smuzhiyun- CONFIG_PCI_INDIRECT_BRIDGE:
3435*4882a593Smuzhiyun		Enable support for indirect PCI bridges.
3436*4882a593Smuzhiyun
3437*4882a593Smuzhiyun- CONFIG_SYS_SRIO:
3438*4882a593Smuzhiyun		Chip has SRIO or not
3439*4882a593Smuzhiyun
3440*4882a593Smuzhiyun- CONFIG_SRIO1:
3441*4882a593Smuzhiyun		Board has SRIO 1 port available
3442*4882a593Smuzhiyun
3443*4882a593Smuzhiyun- CONFIG_SRIO2:
3444*4882a593Smuzhiyun		Board has SRIO 2 port available
3445*4882a593Smuzhiyun
3446*4882a593Smuzhiyun- CONFIG_SRIO_PCIE_BOOT_MASTER
3447*4882a593Smuzhiyun		Board can support master function for Boot from SRIO and PCIE
3448*4882a593Smuzhiyun
3449*4882a593Smuzhiyun- CONFIG_SYS_SRIOn_MEM_VIRT:
3450*4882a593Smuzhiyun		Virtual Address of SRIO port 'n' memory region
3451*4882a593Smuzhiyun
3452*4882a593Smuzhiyun- CONFIG_SYS_SRIOn_MEM_PHYS:
3453*4882a593Smuzhiyun		Physical Address of SRIO port 'n' memory region
3454*4882a593Smuzhiyun
3455*4882a593Smuzhiyun- CONFIG_SYS_SRIOn_MEM_SIZE:
3456*4882a593Smuzhiyun		Size of SRIO port 'n' memory region
3457*4882a593Smuzhiyun
3458*4882a593Smuzhiyun- CONFIG_SYS_NAND_BUSWIDTH_16BIT
3459*4882a593Smuzhiyun		Defined to tell the NAND controller that the NAND chip is using
3460*4882a593Smuzhiyun		a 16 bit bus.
3461*4882a593Smuzhiyun		Not all NAND drivers use this symbol.
3462*4882a593Smuzhiyun		Example of drivers that use it:
3463*4882a593Smuzhiyun		- drivers/mtd/nand/raw/ndfc.c
3464*4882a593Smuzhiyun		- drivers/mtd/nand/raw/mxc_nand.c
3465*4882a593Smuzhiyun
3466*4882a593Smuzhiyun- CONFIG_SYS_NDFC_EBC0_CFG
3467*4882a593Smuzhiyun		Sets the EBC0_CFG register for the NDFC. If not defined
3468*4882a593Smuzhiyun		a default value will be used.
3469*4882a593Smuzhiyun
3470*4882a593Smuzhiyun- CONFIG_SPD_EEPROM
3471*4882a593Smuzhiyun		Get DDR timing information from an I2C EEPROM. Common
3472*4882a593Smuzhiyun		with pluggable memory modules such as SODIMMs
3473*4882a593Smuzhiyun
3474*4882a593Smuzhiyun  SPD_EEPROM_ADDRESS
3475*4882a593Smuzhiyun		I2C address of the SPD EEPROM
3476*4882a593Smuzhiyun
3477*4882a593Smuzhiyun- CONFIG_SYS_SPD_BUS_NUM
3478*4882a593Smuzhiyun		If SPD EEPROM is on an I2C bus other than the first
3479*4882a593Smuzhiyun		one, specify here. Note that the value must resolve
3480*4882a593Smuzhiyun		to something your driver can deal with.
3481*4882a593Smuzhiyun
3482*4882a593Smuzhiyun- CONFIG_SYS_DDR_RAW_TIMING
3483*4882a593Smuzhiyun		Get DDR timing information from other than SPD. Common with
3484*4882a593Smuzhiyun		soldered DDR chips onboard without SPD. DDR raw timing
3485*4882a593Smuzhiyun		parameters are extracted from datasheet and hard-coded into
3486*4882a593Smuzhiyun		header files or board specific files.
3487*4882a593Smuzhiyun
3488*4882a593Smuzhiyun- CONFIG_FSL_DDR_INTERACTIVE
3489*4882a593Smuzhiyun		Enable interactive DDR debugging. See doc/README.fsl-ddr.
3490*4882a593Smuzhiyun
3491*4882a593Smuzhiyun- CONFIG_FSL_DDR_SYNC_REFRESH
3492*4882a593Smuzhiyun		Enable sync of refresh for multiple controllers.
3493*4882a593Smuzhiyun
3494*4882a593Smuzhiyun- CONFIG_FSL_DDR_BIST
3495*4882a593Smuzhiyun		Enable built-in memory test for Freescale DDR controllers.
3496*4882a593Smuzhiyun
3497*4882a593Smuzhiyun- CONFIG_SYS_83XX_DDR_USES_CS0
3498*4882a593Smuzhiyun		Only for 83xx systems. If specified, then DDR should
3499*4882a593Smuzhiyun		be configured using CS0 and CS1 instead of CS2 and CS3.
3500*4882a593Smuzhiyun
3501*4882a593Smuzhiyun- CONFIG_RMII
3502*4882a593Smuzhiyun		Enable RMII mode for all FECs.
3503*4882a593Smuzhiyun		Note that this is a global option, we can't
3504*4882a593Smuzhiyun		have one FEC in standard MII mode and another in RMII mode.
3505*4882a593Smuzhiyun
3506*4882a593Smuzhiyun- CONFIG_CRC32_VERIFY
3507*4882a593Smuzhiyun		Add a verify option to the crc32 command.
3508*4882a593Smuzhiyun		The syntax is:
3509*4882a593Smuzhiyun
3510*4882a593Smuzhiyun		=> crc32 -v <address> <count> <crc32>
3511*4882a593Smuzhiyun
3512*4882a593Smuzhiyun		Where address/count indicate a memory area
3513*4882a593Smuzhiyun		and crc32 is the correct crc32 which the
3514*4882a593Smuzhiyun		area should have.
3515*4882a593Smuzhiyun
3516*4882a593Smuzhiyun- CONFIG_LOOPW
3517*4882a593Smuzhiyun		Add the "loopw" memory command. This only takes effect if
3518*4882a593Smuzhiyun		the memory commands are activated globally (CONFIG_CMD_MEMORY).
3519*4882a593Smuzhiyun
3520*4882a593Smuzhiyun- CONFIG_MX_CYCLIC
3521*4882a593Smuzhiyun		Add the "mdc" and "mwc" memory commands. These are cyclic
3522*4882a593Smuzhiyun		"md/mw" commands.
3523*4882a593Smuzhiyun		Examples:
3524*4882a593Smuzhiyun
3525*4882a593Smuzhiyun		=> mdc.b 10 4 500
3526*4882a593Smuzhiyun		This command will print 4 bytes (10,11,12,13) each 500 ms.
3527*4882a593Smuzhiyun
3528*4882a593Smuzhiyun		=> mwc.l 100 12345678 10
3529*4882a593Smuzhiyun		This command will write 12345678 to address 100 all 10 ms.
3530*4882a593Smuzhiyun
3531*4882a593Smuzhiyun		This only takes effect if the memory commands are activated
3532*4882a593Smuzhiyun		globally (CONFIG_CMD_MEMORY).
3533*4882a593Smuzhiyun
3534*4882a593Smuzhiyun- CONFIG_SKIP_LOWLEVEL_INIT
3535*4882a593Smuzhiyun		[ARM, NDS32, MIPS only] If this variable is defined, then certain
3536*4882a593Smuzhiyun		low level initializations (like setting up the memory
3537*4882a593Smuzhiyun		controller) are omitted and/or U-Boot does not
3538*4882a593Smuzhiyun		relocate itself into RAM.
3539*4882a593Smuzhiyun
3540*4882a593Smuzhiyun		Normally this variable MUST NOT be defined. The only
3541*4882a593Smuzhiyun		exception is when U-Boot is loaded (to RAM) by some
3542*4882a593Smuzhiyun		other boot loader or by a debugger which performs
3543*4882a593Smuzhiyun		these initializations itself.
3544*4882a593Smuzhiyun
3545*4882a593Smuzhiyun- CONFIG_SKIP_LOWLEVEL_INIT_ONLY
3546*4882a593Smuzhiyun		[ARM926EJ-S only] This allows just the call to lowlevel_init()
3547*4882a593Smuzhiyun		to be skipped. The normal CP15 init (such as enabling the
3548*4882a593Smuzhiyun		instruction cache) is still performed.
3549*4882a593Smuzhiyun
3550*4882a593Smuzhiyun- CONFIG_SPL_BUILD
3551*4882a593Smuzhiyun		Modifies the behaviour of start.S when compiling a loader
3552*4882a593Smuzhiyun		that is executed before the actual U-Boot. E.g. when
3553*4882a593Smuzhiyun		compiling a NAND SPL.
3554*4882a593Smuzhiyun
3555*4882a593Smuzhiyun- CONFIG_TPL_BUILD
3556*4882a593Smuzhiyun		Modifies the behaviour of start.S  when compiling a loader
3557*4882a593Smuzhiyun		that is executed after the SPL and before the actual U-Boot.
3558*4882a593Smuzhiyun		It is loaded by the SPL.
3559*4882a593Smuzhiyun
3560*4882a593Smuzhiyun- CONFIG_SYS_MPC85XX_NO_RESETVEC
3561*4882a593Smuzhiyun		Only for 85xx systems. If this variable is specified, the section
3562*4882a593Smuzhiyun		.resetvec is not kept and the section .bootpg is placed in the
3563*4882a593Smuzhiyun		previous 4k of the .text section.
3564*4882a593Smuzhiyun
3565*4882a593Smuzhiyun- CONFIG_ARCH_MAP_SYSMEM
3566*4882a593Smuzhiyun		Generally U-Boot (and in particular the md command) uses
3567*4882a593Smuzhiyun		effective address. It is therefore not necessary to regard
3568*4882a593Smuzhiyun		U-Boot address as virtual addresses that need to be translated
3569*4882a593Smuzhiyun		to physical addresses. However, sandbox requires this, since
3570*4882a593Smuzhiyun		it maintains its own little RAM buffer which contains all
3571*4882a593Smuzhiyun		addressable memory. This option causes some memory accesses
3572*4882a593Smuzhiyun		to be mapped through map_sysmem() / unmap_sysmem().
3573*4882a593Smuzhiyun
3574*4882a593Smuzhiyun- CONFIG_X86_RESET_VECTOR
3575*4882a593Smuzhiyun		If defined, the x86 reset vector code is included. This is not
3576*4882a593Smuzhiyun		needed when U-Boot is running from Coreboot.
3577*4882a593Smuzhiyun
3578*4882a593Smuzhiyun- CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC:
3579*4882a593Smuzhiyun		Enables the RTC32K OSC on AM33xx based plattforms
3580*4882a593Smuzhiyun
3581*4882a593Smuzhiyun- CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
3582*4882a593Smuzhiyun		Option to disable subpage write in NAND driver
3583*4882a593Smuzhiyun		driver that uses this:
3584*4882a593Smuzhiyun		drivers/mtd/nand/raw/davinci_nand.c
3585*4882a593Smuzhiyun
3586*4882a593SmuzhiyunFreescale QE/FMAN Firmware Support:
3587*4882a593Smuzhiyun-----------------------------------
3588*4882a593Smuzhiyun
3589*4882a593SmuzhiyunThe Freescale QUICCEngine (QE) and Frame Manager (FMAN) both support the
3590*4882a593Smuzhiyunloading of "firmware", which is encoded in the QE firmware binary format.
3591*4882a593SmuzhiyunThis firmware often needs to be loaded during U-Boot booting, so macros
3592*4882a593Smuzhiyunare used to identify the storage device (NOR flash, SPI, etc) and the address
3593*4882a593Smuzhiyunwithin that device.
3594*4882a593Smuzhiyun
3595*4882a593Smuzhiyun- CONFIG_SYS_FMAN_FW_ADDR
3596*4882a593Smuzhiyun	The address in the storage device where the FMAN microcode is located.  The
3597*4882a593Smuzhiyun	meaning of this address depends on which CONFIG_SYS_QE_FW_IN_xxx macro
3598*4882a593Smuzhiyun	is also specified.
3599*4882a593Smuzhiyun
3600*4882a593Smuzhiyun- CONFIG_SYS_QE_FW_ADDR
3601*4882a593Smuzhiyun	The address in the storage device where the QE microcode is located.  The
3602*4882a593Smuzhiyun	meaning of this address depends on which CONFIG_SYS_QE_FW_IN_xxx macro
3603*4882a593Smuzhiyun	is also specified.
3604*4882a593Smuzhiyun
3605*4882a593Smuzhiyun- CONFIG_SYS_QE_FMAN_FW_LENGTH
3606*4882a593Smuzhiyun	The maximum possible size of the firmware.  The firmware binary format
3607*4882a593Smuzhiyun	has a field that specifies the actual size of the firmware, but it
3608*4882a593Smuzhiyun	might not be possible to read any part of the firmware unless some
3609*4882a593Smuzhiyun	local storage is allocated to hold the entire firmware first.
3610*4882a593Smuzhiyun
3611*4882a593Smuzhiyun- CONFIG_SYS_QE_FMAN_FW_IN_NOR
3612*4882a593Smuzhiyun	Specifies that QE/FMAN firmware is located in NOR flash, mapped as
3613*4882a593Smuzhiyun	normal addressable memory via the LBC.  CONFIG_SYS_FMAN_FW_ADDR is the
3614*4882a593Smuzhiyun	virtual address in NOR flash.
3615*4882a593Smuzhiyun
3616*4882a593Smuzhiyun- CONFIG_SYS_QE_FMAN_FW_IN_NAND
3617*4882a593Smuzhiyun	Specifies that QE/FMAN firmware is located in NAND flash.
3618*4882a593Smuzhiyun	CONFIG_SYS_FMAN_FW_ADDR is the offset within NAND flash.
3619*4882a593Smuzhiyun
3620*4882a593Smuzhiyun- CONFIG_SYS_QE_FMAN_FW_IN_MMC
3621*4882a593Smuzhiyun	Specifies that QE/FMAN firmware is located on the primary SD/MMC
3622*4882a593Smuzhiyun	device.  CONFIG_SYS_FMAN_FW_ADDR is the byte offset on that device.
3623*4882a593Smuzhiyun
3624*4882a593Smuzhiyun- CONFIG_SYS_QE_FMAN_FW_IN_REMOTE
3625*4882a593Smuzhiyun	Specifies that QE/FMAN firmware is located in the remote (master)
3626*4882a593Smuzhiyun	memory space.	CONFIG_SYS_FMAN_FW_ADDR is a virtual address which
3627*4882a593Smuzhiyun	can be mapped from slave TLB->slave LAW->slave SRIO or PCIE outbound
3628*4882a593Smuzhiyun	window->master inbound window->master LAW->the ucode address in
3629*4882a593Smuzhiyun	master's memory space.
3630*4882a593Smuzhiyun
3631*4882a593SmuzhiyunFreescale Layerscape Management Complex Firmware Support:
3632*4882a593Smuzhiyun---------------------------------------------------------
3633*4882a593SmuzhiyunThe Freescale Layerscape Management Complex (MC) supports the loading of
3634*4882a593Smuzhiyun"firmware".
3635*4882a593SmuzhiyunThis firmware often needs to be loaded during U-Boot booting, so macros
3636*4882a593Smuzhiyunare used to identify the storage device (NOR flash, SPI, etc) and the address
3637*4882a593Smuzhiyunwithin that device.
3638*4882a593Smuzhiyun
3639*4882a593Smuzhiyun- CONFIG_FSL_MC_ENET
3640*4882a593Smuzhiyun	Enable the MC driver for Layerscape SoCs.
3641*4882a593Smuzhiyun
3642*4882a593SmuzhiyunFreescale Layerscape Debug Server Support:
3643*4882a593Smuzhiyun-------------------------------------------
3644*4882a593SmuzhiyunThe Freescale Layerscape Debug Server Support supports the loading of
3645*4882a593Smuzhiyun"Debug Server firmware" and triggering SP boot-rom.
3646*4882a593SmuzhiyunThis firmware often needs to be loaded during U-Boot booting.
3647*4882a593Smuzhiyun
3648*4882a593Smuzhiyun- CONFIG_SYS_MC_RSV_MEM_ALIGN
3649*4882a593Smuzhiyun	Define alignment of reserved memory MC requires
3650*4882a593Smuzhiyun
3651*4882a593SmuzhiyunReproducible builds
3652*4882a593Smuzhiyun-------------------
3653*4882a593Smuzhiyun
3654*4882a593SmuzhiyunIn order to achieve reproducible builds, timestamps used in the U-Boot build
3655*4882a593Smuzhiyunprocess have to be set to a fixed value.
3656*4882a593Smuzhiyun
3657*4882a593SmuzhiyunThis is done using the SOURCE_DATE_EPOCH environment variable.
3658*4882a593SmuzhiyunSOURCE_DATE_EPOCH is to be set on the build host's shell, not as a configuration
3659*4882a593Smuzhiyunoption for U-Boot or an environment variable in U-Boot.
3660*4882a593Smuzhiyun
3661*4882a593SmuzhiyunSOURCE_DATE_EPOCH should be set to a number of seconds since the epoch, in UTC.
3662*4882a593Smuzhiyun
3663*4882a593SmuzhiyunBuilding the Software:
3664*4882a593Smuzhiyun======================
3665*4882a593Smuzhiyun
3666*4882a593SmuzhiyunBuilding U-Boot has been tested in several native build environments
3667*4882a593Smuzhiyunand in many different cross environments. Of course we cannot support
3668*4882a593Smuzhiyunall possibly existing versions of cross development tools in all
3669*4882a593Smuzhiyun(potentially obsolete) versions. In case of tool chain problems we
3670*4882a593Smuzhiyunrecommend to use the ELDK (see http://www.denx.de/wiki/DULG/ELDK)
3671*4882a593Smuzhiyunwhich is extensively used to build and test U-Boot.
3672*4882a593Smuzhiyun
3673*4882a593SmuzhiyunIf you are not using a native environment, it is assumed that you
3674*4882a593Smuzhiyunhave GNU cross compiling tools available in your path. In this case,
3675*4882a593Smuzhiyunyou must set the environment variable CROSS_COMPILE in your shell.
3676*4882a593SmuzhiyunNote that no changes to the Makefile or any other source files are
3677*4882a593Smuzhiyunnecessary. For example using the ELDK on a 4xx CPU, please enter:
3678*4882a593Smuzhiyun
3679*4882a593Smuzhiyun	$ CROSS_COMPILE=ppc_4xx-
3680*4882a593Smuzhiyun	$ export CROSS_COMPILE
3681*4882a593Smuzhiyun
3682*4882a593SmuzhiyunNote: If you wish to generate Windows versions of the utilities in
3683*4882a593Smuzhiyun      the tools directory you can use the MinGW toolchain
3684*4882a593Smuzhiyun      (http://www.mingw.org).  Set your HOST tools to the MinGW
3685*4882a593Smuzhiyun      toolchain and execute 'make tools'.  For example:
3686*4882a593Smuzhiyun
3687*4882a593Smuzhiyun       $ make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools
3688*4882a593Smuzhiyun
3689*4882a593Smuzhiyun      Binaries such as tools/mkimage.exe will be created which can
3690*4882a593Smuzhiyun      be executed on computers running Windows.
3691*4882a593Smuzhiyun
3692*4882a593SmuzhiyunU-Boot is intended to be simple to build. After installing the
3693*4882a593Smuzhiyunsources you must configure U-Boot for one specific board type. This
3694*4882a593Smuzhiyunis done by typing:
3695*4882a593Smuzhiyun
3696*4882a593Smuzhiyun	make NAME_defconfig
3697*4882a593Smuzhiyun
3698*4882a593Smuzhiyunwhere "NAME_defconfig" is the name of one of the existing configu-
3699*4882a593Smuzhiyunrations; see boards.cfg for supported names.
3700*4882a593Smuzhiyun
3701*4882a593SmuzhiyunNote: for some board special configuration names may exist; check if
3702*4882a593Smuzhiyun      additional information is available from the board vendor; for
3703*4882a593Smuzhiyun      instance, the TQM823L systems are available without (standard)
3704*4882a593Smuzhiyun      or with LCD support. You can select such additional "features"
3705*4882a593Smuzhiyun      when choosing the configuration, i. e.
3706*4882a593Smuzhiyun
3707*4882a593Smuzhiyun      make TQM823L_defconfig
3708*4882a593Smuzhiyun	- will configure for a plain TQM823L, i. e. no LCD support
3709*4882a593Smuzhiyun
3710*4882a593Smuzhiyun      make TQM823L_LCD_defconfig
3711*4882a593Smuzhiyun	- will configure for a TQM823L with U-Boot console on LCD
3712*4882a593Smuzhiyun
3713*4882a593Smuzhiyun      etc.
3714*4882a593Smuzhiyun
3715*4882a593Smuzhiyun
3716*4882a593SmuzhiyunFinally, type "make all", and you should get some working U-Boot
3717*4882a593Smuzhiyunimages ready for download to / installation on your system:
3718*4882a593Smuzhiyun
3719*4882a593Smuzhiyun- "u-boot.bin" is a raw binary image
3720*4882a593Smuzhiyun- "u-boot" is an image in ELF binary format
3721*4882a593Smuzhiyun- "u-boot.srec" is in Motorola S-Record format
3722*4882a593Smuzhiyun
3723*4882a593SmuzhiyunBy default the build is performed locally and the objects are saved
3724*4882a593Smuzhiyunin the source directory. One of the two methods can be used to change
3725*4882a593Smuzhiyunthis behavior and build U-Boot to some external directory:
3726*4882a593Smuzhiyun
3727*4882a593Smuzhiyun1. Add O= to the make command line invocations:
3728*4882a593Smuzhiyun
3729*4882a593Smuzhiyun	make O=/tmp/build distclean
3730*4882a593Smuzhiyun	make O=/tmp/build NAME_defconfig
3731*4882a593Smuzhiyun	make O=/tmp/build all
3732*4882a593Smuzhiyun
3733*4882a593Smuzhiyun2. Set environment variable KBUILD_OUTPUT to point to the desired location:
3734*4882a593Smuzhiyun
3735*4882a593Smuzhiyun	export KBUILD_OUTPUT=/tmp/build
3736*4882a593Smuzhiyun	make distclean
3737*4882a593Smuzhiyun	make NAME_defconfig
3738*4882a593Smuzhiyun	make all
3739*4882a593Smuzhiyun
3740*4882a593SmuzhiyunNote that the command line "O=" setting overrides the KBUILD_OUTPUT environment
3741*4882a593Smuzhiyunvariable.
3742*4882a593Smuzhiyun
3743*4882a593Smuzhiyun
3744*4882a593SmuzhiyunPlease be aware that the Makefiles assume you are using GNU make, so
3745*4882a593Smuzhiyunfor instance on NetBSD you might need to use "gmake" instead of
3746*4882a593Smuzhiyunnative "make".
3747*4882a593Smuzhiyun
3748*4882a593Smuzhiyun
3749*4882a593SmuzhiyunIf the system board that you have is not listed, then you will need
3750*4882a593Smuzhiyunto port U-Boot to your hardware platform. To do this, follow these
3751*4882a593Smuzhiyunsteps:
3752*4882a593Smuzhiyun
3753*4882a593Smuzhiyun1.  Create a new directory to hold your board specific code. Add any
3754*4882a593Smuzhiyun    files you need. In your board directory, you will need at least
3755*4882a593Smuzhiyun    the "Makefile" and a "<board>.c".
3756*4882a593Smuzhiyun2.  Create a new configuration file "include/configs/<board>.h" for
3757*4882a593Smuzhiyun    your board.
3758*4882a593Smuzhiyun3.  If you're porting U-Boot to a new CPU, then also create a new
3759*4882a593Smuzhiyun    directory to hold your CPU specific code. Add any files you need.
3760*4882a593Smuzhiyun4.  Run "make <board>_defconfig" with your new name.
3761*4882a593Smuzhiyun5.  Type "make", and you should get a working "u-boot.srec" file
3762*4882a593Smuzhiyun    to be installed on your target system.
3763*4882a593Smuzhiyun6.  Debug and solve any problems that might arise.
3764*4882a593Smuzhiyun    [Of course, this last step is much harder than it sounds.]
3765*4882a593Smuzhiyun
3766*4882a593Smuzhiyun
3767*4882a593SmuzhiyunTesting of U-Boot Modifications, Ports to New Hardware, etc.:
3768*4882a593Smuzhiyun==============================================================
3769*4882a593Smuzhiyun
3770*4882a593SmuzhiyunIf you have modified U-Boot sources (for instance added a new board
3771*4882a593Smuzhiyunor support for new devices, a new CPU, etc.) you are expected to
3772*4882a593Smuzhiyunprovide feedback to the other developers. The feedback normally takes
3773*4882a593Smuzhiyunthe form of a "patch", i. e. a context diff against a certain (latest
3774*4882a593Smuzhiyunofficial or latest in the git repository) version of U-Boot sources.
3775*4882a593Smuzhiyun
3776*4882a593SmuzhiyunBut before you submit such a patch, please verify that your modifi-
3777*4882a593Smuzhiyuncation did not break existing code. At least make sure that *ALL* of
3778*4882a593Smuzhiyunthe supported boards compile WITHOUT ANY compiler warnings. To do so,
3779*4882a593Smuzhiyunjust run the buildman script (tools/buildman/buildman), which will
3780*4882a593Smuzhiyunconfigure and build U-Boot for ALL supported system. Be warned, this
3781*4882a593Smuzhiyunwill take a while. Please see the buildman README, or run 'buildman -H'
3782*4882a593Smuzhiyunfor documentation.
3783*4882a593Smuzhiyun
3784*4882a593Smuzhiyun
3785*4882a593SmuzhiyunSee also "U-Boot Porting Guide" below.
3786*4882a593Smuzhiyun
3787*4882a593Smuzhiyun
3788*4882a593SmuzhiyunMonitor Commands - Overview:
3789*4882a593Smuzhiyun============================
3790*4882a593Smuzhiyun
3791*4882a593Smuzhiyungo	- start application at address 'addr'
3792*4882a593Smuzhiyunrun	- run commands in an environment variable
3793*4882a593Smuzhiyunbootm	- boot application image from memory
3794*4882a593Smuzhiyunbootp	- boot image via network using BootP/TFTP protocol
3795*4882a593Smuzhiyunbootz   - boot zImage from memory
3796*4882a593Smuzhiyuntftpboot- boot image via network using TFTP protocol
3797*4882a593Smuzhiyun	       and env variables "ipaddr" and "serverip"
3798*4882a593Smuzhiyun	       (and eventually "gatewayip")
3799*4882a593Smuzhiyuntftpput - upload a file via network using TFTP protocol
3800*4882a593Smuzhiyunrarpboot- boot image via network using RARP/TFTP protocol
3801*4882a593Smuzhiyundiskboot- boot from IDE devicebootd   - boot default, i.e., run 'bootcmd'
3802*4882a593Smuzhiyunloads	- load S-Record file over serial line
3803*4882a593Smuzhiyunloadb	- load binary file over serial line (kermit mode)
3804*4882a593Smuzhiyunmd	- memory display
3805*4882a593Smuzhiyunmm	- memory modify (auto-incrementing)
3806*4882a593Smuzhiyunnm	- memory modify (constant address)
3807*4882a593Smuzhiyunmw	- memory write (fill)
3808*4882a593Smuzhiyuncp	- memory copy
3809*4882a593Smuzhiyuncmp	- memory compare
3810*4882a593Smuzhiyuncrc32	- checksum calculation
3811*4882a593Smuzhiyuni2c	- I2C sub-system
3812*4882a593Smuzhiyunsspi	- SPI utility commands
3813*4882a593Smuzhiyunbase	- print or set address offset
3814*4882a593Smuzhiyunprintenv- print environment variables
3815*4882a593Smuzhiyunsetenv	- set environment variables
3816*4882a593Smuzhiyunsaveenv - save environment variables to persistent storage
3817*4882a593Smuzhiyunprotect - enable or disable FLASH write protection
3818*4882a593Smuzhiyunerase	- erase FLASH memory
3819*4882a593Smuzhiyunflinfo	- print FLASH memory information
3820*4882a593Smuzhiyunnand	- NAND memory operations (see doc/README.nand)
3821*4882a593Smuzhiyunbdinfo	- print Board Info structure
3822*4882a593Smuzhiyuniminfo	- print header information for application image
3823*4882a593Smuzhiyunconinfo - print console devices and informations
3824*4882a593Smuzhiyunide	- IDE sub-system
3825*4882a593Smuzhiyunloop	- infinite loop on address range
3826*4882a593Smuzhiyunloopw	- infinite write loop on address range
3827*4882a593Smuzhiyunmtest	- simple RAM test
3828*4882a593Smuzhiyunicache	- enable or disable instruction cache
3829*4882a593Smuzhiyundcache	- enable or disable data cache
3830*4882a593Smuzhiyunreset	- Perform RESET of the CPU
3831*4882a593Smuzhiyunecho	- echo args to console
3832*4882a593Smuzhiyunversion - print monitor version
3833*4882a593Smuzhiyunhelp	- print online help
3834*4882a593Smuzhiyun?	- alias for 'help'
3835*4882a593Smuzhiyun
3836*4882a593Smuzhiyun
3837*4882a593SmuzhiyunMonitor Commands - Detailed Description:
3838*4882a593Smuzhiyun========================================
3839*4882a593Smuzhiyun
3840*4882a593SmuzhiyunTODO.
3841*4882a593Smuzhiyun
3842*4882a593SmuzhiyunFor now: just type "help <command>".
3843*4882a593Smuzhiyun
3844*4882a593Smuzhiyun
3845*4882a593SmuzhiyunEnvironment Variables:
3846*4882a593Smuzhiyun======================
3847*4882a593Smuzhiyun
3848*4882a593SmuzhiyunU-Boot supports user configuration using Environment Variables which
3849*4882a593Smuzhiyuncan be made persistent by saving to Flash memory.
3850*4882a593Smuzhiyun
3851*4882a593SmuzhiyunEnvironment Variables are set using "setenv", printed using
3852*4882a593Smuzhiyun"printenv", and saved to Flash using "saveenv". Using "setenv"
3853*4882a593Smuzhiyunwithout a value can be used to delete a variable from the
3854*4882a593Smuzhiyunenvironment. As long as you don't save the environment you are
3855*4882a593Smuzhiyunworking with an in-memory copy. In case the Flash area containing the
3856*4882a593Smuzhiyunenvironment is erased by accident, a default environment is provided.
3857*4882a593Smuzhiyun
3858*4882a593SmuzhiyunSome configuration options can be set using Environment Variables.
3859*4882a593Smuzhiyun
3860*4882a593SmuzhiyunList of environment variables (most likely not complete):
3861*4882a593Smuzhiyun
3862*4882a593Smuzhiyun  baudrate	- see CONFIG_BAUDRATE
3863*4882a593Smuzhiyun
3864*4882a593Smuzhiyun  bootdelay	- see CONFIG_BOOTDELAY
3865*4882a593Smuzhiyun
3866*4882a593Smuzhiyun  bootcmd	- see CONFIG_BOOTCOMMAND
3867*4882a593Smuzhiyun
3868*4882a593Smuzhiyun  bootargs	- Boot arguments when booting an RTOS image
3869*4882a593Smuzhiyun
3870*4882a593Smuzhiyun  bootfile	- Name of the image to load with TFTP
3871*4882a593Smuzhiyun
3872*4882a593Smuzhiyun  bootm_low	- Memory range available for image processing in the bootm
3873*4882a593Smuzhiyun		  command can be restricted. This variable is given as
3874*4882a593Smuzhiyun		  a hexadecimal number and defines lowest address allowed
3875*4882a593Smuzhiyun		  for use by the bootm command. See also "bootm_size"
3876*4882a593Smuzhiyun		  environment variable. Address defined by "bootm_low" is
3877*4882a593Smuzhiyun		  also the base of the initial memory mapping for the Linux
3878*4882a593Smuzhiyun		  kernel -- see the description of CONFIG_SYS_BOOTMAPSZ and
3879*4882a593Smuzhiyun		  bootm_mapsize.
3880*4882a593Smuzhiyun
3881*4882a593Smuzhiyun  bootm_mapsize - Size of the initial memory mapping for the Linux kernel.
3882*4882a593Smuzhiyun		  This variable is given as a hexadecimal number and it
3883*4882a593Smuzhiyun		  defines the size of the memory region starting at base
3884*4882a593Smuzhiyun		  address bootm_low that is accessible by the Linux kernel
3885*4882a593Smuzhiyun		  during early boot.  If unset, CONFIG_SYS_BOOTMAPSZ is used
3886*4882a593Smuzhiyun		  as the default value if it is defined, and bootm_size is
3887*4882a593Smuzhiyun		  used otherwise.
3888*4882a593Smuzhiyun
3889*4882a593Smuzhiyun  bootm_size	- Memory range available for image processing in the bootm
3890*4882a593Smuzhiyun		  command can be restricted. This variable is given as
3891*4882a593Smuzhiyun		  a hexadecimal number and defines the size of the region
3892*4882a593Smuzhiyun		  allowed for use by the bootm command. See also "bootm_low"
3893*4882a593Smuzhiyun		  environment variable.
3894*4882a593Smuzhiyun
3895*4882a593Smuzhiyun  updatefile	- Location of the software update file on a TFTP server, used
3896*4882a593Smuzhiyun		  by the automatic software update feature. Please refer to
3897*4882a593Smuzhiyun		  documentation in doc/README.update for more details.
3898*4882a593Smuzhiyun
3899*4882a593Smuzhiyun  autoload	- if set to "no" (any string beginning with 'n'),
3900*4882a593Smuzhiyun		  "bootp" will just load perform a lookup of the
3901*4882a593Smuzhiyun		  configuration from the BOOTP server, but not try to
3902*4882a593Smuzhiyun		  load any image using TFTP
3903*4882a593Smuzhiyun
3904*4882a593Smuzhiyun  autostart	- if set to "yes", an image loaded using the "bootp",
3905*4882a593Smuzhiyun		  "rarpboot", "tftpboot" or "diskboot" commands will
3906*4882a593Smuzhiyun		  be automatically started (by internally calling
3907*4882a593Smuzhiyun		  "bootm")
3908*4882a593Smuzhiyun
3909*4882a593Smuzhiyun		  If set to "no", a standalone image passed to the
3910*4882a593Smuzhiyun		  "bootm" command will be copied to the load address
3911*4882a593Smuzhiyun		  (and eventually uncompressed), but NOT be started.
3912*4882a593Smuzhiyun		  This can be used to load and uncompress arbitrary
3913*4882a593Smuzhiyun		  data.
3914*4882a593Smuzhiyun
3915*4882a593Smuzhiyun  fdt_high	- if set this restricts the maximum address that the
3916*4882a593Smuzhiyun		  flattened device tree will be copied into upon boot.
3917*4882a593Smuzhiyun		  For example, if you have a system with 1 GB memory
3918*4882a593Smuzhiyun		  at physical address 0x10000000, while Linux kernel
3919*4882a593Smuzhiyun		  only recognizes the first 704 MB as low memory, you
3920*4882a593Smuzhiyun		  may need to set fdt_high as 0x3C000000 to have the
3921*4882a593Smuzhiyun		  device tree blob be copied to the maximum address
3922*4882a593Smuzhiyun		  of the 704 MB low memory, so that Linux kernel can
3923*4882a593Smuzhiyun		  access it during the boot procedure.
3924*4882a593Smuzhiyun
3925*4882a593Smuzhiyun		  If this is set to the special value 0xFFFFFFFF then
3926*4882a593Smuzhiyun		  the fdt will not be copied at all on boot.  For this
3927*4882a593Smuzhiyun		  to work it must reside in writable memory, have
3928*4882a593Smuzhiyun		  sufficient padding on the end of it for u-boot to
3929*4882a593Smuzhiyun		  add the information it needs into it, and the memory
3930*4882a593Smuzhiyun		  must be accessible by the kernel.
3931*4882a593Smuzhiyun
3932*4882a593Smuzhiyun  fdtcontroladdr- if set this is the address of the control flattened
3933*4882a593Smuzhiyun		  device tree used by U-Boot when CONFIG_OF_CONTROL is
3934*4882a593Smuzhiyun		  defined.
3935*4882a593Smuzhiyun
3936*4882a593Smuzhiyun  i2cfast	- (PPC405GP|PPC405EP only)
3937*4882a593Smuzhiyun		  if set to 'y' configures Linux I2C driver for fast
3938*4882a593Smuzhiyun		  mode (400kHZ). This environment variable is used in
3939*4882a593Smuzhiyun		  initialization code. So, for changes to be effective
3940*4882a593Smuzhiyun		  it must be saved and board must be reset.
3941*4882a593Smuzhiyun
3942*4882a593Smuzhiyun  initrd_high	- restrict positioning of initrd images:
3943*4882a593Smuzhiyun		  If this variable is not set, initrd images will be
3944*4882a593Smuzhiyun		  copied to the highest possible address in RAM; this
3945*4882a593Smuzhiyun		  is usually what you want since it allows for
3946*4882a593Smuzhiyun		  maximum initrd size. If for some reason you want to
3947*4882a593Smuzhiyun		  make sure that the initrd image is loaded below the
3948*4882a593Smuzhiyun		  CONFIG_SYS_BOOTMAPSZ limit, you can set this environment
3949*4882a593Smuzhiyun		  variable to a value of "no" or "off" or "0".
3950*4882a593Smuzhiyun		  Alternatively, you can set it to a maximum upper
3951*4882a593Smuzhiyun		  address to use (U-Boot will still check that it
3952*4882a593Smuzhiyun		  does not overwrite the U-Boot stack and data).
3953*4882a593Smuzhiyun
3954*4882a593Smuzhiyun		  For instance, when you have a system with 16 MB
3955*4882a593Smuzhiyun		  RAM, and want to reserve 4 MB from use by Linux,
3956*4882a593Smuzhiyun		  you can do this by adding "mem=12M" to the value of
3957*4882a593Smuzhiyun		  the "bootargs" variable. However, now you must make
3958*4882a593Smuzhiyun		  sure that the initrd image is placed in the first
3959*4882a593Smuzhiyun		  12 MB as well - this can be done with
3960*4882a593Smuzhiyun
3961*4882a593Smuzhiyun		  setenv initrd_high 00c00000
3962*4882a593Smuzhiyun
3963*4882a593Smuzhiyun		  If you set initrd_high to 0xFFFFFFFF, this is an
3964*4882a593Smuzhiyun		  indication to U-Boot that all addresses are legal
3965*4882a593Smuzhiyun		  for the Linux kernel, including addresses in flash
3966*4882a593Smuzhiyun		  memory. In this case U-Boot will NOT COPY the
3967*4882a593Smuzhiyun		  ramdisk at all. This may be useful to reduce the
3968*4882a593Smuzhiyun		  boot time on your system, but requires that this
3969*4882a593Smuzhiyun		  feature is supported by your Linux kernel.
3970*4882a593Smuzhiyun
3971*4882a593Smuzhiyun  ipaddr	- IP address; needed for tftpboot command
3972*4882a593Smuzhiyun
3973*4882a593Smuzhiyun  loadaddr	- Default load address for commands like "bootp",
3974*4882a593Smuzhiyun		  "rarpboot", "tftpboot", "loadb" or "diskboot"
3975*4882a593Smuzhiyun
3976*4882a593Smuzhiyun  loads_echo	- see CONFIG_LOADS_ECHO
3977*4882a593Smuzhiyun
3978*4882a593Smuzhiyun  serverip	- TFTP server IP address; needed for tftpboot command
3979*4882a593Smuzhiyun
3980*4882a593Smuzhiyun  bootretry	- see CONFIG_BOOT_RETRY_TIME
3981*4882a593Smuzhiyun
3982*4882a593Smuzhiyun  bootdelaykey	- see CONFIG_AUTOBOOT_DELAY_STR
3983*4882a593Smuzhiyun
3984*4882a593Smuzhiyun  bootstopkey	- see CONFIG_AUTOBOOT_STOP_STR
3985*4882a593Smuzhiyun
3986*4882a593Smuzhiyun  ethprime	- controls which interface is used first.
3987*4882a593Smuzhiyun
3988*4882a593Smuzhiyun  ethact	- controls which interface is currently active.
3989*4882a593Smuzhiyun		  For example you can do the following
3990*4882a593Smuzhiyun
3991*4882a593Smuzhiyun		  => setenv ethact FEC
3992*4882a593Smuzhiyun		  => ping 192.168.0.1 # traffic sent on FEC
3993*4882a593Smuzhiyun		  => setenv ethact SCC
3994*4882a593Smuzhiyun		  => ping 10.0.0.1 # traffic sent on SCC
3995*4882a593Smuzhiyun
3996*4882a593Smuzhiyun  ethrotate	- When set to "no" U-Boot does not go through all
3997*4882a593Smuzhiyun		  available network interfaces.
3998*4882a593Smuzhiyun		  It just stays at the currently selected interface.
3999*4882a593Smuzhiyun
4000*4882a593Smuzhiyun  netretry	- When set to "no" each network operation will
4001*4882a593Smuzhiyun		  either succeed or fail without retrying.
4002*4882a593Smuzhiyun		  When set to "once" the network operation will
4003*4882a593Smuzhiyun		  fail when all the available network interfaces
4004*4882a593Smuzhiyun		  are tried once without success.
4005*4882a593Smuzhiyun		  Useful on scripts which control the retry operation
4006*4882a593Smuzhiyun		  themselves.
4007*4882a593Smuzhiyun
4008*4882a593Smuzhiyun  npe_ucode	- set load address for the NPE microcode
4009*4882a593Smuzhiyun
4010*4882a593Smuzhiyun  silent_linux  - If set then Linux will be told to boot silently, by
4011*4882a593Smuzhiyun		  changing the console to be empty. If "yes" it will be
4012*4882a593Smuzhiyun		  made silent. If "no" it will not be made silent. If
4013*4882a593Smuzhiyun		  unset, then it will be made silent if the U-Boot console
4014*4882a593Smuzhiyun		  is silent.
4015*4882a593Smuzhiyun
4016*4882a593Smuzhiyun  tftpsrcp	- If this is set, the value is used for TFTP's
4017*4882a593Smuzhiyun		  UDP source port.
4018*4882a593Smuzhiyun
4019*4882a593Smuzhiyun  tftpdstp	- If this is set, the value is used for TFTP's UDP
4020*4882a593Smuzhiyun		  destination port instead of the Well Know Port 69.
4021*4882a593Smuzhiyun
4022*4882a593Smuzhiyun  tftpblocksize - Block size to use for TFTP transfers; if not set,
4023*4882a593Smuzhiyun		  we use the TFTP server's default block size
4024*4882a593Smuzhiyun
4025*4882a593Smuzhiyun  tftptimeout	- Retransmission timeout for TFTP packets (in milli-
4026*4882a593Smuzhiyun		  seconds, minimum value is 1000 = 1 second). Defines
4027*4882a593Smuzhiyun		  when a packet is considered to be lost so it has to
4028*4882a593Smuzhiyun		  be retransmitted. The default is 5000 = 5 seconds.
4029*4882a593Smuzhiyun		  Lowering this value may make downloads succeed
4030*4882a593Smuzhiyun		  faster in networks with high packet loss rates or
4031*4882a593Smuzhiyun		  with unreliable TFTP servers.
4032*4882a593Smuzhiyun
4033*4882a593Smuzhiyun  tftptimeoutcountmax	- maximum count of TFTP timeouts (no
4034*4882a593Smuzhiyun		  unit, minimum value = 0). Defines how many timeouts
4035*4882a593Smuzhiyun		  can happen during a single file transfer before that
4036*4882a593Smuzhiyun		  transfer is aborted. The default is 10, and 0 means
4037*4882a593Smuzhiyun		  'no timeouts allowed'. Increasing this value may help
4038*4882a593Smuzhiyun		  downloads succeed with high packet loss rates, or with
4039*4882a593Smuzhiyun		  unreliable TFTP servers or client hardware.
4040*4882a593Smuzhiyun
4041*4882a593Smuzhiyun  vlan		- When set to a value < 4095 the traffic over
4042*4882a593Smuzhiyun		  Ethernet is encapsulated/received over 802.1q
4043*4882a593Smuzhiyun		  VLAN tagged frames.
4044*4882a593Smuzhiyun
4045*4882a593Smuzhiyun  bootpretryperiod	- Period during which BOOTP/DHCP sends retries.
4046*4882a593Smuzhiyun		  Unsigned value, in milliseconds. If not set, the period will
4047*4882a593Smuzhiyun		  be either the default (28000), or a value based on
4048*4882a593Smuzhiyun		  CONFIG_NET_RETRY_COUNT, if defined. This value has
4049*4882a593Smuzhiyun		  precedence over the valu based on CONFIG_NET_RETRY_COUNT.
4050*4882a593Smuzhiyun
4051*4882a593SmuzhiyunThe following image location variables contain the location of images
4052*4882a593Smuzhiyunused in booting. The "Image" column gives the role of the image and is
4053*4882a593Smuzhiyunnot an environment variable name. The other columns are environment
4054*4882a593Smuzhiyunvariable names. "File Name" gives the name of the file on a TFTP
4055*4882a593Smuzhiyunserver, "RAM Address" gives the location in RAM the image will be
4056*4882a593Smuzhiyunloaded to, and "Flash Location" gives the image's address in NOR
4057*4882a593Smuzhiyunflash or offset in NAND flash.
4058*4882a593Smuzhiyun
4059*4882a593Smuzhiyun*Note* - these variables don't have to be defined for all boards, some
4060*4882a593Smuzhiyunboards currently use other variables for these purposes, and some
4061*4882a593Smuzhiyunboards use these variables for other purposes.
4062*4882a593Smuzhiyun
4063*4882a593SmuzhiyunImage		    File Name	     RAM Address       Flash Location
4064*4882a593Smuzhiyun-----		    ---------	     -----------       --------------
4065*4882a593Smuzhiyunu-boot		    u-boot	     u-boot_addr_r     u-boot_addr
4066*4882a593SmuzhiyunLinux kernel	    bootfile	     kernel_addr_r     kernel_addr
4067*4882a593Smuzhiyundevice tree blob    fdtfile	     fdt_addr_r	       fdt_addr
4068*4882a593Smuzhiyunramdisk		    ramdiskfile	     ramdisk_addr_r    ramdisk_addr
4069*4882a593Smuzhiyun
4070*4882a593SmuzhiyunThe following environment variables may be used and automatically
4071*4882a593Smuzhiyunupdated by the network boot commands ("bootp" and "rarpboot"),
4072*4882a593Smuzhiyundepending the information provided by your boot server:
4073*4882a593Smuzhiyun
4074*4882a593Smuzhiyun  bootfile	- see above
4075*4882a593Smuzhiyun  dnsip		- IP address of your Domain Name Server
4076*4882a593Smuzhiyun  dnsip2	- IP address of your secondary Domain Name Server
4077*4882a593Smuzhiyun  gatewayip	- IP address of the Gateway (Router) to use
4078*4882a593Smuzhiyun  hostname	- Target hostname
4079*4882a593Smuzhiyun  ipaddr	- see above
4080*4882a593Smuzhiyun  netmask	- Subnet Mask
4081*4882a593Smuzhiyun  rootpath	- Pathname of the root filesystem on the NFS server
4082*4882a593Smuzhiyun  serverip	- see above
4083*4882a593Smuzhiyun
4084*4882a593Smuzhiyun
4085*4882a593SmuzhiyunThere are two special Environment Variables:
4086*4882a593Smuzhiyun
4087*4882a593Smuzhiyun  serial#	- contains hardware identification information such
4088*4882a593Smuzhiyun		  as type string and/or serial number
4089*4882a593Smuzhiyun  ethaddr	- Ethernet address
4090*4882a593Smuzhiyun
4091*4882a593SmuzhiyunThese variables can be set only once (usually during manufacturing of
4092*4882a593Smuzhiyunthe board). U-Boot refuses to delete or overwrite these variables
4093*4882a593Smuzhiyunonce they have been set once.
4094*4882a593Smuzhiyun
4095*4882a593Smuzhiyun
4096*4882a593SmuzhiyunFurther special Environment Variables:
4097*4882a593Smuzhiyun
4098*4882a593Smuzhiyun  ver		- Contains the U-Boot version string as printed
4099*4882a593Smuzhiyun		  with the "version" command. This variable is
4100*4882a593Smuzhiyun		  readonly (see CONFIG_VERSION_VARIABLE).
4101*4882a593Smuzhiyun
4102*4882a593Smuzhiyun
4103*4882a593SmuzhiyunPlease note that changes to some configuration parameters may take
4104*4882a593Smuzhiyunonly effect after the next boot (yes, that's just like Windoze :-).
4105*4882a593Smuzhiyun
4106*4882a593Smuzhiyun
4107*4882a593SmuzhiyunCallback functions for environment variables:
4108*4882a593Smuzhiyun---------------------------------------------
4109*4882a593Smuzhiyun
4110*4882a593SmuzhiyunFor some environment variables, the behavior of u-boot needs to change
4111*4882a593Smuzhiyunwhen their values are changed.  This functionality allows functions to
4112*4882a593Smuzhiyunbe associated with arbitrary variables.  On creation, overwrite, or
4113*4882a593Smuzhiyundeletion, the callback will provide the opportunity for some side
4114*4882a593Smuzhiyuneffect to happen or for the change to be rejected.
4115*4882a593Smuzhiyun
4116*4882a593SmuzhiyunThe callbacks are named and associated with a function using the
4117*4882a593SmuzhiyunU_BOOT_ENV_CALLBACK macro in your board or driver code.
4118*4882a593Smuzhiyun
4119*4882a593SmuzhiyunThese callbacks are associated with variables in one of two ways.  The
4120*4882a593Smuzhiyunstatic list can be added to by defining CONFIG_ENV_CALLBACK_LIST_STATIC
4121*4882a593Smuzhiyunin the board configuration to a string that defines a list of
4122*4882a593Smuzhiyunassociations.  The list must be in the following format:
4123*4882a593Smuzhiyun
4124*4882a593Smuzhiyun	entry = variable_name[:callback_name]
4125*4882a593Smuzhiyun	list = entry[,list]
4126*4882a593Smuzhiyun
4127*4882a593SmuzhiyunIf the callback name is not specified, then the callback is deleted.
4128*4882a593SmuzhiyunSpaces are also allowed anywhere in the list.
4129*4882a593Smuzhiyun
4130*4882a593SmuzhiyunCallbacks can also be associated by defining the ".callbacks" variable
4131*4882a593Smuzhiyunwith the same list format above.  Any association in ".callbacks" will
4132*4882a593Smuzhiyunoverride any association in the static list. You can define
4133*4882a593SmuzhiyunCONFIG_ENV_CALLBACK_LIST_DEFAULT to a list (string) to define the
4134*4882a593Smuzhiyun".callbacks" environment variable in the default or embedded environment.
4135*4882a593Smuzhiyun
4136*4882a593SmuzhiyunIf CONFIG_REGEX is defined, the variable_name above is evaluated as a
4137*4882a593Smuzhiyunregular expression. This allows multiple variables to be connected to
4138*4882a593Smuzhiyunthe same callback without explicitly listing them all out.
4139*4882a593Smuzhiyun
4140*4882a593Smuzhiyun
4141*4882a593SmuzhiyunCommand Line Parsing:
4142*4882a593Smuzhiyun=====================
4143*4882a593Smuzhiyun
4144*4882a593SmuzhiyunThere are two different command line parsers available with U-Boot:
4145*4882a593Smuzhiyunthe old "simple" one, and the much more powerful "hush" shell:
4146*4882a593Smuzhiyun
4147*4882a593SmuzhiyunOld, simple command line parser:
4148*4882a593Smuzhiyun--------------------------------
4149*4882a593Smuzhiyun
4150*4882a593Smuzhiyun- supports environment variables (through setenv / saveenv commands)
4151*4882a593Smuzhiyun- several commands on one line, separated by ';'
4152*4882a593Smuzhiyun- variable substitution using "... ${name} ..." syntax
4153*4882a593Smuzhiyun- special characters ('$', ';') can be escaped by prefixing with '\',
4154*4882a593Smuzhiyun  for example:
4155*4882a593Smuzhiyun	setenv bootcmd bootm \${address}
4156*4882a593Smuzhiyun- You can also escape text by enclosing in single apostrophes, for example:
4157*4882a593Smuzhiyun	setenv addip 'setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off'
4158*4882a593Smuzhiyun
4159*4882a593SmuzhiyunHush shell:
4160*4882a593Smuzhiyun-----------
4161*4882a593Smuzhiyun
4162*4882a593Smuzhiyun- similar to Bourne shell, with control structures like
4163*4882a593Smuzhiyun  if...then...else...fi, for...do...done; while...do...done,
4164*4882a593Smuzhiyun  until...do...done, ...
4165*4882a593Smuzhiyun- supports environment ("global") variables (through setenv / saveenv
4166*4882a593Smuzhiyun  commands) and local shell variables (through standard shell syntax
4167*4882a593Smuzhiyun  "name=value"); only environment variables can be used with "run"
4168*4882a593Smuzhiyun  command
4169*4882a593Smuzhiyun
4170*4882a593SmuzhiyunGeneral rules:
4171*4882a593Smuzhiyun--------------
4172*4882a593Smuzhiyun
4173*4882a593Smuzhiyun(1) If a command line (or an environment variable executed by a "run"
4174*4882a593Smuzhiyun    command) contains several commands separated by semicolon, and
4175*4882a593Smuzhiyun    one of these commands fails, then the remaining commands will be
4176*4882a593Smuzhiyun    executed anyway.
4177*4882a593Smuzhiyun
4178*4882a593Smuzhiyun(2) If you execute several variables with one call to run (i. e.
4179*4882a593Smuzhiyun    calling run with a list of variables as arguments), any failing
4180*4882a593Smuzhiyun    command will cause "run" to terminate, i. e. the remaining
4181*4882a593Smuzhiyun    variables are not executed.
4182*4882a593Smuzhiyun
4183*4882a593SmuzhiyunNote for Redundant Ethernet Interfaces:
4184*4882a593Smuzhiyun=======================================
4185*4882a593Smuzhiyun
4186*4882a593SmuzhiyunSome boards come with redundant Ethernet interfaces; U-Boot supports
4187*4882a593Smuzhiyunsuch configurations and is capable of automatic selection of a
4188*4882a593Smuzhiyun"working" interface when needed. MAC assignment works as follows:
4189*4882a593Smuzhiyun
4190*4882a593SmuzhiyunNetwork interfaces are numbered eth0, eth1, eth2, ... Corresponding
4191*4882a593SmuzhiyunMAC addresses can be stored in the environment as "ethaddr" (=>eth0),
4192*4882a593Smuzhiyun"eth1addr" (=>eth1), "eth2addr", ...
4193*4882a593Smuzhiyun
4194*4882a593SmuzhiyunIf the network interface stores some valid MAC address (for instance
4195*4882a593Smuzhiyunin SROM), this is used as default address if there is NO correspon-
4196*4882a593Smuzhiyunding setting in the environment; if the corresponding environment
4197*4882a593Smuzhiyunvariable is set, this overrides the settings in the card; that means:
4198*4882a593Smuzhiyun
4199*4882a593Smuzhiyuno If the SROM has a valid MAC address, and there is no address in the
4200*4882a593Smuzhiyun  environment, the SROM's address is used.
4201*4882a593Smuzhiyun
4202*4882a593Smuzhiyuno If there is no valid address in the SROM, and a definition in the
4203*4882a593Smuzhiyun  environment exists, then the value from the environment variable is
4204*4882a593Smuzhiyun  used.
4205*4882a593Smuzhiyun
4206*4882a593Smuzhiyuno If both the SROM and the environment contain a MAC address, and
4207*4882a593Smuzhiyun  both addresses are the same, this MAC address is used.
4208*4882a593Smuzhiyun
4209*4882a593Smuzhiyuno If both the SROM and the environment contain a MAC address, and the
4210*4882a593Smuzhiyun  addresses differ, the value from the environment is used and a
4211*4882a593Smuzhiyun  warning is printed.
4212*4882a593Smuzhiyun
4213*4882a593Smuzhiyuno If neither SROM nor the environment contain a MAC address, an error
4214*4882a593Smuzhiyun  is raised. If CONFIG_NET_RANDOM_ETHADDR is defined, then in this case
4215*4882a593Smuzhiyun  a random, locally-assigned MAC is used.
4216*4882a593Smuzhiyun
4217*4882a593SmuzhiyunIf Ethernet drivers implement the 'write_hwaddr' function, valid MAC addresses
4218*4882a593Smuzhiyunwill be programmed into hardware as part of the initialization process.	 This
4219*4882a593Smuzhiyunmay be skipped by setting the appropriate 'ethmacskip' environment variable.
4220*4882a593SmuzhiyunThe naming convention is as follows:
4221*4882a593Smuzhiyun"ethmacskip" (=>eth0), "eth1macskip" (=>eth1) etc.
4222*4882a593Smuzhiyun
4223*4882a593SmuzhiyunImage Formats:
4224*4882a593Smuzhiyun==============
4225*4882a593Smuzhiyun
4226*4882a593SmuzhiyunU-Boot is capable of booting (and performing other auxiliary operations on)
4227*4882a593Smuzhiyunimages in two formats:
4228*4882a593Smuzhiyun
4229*4882a593SmuzhiyunNew uImage format (FIT)
4230*4882a593Smuzhiyun-----------------------
4231*4882a593Smuzhiyun
4232*4882a593SmuzhiyunFlexible and powerful format based on Flattened Image Tree -- FIT (similar
4233*4882a593Smuzhiyunto Flattened Device Tree). It allows the use of images with multiple
4234*4882a593Smuzhiyuncomponents (several kernels, ramdisks, etc.), with contents protected by
4235*4882a593SmuzhiyunSHA1, MD5 or CRC32. More details are found in the doc/uImage.FIT directory.
4236*4882a593Smuzhiyun
4237*4882a593Smuzhiyun
4238*4882a593SmuzhiyunOld uImage format
4239*4882a593Smuzhiyun-----------------
4240*4882a593Smuzhiyun
4241*4882a593SmuzhiyunOld image format is based on binary files which can be basically anything,
4242*4882a593Smuzhiyunpreceded by a special header; see the definitions in include/image.h for
4243*4882a593Smuzhiyundetails; basically, the header defines the following image properties:
4244*4882a593Smuzhiyun
4245*4882a593Smuzhiyun* Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD,
4246*4882a593Smuzhiyun  4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks,
4247*4882a593Smuzhiyun  LynxOS, pSOS, QNX, RTEMS, INTEGRITY;
4248*4882a593Smuzhiyun  Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS,
4249*4882a593Smuzhiyun  INTEGRITY).
4250*4882a593Smuzhiyun* Target CPU Architecture (Provisions for Alpha, ARM, Intel x86,
4251*4882a593Smuzhiyun  IA64, MIPS, NDS32, Nios II, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
4252*4882a593Smuzhiyun  Currently supported: ARM, Intel x86, MIPS, NDS32, Nios II, PowerPC).
4253*4882a593Smuzhiyun* Compression Type (uncompressed, gzip, bzip2)
4254*4882a593Smuzhiyun* Load Address
4255*4882a593Smuzhiyun* Entry Point
4256*4882a593Smuzhiyun* Image Name
4257*4882a593Smuzhiyun* Image Timestamp
4258*4882a593Smuzhiyun
4259*4882a593SmuzhiyunThe header is marked by a special Magic Number, and both the header
4260*4882a593Smuzhiyunand the data portions of the image are secured against corruption by
4261*4882a593SmuzhiyunCRC32 checksums.
4262*4882a593Smuzhiyun
4263*4882a593Smuzhiyun
4264*4882a593SmuzhiyunLinux Support:
4265*4882a593Smuzhiyun==============
4266*4882a593Smuzhiyun
4267*4882a593SmuzhiyunAlthough U-Boot should support any OS or standalone application
4268*4882a593Smuzhiyuneasily, the main focus has always been on Linux during the design of
4269*4882a593SmuzhiyunU-Boot.
4270*4882a593Smuzhiyun
4271*4882a593SmuzhiyunU-Boot includes many features that so far have been part of some
4272*4882a593Smuzhiyunspecial "boot loader" code within the Linux kernel. Also, any
4273*4882a593Smuzhiyun"initrd" images to be used are no longer part of one big Linux image;
4274*4882a593Smuzhiyuninstead, kernel and "initrd" are separate images. This implementation
4275*4882a593Smuzhiyunserves several purposes:
4276*4882a593Smuzhiyun
4277*4882a593Smuzhiyun- the same features can be used for other OS or standalone
4278*4882a593Smuzhiyun  applications (for instance: using compressed images to reduce the
4279*4882a593Smuzhiyun  Flash memory footprint)
4280*4882a593Smuzhiyun
4281*4882a593Smuzhiyun- it becomes much easier to port new Linux kernel versions because
4282*4882a593Smuzhiyun  lots of low-level, hardware dependent stuff are done by U-Boot
4283*4882a593Smuzhiyun
4284*4882a593Smuzhiyun- the same Linux kernel image can now be used with different "initrd"
4285*4882a593Smuzhiyun  images; of course this also means that different kernel images can
4286*4882a593Smuzhiyun  be run with the same "initrd". This makes testing easier (you don't
4287*4882a593Smuzhiyun  have to build a new "zImage.initrd" Linux image when you just
4288*4882a593Smuzhiyun  change a file in your "initrd"). Also, a field-upgrade of the
4289*4882a593Smuzhiyun  software is easier now.
4290*4882a593Smuzhiyun
4291*4882a593Smuzhiyun
4292*4882a593SmuzhiyunLinux HOWTO:
4293*4882a593Smuzhiyun============
4294*4882a593Smuzhiyun
4295*4882a593SmuzhiyunPorting Linux to U-Boot based systems:
4296*4882a593Smuzhiyun---------------------------------------
4297*4882a593Smuzhiyun
4298*4882a593SmuzhiyunU-Boot cannot save you from doing all the necessary modifications to
4299*4882a593Smuzhiyunconfigure the Linux device drivers for use with your target hardware
4300*4882a593Smuzhiyun(no, we don't intend to provide a full virtual machine interface to
4301*4882a593SmuzhiyunLinux :-).
4302*4882a593Smuzhiyun
4303*4882a593SmuzhiyunBut now you can ignore ALL boot loader code (in arch/powerpc/mbxboot).
4304*4882a593Smuzhiyun
4305*4882a593SmuzhiyunJust make sure your machine specific header file (for instance
4306*4882a593Smuzhiyuninclude/asm-ppc/tqm8xx.h) includes the same definition of the Board
4307*4882a593SmuzhiyunInformation structure as we define in include/asm-<arch>/u-boot.h,
4308*4882a593Smuzhiyunand make sure that your definition of IMAP_ADDR uses the same value
4309*4882a593Smuzhiyunas your U-Boot configuration in CONFIG_SYS_IMMR.
4310*4882a593Smuzhiyun
4311*4882a593SmuzhiyunNote that U-Boot now has a driver model, a unified model for drivers.
4312*4882a593SmuzhiyunIf you are adding a new driver, plumb it into driver model. If there
4313*4882a593Smuzhiyunis no uclass available, you are encouraged to create one. See
4314*4882a593Smuzhiyundoc/driver-model.
4315*4882a593Smuzhiyun
4316*4882a593Smuzhiyun
4317*4882a593SmuzhiyunConfiguring the Linux kernel:
4318*4882a593Smuzhiyun-----------------------------
4319*4882a593Smuzhiyun
4320*4882a593SmuzhiyunNo specific requirements for U-Boot. Make sure you have some root
4321*4882a593Smuzhiyundevice (initial ramdisk, NFS) for your target system.
4322*4882a593Smuzhiyun
4323*4882a593Smuzhiyun
4324*4882a593SmuzhiyunBuilding a Linux Image:
4325*4882a593Smuzhiyun-----------------------
4326*4882a593Smuzhiyun
4327*4882a593SmuzhiyunWith U-Boot, "normal" build targets like "zImage" or "bzImage" are
4328*4882a593Smuzhiyunnot used. If you use recent kernel source, a new build target
4329*4882a593Smuzhiyun"uImage" will exist which automatically builds an image usable by
4330*4882a593SmuzhiyunU-Boot. Most older kernels also have support for a "pImage" target,
4331*4882a593Smuzhiyunwhich was introduced for our predecessor project PPCBoot and uses a
4332*4882a593Smuzhiyun100% compatible format.
4333*4882a593Smuzhiyun
4334*4882a593SmuzhiyunExample:
4335*4882a593Smuzhiyun
4336*4882a593Smuzhiyun	make TQM850L_defconfig
4337*4882a593Smuzhiyun	make oldconfig
4338*4882a593Smuzhiyun	make dep
4339*4882a593Smuzhiyun	make uImage
4340*4882a593Smuzhiyun
4341*4882a593SmuzhiyunThe "uImage" build target uses a special tool (in 'tools/mkimage') to
4342*4882a593Smuzhiyunencapsulate a compressed Linux kernel image with header	 information,
4343*4882a593SmuzhiyunCRC32 checksum etc. for use with U-Boot. This is what we are doing:
4344*4882a593Smuzhiyun
4345*4882a593Smuzhiyun* build a standard "vmlinux" kernel image (in ELF binary format):
4346*4882a593Smuzhiyun
4347*4882a593Smuzhiyun* convert the kernel into a raw binary image:
4348*4882a593Smuzhiyun
4349*4882a593Smuzhiyun	${CROSS_COMPILE}-objcopy -O binary \
4350*4882a593Smuzhiyun				 -R .note -R .comment \
4351*4882a593Smuzhiyun				 -S vmlinux linux.bin
4352*4882a593Smuzhiyun
4353*4882a593Smuzhiyun* compress the binary image:
4354*4882a593Smuzhiyun
4355*4882a593Smuzhiyun	gzip -9 linux.bin
4356*4882a593Smuzhiyun
4357*4882a593Smuzhiyun* package compressed binary image for U-Boot:
4358*4882a593Smuzhiyun
4359*4882a593Smuzhiyun	mkimage -A ppc -O linux -T kernel -C gzip \
4360*4882a593Smuzhiyun		-a 0 -e 0 -n "Linux Kernel Image" \
4361*4882a593Smuzhiyun		-d linux.bin.gz uImage
4362*4882a593Smuzhiyun
4363*4882a593Smuzhiyun
4364*4882a593SmuzhiyunThe "mkimage" tool can also be used to create ramdisk images for use
4365*4882a593Smuzhiyunwith U-Boot, either separated from the Linux kernel image, or
4366*4882a593Smuzhiyuncombined into one file. "mkimage" encapsulates the images with a 64
4367*4882a593Smuzhiyunbyte header containing information about target architecture,
4368*4882a593Smuzhiyunoperating system, image type, compression method, entry points, time
4369*4882a593Smuzhiyunstamp, CRC32 checksums, etc.
4370*4882a593Smuzhiyun
4371*4882a593Smuzhiyun"mkimage" can be called in two ways: to verify existing images and
4372*4882a593Smuzhiyunprint the header information, or to build new images.
4373*4882a593Smuzhiyun
4374*4882a593SmuzhiyunIn the first form (with "-l" option) mkimage lists the information
4375*4882a593Smuzhiyuncontained in the header of an existing U-Boot image; this includes
4376*4882a593Smuzhiyunchecksum verification:
4377*4882a593Smuzhiyun
4378*4882a593Smuzhiyun	tools/mkimage -l image
4379*4882a593Smuzhiyun	  -l ==> list image header information
4380*4882a593Smuzhiyun
4381*4882a593SmuzhiyunThe second form (with "-d" option) is used to build a U-Boot image
4382*4882a593Smuzhiyunfrom a "data file" which is used as image payload:
4383*4882a593Smuzhiyun
4384*4882a593Smuzhiyun	tools/mkimage -A arch -O os -T type -C comp -a addr -e ep \
4385*4882a593Smuzhiyun		      -n name -d data_file image
4386*4882a593Smuzhiyun	  -A ==> set architecture to 'arch'
4387*4882a593Smuzhiyun	  -O ==> set operating system to 'os'
4388*4882a593Smuzhiyun	  -T ==> set image type to 'type'
4389*4882a593Smuzhiyun	  -C ==> set compression type 'comp'
4390*4882a593Smuzhiyun	  -a ==> set load address to 'addr' (hex)
4391*4882a593Smuzhiyun	  -e ==> set entry point to 'ep' (hex)
4392*4882a593Smuzhiyun	  -n ==> set image name to 'name'
4393*4882a593Smuzhiyun	  -d ==> use image data from 'datafile'
4394*4882a593Smuzhiyun
4395*4882a593SmuzhiyunRight now, all Linux kernels for PowerPC systems use the same load
4396*4882a593Smuzhiyunaddress (0x00000000), but the entry point address depends on the
4397*4882a593Smuzhiyunkernel version:
4398*4882a593Smuzhiyun
4399*4882a593Smuzhiyun- 2.2.x kernels have the entry point at 0x0000000C,
4400*4882a593Smuzhiyun- 2.3.x and later kernels have the entry point at 0x00000000.
4401*4882a593Smuzhiyun
4402*4882a593SmuzhiyunSo a typical call to build a U-Boot image would read:
4403*4882a593Smuzhiyun
4404*4882a593Smuzhiyun	-> tools/mkimage -n '2.4.4 kernel for TQM850L' \
4405*4882a593Smuzhiyun	> -A ppc -O linux -T kernel -C gzip -a 0 -e 0 \
4406*4882a593Smuzhiyun	> -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux.gz \
4407*4882a593Smuzhiyun	> examples/uImage.TQM850L
4408*4882a593Smuzhiyun	Image Name:   2.4.4 kernel for TQM850L
4409*4882a593Smuzhiyun	Created:      Wed Jul 19 02:34:59 2000
4410*4882a593Smuzhiyun	Image Type:   PowerPC Linux Kernel Image (gzip compressed)
4411*4882a593Smuzhiyun	Data Size:    335725 Bytes = 327.86 kB = 0.32 MB
4412*4882a593Smuzhiyun	Load Address: 0x00000000
4413*4882a593Smuzhiyun	Entry Point:  0x00000000
4414*4882a593Smuzhiyun
4415*4882a593SmuzhiyunTo verify the contents of the image (or check for corruption):
4416*4882a593Smuzhiyun
4417*4882a593Smuzhiyun	-> tools/mkimage -l examples/uImage.TQM850L
4418*4882a593Smuzhiyun	Image Name:   2.4.4 kernel for TQM850L
4419*4882a593Smuzhiyun	Created:      Wed Jul 19 02:34:59 2000
4420*4882a593Smuzhiyun	Image Type:   PowerPC Linux Kernel Image (gzip compressed)
4421*4882a593Smuzhiyun	Data Size:    335725 Bytes = 327.86 kB = 0.32 MB
4422*4882a593Smuzhiyun	Load Address: 0x00000000
4423*4882a593Smuzhiyun	Entry Point:  0x00000000
4424*4882a593Smuzhiyun
4425*4882a593SmuzhiyunNOTE: for embedded systems where boot time is critical you can trade
4426*4882a593Smuzhiyunspeed for memory and install an UNCOMPRESSED image instead: this
4427*4882a593Smuzhiyunneeds more space in Flash, but boots much faster since it does not
4428*4882a593Smuzhiyunneed to be uncompressed:
4429*4882a593Smuzhiyun
4430*4882a593Smuzhiyun	-> gunzip /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux.gz
4431*4882a593Smuzhiyun	-> tools/mkimage -n '2.4.4 kernel for TQM850L' \
4432*4882a593Smuzhiyun	> -A ppc -O linux -T kernel -C none -a 0 -e 0 \
4433*4882a593Smuzhiyun	> -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux \
4434*4882a593Smuzhiyun	> examples/uImage.TQM850L-uncompressed
4435*4882a593Smuzhiyun	Image Name:   2.4.4 kernel for TQM850L
4436*4882a593Smuzhiyun	Created:      Wed Jul 19 02:34:59 2000
4437*4882a593Smuzhiyun	Image Type:   PowerPC Linux Kernel Image (uncompressed)
4438*4882a593Smuzhiyun	Data Size:    792160 Bytes = 773.59 kB = 0.76 MB
4439*4882a593Smuzhiyun	Load Address: 0x00000000
4440*4882a593Smuzhiyun	Entry Point:  0x00000000
4441*4882a593Smuzhiyun
4442*4882a593Smuzhiyun
4443*4882a593SmuzhiyunSimilar you can build U-Boot images from a 'ramdisk.image.gz' file
4444*4882a593Smuzhiyunwhen your kernel is intended to use an initial ramdisk:
4445*4882a593Smuzhiyun
4446*4882a593Smuzhiyun	-> tools/mkimage -n 'Simple Ramdisk Image' \
4447*4882a593Smuzhiyun	> -A ppc -O linux -T ramdisk -C gzip \
4448*4882a593Smuzhiyun	> -d /LinuxPPC/images/SIMPLE-ramdisk.image.gz examples/simple-initrd
4449*4882a593Smuzhiyun	Image Name:   Simple Ramdisk Image
4450*4882a593Smuzhiyun	Created:      Wed Jan 12 14:01:50 2000
4451*4882a593Smuzhiyun	Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
4452*4882a593Smuzhiyun	Data Size:    566530 Bytes = 553.25 kB = 0.54 MB
4453*4882a593Smuzhiyun	Load Address: 0x00000000
4454*4882a593Smuzhiyun	Entry Point:  0x00000000
4455*4882a593Smuzhiyun
4456*4882a593SmuzhiyunThe "dumpimage" is a tool to disassemble images built by mkimage. Its "-i"
4457*4882a593Smuzhiyunoption performs the converse operation of the mkimage's second form (the "-d"
4458*4882a593Smuzhiyunoption). Given an image built by mkimage, the dumpimage extracts a "data file"
4459*4882a593Smuzhiyunfrom the image:
4460*4882a593Smuzhiyun
4461*4882a593Smuzhiyun	tools/dumpimage -i image -T type -p position data_file
4462*4882a593Smuzhiyun	  -i ==> extract from the 'image' a specific 'data_file'
4463*4882a593Smuzhiyun	  -T ==> set image type to 'type'
4464*4882a593Smuzhiyun	  -p ==> 'position' (starting at 0) of the 'data_file' inside the 'image'
4465*4882a593Smuzhiyun
4466*4882a593Smuzhiyun
4467*4882a593SmuzhiyunInstalling a Linux Image:
4468*4882a593Smuzhiyun-------------------------
4469*4882a593Smuzhiyun
4470*4882a593SmuzhiyunTo downloading a U-Boot image over the serial (console) interface,
4471*4882a593Smuzhiyunyou must convert the image to S-Record format:
4472*4882a593Smuzhiyun
4473*4882a593Smuzhiyun	objcopy -I binary -O srec examples/image examples/image.srec
4474*4882a593Smuzhiyun
4475*4882a593SmuzhiyunThe 'objcopy' does not understand the information in the U-Boot
4476*4882a593Smuzhiyunimage header, so the resulting S-Record file will be relative to
4477*4882a593Smuzhiyunaddress 0x00000000. To load it to a given address, you need to
4478*4882a593Smuzhiyunspecify the target address as 'offset' parameter with the 'loads'
4479*4882a593Smuzhiyuncommand.
4480*4882a593Smuzhiyun
4481*4882a593SmuzhiyunExample: install the image to address 0x40100000 (which on the
4482*4882a593SmuzhiyunTQM8xxL is in the first Flash bank):
4483*4882a593Smuzhiyun
4484*4882a593Smuzhiyun	=> erase 40100000 401FFFFF
4485*4882a593Smuzhiyun
4486*4882a593Smuzhiyun	.......... done
4487*4882a593Smuzhiyun	Erased 8 sectors
4488*4882a593Smuzhiyun
4489*4882a593Smuzhiyun	=> loads 40100000
4490*4882a593Smuzhiyun	## Ready for S-Record download ...
4491*4882a593Smuzhiyun	~>examples/image.srec
4492*4882a593Smuzhiyun	1 2 3 4 5 6 7 8 9 10 11 12 13 ...
4493*4882a593Smuzhiyun	...
4494*4882a593Smuzhiyun	15989 15990 15991 15992
4495*4882a593Smuzhiyun	[file transfer complete]
4496*4882a593Smuzhiyun	[connected]
4497*4882a593Smuzhiyun	## Start Addr = 0x00000000
4498*4882a593Smuzhiyun
4499*4882a593Smuzhiyun
4500*4882a593SmuzhiyunYou can check the success of the download using the 'iminfo' command;
4501*4882a593Smuzhiyunthis includes a checksum verification so you can be sure no data
4502*4882a593Smuzhiyuncorruption happened:
4503*4882a593Smuzhiyun
4504*4882a593Smuzhiyun	=> imi 40100000
4505*4882a593Smuzhiyun
4506*4882a593Smuzhiyun	## Checking Image at 40100000 ...
4507*4882a593Smuzhiyun	   Image Name:	 2.2.13 for initrd on TQM850L
4508*4882a593Smuzhiyun	   Image Type:	 PowerPC Linux Kernel Image (gzip compressed)
4509*4882a593Smuzhiyun	   Data Size:	 335725 Bytes = 327 kB = 0 MB
4510*4882a593Smuzhiyun	   Load Address: 00000000
4511*4882a593Smuzhiyun	   Entry Point:	 0000000c
4512*4882a593Smuzhiyun	   Verifying Checksum ... OK
4513*4882a593Smuzhiyun
4514*4882a593Smuzhiyun
4515*4882a593SmuzhiyunBoot Linux:
4516*4882a593Smuzhiyun-----------
4517*4882a593Smuzhiyun
4518*4882a593SmuzhiyunThe "bootm" command is used to boot an application that is stored in
4519*4882a593Smuzhiyunmemory (RAM or Flash). In case of a Linux kernel image, the contents
4520*4882a593Smuzhiyunof the "bootargs" environment variable is passed to the kernel as
4521*4882a593Smuzhiyunparameters. You can check and modify this variable using the
4522*4882a593Smuzhiyun"printenv" and "setenv" commands:
4523*4882a593Smuzhiyun
4524*4882a593Smuzhiyun
4525*4882a593Smuzhiyun	=> printenv bootargs
4526*4882a593Smuzhiyun	bootargs=root=/dev/ram
4527*4882a593Smuzhiyun
4528*4882a593Smuzhiyun	=> setenv bootargs root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
4529*4882a593Smuzhiyun
4530*4882a593Smuzhiyun	=> printenv bootargs
4531*4882a593Smuzhiyun	bootargs=root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
4532*4882a593Smuzhiyun
4533*4882a593Smuzhiyun	=> bootm 40020000
4534*4882a593Smuzhiyun	## Booting Linux kernel at 40020000 ...
4535*4882a593Smuzhiyun	   Image Name:	 2.2.13 for NFS on TQM850L
4536*4882a593Smuzhiyun	   Image Type:	 PowerPC Linux Kernel Image (gzip compressed)
4537*4882a593Smuzhiyun	   Data Size:	 381681 Bytes = 372 kB = 0 MB
4538*4882a593Smuzhiyun	   Load Address: 00000000
4539*4882a593Smuzhiyun	   Entry Point:	 0000000c
4540*4882a593Smuzhiyun	   Verifying Checksum ... OK
4541*4882a593Smuzhiyun	   Uncompressing Kernel Image ... OK
4542*4882a593Smuzhiyun	Linux version 2.2.13 (wd@denx.local.net) (gcc version 2.95.2 19991024 (release)) #1 Wed Jul 19 02:35:17 MEST 2000
4543*4882a593Smuzhiyun	Boot arguments: root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
4544*4882a593Smuzhiyun	time_init: decrementer frequency = 187500000/60
4545*4882a593Smuzhiyun	Calibrating delay loop... 49.77 BogoMIPS
4546*4882a593Smuzhiyun	Memory: 15208k available (700k kernel code, 444k data, 32k init) [c0000000,c1000000]
4547*4882a593Smuzhiyun	...
4548*4882a593Smuzhiyun
4549*4882a593SmuzhiyunIf you want to boot a Linux kernel with initial RAM disk, you pass
4550*4882a593Smuzhiyunthe memory addresses of both the kernel and the initrd image (PPBCOOT
4551*4882a593Smuzhiyunformat!) to the "bootm" command:
4552*4882a593Smuzhiyun
4553*4882a593Smuzhiyun	=> imi 40100000 40200000
4554*4882a593Smuzhiyun
4555*4882a593Smuzhiyun	## Checking Image at 40100000 ...
4556*4882a593Smuzhiyun	   Image Name:	 2.2.13 for initrd on TQM850L
4557*4882a593Smuzhiyun	   Image Type:	 PowerPC Linux Kernel Image (gzip compressed)
4558*4882a593Smuzhiyun	   Data Size:	 335725 Bytes = 327 kB = 0 MB
4559*4882a593Smuzhiyun	   Load Address: 00000000
4560*4882a593Smuzhiyun	   Entry Point:	 0000000c
4561*4882a593Smuzhiyun	   Verifying Checksum ... OK
4562*4882a593Smuzhiyun
4563*4882a593Smuzhiyun	## Checking Image at 40200000 ...
4564*4882a593Smuzhiyun	   Image Name:	 Simple Ramdisk Image
4565*4882a593Smuzhiyun	   Image Type:	 PowerPC Linux RAMDisk Image (gzip compressed)
4566*4882a593Smuzhiyun	   Data Size:	 566530 Bytes = 553 kB = 0 MB
4567*4882a593Smuzhiyun	   Load Address: 00000000
4568*4882a593Smuzhiyun	   Entry Point:	 00000000
4569*4882a593Smuzhiyun	   Verifying Checksum ... OK
4570*4882a593Smuzhiyun
4571*4882a593Smuzhiyun	=> bootm 40100000 40200000
4572*4882a593Smuzhiyun	## Booting Linux kernel at 40100000 ...
4573*4882a593Smuzhiyun	   Image Name:	 2.2.13 for initrd on TQM850L
4574*4882a593Smuzhiyun	   Image Type:	 PowerPC Linux Kernel Image (gzip compressed)
4575*4882a593Smuzhiyun	   Data Size:	 335725 Bytes = 327 kB = 0 MB
4576*4882a593Smuzhiyun	   Load Address: 00000000
4577*4882a593Smuzhiyun	   Entry Point:	 0000000c
4578*4882a593Smuzhiyun	   Verifying Checksum ... OK
4579*4882a593Smuzhiyun	   Uncompressing Kernel Image ... OK
4580*4882a593Smuzhiyun	## Loading RAMDisk Image at 40200000 ...
4581*4882a593Smuzhiyun	   Image Name:	 Simple Ramdisk Image
4582*4882a593Smuzhiyun	   Image Type:	 PowerPC Linux RAMDisk Image (gzip compressed)
4583*4882a593Smuzhiyun	   Data Size:	 566530 Bytes = 553 kB = 0 MB
4584*4882a593Smuzhiyun	   Load Address: 00000000
4585*4882a593Smuzhiyun	   Entry Point:	 00000000
4586*4882a593Smuzhiyun	   Verifying Checksum ... OK
4587*4882a593Smuzhiyun	   Loading Ramdisk ... OK
4588*4882a593Smuzhiyun	Linux version 2.2.13 (wd@denx.local.net) (gcc version 2.95.2 19991024 (release)) #1 Wed Jul 19 02:32:08 MEST 2000
4589*4882a593Smuzhiyun	Boot arguments: root=/dev/ram
4590*4882a593Smuzhiyun	time_init: decrementer frequency = 187500000/60
4591*4882a593Smuzhiyun	Calibrating delay loop... 49.77 BogoMIPS
4592*4882a593Smuzhiyun	...
4593*4882a593Smuzhiyun	RAMDISK: Compressed image found at block 0
4594*4882a593Smuzhiyun	VFS: Mounted root (ext2 filesystem).
4595*4882a593Smuzhiyun
4596*4882a593Smuzhiyun	bash#
4597*4882a593Smuzhiyun
4598*4882a593SmuzhiyunBoot Linux and pass a flat device tree:
4599*4882a593Smuzhiyun-----------
4600*4882a593Smuzhiyun
4601*4882a593SmuzhiyunFirst, U-Boot must be compiled with the appropriate defines. See the section
4602*4882a593Smuzhiyuntitled "Linux Kernel Interface" above for a more in depth explanation. The
4603*4882a593Smuzhiyunfollowing is an example of how to start a kernel and pass an updated
4604*4882a593Smuzhiyunflat device tree:
4605*4882a593Smuzhiyun
4606*4882a593Smuzhiyun=> print oftaddr
4607*4882a593Smuzhiyunoftaddr=0x300000
4608*4882a593Smuzhiyun=> print oft
4609*4882a593Smuzhiyunoft=oftrees/mpc8540ads.dtb
4610*4882a593Smuzhiyun=> tftp $oftaddr $oft
4611*4882a593SmuzhiyunSpeed: 1000, full duplex
4612*4882a593SmuzhiyunUsing TSEC0 device
4613*4882a593SmuzhiyunTFTP from server 192.168.1.1; our IP address is 192.168.1.101
4614*4882a593SmuzhiyunFilename 'oftrees/mpc8540ads.dtb'.
4615*4882a593SmuzhiyunLoad address: 0x300000
4616*4882a593SmuzhiyunLoading: #
4617*4882a593Smuzhiyundone
4618*4882a593SmuzhiyunBytes transferred = 4106 (100a hex)
4619*4882a593Smuzhiyun=> tftp $loadaddr $bootfile
4620*4882a593SmuzhiyunSpeed: 1000, full duplex
4621*4882a593SmuzhiyunUsing TSEC0 device
4622*4882a593SmuzhiyunTFTP from server 192.168.1.1; our IP address is 192.168.1.2
4623*4882a593SmuzhiyunFilename 'uImage'.
4624*4882a593SmuzhiyunLoad address: 0x200000
4625*4882a593SmuzhiyunLoading:############
4626*4882a593Smuzhiyundone
4627*4882a593SmuzhiyunBytes transferred = 1029407 (fb51f hex)
4628*4882a593Smuzhiyun=> print loadaddr
4629*4882a593Smuzhiyunloadaddr=200000
4630*4882a593Smuzhiyun=> print oftaddr
4631*4882a593Smuzhiyunoftaddr=0x300000
4632*4882a593Smuzhiyun=> bootm $loadaddr - $oftaddr
4633*4882a593Smuzhiyun## Booting image at 00200000 ...
4634*4882a593Smuzhiyun   Image Name:	 Linux-2.6.17-dirty
4635*4882a593Smuzhiyun   Image Type:	 PowerPC Linux Kernel Image (gzip compressed)
4636*4882a593Smuzhiyun   Data Size:	 1029343 Bytes = 1005.2 kB
4637*4882a593Smuzhiyun   Load Address: 00000000
4638*4882a593Smuzhiyun   Entry Point:	 00000000
4639*4882a593Smuzhiyun   Verifying Checksum ... OK
4640*4882a593Smuzhiyun   Uncompressing Kernel Image ... OK
4641*4882a593SmuzhiyunBooting using flat device tree at 0x300000
4642*4882a593SmuzhiyunUsing MPC85xx ADS machine description
4643*4882a593SmuzhiyunMemory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb
4644*4882a593Smuzhiyun[snip]
4645*4882a593Smuzhiyun
4646*4882a593Smuzhiyun
4647*4882a593SmuzhiyunMore About U-Boot Image Types:
4648*4882a593Smuzhiyun------------------------------
4649*4882a593Smuzhiyun
4650*4882a593SmuzhiyunU-Boot supports the following image types:
4651*4882a593Smuzhiyun
4652*4882a593Smuzhiyun   "Standalone Programs" are directly runnable in the environment
4653*4882a593Smuzhiyun	provided by U-Boot; it is expected that (if they behave
4654*4882a593Smuzhiyun	well) you can continue to work in U-Boot after return from
4655*4882a593Smuzhiyun	the Standalone Program.
4656*4882a593Smuzhiyun   "OS Kernel Images" are usually images of some Embedded OS which
4657*4882a593Smuzhiyun	will take over control completely. Usually these programs
4658*4882a593Smuzhiyun	will install their own set of exception handlers, device
4659*4882a593Smuzhiyun	drivers, set up the MMU, etc. - this means, that you cannot
4660*4882a593Smuzhiyun	expect to re-enter U-Boot except by resetting the CPU.
4661*4882a593Smuzhiyun   "RAMDisk Images" are more or less just data blocks, and their
4662*4882a593Smuzhiyun	parameters (address, size) are passed to an OS kernel that is
4663*4882a593Smuzhiyun	being started.
4664*4882a593Smuzhiyun   "Multi-File Images" contain several images, typically an OS
4665*4882a593Smuzhiyun	(Linux) kernel image and one or more data images like
4666*4882a593Smuzhiyun	RAMDisks. This construct is useful for instance when you want
4667*4882a593Smuzhiyun	to boot over the network using BOOTP etc., where the boot
4668*4882a593Smuzhiyun	server provides just a single image file, but you want to get
4669*4882a593Smuzhiyun	for instance an OS kernel and a RAMDisk image.
4670*4882a593Smuzhiyun
4671*4882a593Smuzhiyun	"Multi-File Images" start with a list of image sizes, each
4672*4882a593Smuzhiyun	image size (in bytes) specified by an "uint32_t" in network
4673*4882a593Smuzhiyun	byte order. This list is terminated by an "(uint32_t)0".
4674*4882a593Smuzhiyun	Immediately after the terminating 0 follow the images, one by
4675*4882a593Smuzhiyun	one, all aligned on "uint32_t" boundaries (size rounded up to
4676*4882a593Smuzhiyun	a multiple of 4 bytes).
4677*4882a593Smuzhiyun
4678*4882a593Smuzhiyun   "Firmware Images" are binary images containing firmware (like
4679*4882a593Smuzhiyun	U-Boot or FPGA images) which usually will be programmed to
4680*4882a593Smuzhiyun	flash memory.
4681*4882a593Smuzhiyun
4682*4882a593Smuzhiyun   "Script files" are command sequences that will be executed by
4683*4882a593Smuzhiyun	U-Boot's command interpreter; this feature is especially
4684*4882a593Smuzhiyun	useful when you configure U-Boot to use a real shell (hush)
4685*4882a593Smuzhiyun	as command interpreter.
4686*4882a593Smuzhiyun
4687*4882a593SmuzhiyunBooting the Linux zImage:
4688*4882a593Smuzhiyun-------------------------
4689*4882a593Smuzhiyun
4690*4882a593SmuzhiyunOn some platforms, it's possible to boot Linux zImage. This is done
4691*4882a593Smuzhiyunusing the "bootz" command. The syntax of "bootz" command is the same
4692*4882a593Smuzhiyunas the syntax of "bootm" command.
4693*4882a593Smuzhiyun
4694*4882a593SmuzhiyunNote, defining the CONFIG_SUPPORT_RAW_INITRD allows user to supply
4695*4882a593Smuzhiyunkernel with raw initrd images. The syntax is slightly different, the
4696*4882a593Smuzhiyunaddress of the initrd must be augmented by it's size, in the following
4697*4882a593Smuzhiyunformat: "<initrd addres>:<initrd size>".
4698*4882a593Smuzhiyun
4699*4882a593Smuzhiyun
4700*4882a593SmuzhiyunStandalone HOWTO:
4701*4882a593Smuzhiyun=================
4702*4882a593Smuzhiyun
4703*4882a593SmuzhiyunOne of the features of U-Boot is that you can dynamically load and
4704*4882a593Smuzhiyunrun "standalone" applications, which can use some resources of
4705*4882a593SmuzhiyunU-Boot like console I/O functions or interrupt services.
4706*4882a593Smuzhiyun
4707*4882a593SmuzhiyunTwo simple examples are included with the sources:
4708*4882a593Smuzhiyun
4709*4882a593Smuzhiyun"Hello World" Demo:
4710*4882a593Smuzhiyun-------------------
4711*4882a593Smuzhiyun
4712*4882a593Smuzhiyun'examples/hello_world.c' contains a small "Hello World" Demo
4713*4882a593Smuzhiyunapplication; it is automatically compiled when you build U-Boot.
4714*4882a593SmuzhiyunIt's configured to run at address 0x00040004, so you can play with it
4715*4882a593Smuzhiyunlike that:
4716*4882a593Smuzhiyun
4717*4882a593Smuzhiyun	=> loads
4718*4882a593Smuzhiyun	## Ready for S-Record download ...
4719*4882a593Smuzhiyun	~>examples/hello_world.srec
4720*4882a593Smuzhiyun	1 2 3 4 5 6 7 8 9 10 11 ...
4721*4882a593Smuzhiyun	[file transfer complete]
4722*4882a593Smuzhiyun	[connected]
4723*4882a593Smuzhiyun	## Start Addr = 0x00040004
4724*4882a593Smuzhiyun
4725*4882a593Smuzhiyun	=> go 40004 Hello World! This is a test.
4726*4882a593Smuzhiyun	## Starting application at 0x00040004 ...
4727*4882a593Smuzhiyun	Hello World
4728*4882a593Smuzhiyun	argc = 7
4729*4882a593Smuzhiyun	argv[0] = "40004"
4730*4882a593Smuzhiyun	argv[1] = "Hello"
4731*4882a593Smuzhiyun	argv[2] = "World!"
4732*4882a593Smuzhiyun	argv[3] = "This"
4733*4882a593Smuzhiyun	argv[4] = "is"
4734*4882a593Smuzhiyun	argv[5] = "a"
4735*4882a593Smuzhiyun	argv[6] = "test."
4736*4882a593Smuzhiyun	argv[7] = "<NULL>"
4737*4882a593Smuzhiyun	Hit any key to exit ...
4738*4882a593Smuzhiyun
4739*4882a593Smuzhiyun	## Application terminated, rc = 0x0
4740*4882a593Smuzhiyun
4741*4882a593SmuzhiyunAnother example, which demonstrates how to register a CPM interrupt
4742*4882a593Smuzhiyunhandler with the U-Boot code, can be found in 'examples/timer.c'.
4743*4882a593SmuzhiyunHere, a CPM timer is set up to generate an interrupt every second.
4744*4882a593SmuzhiyunThe interrupt service routine is trivial, just printing a '.'
4745*4882a593Smuzhiyuncharacter, but this is just a demo program. The application can be
4746*4882a593Smuzhiyuncontrolled by the following keys:
4747*4882a593Smuzhiyun
4748*4882a593Smuzhiyun	? - print current values og the CPM Timer registers
4749*4882a593Smuzhiyun	b - enable interrupts and start timer
4750*4882a593Smuzhiyun	e - stop timer and disable interrupts
4751*4882a593Smuzhiyun	q - quit application
4752*4882a593Smuzhiyun
4753*4882a593Smuzhiyun	=> loads
4754*4882a593Smuzhiyun	## Ready for S-Record download ...
4755*4882a593Smuzhiyun	~>examples/timer.srec
4756*4882a593Smuzhiyun	1 2 3 4 5 6 7 8 9 10 11 ...
4757*4882a593Smuzhiyun	[file transfer complete]
4758*4882a593Smuzhiyun	[connected]
4759*4882a593Smuzhiyun	## Start Addr = 0x00040004
4760*4882a593Smuzhiyun
4761*4882a593Smuzhiyun	=> go 40004
4762*4882a593Smuzhiyun	## Starting application at 0x00040004 ...
4763*4882a593Smuzhiyun	TIMERS=0xfff00980
4764*4882a593Smuzhiyun	Using timer 1
4765*4882a593Smuzhiyun	  tgcr @ 0xfff00980, tmr @ 0xfff00990, trr @ 0xfff00994, tcr @ 0xfff00998, tcn @ 0xfff0099c, ter @ 0xfff009b0
4766*4882a593Smuzhiyun
4767*4882a593SmuzhiyunHit 'b':
4768*4882a593Smuzhiyun	[q, b, e, ?] Set interval 1000000 us
4769*4882a593Smuzhiyun	Enabling timer
4770*4882a593SmuzhiyunHit '?':
4771*4882a593Smuzhiyun	[q, b, e, ?] ........
4772*4882a593Smuzhiyun	tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0xef6, ter=0x0
4773*4882a593SmuzhiyunHit '?':
4774*4882a593Smuzhiyun	[q, b, e, ?] .
4775*4882a593Smuzhiyun	tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x2ad4, ter=0x0
4776*4882a593SmuzhiyunHit '?':
4777*4882a593Smuzhiyun	[q, b, e, ?] .
4778*4882a593Smuzhiyun	tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x1efc, ter=0x0
4779*4882a593SmuzhiyunHit '?':
4780*4882a593Smuzhiyun	[q, b, e, ?] .
4781*4882a593Smuzhiyun	tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x169d, ter=0x0
4782*4882a593SmuzhiyunHit 'e':
4783*4882a593Smuzhiyun	[q, b, e, ?] ...Stopping timer
4784*4882a593SmuzhiyunHit 'q':
4785*4882a593Smuzhiyun	[q, b, e, ?] ## Application terminated, rc = 0x0
4786*4882a593Smuzhiyun
4787*4882a593Smuzhiyun
4788*4882a593SmuzhiyunMinicom warning:
4789*4882a593Smuzhiyun================
4790*4882a593Smuzhiyun
4791*4882a593SmuzhiyunOver time, many people have reported problems when trying to use the
4792*4882a593Smuzhiyun"minicom" terminal emulation program for serial download. I (wd)
4793*4882a593Smuzhiyunconsider minicom to be broken, and recommend not to use it. Under
4794*4882a593SmuzhiyunUnix, I recommend to use C-Kermit for general purpose use (and
4795*4882a593Smuzhiyunespecially for kermit binary protocol download ("loadb" command), and
4796*4882a593Smuzhiyunuse "cu" for S-Record download ("loads" command).  See
4797*4882a593Smuzhiyunhttp://www.denx.de/wiki/view/DULG/SystemSetup#Section_4.3.
4798*4882a593Smuzhiyunfor help with kermit.
4799*4882a593Smuzhiyun
4800*4882a593Smuzhiyun
4801*4882a593SmuzhiyunNevertheless, if you absolutely want to use it try adding this
4802*4882a593Smuzhiyunconfiguration to your "File transfer protocols" section:
4803*4882a593Smuzhiyun
4804*4882a593Smuzhiyun	   Name	   Program			Name U/D FullScr IO-Red. Multi
4805*4882a593Smuzhiyun	X  kermit  /usr/bin/kermit -i -l %l -s	 Y    U	   Y	   N	  N
4806*4882a593Smuzhiyun	Y  kermit  /usr/bin/kermit -i -l %l -r	 N    D	   Y	   N	  N
4807*4882a593Smuzhiyun
4808*4882a593Smuzhiyun
4809*4882a593SmuzhiyunNetBSD Notes:
4810*4882a593Smuzhiyun=============
4811*4882a593Smuzhiyun
4812*4882a593SmuzhiyunStarting at version 0.9.2, U-Boot supports NetBSD both as host
4813*4882a593Smuzhiyun(build U-Boot) and target system (boots NetBSD/mpc8xx).
4814*4882a593Smuzhiyun
4815*4882a593SmuzhiyunBuilding requires a cross environment; it is known to work on
4816*4882a593SmuzhiyunNetBSD/i386 with the cross-powerpc-netbsd-1.3 package (you will also
4817*4882a593Smuzhiyunneed gmake since the Makefiles are not compatible with BSD make).
4818*4882a593SmuzhiyunNote that the cross-powerpc package does not install include files;
4819*4882a593Smuzhiyunattempting to build U-Boot will fail because <machine/ansi.h> is
4820*4882a593Smuzhiyunmissing.  This file has to be installed and patched manually:
4821*4882a593Smuzhiyun
4822*4882a593Smuzhiyun	# cd /usr/pkg/cross/powerpc-netbsd/include
4823*4882a593Smuzhiyun	# mkdir powerpc
4824*4882a593Smuzhiyun	# ln -s powerpc machine
4825*4882a593Smuzhiyun	# cp /usr/src/sys/arch/powerpc/include/ansi.h powerpc/ansi.h
4826*4882a593Smuzhiyun	# ${EDIT} powerpc/ansi.h	## must remove __va_list, _BSD_VA_LIST
4827*4882a593Smuzhiyun
4828*4882a593SmuzhiyunNative builds *don't* work due to incompatibilities between native
4829*4882a593Smuzhiyunand U-Boot include files.
4830*4882a593Smuzhiyun
4831*4882a593SmuzhiyunBooting assumes that (the first part of) the image booted is a
4832*4882a593Smuzhiyunstage-2 loader which in turn loads and then invokes the kernel
4833*4882a593Smuzhiyunproper. Loader sources will eventually appear in the NetBSD source
4834*4882a593Smuzhiyuntree (probably in sys/arc/mpc8xx/stand/u-boot_stage2/); in the
4835*4882a593Smuzhiyunmeantime, see ftp://ftp.denx.de/pub/u-boot/ppcboot_stage2.tar.gz
4836*4882a593Smuzhiyun
4837*4882a593Smuzhiyun
4838*4882a593SmuzhiyunImplementation Internals:
4839*4882a593Smuzhiyun=========================
4840*4882a593Smuzhiyun
4841*4882a593SmuzhiyunThe following is not intended to be a complete description of every
4842*4882a593Smuzhiyunimplementation detail. However, it should help to understand the
4843*4882a593Smuzhiyuninner workings of U-Boot and make it easier to port it to custom
4844*4882a593Smuzhiyunhardware.
4845*4882a593Smuzhiyun
4846*4882a593Smuzhiyun
4847*4882a593SmuzhiyunInitial Stack, Global Data:
4848*4882a593Smuzhiyun---------------------------
4849*4882a593Smuzhiyun
4850*4882a593SmuzhiyunThe implementation of U-Boot is complicated by the fact that U-Boot
4851*4882a593Smuzhiyunstarts running out of ROM (flash memory), usually without access to
4852*4882a593Smuzhiyunsystem RAM (because the memory controller is not initialized yet).
4853*4882a593SmuzhiyunThis means that we don't have writable Data or BSS segments, and BSS
4854*4882a593Smuzhiyunis not initialized as zero. To be able to get a C environment working
4855*4882a593Smuzhiyunat all, we have to allocate at least a minimal stack. Implementation
4856*4882a593Smuzhiyunoptions for this are defined and restricted by the CPU used: Some CPU
4857*4882a593Smuzhiyunmodels provide on-chip memory (like the IMMR area on MPC8xx and
4858*4882a593SmuzhiyunMPC826x processors), on others (parts of) the data cache can be
4859*4882a593Smuzhiyunlocked as (mis-) used as memory, etc.
4860*4882a593Smuzhiyun
4861*4882a593Smuzhiyun	Chris Hallinan posted a good summary of these issues to the
4862*4882a593Smuzhiyun	U-Boot mailing list:
4863*4882a593Smuzhiyun
4864*4882a593Smuzhiyun	Subject: RE: [U-Boot-Users] RE: More On Memory Bank x (nothingness)?
4865*4882a593Smuzhiyun	From: "Chris Hallinan" <clh@net1plus.com>
4866*4882a593Smuzhiyun	Date: Mon, 10 Feb 2003 16:43:46 -0500 (22:43 MET)
4867*4882a593Smuzhiyun	...
4868*4882a593Smuzhiyun
4869*4882a593Smuzhiyun	Correct me if I'm wrong, folks, but the way I understand it
4870*4882a593Smuzhiyun	is this: Using DCACHE as initial RAM for Stack, etc, does not
4871*4882a593Smuzhiyun	require any physical RAM backing up the cache. The cleverness
4872*4882a593Smuzhiyun	is that the cache is being used as a temporary supply of
4873*4882a593Smuzhiyun	necessary storage before the SDRAM controller is setup. It's
4874*4882a593Smuzhiyun	beyond the scope of this list to explain the details, but you
4875*4882a593Smuzhiyun	can see how this works by studying the cache architecture and
4876*4882a593Smuzhiyun	operation in the architecture and processor-specific manuals.
4877*4882a593Smuzhiyun
4878*4882a593Smuzhiyun	OCM is On Chip Memory, which I believe the 405GP has 4K. It
4879*4882a593Smuzhiyun	is another option for the system designer to use as an
4880*4882a593Smuzhiyun	initial stack/RAM area prior to SDRAM being available. Either
4881*4882a593Smuzhiyun	option should work for you. Using CS 4 should be fine if your
4882*4882a593Smuzhiyun	board designers haven't used it for something that would
4883*4882a593Smuzhiyun	cause you grief during the initial boot! It is frequently not
4884*4882a593Smuzhiyun	used.
4885*4882a593Smuzhiyun
4886*4882a593Smuzhiyun	CONFIG_SYS_INIT_RAM_ADDR should be somewhere that won't interfere
4887*4882a593Smuzhiyun	with your processor/board/system design. The default value
4888*4882a593Smuzhiyun	you will find in any recent u-boot distribution in
4889*4882a593Smuzhiyun	walnut.h should work for you. I'd set it to a value larger
4890*4882a593Smuzhiyun	than your SDRAM module. If you have a 64MB SDRAM module, set
4891*4882a593Smuzhiyun	it above 400_0000. Just make sure your board has no resources
4892*4882a593Smuzhiyun	that are supposed to respond to that address! That code in
4893*4882a593Smuzhiyun	start.S has been around a while and should work as is when
4894*4882a593Smuzhiyun	you get the config right.
4895*4882a593Smuzhiyun
4896*4882a593Smuzhiyun	-Chris Hallinan
4897*4882a593Smuzhiyun	DS4.COM, Inc.
4898*4882a593Smuzhiyun
4899*4882a593SmuzhiyunIt is essential to remember this, since it has some impact on the C
4900*4882a593Smuzhiyuncode for the initialization procedures:
4901*4882a593Smuzhiyun
4902*4882a593Smuzhiyun* Initialized global data (data segment) is read-only. Do not attempt
4903*4882a593Smuzhiyun  to write it.
4904*4882a593Smuzhiyun
4905*4882a593Smuzhiyun* Do not use any uninitialized global data (or implicitly initialized
4906*4882a593Smuzhiyun  as zero data - BSS segment) at all - this is undefined, initiali-
4907*4882a593Smuzhiyun  zation is performed later (when relocating to RAM).
4908*4882a593Smuzhiyun
4909*4882a593Smuzhiyun* Stack space is very limited. Avoid big data buffers or things like
4910*4882a593Smuzhiyun  that.
4911*4882a593Smuzhiyun
4912*4882a593SmuzhiyunHaving only the stack as writable memory limits means we cannot use
4913*4882a593Smuzhiyunnormal global data to share information between the code. But it
4914*4882a593Smuzhiyunturned out that the implementation of U-Boot can be greatly
4915*4882a593Smuzhiyunsimplified by making a global data structure (gd_t) available to all
4916*4882a593Smuzhiyunfunctions. We could pass a pointer to this data as argument to _all_
4917*4882a593Smuzhiyunfunctions, but this would bloat the code. Instead we use a feature of
4918*4882a593Smuzhiyunthe GCC compiler (Global Register Variables) to share the data: we
4919*4882a593Smuzhiyunplace a pointer (gd) to the global data into a register which we
4920*4882a593Smuzhiyunreserve for this purpose.
4921*4882a593Smuzhiyun
4922*4882a593SmuzhiyunWhen choosing a register for such a purpose we are restricted by the
4923*4882a593Smuzhiyunrelevant  (E)ABI  specifications for the current architecture, and by
4924*4882a593SmuzhiyunGCC's implementation.
4925*4882a593Smuzhiyun
4926*4882a593SmuzhiyunFor PowerPC, the following registers have specific use:
4927*4882a593Smuzhiyun	R1:	stack pointer
4928*4882a593Smuzhiyun	R2:	reserved for system use
4929*4882a593Smuzhiyun	R3-R4:	parameter passing and return values
4930*4882a593Smuzhiyun	R5-R10: parameter passing
4931*4882a593Smuzhiyun	R13:	small data area pointer
4932*4882a593Smuzhiyun	R30:	GOT pointer
4933*4882a593Smuzhiyun	R31:	frame pointer
4934*4882a593Smuzhiyun
4935*4882a593Smuzhiyun	(U-Boot also uses R12 as internal GOT pointer. r12
4936*4882a593Smuzhiyun	is a volatile register so r12 needs to be reset when
4937*4882a593Smuzhiyun	going back and forth between asm and C)
4938*4882a593Smuzhiyun
4939*4882a593Smuzhiyun    ==> U-Boot will use R2 to hold a pointer to the global data
4940*4882a593Smuzhiyun
4941*4882a593Smuzhiyun    Note: on PPC, we could use a static initializer (since the
4942*4882a593Smuzhiyun    address of the global data structure is known at compile time),
4943*4882a593Smuzhiyun    but it turned out that reserving a register results in somewhat
4944*4882a593Smuzhiyun    smaller code - although the code savings are not that big (on
4945*4882a593Smuzhiyun    average for all boards 752 bytes for the whole U-Boot image,
4946*4882a593Smuzhiyun    624 text + 127 data).
4947*4882a593Smuzhiyun
4948*4882a593SmuzhiyunOn ARM, the following registers are used:
4949*4882a593Smuzhiyun
4950*4882a593Smuzhiyun	R0:	function argument word/integer result
4951*4882a593Smuzhiyun	R1-R3:	function argument word
4952*4882a593Smuzhiyun	R9:	platform specific
4953*4882a593Smuzhiyun	R10:	stack limit (used only if stack checking is enabled)
4954*4882a593Smuzhiyun	R11:	argument (frame) pointer
4955*4882a593Smuzhiyun	R12:	temporary workspace
4956*4882a593Smuzhiyun	R13:	stack pointer
4957*4882a593Smuzhiyun	R14:	link register
4958*4882a593Smuzhiyun	R15:	program counter
4959*4882a593Smuzhiyun
4960*4882a593Smuzhiyun    ==> U-Boot will use R9 to hold a pointer to the global data
4961*4882a593Smuzhiyun
4962*4882a593Smuzhiyun    Note: on ARM, only R_ARM_RELATIVE relocations are supported.
4963*4882a593Smuzhiyun
4964*4882a593SmuzhiyunOn Nios II, the ABI is documented here:
4965*4882a593Smuzhiyun	http://www.altera.com/literature/hb/nios2/n2cpu_nii51016.pdf
4966*4882a593Smuzhiyun
4967*4882a593Smuzhiyun    ==> U-Boot will use gp to hold a pointer to the global data
4968*4882a593Smuzhiyun
4969*4882a593Smuzhiyun    Note: on Nios II, we give "-G0" option to gcc and don't use gp
4970*4882a593Smuzhiyun    to access small data sections, so gp is free.
4971*4882a593Smuzhiyun
4972*4882a593SmuzhiyunOn NDS32, the following registers are used:
4973*4882a593Smuzhiyun
4974*4882a593Smuzhiyun	R0-R1:	argument/return
4975*4882a593Smuzhiyun	R2-R5:	argument
4976*4882a593Smuzhiyun	R15:	temporary register for assembler
4977*4882a593Smuzhiyun	R16:	trampoline register
4978*4882a593Smuzhiyun	R28:	frame pointer (FP)
4979*4882a593Smuzhiyun	R29:	global pointer (GP)
4980*4882a593Smuzhiyun	R30:	link register (LP)
4981*4882a593Smuzhiyun	R31:	stack pointer (SP)
4982*4882a593Smuzhiyun	PC:	program counter (PC)
4983*4882a593Smuzhiyun
4984*4882a593Smuzhiyun    ==> U-Boot will use R10 to hold a pointer to the global data
4985*4882a593Smuzhiyun
4986*4882a593SmuzhiyunNOTE: DECLARE_GLOBAL_DATA_PTR must be used with file-global scope,
4987*4882a593Smuzhiyunor current versions of GCC may "optimize" the code too much.
4988*4882a593Smuzhiyun
4989*4882a593SmuzhiyunMemory Management:
4990*4882a593Smuzhiyun------------------
4991*4882a593Smuzhiyun
4992*4882a593SmuzhiyunU-Boot runs in system state and uses physical addresses, i.e. the
4993*4882a593SmuzhiyunMMU is not used either for address mapping nor for memory protection.
4994*4882a593Smuzhiyun
4995*4882a593SmuzhiyunThe available memory is mapped to fixed addresses using the memory
4996*4882a593Smuzhiyuncontroller. In this process, a contiguous block is formed for each
4997*4882a593Smuzhiyunmemory type (Flash, SDRAM, SRAM), even when it consists of several
4998*4882a593Smuzhiyunphysical memory banks.
4999*4882a593Smuzhiyun
5000*4882a593SmuzhiyunU-Boot is installed in the first 128 kB of the first Flash bank (on
5001*4882a593SmuzhiyunTQM8xxL modules this is the range 0x40000000 ... 0x4001FFFF). After
5002*4882a593Smuzhiyunbooting and sizing and initializing DRAM, the code relocates itself
5003*4882a593Smuzhiyunto the upper end of DRAM. Immediately below the U-Boot code some
5004*4882a593Smuzhiyunmemory is reserved for use by malloc() [see CONFIG_SYS_MALLOC_LEN
5005*4882a593Smuzhiyunconfiguration setting]. Below that, a structure with global Board
5006*4882a593SmuzhiyunInfo data is placed, followed by the stack (growing downward).
5007*4882a593Smuzhiyun
5008*4882a593SmuzhiyunAdditionally, some exception handler code is copied to the low 8 kB
5009*4882a593Smuzhiyunof DRAM (0x00000000 ... 0x00001FFF).
5010*4882a593Smuzhiyun
5011*4882a593SmuzhiyunSo a typical memory configuration with 16 MB of DRAM could look like
5012*4882a593Smuzhiyunthis:
5013*4882a593Smuzhiyun
5014*4882a593Smuzhiyun	0x0000 0000	Exception Vector code
5015*4882a593Smuzhiyun	      :
5016*4882a593Smuzhiyun	0x0000 1FFF
5017*4882a593Smuzhiyun	0x0000 2000	Free for Application Use
5018*4882a593Smuzhiyun	      :
5019*4882a593Smuzhiyun	      :
5020*4882a593Smuzhiyun
5021*4882a593Smuzhiyun	      :
5022*4882a593Smuzhiyun	      :
5023*4882a593Smuzhiyun	0x00FB FF20	Monitor Stack (Growing downward)
5024*4882a593Smuzhiyun	0x00FB FFAC	Board Info Data and permanent copy of global data
5025*4882a593Smuzhiyun	0x00FC 0000	Malloc Arena
5026*4882a593Smuzhiyun	      :
5027*4882a593Smuzhiyun	0x00FD FFFF
5028*4882a593Smuzhiyun	0x00FE 0000	RAM Copy of Monitor Code
5029*4882a593Smuzhiyun	...		eventually: LCD or video framebuffer
5030*4882a593Smuzhiyun	...		eventually: pRAM (Protected RAM - unchanged by reset)
5031*4882a593Smuzhiyun	0x00FF FFFF	[End of RAM]
5032*4882a593Smuzhiyun
5033*4882a593Smuzhiyun
5034*4882a593SmuzhiyunSystem Initialization:
5035*4882a593Smuzhiyun----------------------
5036*4882a593Smuzhiyun
5037*4882a593SmuzhiyunIn the reset configuration, U-Boot starts at the reset entry point
5038*4882a593Smuzhiyun(on most PowerPC systems at address 0x00000100). Because of the reset
5039*4882a593Smuzhiyunconfiguration for CS0# this is a mirror of the on board Flash memory.
5040*4882a593SmuzhiyunTo be able to re-map memory U-Boot then jumps to its link address.
5041*4882a593SmuzhiyunTo be able to implement the initialization code in C, a (small!)
5042*4882a593Smuzhiyuninitial stack is set up in the internal Dual Ported RAM (in case CPUs
5043*4882a593Smuzhiyunwhich provide such a feature like), or in a locked part of the data
5044*4882a593Smuzhiyuncache. After that, U-Boot initializes the CPU core, the caches and
5045*4882a593Smuzhiyunthe SIU.
5046*4882a593Smuzhiyun
5047*4882a593SmuzhiyunNext, all (potentially) available memory banks are mapped using a
5048*4882a593Smuzhiyunpreliminary mapping. For example, we put them on 512 MB boundaries
5049*4882a593Smuzhiyun(multiples of 0x20000000: SDRAM on 0x00000000 and 0x20000000, Flash
5050*4882a593Smuzhiyunon 0x40000000 and 0x60000000, SRAM on 0x80000000). Then UPM A is
5051*4882a593Smuzhiyunprogrammed for SDRAM access. Using the temporary configuration, a
5052*4882a593Smuzhiyunsimple memory test is run that determines the size of the SDRAM
5053*4882a593Smuzhiyunbanks.
5054*4882a593Smuzhiyun
5055*4882a593SmuzhiyunWhen there is more than one SDRAM bank, and the banks are of
5056*4882a593Smuzhiyundifferent size, the largest is mapped first. For equal size, the first
5057*4882a593Smuzhiyunbank (CS2#) is mapped first. The first mapping is always for address
5058*4882a593Smuzhiyun0x00000000, with any additional banks following immediately to create
5059*4882a593Smuzhiyuncontiguous memory starting from 0.
5060*4882a593Smuzhiyun
5061*4882a593SmuzhiyunThen, the monitor installs itself at the upper end of the SDRAM area
5062*4882a593Smuzhiyunand allocates memory for use by malloc() and for the global Board
5063*4882a593SmuzhiyunInfo data; also, the exception vector code is copied to the low RAM
5064*4882a593Smuzhiyunpages, and the final stack is set up.
5065*4882a593Smuzhiyun
5066*4882a593SmuzhiyunOnly after this relocation will you have a "normal" C environment;
5067*4882a593Smuzhiyununtil that you are restricted in several ways, mostly because you are
5068*4882a593Smuzhiyunrunning from ROM, and because the code will have to be relocated to a
5069*4882a593Smuzhiyunnew address in RAM.
5070*4882a593Smuzhiyun
5071*4882a593Smuzhiyun
5072*4882a593SmuzhiyunU-Boot Porting Guide:
5073*4882a593Smuzhiyun----------------------
5074*4882a593Smuzhiyun
5075*4882a593Smuzhiyun[Based on messages by Jerry Van Baren in the U-Boot-Users mailing
5076*4882a593Smuzhiyunlist, October 2002]
5077*4882a593Smuzhiyun
5078*4882a593Smuzhiyun
5079*4882a593Smuzhiyunint main(int argc, char *argv[])
5080*4882a593Smuzhiyun{
5081*4882a593Smuzhiyun	sighandler_t no_more_time;
5082*4882a593Smuzhiyun
5083*4882a593Smuzhiyun	signal(SIGALRM, no_more_time);
5084*4882a593Smuzhiyun	alarm(PROJECT_DEADLINE - toSec (3 * WEEK));
5085*4882a593Smuzhiyun
5086*4882a593Smuzhiyun	if (available_money > available_manpower) {
5087*4882a593Smuzhiyun		Pay consultant to port U-Boot;
5088*4882a593Smuzhiyun		return 0;
5089*4882a593Smuzhiyun	}
5090*4882a593Smuzhiyun
5091*4882a593Smuzhiyun	Download latest U-Boot source;
5092*4882a593Smuzhiyun
5093*4882a593Smuzhiyun	Subscribe to u-boot mailing list;
5094*4882a593Smuzhiyun
5095*4882a593Smuzhiyun	if (clueless)
5096*4882a593Smuzhiyun		email("Hi, I am new to U-Boot, how do I get started?");
5097*4882a593Smuzhiyun
5098*4882a593Smuzhiyun	while (learning) {
5099*4882a593Smuzhiyun		Read the README file in the top level directory;
5100*4882a593Smuzhiyun		Read http://www.denx.de/twiki/bin/view/DULG/Manual;
5101*4882a593Smuzhiyun		Read applicable doc/*.README;
5102*4882a593Smuzhiyun		Read the source, Luke;
5103*4882a593Smuzhiyun		/* find . -name "*.[chS]" | xargs grep -i <keyword> */
5104*4882a593Smuzhiyun	}
5105*4882a593Smuzhiyun
5106*4882a593Smuzhiyun	if (available_money > toLocalCurrency ($2500))
5107*4882a593Smuzhiyun		Buy a BDI3000;
5108*4882a593Smuzhiyun	else
5109*4882a593Smuzhiyun		Add a lot of aggravation and time;
5110*4882a593Smuzhiyun
5111*4882a593Smuzhiyun	if (a similar board exists) {	/* hopefully... */
5112*4882a593Smuzhiyun		cp -a board/<similar> board/<myboard>
5113*4882a593Smuzhiyun		cp include/configs/<similar>.h include/configs/<myboard>.h
5114*4882a593Smuzhiyun	} else {
5115*4882a593Smuzhiyun		Create your own board support subdirectory;
5116*4882a593Smuzhiyun		Create your own board include/configs/<myboard>.h file;
5117*4882a593Smuzhiyun	}
5118*4882a593Smuzhiyun	Edit new board/<myboard> files
5119*4882a593Smuzhiyun	Edit new include/configs/<myboard>.h
5120*4882a593Smuzhiyun
5121*4882a593Smuzhiyun	while (!accepted) {
5122*4882a593Smuzhiyun		while (!running) {
5123*4882a593Smuzhiyun			do {
5124*4882a593Smuzhiyun				Add / modify source code;
5125*4882a593Smuzhiyun			} until (compiles);
5126*4882a593Smuzhiyun			Debug;
5127*4882a593Smuzhiyun			if (clueless)
5128*4882a593Smuzhiyun				email("Hi, I am having problems...");
5129*4882a593Smuzhiyun		}
5130*4882a593Smuzhiyun		Send patch file to the U-Boot email list;
5131*4882a593Smuzhiyun		if (reasonable critiques)
5132*4882a593Smuzhiyun			Incorporate improvements from email list code review;
5133*4882a593Smuzhiyun		else
5134*4882a593Smuzhiyun			Defend code as written;
5135*4882a593Smuzhiyun	}
5136*4882a593Smuzhiyun
5137*4882a593Smuzhiyun	return 0;
5138*4882a593Smuzhiyun}
5139*4882a593Smuzhiyun
5140*4882a593Smuzhiyunvoid no_more_time (int sig)
5141*4882a593Smuzhiyun{
5142*4882a593Smuzhiyun      hire_a_guru();
5143*4882a593Smuzhiyun}
5144*4882a593Smuzhiyun
5145*4882a593Smuzhiyun
5146*4882a593SmuzhiyunCoding Standards:
5147*4882a593Smuzhiyun-----------------
5148*4882a593Smuzhiyun
5149*4882a593SmuzhiyunAll contributions to U-Boot should conform to the Linux kernel
5150*4882a593Smuzhiyuncoding style; see the kernel coding style guide at
5151*4882a593Smuzhiyunhttps://www.kernel.org/doc/html/latest/process/coding-style.html, and the
5152*4882a593Smuzhiyunscript "scripts/Lindent" in your Linux kernel source directory.
5153*4882a593Smuzhiyun
5154*4882a593SmuzhiyunSource files originating from a different project (for example the
5155*4882a593SmuzhiyunMTD subsystem) are generally exempt from these guidelines and are not
5156*4882a593Smuzhiyunreformatted to ease subsequent migration to newer versions of those
5157*4882a593Smuzhiyunsources.
5158*4882a593Smuzhiyun
5159*4882a593SmuzhiyunPlease note that U-Boot is implemented in C (and to some small parts in
5160*4882a593SmuzhiyunAssembler); no C++ is used, so please do not use C++ style comments (//)
5161*4882a593Smuzhiyunin your code.
5162*4882a593Smuzhiyun
5163*4882a593SmuzhiyunPlease also stick to the following formatting rules:
5164*4882a593Smuzhiyun- remove any trailing white space
5165*4882a593Smuzhiyun- use TAB characters for indentation and vertical alignment, not spaces
5166*4882a593Smuzhiyun- make sure NOT to use DOS '\r\n' line feeds
5167*4882a593Smuzhiyun- do not add more than 2 consecutive empty lines to source files
5168*4882a593Smuzhiyun- do not add trailing empty lines to source files
5169*4882a593Smuzhiyun
5170*4882a593SmuzhiyunSubmissions which do not conform to the standards may be returned
5171*4882a593Smuzhiyunwith a request to reformat the changes.
5172*4882a593Smuzhiyun
5173*4882a593Smuzhiyun
5174*4882a593SmuzhiyunSubmitting Patches:
5175*4882a593Smuzhiyun-------------------
5176*4882a593Smuzhiyun
5177*4882a593SmuzhiyunSince the number of patches for U-Boot is growing, we need to
5178*4882a593Smuzhiyunestablish some rules. Submissions which do not conform to these rules
5179*4882a593Smuzhiyunmay be rejected, even when they contain important and valuable stuff.
5180*4882a593Smuzhiyun
5181*4882a593SmuzhiyunPlease see http://www.denx.de/wiki/U-Boot/Patches for details.
5182*4882a593Smuzhiyun
5183*4882a593SmuzhiyunPatches shall be sent to the u-boot mailing list <u-boot@lists.denx.de>;
5184*4882a593Smuzhiyunsee https://lists.denx.de/listinfo/u-boot
5185*4882a593Smuzhiyun
5186*4882a593SmuzhiyunWhen you send a patch, please include the following information with
5187*4882a593Smuzhiyunit:
5188*4882a593Smuzhiyun
5189*4882a593Smuzhiyun* For bug fixes: a description of the bug and how your patch fixes
5190*4882a593Smuzhiyun  this bug. Please try to include a way of demonstrating that the
5191*4882a593Smuzhiyun  patch actually fixes something.
5192*4882a593Smuzhiyun
5193*4882a593Smuzhiyun* For new features: a description of the feature and your
5194*4882a593Smuzhiyun  implementation.
5195*4882a593Smuzhiyun
5196*4882a593Smuzhiyun* A CHANGELOG entry as plaintext (separate from the patch)
5197*4882a593Smuzhiyun
5198*4882a593Smuzhiyun* For major contributions, add a MAINTAINERS file with your
5199*4882a593Smuzhiyun  information and associated file and directory references.
5200*4882a593Smuzhiyun
5201*4882a593Smuzhiyun* When you add support for a new board, don't forget to add a
5202*4882a593Smuzhiyun  maintainer e-mail address to the boards.cfg file, too.
5203*4882a593Smuzhiyun
5204*4882a593Smuzhiyun* If your patch adds new configuration options, don't forget to
5205*4882a593Smuzhiyun  document these in the README file.
5206*4882a593Smuzhiyun
5207*4882a593Smuzhiyun* The patch itself. If you are using git (which is *strongly*
5208*4882a593Smuzhiyun  recommended) you can easily generate the patch using the
5209*4882a593Smuzhiyun  "git format-patch". If you then use "git send-email" to send it to
5210*4882a593Smuzhiyun  the U-Boot mailing list, you will avoid most of the common problems
5211*4882a593Smuzhiyun  with some other mail clients.
5212*4882a593Smuzhiyun
5213*4882a593Smuzhiyun  If you cannot use git, use "diff -purN OLD NEW". If your version of
5214*4882a593Smuzhiyun  diff does not support these options, then get the latest version of
5215*4882a593Smuzhiyun  GNU diff.
5216*4882a593Smuzhiyun
5217*4882a593Smuzhiyun  The current directory when running this command shall be the parent
5218*4882a593Smuzhiyun  directory of the U-Boot source tree (i. e. please make sure that
5219*4882a593Smuzhiyun  your patch includes sufficient directory information for the
5220*4882a593Smuzhiyun  affected files).
5221*4882a593Smuzhiyun
5222*4882a593Smuzhiyun  We prefer patches as plain text. MIME attachments are discouraged,
5223*4882a593Smuzhiyun  and compressed attachments must not be used.
5224*4882a593Smuzhiyun
5225*4882a593Smuzhiyun* If one logical set of modifications affects or creates several
5226*4882a593Smuzhiyun  files, all these changes shall be submitted in a SINGLE patch file.
5227*4882a593Smuzhiyun
5228*4882a593Smuzhiyun* Changesets that contain different, unrelated modifications shall be
5229*4882a593Smuzhiyun  submitted as SEPARATE patches, one patch per changeset.
5230*4882a593Smuzhiyun
5231*4882a593Smuzhiyun
5232*4882a593SmuzhiyunNotes:
5233*4882a593Smuzhiyun
5234*4882a593Smuzhiyun* Before sending the patch, run the buildman script on your patched
5235*4882a593Smuzhiyun  source tree and make sure that no errors or warnings are reported
5236*4882a593Smuzhiyun  for any of the boards.
5237*4882a593Smuzhiyun
5238*4882a593Smuzhiyun* Keep your modifications to the necessary minimum: A patch
5239*4882a593Smuzhiyun  containing several unrelated changes or arbitrary reformats will be
5240*4882a593Smuzhiyun  returned with a request to re-formatting / split it.
5241*4882a593Smuzhiyun
5242*4882a593Smuzhiyun* If you modify existing code, make sure that your new code does not
5243*4882a593Smuzhiyun  add to the memory footprint of the code ;-) Small is beautiful!
5244*4882a593Smuzhiyun  When adding new features, these should compile conditionally only
5245*4882a593Smuzhiyun  (using #ifdef), and the resulting code with the new feature
5246*4882a593Smuzhiyun  disabled must not need more memory than the old code without your
5247*4882a593Smuzhiyun  modification.
5248*4882a593Smuzhiyun
5249*4882a593Smuzhiyun* Remember that there is a size limit of 100 kB per message on the
5250*4882a593Smuzhiyun  u-boot mailing list. Bigger patches will be moderated. If they are
5251*4882a593Smuzhiyun  reasonable and not too big, they will be acknowledged. But patches
5252*4882a593Smuzhiyun  bigger than the size limit should be avoided.
5253