Skip to contentSkip to conversation

RISC-V: Cosmetic menuconfig changes

PATCH New Nick Kossifidis 2 participants 4 messages Sep 19, 2018 – Oct 1, 2018 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RISC-V: Cosmetic menuconfig changes

* Move the built-in cmdline configuration on a new menu entry "Boot options", it doesn't make much sense to be part of the debuging menu.

* Rename "Kernel Type" menu to "Kernel features" to be more consistent with what other architectures are using, plus "type" is a bit misleading here.

---
 arch/riscv/Kconfig       | 40 +++++++++++++++++++++++++++++++++++++++-
 arch/riscv/Kconfig.debug | 35 -----------------------------------
 2 files changed, 39 insertions(+), 36 deletions(-)
arch/riscv/Kconfig +39 -1
index a3449802..82172bf8 100644
@@ -210,12 +210,50 @@ endmenu
 
 endmenu
 
-menu "Kernel type"
+menu "Kernel features"
 
 source "kernel/Kconfig.hz"
 
 endmenu
 
+menu "Boot options"
+
+config CMDLINE_BOOL
+	bool "Built-in kernel command line"
+	help
+	  For most platforms, it is firmware or second stage bootloader
+	  that by default specifies the kernel command line options.
+	  However, it might be necessary or advantageous to either override
+	  the default kernel command line or add a few extra options to it.
+	  For such cases, this option allows hardcoding command line options
+	  directly into the kernel.
+
+	  For that, choose 'Y' here and fill in the extra boot parameters
+	  in CONFIG_CMDLINE.
+
+	  The built-in options will be concatenated to the default command
+	  line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
+	  command line will be ignored and replaced by the built-in string.
+
+config CMDLINE
+	string "Built-in kernel command string"
+	depends on CMDLINE_BOOL
+	default ""
+	help
+	  Supply command-line options at build time by entering them here.
+
+config CMDLINE_FORCE
+	bool "Built-in command line overrides bootloader arguments"
+	depends on CMDLINE_BOOL
+	help
+	  Set this option to 'Y' to have the kernel ignore the bootloader
+	  or firmware command line.  Instead, the built-in command line
+	  will be used exclusively.
+
+	  If you don't know what to do here, say N.
+
+endmenu
+
 menu "Bus support"
 
 config PCI
arch/riscv/Kconfig.debug +0 -35
index 3224ff6e..c5a72f17 100644
@@ -1,37 +1,2 @@
-
-config CMDLINE_BOOL
-	bool "Built-in kernel command line"
-	help
-	  For most platforms, it is firmware or second stage bootloader
-	  that by default specifies the kernel command line options.
-	  However, it might be necessary or advantageous to either override
-	  the default kernel command line or add a few extra options to it.
-	  For such cases, this option allows hardcoding command line options
-	  directly into the kernel.
-
-	  For that, choose 'Y' here and fill in the extra boot parameters
-	  in CONFIG_CMDLINE.
-
-	  The built-in options will be concatenated to the default command
-	  line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
-	  command line will be ignored and replaced by the built-in string.
-
-config CMDLINE
-	string "Built-in kernel command string"
-	depends on CMDLINE_BOOL
-	default ""
-	help
-	  Supply command-line options at build time by entering them here.
-
-config CMDLINE_FORCE
-	bool "Built-in command line overrides bootloader arguments"
-	depends on CMDLINE_BOOL
-	help
-	  Set this option to 'Y' to have the kernel ignore the bootloader
-	  or firmware command line.  Instead, the built-in command line
-	  will be used exclusively.
-
-	  If you don't know what to do here, say N.
-
 config EARLY_PRINTK
 	def_bool y
Signature · 1 line
2.16.4
#1 lore raw

PATCH 1/1 RISC-V: Cosmetic menuconfig changes

Quoted 7 lines · mick at ics.forth.gr

* Move the built-in cmdline configuration on a new menu entry "Boot options", it doesn't make much sense to be part of the debuging menu.

* Rename "Kernel Type" menu to "Kernel features" to be more consistent with what other architectures are using, plus "type" is a bit misleading here.

This seems reasonable to me. I've added it to our for-next branch, we'll see if anyone else has comments. Thanks!

Did you, by any chance, go and check to see if these boot options actually work? We've got a bunch of subtly different boot methods and they've been broken in various ones at various times, so I always like to try and catalog what actually works now so at least I know where to look when testing things.

Quoted 103 lines
---
 arch/riscv/Kconfig       | 40 +++++++++++++++++++++++++++++++++++++++-
 arch/riscv/Kconfig.debug | 35 -----------------------------------
 2 files changed, 39 insertions(+), 36 deletions(-)
arch/riscv/Kconfig +39 -1
index a3449802..82172bf8 100644
@@ -210,12 +210,50 @@ endmenu
 
 endmenu
 
-menu "Kernel type"
+menu "Kernel features"
 
 source "kernel/Kconfig.hz"
 
 endmenu
 
+menu "Boot options"
+
+config CMDLINE_BOOL
+	bool "Built-in kernel command line"
+	help
+	  For most platforms, it is firmware or second stage bootloader
+	  that by default specifies the kernel command line options.
+	  However, it might be necessary or advantageous to either override
+	  the default kernel command line or add a few extra options to it.
+	  For such cases, this option allows hardcoding command line options
+	  directly into the kernel.
+
+	  For that, choose 'Y' here and fill in the extra boot parameters
+	  in CONFIG_CMDLINE.
+
+	  The built-in options will be concatenated to the default command
+	  line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
+	  command line will be ignored and replaced by the built-in string.
+
+config CMDLINE
+	string "Built-in kernel command string"
+	depends on CMDLINE_BOOL
+	default ""
+	help
+	  Supply command-line options at build time by entering them here.
+
+config CMDLINE_FORCE
+	bool "Built-in command line overrides bootloader arguments"
+	depends on CMDLINE_BOOL
+	help
+	  Set this option to 'Y' to have the kernel ignore the bootloader
+	  or firmware command line.  Instead, the built-in command line
+	  will be used exclusively.
+
+	  If you don't know what to do here, say N.
+
+endmenu
+
 menu "Bus support"
 
 config PCI
arch/riscv/Kconfig.debug +0 -35
index 3224ff6e..c5a72f17 100644
@@ -1,37 +1,2 @@
-
-config CMDLINE_BOOL
-	bool "Built-in kernel command line"
-	help
-	  For most platforms, it is firmware or second stage bootloader
-	  that by default specifies the kernel command line options.
-	  However, it might be necessary or advantageous to either override
-	  the default kernel command line or add a few extra options to it.
-	  For such cases, this option allows hardcoding command line options
-	  directly into the kernel.
-
-	  For that, choose 'Y' here and fill in the extra boot parameters
-	  in CONFIG_CMDLINE.
-
-	  The built-in options will be concatenated to the default command
-	  line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
-	  command line will be ignored and replaced by the built-in string.
-
-config CMDLINE
-	string "Built-in kernel command string"
-	depends on CMDLINE_BOOL
-	default ""
-	help
-	  Supply command-line options at build time by entering them here.
-
-config CMDLINE_FORCE
-	bool "Built-in command line overrides bootloader arguments"
-	depends on CMDLINE_BOOL
-	help
-	  Set this option to 'Y' to have the kernel ignore the bootloader
-	  or firmware command line.  Instead, the built-in command line
-	  will be used exclusively.
-
-	  If you don't know what to do here, say N.
-
 config EARLY_PRINTK
 	def_bool y
#2 lore raw

PATCH 1/1 RISC-V: Cosmetic menuconfig changes

???? 2018-09-29 04:44, Palmer Dabbelt ??????:

Quoted 12 lines · mick at ics.forth.gr
Quoted 10 lines

* Move the built-in cmdline configuration on a new menu entry "Boot options", it doesn't make much sense to be part of the debuging
menu.

* Rename "Kernel Type" menu to "Kernel features" to be more consistent with
what other architectures are using, plus "type" is a bit misleading
here.

Quoted 9 lines

This seems reasonable to me. I've added it to our for-next branch, we'll see if anyone else has comments. Thanks!

Did you, by any chance, go and check to see if these boot options actually work? We've got a bunch of subtly different boot methods and they've been broken in various ones at various times, so I always like to try and catalog what actually works now so at least I know where to look when testing things.

I assumed that since it was already there it worked but you are right, cmdline when passed from the bootloader through the generated device tree
(https://github.com/riscv/riscv-qemu/blob/riscv-all/hw/riscv/virt.c)
works but when passed through the config option doesn't. Do you want me to send a separate patch for that or re-send this one as well as a series ?

#3 lore raw

PATCH 1/1 RISC-V: Cosmetic menuconfig changes

Quoted 23 lines · mick at ics.forth.gr

???? 2018-09-29 04:44, Palmer Dabbelt ??????:

Quoted 12 lines · mick at ics.forth.gr
Quoted 10 lines

* Move the built-in cmdline configuration on a new menu entry "Boot options", it doesn't make much sense to be part of the debuging
menu.

* Rename "Kernel Type" menu to "Kernel features" to be more consistent with
what other architectures are using, plus "type" is a bit misleading
here.

Quoted 9 lines

This seems reasonable to me. I've added it to our for-next branch, we'll see if anyone else has comments. Thanks!

Did you, by any chance, go and check to see if these boot options actually work? We've got a bunch of subtly different boot methods and they've been broken in various ones at various times, so I always like to try and catalog what actually works now so at least I know where to look when testing things.

Quoted 7 lines

I assumed that since it was already there it worked but you are right, cmdline when passed from the bootloader through the generated device tree
(https://github.com/riscv/riscv-qemu/blob/riscv-all/hw/riscv/virt.c)
works but when passed through the config option doesn't. Do you want me to send a separate patch for that or re-send this one as well as a series ?

I think it's better to send that out as a separate patch. There's really no reason to couple the two, it's just that this reminded me that we probably had some bugs here.