Debian Codegraph @

payloads/external/LinuxBoot/Kconfig

raw
1 ## SPDX-License-Identifier: GPL-2.0-only
2
3 if PAYLOAD_LINUXBOOT
4
5 choice
6 prompt "Architecture"
7 depends on LINUXBOOT_COMPILE_KERNEL || LINUXBOOT_BUILD_INITRAMFS
8 default LINUXBOOT_X86_64
9
10 config LINUXBOOT_X86_64
11 bool "x86_64"
12 depends on ARCH_X86
13 help
14 AMD64 kernel and initramfs
15
16 config LINUXBOOT_X86
17 bool "x86"
18 depends on ARCH_X86
19 help
20 X86 kernel and initramfs
21
22 config LINUXBOOT_ARM
23 bool "arm64"
24 depends on ARCH_ARM
25 select PAYLOAD_FIT_SUPPORT
26 help
27 arm kernel and initramfs
28
29 config LINUXBOOT_ARM64
30 bool "arm64"
31 depends on ARCH_ARM64
32 select PAYLOAD_FIT_SUPPORT
33 help
34 AARCH64 kernel and initramfs
35
36 config LINUXBOOT_RISCV_RV32
37 bool "RISC-V"
38 depends on ARCH_RISCV_RV32
39 select PAYLOAD_FIT_SUPPORT
40 help
41 RISC-V kernel and initramfs
42
43 config LINUXBOOT_RISCV_RV64
44 bool "RISC-V"
45 depends on ARCH_RISCV_RV64
46 select PAYLOAD_FIT_SUPPORT
47 help
48 RISC-V kernel and initramfs
49
50 endchoice
51
52 comment "Linux kernel"
53
54 config LINUXBOOT_COMPILE_KERNEL
55 bool "Compile kernel"
56 default n
57
58 config LINUXBOOT_KERNEL_PATH
59 string "Path to kernel"
60 default ""
61 depends on !LINUXBOOT_COMPILE_KERNEL
62 help
63 The kernel path is either and absolute path or relative to the
64 LinuxBoot directory
65
66 if LINUXBOOT_COMPILE_KERNEL
67
68 config LINUXBOOT_CROSS_COMPILE
69 bool "cross compiler"
70 default n if LINUXBOOT_X86_64 # currently coreboots cross toolchain cannot build Linux
71 default y
72 help
73 Enable this option if you want to compile Linux using a cross compiler.
74 The coreboot toolchain also counts as a cross toolchain.
75
76 config LINUXBOOT_CROSS_COMPILE_PATH
77 string "cross compiler"
78 depends on LINUXBOOT_CROSS_COMPILE
79 default "" # e.g. "aarch64-linux-gnu-"
80 help
81 Choose a custom cross compiler toolchain to use.
82 The cross toolchain of coreboot will be used if this option is left empty.
83 If not left empty, it should contain a path to a cross toolchain that is
84 capable of compiling Linux. It can be useful if you don't want to use the
85 coreboot toolchain or experience problems using it for building Linux.
86
87 config LINUXBOOT_KERNEL_VERSION
88 string "kernel version"
89 default "6.3"
90 help
91 Choose the Linux kernel version number. (x.x.x)
92 Release candidate kernels (rc) are currently are not supported.
93
94 config LINUXBOOT_KERNEL_CONFIGFILE
95 string "Config file path"
96 default "i386/defconfig" if LINUXBOOT_X86
97 default "x86_64/defconfig" if LINUXBOOT_X86_64
98 default "arm64/defconfig" if LINUXBOOT_ARM64
99 default "riscv/defconfig-32" if LINUXBOOT_RISCV_RV32
100 default "riscv/defconfig-64" if LINUXBOOT_RISCV_RV64
101 help
102 Path to the kernel configuration file.
103
104 Note: this can be a defconfig file or a complete .config file.
105
106 choice
107 prompt "Kernel binary format"
108 default LINUXBOOT_KERNEL_BZIMAGE if LINUXBOOT_X86 || LINUXBOOT_X86_64
109 default LINUXBOOT_KERNEL_UIMAGE if LINUXBOOT_ARM64 || LINUXBOOT_RISCV_RV32 || LINUXBOOT_RISCV_RV64
110
111 config LINUXBOOT_KERNEL_BZIMAGE
112 bool "bzImage"
113 depends on LINUXBOOT_X86 || LINUXBOOT_X86_64
114
115 config LINUXBOOT_KERNEL_UIMAGE
116 bool "uImage"
117 depends on LINUXBOOT_ARM64 || LINUXBOOT_RISCV_RV32 || LINUXBOOT_RISCV_RV64
118
119 endchoice
120
121 config LINUXBOOT_DTS_FILE
122 string "Compiled devicetree file"
123 depends on LINUXBOOT_ARM64 || LINUXBOOT_RISCV_RV32 || LINUXBOOT_RISCV_RV64
124 default "empty.dts"
125
126 endif #LINUXBOOT_COMPILE_KERNEL
127
128 config LINUX_COMMAND_LINE
129 string "Kernel command-line"
130 default ""
131 help
132 Add your own kernel command-line arguments.
133
134 config PAYLOAD_FILE
135 default "payloads/external/LinuxBoot/build/Image"
136
137 comment "Linux initramfs"
138
139 config LINUXBOOT_BUILD_INITRAMFS
140 bool "Build initramfs"
141 default n
142
143 config LINUXBOOT_INITRAMFS_PATH
144 string "Path to initramfs"
145 default "payloads/external/LinuxBoot/build/initramfs" if LINUXBOOT_UROOT
146
147 if LINUXBOOT_BUILD_INITRAMFS
148
149 choice
150 prompt "Initramfs"
151 default LINUXBOOT_UROOT
152
153 config LINUXBOOT_UROOT
154 bool "u-root"
155 depends on !LINUXBOOT_RISCV_RV32 # not supported by u-root
156 help
157 Enable u-root linuxboot mode.
158 See http://u-root.tk/ for more information.
159
160 endchoice
161
162 if LINUXBOOT_UROOT
163
164 choice
165 prompt "U-root version"
166 default LINUXBOOT_UROOT_MAIN
167
168 config LINUXBOOT_UROOT_CUSTOM
169 bool "custom"
170 help
171 choose a custom u-root branch
172
173 config LINUXBOOT_UROOT_MAIN
174 bool "main"
175 help
176 Latest u-root version
177
178 config LINUXBOOT_UROOT_V7_0_0
179 bool "v7.0.0"
180
181 config LINUXBOOT_UROOT_V6_0_0
182 bool "v6.0.0"
183
184 config LINUXBOOT_UROOT_V5_0_0
185 bool "v5.0.0"
186
187 config LINUXBOOT_UROOT_V4_0_0
188 bool "v4.0.0"
189
190 config LINUXBOOT_UROOT_V3_0_0
191 bool "v3.0.0"
192
193 config LINUXBOOT_UROOT_V2_0_0
194 bool "v2.0.0"
195
196 config LINUXBOOT_UROOT_V1_0_0
197 bool "v1.0.0"
198
199 endchoice
200
201 config LINUXBOOT_UROOT_CHECKOUT
202 string "U-root custom branch"
203 depends on LINUXBOOT_UROOT_CUSTOM
204
205 config LINUXBOOT_UROOT_VERSION
206 string
207 default LINUXBOOT_UROOT_CHECKOUT if LINUXBOOT_UROOT_CUSTOM
208 default "main" if LINUXBOOT_UROOT_MAIN
209 default "v7.0.0" if LINUXBOOT_UROOT_V7_0_0
210 default "v6.0.0" if LINUXBOOT_UROOT_V6_0_0
211 default "v5.0.0" if LINUXBOOT_UROOT_V5_0_0
212 default "v4.0.0" if LINUXBOOT_UROOT_V4_0_0
213 default "v3.0.0" if LINUXBOOT_UROOT_V3_0_0
214 default "v2.0.0" if LINUXBOOT_UROOT_V2_0_0
215 default "v1.0.0" if LINUXBOOT_UROOT_V1_0_0
216
217 choice
218 prompt "Build format"
219 default LINUXBOOT_UROOT_BB
220 help
221 u-root build format (e.g. bb or source). (default "bb")
222
223 config LINUXBOOT_UROOT_BB
224 bool "bb"
225
226 config LINUXBOOT_UROOT_SOURCE
227 bool "source (experimental)"
228
229 endchoice
230
231 config LINUXBOOT_UROOT_FORMAT
232 string
233 default "bb" if LINUXBOOT_UROOT_BB
234 default "source" if LINUXBOOT_UROOT_SOURCE
235
236 config LINUXBOOT_UROOT_FILES
237 string "Add files to u-root base"
238 help
239 Additional files, directories, and binaries (with their ldd dependencies) to add to archive.
240 Can be speficified multiple times.
241
242 config LINUXBOOT_UROOT_INITCMD
243 string "Init target"
244 default "init"
245 help
246 Symlink target for /init.
247 Can be an absolute path or a u-root command name. (default "init")
248
249 config LINUXBOOT_UROOT_SHELL
250 string "default shell"
251 default "gosh"
252 help
253 Default shell.
254 Can be an absolute path or a u-root command name. (default "elvish")
255
256 config LINUXBOOT_UROOT_COMMANDS
257 string "U-root commands"
258 default "boot coreboot-app"
259 help
260 List of additional modules to include,
261 separated by space. (default "boot coreboot-app")
262
263 if LINUXBOOT_UROOT_MAIN
264
265 choice
266 prompt "Choose a specific bootloader"
267 default SPECIFIC_BOOTLOADER_BOOT
268 help
269 Specify a bootloader which starts after u-root init. It will be a symlink
270 to /bin/uinit. Default: boot
271
272 config SPECIFIC_BOOTLOADER_NONE
273 bool "none"
274 help
275 Leave u-root to decide which bootloaders to load first after init, if
276 any at all. Most likely u-root will start into the defined u-root shell.
277
278 config SPECIFIC_BOOTLOADER_BOOT
279 bool "boot"
280
281 config SPECIFIC_BOOTLOADER_PXEBOOT
282 bool "pxeboot"
283
284 config SPECIFIC_BOOTLOADER_FITBOOT
285 bool "fitboot"
286
287 config SPECIFIC_BOOTLOADER_CUSTOM
288 bool "custom"
289
290 endchoice
291
292 config SPECIFIC_BOOTLOADER_CUSTOM_CMD
293 string "Specify a custom program to start"
294 depends on SPECIFIC_BOOTLOADER_CUSTOM
295 help
296 This option will symlink the input to /bin/unit which will set it as the
297 first boot program after the u-root init. Program flags are not
298 symlinkable.
299
300 config LINUXBOOT_UROOT_UINITCMD
301 string
302 default "" if SPECIFIC_BOOTLOADER_NONE
303 default "boot" if SPECIFIC_BOOTLOADER_BOOT
304 default "pxeboot" if SPECIFIC_BOOTLOADER_PXEBOOT
305 default "fitboot" if SPECIFIC_BOOTLOADER_FITBOOT
306 default SPECIFIC_BOOTLOADER_CUSTOM_CMD if SPECIFIC_BOOTLOADER_CUSTOM
307
308 endif #LINUXBOOT_UROOT_MAIN
309
310 endif #LINUXBOOT_UROOT
311
312 endif #LINUXBOOT_BUILD_INITRAMFS
313
314 choice
315 prompt "Initramfs compression format"
316 default LINUXBOOT_INITRAMFS_COMPRESSION_XZ
317
318 config LINUXBOOT_INITRAMFS_COMPRESSION_NONE
319 bool "none"
320
321 config LINUXBOOT_INITRAMFS_COMPRESSION_XZ
322 bool "xz compression"
323 depends on LINUXBOOT_BUILD_INITRAMFS
324
325 endchoice
326
327 config LINUXBOOT_INITRAMFS_SUFFIX
328 string
329 default "" if LINUXBOOT_INITRAMFS_COMPRESSION_NONE
330 default ".xz" if LINUXBOOT_INITRAMFS_COMPRESSION_XZ
331
332 endif #PAYLOAD_LINUXBOOT