-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathREADME-custom
115 lines (84 loc) · 4.36 KB
/
README-custom
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
An explanation of the custom U-Boot boot scripts/variables in u-boot.txt
bootcmd (what the "boot" command executes) run preset, bootset,
bootenv, bootload and bootstart in that order. Note, when
run in a sequence with a single run command, it will abort
if any individual script fails.
Main boot scripts:
preset initialize default values. Environment variables take
precedence over shell variables.
bootset set up the bootenv variable, attempts to load and import
uEnv.txt file, sets some default values and determines the
name of the dtb file based on the (automatically set) cpu
and board variables.
bootenv this variable is set up in the bootset script, with a possible
override from a uEnv.txt file. It's executed after bootset,
which allows for variable expansion.
bootload load the kernel or boot script file, optionally loads the
dtb file, sets the correct bootrun value.
bootstart execute what's in the bootrun variable.
Auxiliary (set-up) scripts, execute with "run <script>", e.g. "run reset"
reset reset all of the parameter variabbles to default (mostly by
deleting them)
serialcon set stdin, stdout, stderr variables for serial-only console;
leaves USB keyboard enabled; also sets console variable for
kernel serial console.
videocon set stdin, stdout, stderr variables for video-only console;
leaves serial input enabled; clears console variable for
kernel, setting default (video) console.
usb run reset script, set bootdev to usb; also does a usb rescan
to pick up any new USB devices.
mmc run reset script (leaving bootdev default to SD card); also
does a mmc rescan to reload any SD card inserted.
old_kern set variables to boot from old kernel (uImage with no dtb)
new_keren reset variables to boot from new kernel (zImage with dtb),
this is the default
setmmc set root variable corresponding to rootdev
setusb for mmc/usb, rootpart used to set partition name
setlabel use rootlabel for root name (e.g. LABEL=arch-root)
Variables/parameters:
bootargs normally set by running bootenv variable, this is the kernel
command line, default is "$root $video $console $bootextra"
bootdev device (mmc, usb) to load files from, default mmc
bootunit unit to load files from, currently always 0
bootpart partition to load files from, default 1
bootroot directory to load files from, default /boot/
envfile environment file to load, default ${bootroot}uEnv.txt
bootfile kernel file name, default zImage
bootkern command to boot kernel (bootm or bootz) or script (source),
default bootz
loadfile kernel or script file name, default $bootfile
rootdev device (mmc, usb) that system root is on, default $bootdev
rootunit unit that system root is on, default $bootunit
rootpart partition that system root is on, default $bootpart
rootfs file system type of system root, default ext4 (which usually
works for ext2 and ext3)
rootextra options to pass to kernel related to mounting root,
default "rootfstype=$rootfs ro rootwait"
rootlabel used for root device if rootdev is "label", see man pages
for mount, blkid, fstab for more information.
rootlabel is NOT cleared by "run reset". Example:
PARTUUID=2fc08b14-02
Kernel only supports partition UUID at this time, not
UUID=, LABEL= or PARTLABEL=
fdt_load if "yes", load a dtb file, default yes
fdt_dev device to load dtb files from, default $bootdev
fdt_unit unit to load dtb files from, default $bootunit
fdt_part partition to load dtb files from, default $bootpart
fdt_dir directory to load dtb files from, default ${bootpart}dts/
fdt_file dtb file name, normally calculated (e.g.
/boot/dts/imx6q-cubox-i.dtb)
console set with "run serialcon" or cleared with "run videocon"
video use for any kernel video parameter arguments
root set automatically based on rootdev/rootunit/rootpart/rootfs
bootextra available for any other kernel command line arguments needed
One way of running a boot script (mkimage script file) is to create a
uEnv.txt file (default location, /boot/uEnv.txt) with something like
the following:
loadfile=boot.scr
bootrun=source
This would load /boot/boot.scr and execute it. The script could use
any of the other variables; bootargs will be set up, bootfile will
still have the kernel name, fdt_file will be the dtb file name, etc.
If a dtb file is specified, it will already be loaded.
If the script returns, the boot process is halted, no other default
action is taken.