summaryrefslogtreecommitdiff
path: root/payloads/external/LinuxBoot/Kconfig
blob: 3b8b70c88f7676cccc03dfe8bdacc3dc9e8b910d (plain)
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
## This file is part of the coreboot project.
##
## Copyright (C) 2017 Facebook Inc.
## Copyright (C) 2018 9elements Cyber Security
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; version 2 of the License.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##

if PAYLOAD_LINUXBOOT

choice
	prompt "Architecture"
	depends on LINUXBOOT_COMPILE_KERNEL || LINUXBOOT_BUILD_INITRAMFS
	default LINUXBOOT_X86_64

config LINUXBOOT_X86_64
	bool "x86_64"
	depends on ARCH_X86
	help
	  AMD64 kernel and initramfs

config LINUXBOOT_X86
	bool "x86"
	depends on ARCH_X86
	help
	  X86 kernel and initramfs

config LINUXBOOT_ARM64
	bool "arm64"
	depends on ARCH_ARM64
	select PAYLOAD_FIT_SUPPORT
	help
	  AARCH64 kernel and initramfs

endchoice

config LINUXBOOT_ARCH
	string
	default "amd64" if LINUXBOOT_X86_64
	default "i386" if LINUXBOOT_X86
	default "arm64" if LINUXBOOT_ARM64

comment "Linux kernel"

config LINUXBOOT_COMPILE_KERNEL
	bool "Compile kernel"
	default n

config LINUXBOOT_KERNEL_PATH
	string "Path to kernel"
	default "Image"
	depends on !LINUXBOOT_COMPILE_KERNEL

if LINUXBOOT_COMPILE_KERNEL

choice
	prompt "Kernel version"
	default LINUXBOOT_KERNEL_STABLE

config LINUXBOOT_KERNEL_STABLE
	bool "4.14.67"
	help
	  Stable kernel version

config LINUXBOOT_KERNEL_LATEST
	bool "4.18.5"
	help
	  Latest kernel version

endchoice

config LINUXBOOT_KERNEL_VERSION
	string
	default "4.18.5" if LINUXBOOT_KERNEL_LATEST
	default "4.14.67" if LINUXBOOT_KERNEL_STABLE

config LINUXBOOT_KERNEL_CONFIGFILE
	string "Kernel config file"
	default ""
	help
	  Add your own kernel configuration file. Otherwise a default
	  minimal defconfig is used.

config LINUXBOOT_DTB_FILE
	string "Compiled devicetree file"
	depends on LINUXBOOT_ARM64
	default ""

endif #LINUXBOOT_COMPILE_KERNEL

config LINUX_COMMAND_LINE
	string "Kernel command-line"
	default ""
	help
	  Add your own kernel command-line arguments.

config PAYLOAD_FILE
	default "payloads/external/LinuxBoot/linuxboot/bzImage" if LINUXBOOT_COMPILE_KERNEL && ( LINUXBOOT_X86 || LINUXBOOT_X86_64 )
	default "payloads/external/LinuxBoot/linuxboot/uImage" if LINUXBOOT_COMPILE_KERNEL && LINUXBOOT_ARM64
	default LINUXBOOT_KERNEL_PATH if !LINUXBOOT_COMPILE_KERNEL

comment "Linux initramfs"

config LINUXBOOT_BUILD_INITRAMFS
	bool "Build initramfs"
	default n

config LINUXBOOT_INITRAMFS_PATH
	string "Path to initramfs"
	depends on !LINUXBOOT_BUILD_INITRAMFS

if LINUXBOOT_BUILD_INITRAMFS

choice
	prompt "Payload Mode"
	default LINUXBOOT_UROOT

config LINUXBOOT_UROOT
	bool "u-root"
	help
	  Enable u-root linuxboot mode.
	  See http://u-root.tk/ for more information.

endchoice

if LINUXBOOT_UROOT

choice
	prompt "U-root version"
	default LINUXBOOT_UROOT_MASTER

config LINUXBOOT_UROOT_CUSTOM
	bool "custom"
	help
	  choose a custom u-root branch

config LINUXBOOT_UROOT_MASTER
	bool "master"
	help
	  Latest u-root version

config LINUXBOOT_UROOT_V3_0_0
	bool "v3.0.0"

config LINUXBOOT_UROOT_V2_0_0
	bool "v2.0.0"

config LINUXBOOT_UROOT_V1_0_0
	bool "v1.0.0"

endchoice

config LINUXBOOT_UROOT_CHECKOUT
	string "U-root custom branch"
	depends on LINUXBOOT_UROOT_CUSTOM

config LINUXBOOT_UROOT_VERSION
	string
	default LINUXBOOT_UROOT_CHECKOUT if LINUXBOOT_UROOT_CUSTOM
	default "master" if LINUXBOOT_UROOT_MASTER
	default "v3.0.0" if LINUXBOOT_UROOT_V3_0_0
	default "v2.0.0" if LINUXBOOT_UROOT_V2_0_0
	default "v1.0.0" if LINUXBOOT_UROOT_V1_0_0

choice
	prompt "Build format"
	default LINUXBOOT_UROOT_BB
	help
	  u-root build format (e.g. bb or source). (default "bb")

config LINUXBOOT_UROOT_BB
	bool "bb"

config LINUXBOOT_UROOT_SOURCE
	bool "source (experimental)"

endchoice

config LINUXBOOT_UROOT_FORMAT
	string
	default "bb" if LINUXBOOT_UROOT_BB
	default "source" if LINUXBOOT_UROOT_SOURCE

config LINUXBOOT_UROOT_FILES
	string "Add files to u-root base"
	help
	  Additional files, directories, and binaries (with their ldd dependencies) to add to archive.
	  Can be speficified multiple times.

config LINUXBOOT_UROOT_INITCMD
	string "Init target"
	default "init"
	help
	  Symlink target for /init.
	  Can be an absolute path or a u-root command name. (default "init")

config LINUXBOOT_UROOT_SHELL
	string "default shell"
	default "elvish"
	help
	  Default shell.
	  Can be an absolute path or a u-root command name. (default "elvish")

config LINUXBOOT_UROOT_COMMANDS
	string "U-root commands"
	default "coreboot-app"
	help
	  List of additional modules to include,
	  separated by space. (default "coreboot-app")

endif #LINUXBOOT_UROOT

endif #LINUXBOOT_BUILD_INITRAMFS

choice LINUXBOOT_INITRAMFS_COMPRESSION
	prompt "Initramfs compression format"
	default LINUXBOOT_INITRAMFS_COMPRESSION_XZ

config LINUXBOOT_INITRAMFS_COMPRESSION_NONE
	bool "none"

config LINUXBOOT_INITRAMFS_COMPRESSION_XZ
	bool "xz compression"

endchoice

config LINUX_INITRD
	string
	default "payloads/external/LinuxBoot/linuxboot/initramfs_u-root.cpio" if LINUXBOOT_UROOT
	default LINUXBOOT_INITRAMFS_PATH if !LINUXBOOT_BUILD_INITRAMFS

config LINUXBOOT_INITRAMFS_SUFFIX
	string
	default "" if LINUXBOOT_INITRAMFS_COMPRESSION_NONE
	default ".xz" if LINUXBOOT_INITRAMFS_COMPRESSION_XZ

endif #PAYLOAD_LINUXBOOT