diff options
author | Nick Kossifidis <mick@ics.forth.gr> | 2018-11-17 19:06:56 -0500 |
---|---|---|
committer | Palmer Dabbelt <palmer@sifive.com> | 2018-12-21 11:15:02 -0500 |
commit | 3aed8c43267ebad70b5130d21155db6d9d7c8ebe (patch) | |
tree | c83e07949d362d4e5a5fe29dbf365803fb526381 | |
parent | 397182e0db56b8894a43631ce72de14d90a29834 (diff) |
RISC-V: Update Kconfig to better handle CMDLINE
Added a menu to choose how the built-in command line will be
used and CMDLINE_EXTEND for compatibility with FDT code.
v2: Improved help messages, removed references to bootloader
and made them more descriptive. I also asked help from a
friend who's a language expert just in case.
v3: This time used the corrected text
v4: Copy the config strings from the arm32 port.
v5: Actually copy the config strings from the arm32 port.
Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
-rw-r--r-- | arch/riscv/Kconfig | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 55da93f4e818..23ac6d6f9ab2 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig | |||
@@ -227,39 +227,48 @@ endmenu | |||
227 | 227 | ||
228 | menu "Boot options" | 228 | menu "Boot options" |
229 | 229 | ||
230 | config CMDLINE_BOOL | 230 | config CMDLINE |
231 | bool "Built-in kernel command line" | 231 | string "Built-in kernel command line" |
232 | help | 232 | help |
233 | For most platforms, it is firmware or second stage bootloader | 233 | For most platforms, the arguments for the kernel's command line |
234 | that by default specifies the kernel command line options. | 234 | are provided at run-time, during boot. However, there are cases |
235 | However, it might be necessary or advantageous to either override | 235 | where either no arguments are being provided or the provided |
236 | the default kernel command line or add a few extra options to it. | 236 | arguments are insufficient or even invalid. |
237 | For such cases, this option allows hardcoding command line options | ||
238 | directly into the kernel. | ||
239 | 237 | ||
240 | For that, choose 'Y' here and fill in the extra boot parameters | 238 | When that occurs, it is possible to define a built-in command |
241 | in CONFIG_CMDLINE. | 239 | line here and choose how the kernel should use it later on. |
242 | 240 | ||
243 | The built-in options will be concatenated to the default command | 241 | choice |
244 | line if CMDLINE_FORCE is set to 'N'. Otherwise, the default | 242 | prompt "Built-in command line usage" if CMDLINE != "" |
245 | command line will be ignored and replaced by the built-in string. | 243 | default CMDLINE_FALLBACK |
244 | help | ||
245 | Choose how the kernel will handle the provided built-in command | ||
246 | line. | ||
246 | 247 | ||
247 | config CMDLINE | 248 | config CMDLINE_FALLBACK |
248 | string "Built-in kernel command string" | 249 | bool "Use bootloader kernel arguments if available" |
249 | depends on CMDLINE_BOOL | ||
250 | default "" | ||
251 | help | 250 | help |
252 | Supply command-line options at build time by entering them here. | 251 | Use the built-in command line as fallback in case we get nothing |
252 | during boot. This is the default behaviour. | ||
253 | |||
254 | config CMDLINE_EXTEND | ||
255 | bool "Extend bootloader kernel arguments" | ||
256 | help | ||
257 | The command-line arguments provided during boot will be | ||
258 | appended to the built-in command line. This is useful in | ||
259 | cases where the provided arguments are insufficient and | ||
260 | you don't want to or cannot modify them. | ||
261 | |||
253 | 262 | ||
254 | config CMDLINE_FORCE | 263 | config CMDLINE_FORCE |
255 | bool "Built-in command line overrides bootloader arguments" | 264 | bool "Always use the default kernel command string" |
256 | depends on CMDLINE_BOOL | ||
257 | help | 265 | help |
258 | Set this option to 'Y' to have the kernel ignore the bootloader | 266 | Always use the built-in command line, even if we get one during |
259 | or firmware command line. Instead, the built-in command line | 267 | boot. This is useful in case you need to override the provided |
260 | will be used exclusively. | 268 | command line on systems where you don't have or want control |
269 | over it. | ||
261 | 270 | ||
262 | If you don't know what to do here, say N. | 271 | endchoice |
263 | 272 | ||
264 | endmenu | 273 | endmenu |
265 | 274 | ||