xref: /OK3568_Linux_fs/u-boot/doc/README.distro (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun * (C) Copyright 2014 Red Hat Inc.
3*4882a593Smuzhiyun * Copyright (c) 2014-2015, NVIDIA CORPORATION.  All rights reserved.
4*4882a593Smuzhiyun * Copyright (C) 2015 K. Merker <merker@debian.org>
5*4882a593Smuzhiyun *
6*4882a593Smuzhiyun * SPDX-License-Identifier:     GPL-2.0+
7*4882a593Smuzhiyun */
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunGeneric Distro Configuration Concept
10*4882a593Smuzhiyun====================================
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunLinux distributions are faced with supporting a variety of boot mechanisms,
13*4882a593Smuzhiyunenvironments or bootloaders (PC BIOS, EFI, U-Boot, Barebox, ...). This makes
14*4882a593Smuzhiyunlife complicated. Worse, bootloaders such as U-Boot have a configurable set
15*4882a593Smuzhiyunof features, and each board chooses to enable a different set of features.
16*4882a593SmuzhiyunHence, distros typically need to have board-specific knowledge in order to
17*4882a593Smuzhiyunset up a bootable system.
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunThis document defines a common set of U-Boot features that are required for
20*4882a593Smuzhiyuna distro to support the board in a generic fashion. Any board wishing to
21*4882a593Smuzhiyunallow distros to install and boot in an out-of-the-box fashion should enable
22*4882a593Smuzhiyunall these features. Linux distros can then create a single set of boot
23*4882a593Smuzhiyunsupport/install logic that targets these features. This will allow distros
24*4882a593Smuzhiyunto install on many boards without the need for board-specific logic.
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunIn fact, some of these features can be implemented by any bootloader, thus
27*4882a593Smuzhiyundecoupling distro install/boot logic from any knowledge of the bootloader.
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunThis model assumes that boards will load boot configuration files from a
30*4882a593Smuzhiyunregular storage mechanism (eMMC, SD card, USB Disk, SATA disk, etc.) with
31*4882a593Smuzhiyuna standard partitioning scheme (MBR, GPT). Boards that cannot support this
32*4882a593Smuzhiyunstorage model are outside the scope of this document, and may still need
33*4882a593Smuzhiyunboard-specific installer/boot-configuration support in a distro.
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunTo some extent, this model assumes that a board has a separate boot flash
36*4882a593Smuzhiyunthat contains U-Boot, and that the user has somehow installed U-Boot to this
37*4882a593Smuzhiyunflash before running the distro installer. Even on boards that do not conform
38*4882a593Smuzhiyunto this aspect of the model, the extent of the board-specific support in the
39*4882a593Smuzhiyundistro installer logic would be to install a board-specific U-Boot package to
40*4882a593Smuzhiyunthe boot partition during installation. This distro-supplied U-Boot can still
41*4882a593Smuzhiyunimplement the same features as on any other board, and hence the distro's boot
42*4882a593Smuzhiyunconfiguration file generation logic can still be board-agnostic.
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunLocating Bootable Disks
45*4882a593Smuzhiyun-----------------------
46*4882a593Smuzhiyun
47*4882a593SmuzhiyunTypical desktop/server PCs search all (or a user-defined subset of) attached
48*4882a593Smuzhiyunstorage devices for a bootable partition, then load the bootloader or boot
49*4882a593Smuzhiyunconfiguration files from there. A U-Boot board port that enables the features
50*4882a593Smuzhiyunmentioned in this document will search for boot configuration files in the
51*4882a593Smuzhiyunsame way.
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunThus, distros do not need to manipulate any kind of bootloader-specific
54*4882a593Smuzhiyunconfiguration data to indicate which storage device the system should boot
55*4882a593Smuzhiyunfrom.
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunDistros simply need to install the boot configuration files (see next
58*4882a593Smuzhiyunsection) in an ext2/3/4 or FAT partition, mark the partition bootable (via
59*4882a593Smuzhiyunthe MBR bootable flag, or GPT legacy_bios_bootable attribute), and U-Boot (or
60*4882a593Smuzhiyunany other bootloader) will find those boot files and execute them. This is
61*4882a593Smuzhiyunconceptually identical to creating a grub2 configuration file on a desktop
62*4882a593SmuzhiyunPC.
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunNote that in the absence of any partition that is explicitly marked bootable,
65*4882a593SmuzhiyunU-Boot falls back to searching the first valid partition of a disk for boot
66*4882a593Smuzhiyunconfiguration files. Other bootloaders are recommended to do the same, since
67*4882a593SmuzhiyunI believe that partition table bootable flags aren't so commonly used outside
68*4882a593Smuzhiyunthe realm of x86 PCs.
69*4882a593Smuzhiyun
70*4882a593SmuzhiyunU-Boot can also search for boot configuration files from a TFTP server.
71*4882a593Smuzhiyun
72*4882a593SmuzhiyunBoot Configuration Files
73*4882a593Smuzhiyun------------------------
74*4882a593Smuzhiyun
75*4882a593SmuzhiyunThe standard format for boot configuration files is that of extlinux.conf, as
76*4882a593Smuzhiyunhandled by U-Boot's "syslinux" (disk) or "pxe boot" (network). This is roughly
77*4882a593Smuzhiyunas specified at:
78*4882a593Smuzhiyun
79*4882a593Smuzhiyunhttp://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun... with the exceptions that the BootLoaderSpec document:
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun* Prescribes a separate configuration per boot menu option, whereas U-Boot
84*4882a593Smuzhiyun  lumps all options into a single extlinux.conf file. Hence, U-Boot searches
85*4882a593Smuzhiyun  for /extlinux/extlinux.conf then /boot/extlinux/extlinux.conf on disk, or
86*4882a593Smuzhiyun  pxelinux.cfg/default over the network.
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun* Does not document the fdtdir option, which automatically selects the DTB to
89*4882a593Smuzhiyun  pass to the kernel.
90*4882a593Smuzhiyun
91*4882a593SmuzhiyunOne example extlinux.conf generated by the Fedora installer is:
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun------------------------------------------------------------
94*4882a593Smuzhiyun# extlinux.conf generated by anaconda
95*4882a593Smuzhiyun
96*4882a593Smuzhiyunui menu.c32
97*4882a593Smuzhiyun
98*4882a593Smuzhiyunmenu autoboot Welcome to Fedora. Automatic boot in # second{,s}. Press a key for options.
99*4882a593Smuzhiyunmenu title Fedora Boot Options.
100*4882a593Smuzhiyunmenu hidden
101*4882a593Smuzhiyun
102*4882a593Smuzhiyuntimeout 50
103*4882a593Smuzhiyun#totaltimeout 9000
104*4882a593Smuzhiyun
105*4882a593Smuzhiyundefault Fedora (3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae) 22 (Rawhide)
106*4882a593Smuzhiyun
107*4882a593Smuzhiyunlabel Fedora (3.17.0-0.rc4.git2.1.fc22.armv7hl) 22 (Rawhide)
108*4882a593Smuzhiyun	kernel /boot/vmlinuz-3.17.0-0.rc4.git2.1.fc22.armv7hl
109*4882a593Smuzhiyun	append ro root=UUID=8eac677f-8ea8-4270-8479-d5ddbb797450 console=ttyS0,115200n8 LANG=en_US.UTF-8 drm.debug=0xf
110*4882a593Smuzhiyun	fdtdir /boot/dtb-3.17.0-0.rc4.git2.1.fc22.armv7hl
111*4882a593Smuzhiyun	initrd /boot/initramfs-3.17.0-0.rc4.git2.1.fc22.armv7hl.img
112*4882a593Smuzhiyun
113*4882a593Smuzhiyunlabel Fedora (3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae) 22 (Rawhide)
114*4882a593Smuzhiyun	kernel /boot/vmlinuz-3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae
115*4882a593Smuzhiyun	append ro root=UUID=8eac677f-8ea8-4270-8479-d5ddbb797450 console=ttyS0,115200n8 LANG=en_US.UTF-8 drm.debug=0xf
116*4882a593Smuzhiyun	fdtdir /boot/dtb-3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae
117*4882a593Smuzhiyun	initrd /boot/initramfs-3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae.img
118*4882a593Smuzhiyun
119*4882a593Smuzhiyunlabel Fedora-0-rescue-8f6ba7b039524e0eb957d2c9203f04bc (0-rescue-8f6ba7b039524e0eb957d2c9203f04bc)
120*4882a593Smuzhiyun	kernel /boot/vmlinuz-0-rescue-8f6ba7b039524e0eb957d2c9203f04bc
121*4882a593Smuzhiyun	initrd /boot/initramfs-0-rescue-8f6ba7b039524e0eb957d2c9203f04bc.img
122*4882a593Smuzhiyun	append ro root=UUID=8eac677f-8ea8-4270-8479-d5ddbb797450 console=ttyS0,115200n8
123*4882a593Smuzhiyun	fdtdir /boot/dtb-3.16.0-0.rc6.git1.1.fc22.armv7hl+lpae
124*4882a593Smuzhiyun------------------------------------------------------------
125*4882a593Smuzhiyun
126*4882a593SmuzhiyunAnother hand-crafted network boot configuration file is:
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun------------------------------------------------------------
129*4882a593SmuzhiyunTIMEOUT 100
130*4882a593Smuzhiyun
131*4882a593SmuzhiyunMENU TITLE TFTP boot options
132*4882a593Smuzhiyun
133*4882a593SmuzhiyunLABEL jetson-tk1-emmc
134*4882a593Smuzhiyun        MENU LABEL ../zImage root on Jetson TK1 eMMC
135*4882a593Smuzhiyun        LINUX ../zImage
136*4882a593Smuzhiyun        FDTDIR ../
137*4882a593Smuzhiyun        APPEND console=ttyS0,115200n8 console=tty1 loglevel=8 rootwait rw earlyprintk root=PARTUUID=80a5a8e9-c744-491a-93c1-4f4194fd690b
138*4882a593Smuzhiyun
139*4882a593SmuzhiyunLABEL venice2-emmc
140*4882a593Smuzhiyun        MENU LABEL ../zImage root on Venice2 eMMC
141*4882a593Smuzhiyun        LINUX ../zImage
142*4882a593Smuzhiyun        FDTDIR ../
143*4882a593Smuzhiyun        APPEND console=ttyS0,115200n8 console=tty1 loglevel=8 rootwait rw earlyprintk root=PARTUUID=5f71e06f-be08-48ed-b1ef-ee4800cc860f
144*4882a593Smuzhiyun
145*4882a593SmuzhiyunLABEL sdcard
146*4882a593Smuzhiyun        MENU LABEL ../zImage, root on 2GB sdcard
147*4882a593Smuzhiyun        LINUX ../zImage
148*4882a593Smuzhiyun        FDTDIR ../
149*4882a593Smuzhiyun        APPEND console=ttyS0,115200n8 console=tty1 loglevel=8 rootwait rw earlyprintk root=PARTUUID=b2f82cda-2535-4779-b467-094a210fbae7
150*4882a593Smuzhiyun
151*4882a593SmuzhiyunLABEL fedora-installer-fk
152*4882a593Smuzhiyun        MENU LABEL Fedora installer w/ Fedora kernel
153*4882a593Smuzhiyun        LINUX fedora-installer/vmlinuz
154*4882a593Smuzhiyun        INITRD fedora-installer/initrd.img.orig
155*4882a593Smuzhiyun        FDTDIR fedora-installer/dtb
156*4882a593Smuzhiyun        APPEND loglevel=8 ip=dhcp inst.repo=http://10.0.0.2/mirrors/fedora/linux/development/rawhide/armhfp/os/ rd.shell cma=64M
157*4882a593Smuzhiyun------------------------------------------------------------
158*4882a593Smuzhiyun
159*4882a593SmuzhiyunU-Boot Implementation
160*4882a593Smuzhiyun=====================
161*4882a593Smuzhiyun
162*4882a593SmuzhiyunEnabling the distro options
163*4882a593Smuzhiyun---------------------------
164*4882a593Smuzhiyun
165*4882a593SmuzhiyunIn your board's defconfig, enable the DISTRO_DEFAULTS option by adding
166*4882a593Smuzhiyuna line with "CONFIG_DISTRO_DEFAULTS=y". If you want to enable this
167*4882a593Smuzhiyunfrom Kconfig itself, for e.g. all boards using a specific SoC then
168*4882a593Smuzhiyunadd a "default y if ARCH_FOO" to the DISTRO_DEFAULTS section of
169*4882a593Smuzhiyunthe Kconfig file in the root of the u-boot sources.
170*4882a593Smuzhiyun
171*4882a593SmuzhiyunIn your board configuration file, include the following:
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun------------------------------------------------------------
174*4882a593Smuzhiyun#ifndef CONFIG_SPL_BUILD
175*4882a593Smuzhiyun#include <config_distro_defaults.h>
176*4882a593Smuzhiyun#include <config_distro_bootcmd.h>
177*4882a593Smuzhiyun#endif
178*4882a593Smuzhiyun------------------------------------------------------------
179*4882a593Smuzhiyun
180*4882a593SmuzhiyunThe first of those headers primarily enables a core set of U-Boot features,
181*4882a593Smuzhiyunsuch as support for MBR and GPT partitions, ext* and FAT filesystems, booting
182*4882a593Smuzhiyunraw zImage and initrd (rather than FIT- or uImage-wrapped files), etc. Network
183*4882a593Smuzhiyunboot support is also enabled here, which is useful in order to boot distro
184*4882a593Smuzhiyuninstallers given that distros do not commonly distribute bootable install
185*4882a593Smuzhiyunmedia for non-PC targets at present.
186*4882a593Smuzhiyun
187*4882a593SmuzhiyunFinally, a few options that are mostly relevant only when using U-Boot-
188*4882a593Smuzhiyunspecific boot.scr scripts are enabled. This enables distros to generate a
189*4882a593SmuzhiyunU-Boot-specific boot.scr script rather than extlinux.conf as the boot
190*4882a593Smuzhiyunconfiguration file. While doing so is fully supported, and
191*4882a593Smuzhiyun<config_distro_defaults.h> exposes enough parameterization to boot.scr to
192*4882a593Smuzhiyunallow for board-agnostic boot.scr content, this document recommends that
193*4882a593Smuzhiyundistros generate extlinux.conf rather than boot.scr. extlinux.conf is intended
194*4882a593Smuzhiyunto work across multiple bootloaders, whereas boot.scr will only work with
195*4882a593SmuzhiyunU-Boot. TODO: document the contract between U-Boot and boot.scr re: which
196*4882a593Smuzhiyunenvironment variables a generic boot.scr may rely upon.
197*4882a593Smuzhiyun
198*4882a593SmuzhiyunThe second of those headers sets up the default environment so that $bootcmd
199*4882a593Smuzhiyunis defined in a way that searches attached disks for boot configuration files,
200*4882a593Smuzhiyunand executes them if found.
201*4882a593Smuzhiyun
202*4882a593SmuzhiyunRequired Environment Variables
203*4882a593Smuzhiyun------------------------------
204*4882a593Smuzhiyun
205*4882a593SmuzhiyunThe U-Boot "syslinux" and "pxe boot" commands require a number of environment
206*4882a593Smuzhiyunvariables be set. Default values for these variables are often hard-coded into
207*4882a593SmuzhiyunCONFIG_EXTRA_ENV_SETTINGS in the board's U-Boot configuration file, so that
208*4882a593Smuzhiyunthe user doesn't have to configure them.
209*4882a593Smuzhiyun
210*4882a593Smuzhiyunfdt_addr:
211*4882a593Smuzhiyun
212*4882a593Smuzhiyun  Mandatory for any system that provides the DTB in HW (e.g. ROM) and wishes
213*4882a593Smuzhiyun  to pass that DTB to Linux, rather than loading a DTB from the boot
214*4882a593Smuzhiyun  filesystem. Prohibited for any other system.
215*4882a593Smuzhiyun
216*4882a593Smuzhiyun  If specified a DTB to boot the system must be available at the given
217*4882a593Smuzhiyun  address.
218*4882a593Smuzhiyun
219*4882a593Smuzhiyunfdt_addr_r:
220*4882a593Smuzhiyun
221*4882a593Smuzhiyun  Mandatory. The location in RAM where the DTB will be loaded or copied to when
222*4882a593Smuzhiyun  processing the fdtdir/devicetreedir or fdt/devicetree options in
223*4882a593Smuzhiyun  extlinux.conf.
224*4882a593Smuzhiyun
225*4882a593Smuzhiyun  This is mandatory even when fdt_addr is provided, since extlinux.conf must
226*4882a593Smuzhiyun  always be able to provide a DTB which overrides any copy provided by the HW.
227*4882a593Smuzhiyun
228*4882a593Smuzhiyun  A size of 1MB for the FDT/DTB seems reasonable.
229*4882a593Smuzhiyun
230*4882a593Smuzhiyunramdisk_addr_r:
231*4882a593Smuzhiyun
232*4882a593Smuzhiyun  Mandatory. The location in RAM where the initial ramdisk will be loaded to
233*4882a593Smuzhiyun  when processing the initrd option in extlinux.conf.
234*4882a593Smuzhiyun
235*4882a593Smuzhiyun  It is recommended that this location be highest in RAM out of fdt_addr_,
236*4882a593Smuzhiyun  kernel_addr_r, and ramdisk_addr_r, so that the RAM disk can vary in size
237*4882a593Smuzhiyun  and use any available RAM.
238*4882a593Smuzhiyun
239*4882a593Smuzhiyunkernel_addr_r:
240*4882a593Smuzhiyun
241*4882a593Smuzhiyun  Mandatory. The location in RAM where the kernel will be loaded to when
242*4882a593Smuzhiyun  processing the kernel option in the extlinux.conf.
243*4882a593Smuzhiyun
244*4882a593Smuzhiyun  The kernel should be located within the first 128M of RAM in order for the
245*4882a593Smuzhiyun  kernel CONFIG_AUTO_ZRELADDR option to work, which is likely enabled on any
246*4882a593Smuzhiyun  distro kernel. Since the kernel will decompress itself to 0x8000 after the
247*4882a593Smuzhiyun  start of RAM, kernel_addr_r should not overlap that area, or the kernel will
248*4882a593Smuzhiyun  have to copy itself somewhere else first before decompression.
249*4882a593Smuzhiyun
250*4882a593Smuzhiyun  A size of 16MB for the kernel is likely adequate.
251*4882a593Smuzhiyun
252*4882a593Smuzhiyunpxefile_addr_r:
253*4882a593Smuzhiyun
254*4882a593Smuzhiyun  Mandatory. The location in RAM where extlinux.conf will be loaded to prior
255*4882a593Smuzhiyun  to processing.
256*4882a593Smuzhiyun
257*4882a593Smuzhiyun  A size of 1MB for extlinux.conf is more than adequate.
258*4882a593Smuzhiyun
259*4882a593Smuzhiyunscriptaddr:
260*4882a593Smuzhiyun
261*4882a593Smuzhiyun  Mandatory, if the boot script is boot.scr rather than extlinux.conf. The
262*4882a593Smuzhiyun  location in RAM where boot.scr will be loaded to prior to execution.
263*4882a593Smuzhiyun
264*4882a593Smuzhiyun  A size of 1MB for extlinux.conf is more than adequate.
265*4882a593Smuzhiyun
266*4882a593SmuzhiyunFor suggestions on memory locations for ARM systems, you must follow the
267*4882a593Smuzhiyunguidelines specified in Documentation/arm/Booting in the Linux kernel tree.
268*4882a593Smuzhiyun
269*4882a593SmuzhiyunFor a commented example of setting these values, please see the definition of
270*4882a593SmuzhiyunMEM_LAYOUT_ENV_SETTINGS in include/configs/tegra124-common.h.
271*4882a593Smuzhiyun
272*4882a593SmuzhiyunBoot Target Configuration
273*4882a593Smuzhiyun-------------------------
274*4882a593Smuzhiyun
275*4882a593Smuzhiyun<config_distro_bootcmd.h> defines $bootcmd and many helper command variables
276*4882a593Smuzhiyunthat automatically search attached disks for boot configuration files and
277*4882a593Smuzhiyunexecute them. Boards must provide configure <config_distro_bootcmd.h> so that
278*4882a593Smuzhiyunit supports the correct set of possible boot device types. To provide this
279*4882a593Smuzhiyunconfiguration, simply define macro BOOT_TARGET_DEVICES prior to including
280*4882a593Smuzhiyun<config_distro_bootcmd.h>. For example:
281*4882a593Smuzhiyun
282*4882a593Smuzhiyun------------------------------------------------------------
283*4882a593Smuzhiyun#ifndef CONFIG_SPL_BUILD
284*4882a593Smuzhiyun#define BOOT_TARGET_DEVICES(func) \
285*4882a593Smuzhiyun        func(MMC, mmc, 1) \
286*4882a593Smuzhiyun        func(MMC, mmc, 0) \
287*4882a593Smuzhiyun        func(USB, usb, 0) \
288*4882a593Smuzhiyun        func(PXE, pxe, na) \
289*4882a593Smuzhiyun        func(DHCP, dhcp, na)
290*4882a593Smuzhiyun#include <config_distro_bootcmd.h>
291*4882a593Smuzhiyun#endif
292*4882a593Smuzhiyun------------------------------------------------------------
293*4882a593Smuzhiyun
294*4882a593SmuzhiyunEach entry in the macro defines a single boot device (e.g. a specific eMMC
295*4882a593Smuzhiyundevice or SD card) or type of boot device (e.g. USB disk). The parameters to
296*4882a593Smuzhiyunthe func macro (passed in by the internal implementation of the header) are:
297*4882a593Smuzhiyun
298*4882a593Smuzhiyun- Upper-case disk type (MMC, SATA, SCSI, IDE, USB, DHCP, PXE).
299*4882a593Smuzhiyun- Lower-case disk type (same options as above).
300*4882a593Smuzhiyun- ID of the specific disk (MMC only) or ignored for other types.
301*4882a593Smuzhiyun
302*4882a593SmuzhiyunUser Configuration
303*4882a593Smuzhiyun==================
304*4882a593Smuzhiyun
305*4882a593SmuzhiyunOnce the user has installed U-Boot, it is expected that the environment will
306*4882a593Smuzhiyunbe reset to the default values in order to enable $bootcmd and friends, as set
307*4882a593Smuzhiyunup by <config_distro_bootcmd.h>. After this, various environment variables may
308*4882a593Smuzhiyunbe altered to influence the boot process:
309*4882a593Smuzhiyun
310*4882a593Smuzhiyunboot_targets:
311*4882a593Smuzhiyun
312*4882a593Smuzhiyun  The list of boot locations searched.
313*4882a593Smuzhiyun
314*4882a593Smuzhiyun  Example: mmc0, mmc1, usb, pxe
315*4882a593Smuzhiyun
316*4882a593Smuzhiyun  Entries may be removed or re-ordered in this list to affect the boot order.
317*4882a593Smuzhiyun
318*4882a593Smuzhiyunboot_prefixes:
319*4882a593Smuzhiyun
320*4882a593Smuzhiyun  For disk-based booting, the list of directories within a partition that are
321*4882a593Smuzhiyun  searched for boot configuration files (extlinux.conf, boot.scr).
322*4882a593Smuzhiyun
323*4882a593Smuzhiyun  Example: / /boot/
324*4882a593Smuzhiyun
325*4882a593Smuzhiyun  Entries may be removed or re-ordered in this list to affect the set of
326*4882a593Smuzhiyun  directories which are searched.
327*4882a593Smuzhiyun
328*4882a593Smuzhiyunboot_scripts:
329*4882a593Smuzhiyun
330*4882a593Smuzhiyun  The name of U-Boot style boot.scr files that $bootcmd searches for.
331*4882a593Smuzhiyun
332*4882a593Smuzhiyun  Example: boot.scr.uimg boot.scr
333*4882a593Smuzhiyun
334*4882a593Smuzhiyun  (Typically we expect extlinux.conf to be used, but execution of boot.scr is
335*4882a593Smuzhiyun  maintained for backwards-compatibility.)
336*4882a593Smuzhiyun
337*4882a593Smuzhiyun  Entries may be removed or re-ordered in this list to affect the set of
338*4882a593Smuzhiyun  filenames which are supported.
339*4882a593Smuzhiyun
340*4882a593Smuzhiyunscan_dev_for_extlinux:
341*4882a593Smuzhiyun
342*4882a593Smuzhiyun  If you want to disable extlinux.conf on all disks, set the value to something
343*4882a593Smuzhiyun  innocuous, e.g. setenv scan_dev_for_extlinux true.
344*4882a593Smuzhiyun
345*4882a593Smuzhiyunscan_dev_for_scripts:
346*4882a593Smuzhiyun
347*4882a593Smuzhiyun  If you want to disable boot.scr on all disks, set the value to something
348*4882a593Smuzhiyun  innocuous, e.g. setenv scan_dev_for_scripts true.
349*4882a593Smuzhiyun
350*4882a593Smuzhiyunboot_net_usb_start:
351*4882a593Smuzhiyun
352*4882a593Smuzhiyun  If you want to prevent USB enumeration by distro boot commands which execute
353*4882a593Smuzhiyun  network operations, set the value to something innocuous, e.g. setenv
354*4882a593Smuzhiyun  boot_net_usb_start true. This would be useful if you know your Ethernet
355*4882a593Smuzhiyun  device is not attached to USB, and you wish to increase boot speed by
356*4882a593Smuzhiyun  avoiding unnecessary actions.
357*4882a593Smuzhiyun
358*4882a593Smuzhiyunboot_net_pci_enum:
359*4882a593Smuzhiyun
360*4882a593Smuzhiyun  If you want to prevent PCI enumeration by distro boot commands which execute
361*4882a593Smuzhiyun  network operations, set the value to something innocuous, e.g. setenv
362*4882a593Smuzhiyun  boot_net_pci_enum true. This would be useful if you know your Ethernet
363*4882a593Smuzhiyun  device is not attached to PCI, and you wish to increase boot speed by
364*4882a593Smuzhiyun  avoiding unnecessary actions.
365*4882a593Smuzhiyun
366*4882a593SmuzhiyunInteractively booting from a specific device at the u-boot prompt
367*4882a593Smuzhiyun=================================================================
368*4882a593Smuzhiyun
369*4882a593SmuzhiyunFor interactively booting from a user-selected device at the u-boot command
370*4882a593Smuzhiyunprompt, the environment provides predefined bootcmd_<target> variables for
371*4882a593Smuzhiyunevery target defined in boot_targets, which can be run be the user.
372*4882a593Smuzhiyun
373*4882a593SmuzhiyunIf the target is a storage device, the format of the target is always
374*4882a593Smuzhiyun<device type><device number>, e.g. mmc0.  Specifying the device number is
375*4882a593Smuzhiyunmandatory for storage devices, even if only support for a single instance
376*4882a593Smuzhiyunof the storage device is actually implemented.
377*4882a593Smuzhiyun
378*4882a593SmuzhiyunFor network targets (dhcp, pxe), only the device type gets specified;
379*4882a593Smuzhiyunthey do not have a device number.
380*4882a593Smuzhiyun
381*4882a593SmuzhiyunExamples:
382*4882a593Smuzhiyun
383*4882a593Smuzhiyun - run bootcmd_usb0
384*4882a593Smuzhiyun   boots from the first USB mass storage device
385*4882a593Smuzhiyun
386*4882a593Smuzhiyun - run bootcmd_mmc1
387*4882a593Smuzhiyun   boots from the second MMC device
388*4882a593Smuzhiyun
389*4882a593Smuzhiyun - run bootcmd_pxe
390*4882a593Smuzhiyun   boots by tftp using a pxelinux.cfg
391*4882a593Smuzhiyun
392*4882a593SmuzhiyunThe list of possible targets consists of:
393*4882a593Smuzhiyun
394*4882a593Smuzhiyun- network targets
395*4882a593Smuzhiyun  * dhcp
396*4882a593Smuzhiyun  * pxe
397*4882a593Smuzhiyun
398*4882a593Smuzhiyun- storage targets (to which a device number must be appended)
399*4882a593Smuzhiyun  * mmc
400*4882a593Smuzhiyun  * sata
401*4882a593Smuzhiyun  * scsi
402*4882a593Smuzhiyun  * ide
403*4882a593Smuzhiyun  * usb
404*4882a593Smuzhiyun
405*4882a593SmuzhiyunOther *boot* variables than the ones defined above are only for internal use
406*4882a593Smuzhiyunof the boot environment and are not guaranteed to exist or work in the same
407*4882a593Smuzhiyunway in future u-boot versions.  In particular the <device type>_boot
408*4882a593Smuzhiyunvariables (e.g. mmc_boot, usb_boot) are a strictly internal implementation
409*4882a593Smuzhiyundetail and must not be used as a public interface.
410