All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-10  1:02 ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-10  1:02 UTC (permalink / raw)
  To: linux-riscv

Add a menu to chose how the built-in command line will be
used and add CMDLINE_EXTEND for compatibility with FDT code.

Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
---
 arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 21 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 55da93f4e818..81f884164b52 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -227,39 +227,42 @@ endmenu
 
 menu "Boot options"
 
-config CMDLINE_BOOL
-	bool "Built-in kernel command line"
+config CMDLINE
+	string "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.
+	  the provided kernel command line or add a few extra options to it.
+	  For such cases, it is possible to define a built-in command line
+	  here and chose how the kernel should use it later on.
 
-	  For that, choose 'Y' here and fill in the extra boot parameters
-	  in CONFIG_CMDLINE.
+choice
+	prompt "Built-in command line usage" if CMDLINE != ""
+	default CMDLINE_FALLBACK
+	help
+	  Chose how the kernel will handle the provided built-in command
+	  line.
 
-	  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_FALLBACK
+	bool "Fallback"
+	help
+	  Use the built-in command line as fallback in case we get nothing
+	  from the boot loader.
 
-config CMDLINE
-	string "Built-in kernel command string"
-	depends on CMDLINE_BOOL
-	default ""
+config CMDLINE_EXTEND
+	bool "Extension"
 	help
-	  Supply command-line options at build time by entering them here.
+	  Use the built-in command line as an extension of the command line
+	  provided by the boot loader.
 
 config CMDLINE_FORCE
-	bool "Built-in command line overrides bootloader arguments"
-	depends on CMDLINE_BOOL
+	bool "Forced"
 	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.
+	  Use the built-in command line in place of the command line
+	  provided by the boot loader.
 
-	  If you don't know what to do here, say N.
+endchoice
 
 endmenu
 
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-10  1:02 ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-10  1:02 UTC (permalink / raw)
  To: linux-riscv; +Cc: Nick Kossifidis, palmer, aou

Add a menu to chose how the built-in command line will be
used and add CMDLINE_EXTEND for compatibility with FDT code.

Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
---
 arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 21 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 55da93f4e818..81f884164b52 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -227,39 +227,42 @@ endmenu
 
 menu "Boot options"
 
-config CMDLINE_BOOL
-	bool "Built-in kernel command line"
+config CMDLINE
+	string "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.
+	  the provided kernel command line or add a few extra options to it.
+	  For such cases, it is possible to define a built-in command line
+	  here and chose how the kernel should use it later on.
 
-	  For that, choose 'Y' here and fill in the extra boot parameters
-	  in CONFIG_CMDLINE.
+choice
+	prompt "Built-in command line usage" if CMDLINE != ""
+	default CMDLINE_FALLBACK
+	help
+	  Chose how the kernel will handle the provided built-in command
+	  line.
 
-	  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_FALLBACK
+	bool "Fallback"
+	help
+	  Use the built-in command line as fallback in case we get nothing
+	  from the boot loader.
 
-config CMDLINE
-	string "Built-in kernel command string"
-	depends on CMDLINE_BOOL
-	default ""
+config CMDLINE_EXTEND
+	bool "Extension"
 	help
-	  Supply command-line options at build time by entering them here.
+	  Use the built-in command line as an extension of the command line
+	  provided by the boot loader.
 
 config CMDLINE_FORCE
-	bool "Built-in command line overrides bootloader arguments"
-	depends on CMDLINE_BOOL
+	bool "Forced"
 	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.
+	  Use the built-in command line in place of the command line
+	  provided by the boot loader.
 
-	  If you don't know what to do here, say N.
+endchoice
 
 endmenu
 
-- 
2.16.4


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 16:52   ` Palmer Dabbelt
  0 siblings, 0 replies; 18+ messages in thread
From: Palmer Dabbelt @ 2018-11-16 16:52 UTC (permalink / raw)
  To: linux-riscv

On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick at ics.forth.gr wrote:
> Add a menu to chose how the built-in command line will be
> used and add CMDLINE_EXTEND for compatibility with FDT code.
>
> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> ---
>  arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
>  1 file changed, 24 insertions(+), 21 deletions(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 55da93f4e818..81f884164b52 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -227,39 +227,42 @@ endmenu
>
>  menu "Boot options"
>
> -config CMDLINE_BOOL
> -	bool "Built-in kernel command line"
> +config CMDLINE
> +	string "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.
> +	  the provided kernel command line or add a few extra options to it.
> +	  For such cases, it is possible to define a built-in command line
> +	  here and chose how the kernel should use it later on.
>
> -	  For that, choose 'Y' here and fill in the extra boot parameters
> -	  in CONFIG_CMDLINE.
> +choice
> +	prompt "Built-in command line usage" if CMDLINE != ""
> +	default CMDLINE_FALLBACK
> +	help
> +	  Chose how the kernel will handle the provided built-in command
> +	  line.
>
> -	  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_FALLBACK
> +	bool "Fallback"
> +	help
> +	  Use the built-in command line as fallback in case we get nothing
> +	  from the boot loader.
>
> -config CMDLINE
> -	string "Built-in kernel command string"
> -	depends on CMDLINE_BOOL
> -	default ""
> +config CMDLINE_EXTEND
> +	bool "Extension"
>  	help
> -	  Supply command-line options at build time by entering them here.
> +	  Use the built-in command line as an extension of the command line
> +	  provided by the boot loader.
>
>  config CMDLINE_FORCE
> -	bool "Built-in command line overrides bootloader arguments"
> -	depends on CMDLINE_BOOL
> +	bool "Forced"
>  	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.
> +	  Use the built-in command line in place of the command line
> +	  provided by the boot loader.
>
> -	  If you don't know what to do here, say N.
> +endchoice
>
>  endmenu

It looks like this is functionally equivalent to what ARM has, but the polarity 
is a bit different and the help strings aren't as easy to read.  Is there a 
reason we can't just copy what they do?

    config CMDLINE
            string "Default kernel command string"
            default ""
            help
              On some architectures (EBSA110 and CATS), there is currently no way
              for the boot loader to pass arguments to the kernel. For these
              architectures, you should supply some command-line options at build
              time by entering them here. As a minimum, you should specify the
              memory size and the root device (e.g., mem=64M root=/dev/nfs).
    
    choice
            prompt "Kernel command line type" if CMDLINE != ""
            default CMDLINE_FROM_BOOTLOADER
            depends on ATAGS
    
    config CMDLINE_FROM_BOOTLOADER
            bool "Use bootloader kernel arguments if available"
            help
              Uses the command-line options passed by the boot loader. If
              the boot loader doesn't provide any, the default kernel command
              string provided in CMDLINE will be used.
    
    config CMDLINE_EXTEND
            bool "Extend bootloader kernel arguments"
            help
              The command-line arguments provided by the boot loader will be
              appended to the default kernel command string.
    
    config CMDLINE_FORCE
            bool "Always use the default kernel command string"
            help
              Always use the default kernel command string, even if the boot
              loader passes other arguments to the kernel.
              This is useful if you cannot or don't want to change the
              command-line options your boot loader passes to the kernel.
    endchoice
    
I'm not really opposed to your solution, I'm just trying to avoid being 
different without a reason.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 16:52   ` Palmer Dabbelt
  0 siblings, 0 replies; 18+ messages in thread
From: Palmer Dabbelt @ 2018-11-16 16:52 UTC (permalink / raw)
  To: mick; +Cc: mick, linux-riscv, aou

On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick@ics.forth.gr wrote:
> Add a menu to chose how the built-in command line will be
> used and add CMDLINE_EXTEND for compatibility with FDT code.
>
> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> ---
>  arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
>  1 file changed, 24 insertions(+), 21 deletions(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 55da93f4e818..81f884164b52 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -227,39 +227,42 @@ endmenu
>
>  menu "Boot options"
>
> -config CMDLINE_BOOL
> -	bool "Built-in kernel command line"
> +config CMDLINE
> +	string "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.
> +	  the provided kernel command line or add a few extra options to it.
> +	  For such cases, it is possible to define a built-in command line
> +	  here and chose how the kernel should use it later on.
>
> -	  For that, choose 'Y' here and fill in the extra boot parameters
> -	  in CONFIG_CMDLINE.
> +choice
> +	prompt "Built-in command line usage" if CMDLINE != ""
> +	default CMDLINE_FALLBACK
> +	help
> +	  Chose how the kernel will handle the provided built-in command
> +	  line.
>
> -	  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_FALLBACK
> +	bool "Fallback"
> +	help
> +	  Use the built-in command line as fallback in case we get nothing
> +	  from the boot loader.
>
> -config CMDLINE
> -	string "Built-in kernel command string"
> -	depends on CMDLINE_BOOL
> -	default ""
> +config CMDLINE_EXTEND
> +	bool "Extension"
>  	help
> -	  Supply command-line options at build time by entering them here.
> +	  Use the built-in command line as an extension of the command line
> +	  provided by the boot loader.
>
>  config CMDLINE_FORCE
> -	bool "Built-in command line overrides bootloader arguments"
> -	depends on CMDLINE_BOOL
> +	bool "Forced"
>  	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.
> +	  Use the built-in command line in place of the command line
> +	  provided by the boot loader.
>
> -	  If you don't know what to do here, say N.
> +endchoice
>
>  endmenu

It looks like this is functionally equivalent to what ARM has, but the polarity 
is a bit different and the help strings aren't as easy to read.  Is there a 
reason we can't just copy what they do?

    config CMDLINE
            string "Default kernel command string"
            default ""
            help
              On some architectures (EBSA110 and CATS), there is currently no way
              for the boot loader to pass arguments to the kernel. For these
              architectures, you should supply some command-line options at build
              time by entering them here. As a minimum, you should specify the
              memory size and the root device (e.g., mem=64M root=/dev/nfs).
    
    choice
            prompt "Kernel command line type" if CMDLINE != ""
            default CMDLINE_FROM_BOOTLOADER
            depends on ATAGS
    
    config CMDLINE_FROM_BOOTLOADER
            bool "Use bootloader kernel arguments if available"
            help
              Uses the command-line options passed by the boot loader. If
              the boot loader doesn't provide any, the default kernel command
              string provided in CMDLINE will be used.
    
    config CMDLINE_EXTEND
            bool "Extend bootloader kernel arguments"
            help
              The command-line arguments provided by the boot loader will be
              appended to the default kernel command string.
    
    config CMDLINE_FORCE
            bool "Always use the default kernel command string"
            help
              Always use the default kernel command string, even if the boot
              loader passes other arguments to the kernel.
              This is useful if you cannot or don't want to change the
              command-line options your boot loader passes to the kernel.
    endchoice
    
I'm not really opposed to your solution, I'm just trying to avoid being 
different without a reason.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 17:08     ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-16 17:08 UTC (permalink / raw)
  To: linux-riscv

???? 2018-11-16 18:52, Palmer Dabbelt ??????:
> On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick at ics.forth.gr wrote:
>> Add a menu to chose how the built-in command line will be
>> used and add CMDLINE_EXTEND for compatibility with FDT code.
>> 
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>> ---
>>  arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
>>  1 file changed, 24 insertions(+), 21 deletions(-)
>> 
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index 55da93f4e818..81f884164b52 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -227,39 +227,42 @@ endmenu
>> 
>>  menu "Boot options"
>> 
>> -config CMDLINE_BOOL
>> -	bool "Built-in kernel command line"
>> +config CMDLINE
>> +	string "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.
>> +	  the provided kernel command line or add a few extra options to it.
>> +	  For such cases, it is possible to define a built-in command line
>> +	  here and chose how the kernel should use it later on.
>> 
>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>> -	  in CONFIG_CMDLINE.
>> +choice
>> +	prompt "Built-in command line usage" if CMDLINE != ""
>> +	default CMDLINE_FALLBACK
>> +	help
>> +	  Chose how the kernel will handle the provided built-in command
>> +	  line.
>> 
>> -	  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_FALLBACK
>> +	bool "Fallback"
>> +	help
>> +	  Use the built-in command line as fallback in case we get nothing
>> +	  from the boot loader.
>> 
>> -config CMDLINE
>> -	string "Built-in kernel command string"
>> -	depends on CMDLINE_BOOL
>> -	default ""
>> +config CMDLINE_EXTEND
>> +	bool "Extension"
>>  	help
>> -	  Supply command-line options at build time by entering them here.
>> +	  Use the built-in command line as an extension of the command line
>> +	  provided by the boot loader.
>> 
>>  config CMDLINE_FORCE
>> -	bool "Built-in command line overrides bootloader arguments"
>> -	depends on CMDLINE_BOOL
>> +	bool "Forced"
>>  	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.
>> +	  Use the built-in command line in place of the command line
>> +	  provided by the boot loader.
>> 
>> -	  If you don't know what to do here, say N.
>> +endchoice
>> 
>>  endmenu
> 
> It looks like this is functionally equivalent to what ARM has, but the
> polarity is a bit different and the help strings aren't as easy to
> read.  Is there a reason we can't just copy what they do?
> 
>    config CMDLINE
>            string "Default kernel command string"
>            default ""
>            help
>              On some architectures (EBSA110 and CATS), there is 
> currently no way
>              for the boot loader to pass arguments to the kernel. For 
> these
>              architectures, you should supply some command-line options 
> at build
>              time by entering them here. As a minimum, you should 
> specify the
>              memory size and the root device (e.g., mem=64M 
> root=/dev/nfs).
>       choice
>            prompt "Kernel command line type" if CMDLINE != ""
>            default CMDLINE_FROM_BOOTLOADER
>            depends on ATAGS
>       config CMDLINE_FROM_BOOTLOADER
>            bool "Use bootloader kernel arguments if available"
>            help
>              Uses the command-line options passed by the boot loader. 
> If
>              the boot loader doesn't provide any, the default kernel 
> command
>              string provided in CMDLINE will be used.
>       config CMDLINE_EXTEND
>            bool "Extend bootloader kernel arguments"
>            help
>              The command-line arguments provided by the boot loader 
> will be
>              appended to the default kernel command string.
>       config CMDLINE_FORCE
>            bool "Always use the default kernel command string"
>            help
>              Always use the default kernel command string, even if the 
> boot
>              loader passes other arguments to the kernel.
>              This is useful if you cannot or don't want to change the
>              command-line options your boot loader passes to the 
> kernel.
>    endchoice
>    I'm not really opposed to your solution, I'm just trying to avoid
> being different without a reason.

ATAGS and references to ARM platforms such as EBSA110 are not related to 
RISC-V
and I think CMDLINE_FALLBACK is more descriptive than 
CMDLINE_FROM_BOOTLOADER.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 17:08     ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-16 17:08 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: mick, linux-riscv, aou

Στις 2018-11-16 18:52, Palmer Dabbelt έγραψε:
> On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick@ics.forth.gr wrote:
>> Add a menu to chose how the built-in command line will be
>> used and add CMDLINE_EXTEND for compatibility with FDT code.
>> 
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>> ---
>>  arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
>>  1 file changed, 24 insertions(+), 21 deletions(-)
>> 
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index 55da93f4e818..81f884164b52 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -227,39 +227,42 @@ endmenu
>> 
>>  menu "Boot options"
>> 
>> -config CMDLINE_BOOL
>> -	bool "Built-in kernel command line"
>> +config CMDLINE
>> +	string "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.
>> +	  the provided kernel command line or add a few extra options to it.
>> +	  For such cases, it is possible to define a built-in command line
>> +	  here and chose how the kernel should use it later on.
>> 
>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>> -	  in CONFIG_CMDLINE.
>> +choice
>> +	prompt "Built-in command line usage" if CMDLINE != ""
>> +	default CMDLINE_FALLBACK
>> +	help
>> +	  Chose how the kernel will handle the provided built-in command
>> +	  line.
>> 
>> -	  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_FALLBACK
>> +	bool "Fallback"
>> +	help
>> +	  Use the built-in command line as fallback in case we get nothing
>> +	  from the boot loader.
>> 
>> -config CMDLINE
>> -	string "Built-in kernel command string"
>> -	depends on CMDLINE_BOOL
>> -	default ""
>> +config CMDLINE_EXTEND
>> +	bool "Extension"
>>  	help
>> -	  Supply command-line options at build time by entering them here.
>> +	  Use the built-in command line as an extension of the command line
>> +	  provided by the boot loader.
>> 
>>  config CMDLINE_FORCE
>> -	bool "Built-in command line overrides bootloader arguments"
>> -	depends on CMDLINE_BOOL
>> +	bool "Forced"
>>  	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.
>> +	  Use the built-in command line in place of the command line
>> +	  provided by the boot loader.
>> 
>> -	  If you don't know what to do here, say N.
>> +endchoice
>> 
>>  endmenu
> 
> It looks like this is functionally equivalent to what ARM has, but the
> polarity is a bit different and the help strings aren't as easy to
> read.  Is there a reason we can't just copy what they do?
> 
>    config CMDLINE
>            string "Default kernel command string"
>            default ""
>            help
>              On some architectures (EBSA110 and CATS), there is 
> currently no way
>              for the boot loader to pass arguments to the kernel. For 
> these
>              architectures, you should supply some command-line options 
> at build
>              time by entering them here. As a minimum, you should 
> specify the
>              memory size and the root device (e.g., mem=64M 
> root=/dev/nfs).
>       choice
>            prompt "Kernel command line type" if CMDLINE != ""
>            default CMDLINE_FROM_BOOTLOADER
>            depends on ATAGS
>       config CMDLINE_FROM_BOOTLOADER
>            bool "Use bootloader kernel arguments if available"
>            help
>              Uses the command-line options passed by the boot loader. 
> If
>              the boot loader doesn't provide any, the default kernel 
> command
>              string provided in CMDLINE will be used.
>       config CMDLINE_EXTEND
>            bool "Extend bootloader kernel arguments"
>            help
>              The command-line arguments provided by the boot loader 
> will be
>              appended to the default kernel command string.
>       config CMDLINE_FORCE
>            bool "Always use the default kernel command string"
>            help
>              Always use the default kernel command string, even if the 
> boot
>              loader passes other arguments to the kernel.
>              This is useful if you cannot or don't want to change the
>              command-line options your boot loader passes to the 
> kernel.
>    endchoice
>    I'm not really opposed to your solution, I'm just trying to avoid
> being different without a reason.

ATAGS and references to ARM platforms such as EBSA110 are not related to 
RISC-V
and I think CMDLINE_FALLBACK is more descriptive than 
CMDLINE_FROM_BOOTLOADER.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 17:14       ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-16 17:14 UTC (permalink / raw)
  To: linux-riscv

???? 2018-11-16 19:08, Nick Kossifidis ??????:
> ???? 2018-11-16 18:52, Palmer Dabbelt ??????:
>> On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick at ics.forth.gr wrote:
>>> Add a menu to chose how the built-in command line will be
>>> used and add CMDLINE_EXTEND for compatibility with FDT code.
>>> 
>>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>>> ---
>>>  arch/riscv/Kconfig | 45 
>>> ++++++++++++++++++++++++---------------------
>>>  1 file changed, 24 insertions(+), 21 deletions(-)
>>> 
>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>> index 55da93f4e818..81f884164b52 100644
>>> --- a/arch/riscv/Kconfig
>>> +++ b/arch/riscv/Kconfig
>>> @@ -227,39 +227,42 @@ endmenu
>>> 
>>>  menu "Boot options"
>>> 
>>> -config CMDLINE_BOOL
>>> -	bool "Built-in kernel command line"
>>> +config CMDLINE
>>> +	string "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.
>>> +	  the provided kernel command line or add a few extra options to 
>>> it.
>>> +	  For such cases, it is possible to define a built-in command line
>>> +	  here and chose how the kernel should use it later on.
>>> 
>>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>>> -	  in CONFIG_CMDLINE.
>>> +choice
>>> +	prompt "Built-in command line usage" if CMDLINE != ""
>>> +	default CMDLINE_FALLBACK
>>> +	help
>>> +	  Chose how the kernel will handle the provided built-in command
>>> +	  line.
>>> 
>>> -	  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_FALLBACK
>>> +	bool "Fallback"
>>> +	help
>>> +	  Use the built-in command line as fallback in case we get nothing
>>> +	  from the boot loader.
>>> 
>>> -config CMDLINE
>>> -	string "Built-in kernel command string"
>>> -	depends on CMDLINE_BOOL
>>> -	default ""
>>> +config CMDLINE_EXTEND
>>> +	bool "Extension"
>>>  	help
>>> -	  Supply command-line options at build time by entering them here.
>>> +	  Use the built-in command line as an extension of the command line
>>> +	  provided by the boot loader.
>>> 
>>>  config CMDLINE_FORCE
>>> -	bool "Built-in command line overrides bootloader arguments"
>>> -	depends on CMDLINE_BOOL
>>> +	bool "Forced"
>>>  	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.
>>> +	  Use the built-in command line in place of the command line
>>> +	  provided by the boot loader.
>>> 
>>> -	  If you don't know what to do here, say N.
>>> +endchoice
>>> 
>>>  endmenu
>> 
>> It looks like this is functionally equivalent to what ARM has, but the
>> polarity is a bit different and the help strings aren't as easy to
>> read.  Is there a reason we can't just copy what they do?
>> 
>>    config CMDLINE
>>            string "Default kernel command string"
>>            default ""
>>            help
>>              On some architectures (EBSA110 and CATS), there is 
>> currently no way
>>              for the boot loader to pass arguments to the kernel. For 
>> these
>>              architectures, you should supply some command-line 
>> options at build
>>              time by entering them here. As a minimum, you should 
>> specify the
>>              memory size and the root device (e.g., mem=64M 
>> root=/dev/nfs).
>>       choice
>>            prompt "Kernel command line type" if CMDLINE != ""
>>            default CMDLINE_FROM_BOOTLOADER
>>            depends on ATAGS
>>       config CMDLINE_FROM_BOOTLOADER
>>            bool "Use bootloader kernel arguments if available"
>>            help
>>              Uses the command-line options passed by the boot loader. 
>> If
>>              the boot loader doesn't provide any, the default kernel 
>> command
>>              string provided in CMDLINE will be used.
>>       config CMDLINE_EXTEND
>>            bool "Extend bootloader kernel arguments"
>>            help
>>              The command-line arguments provided by the boot loader 
>> will be
>>              appended to the default kernel command string.
>>       config CMDLINE_FORCE
>>            bool "Always use the default kernel command string"
>>            help
>>              Always use the default kernel command string, even if the 
>> boot
>>              loader passes other arguments to the kernel.
>>              This is useful if you cannot or don't want to change the
>>              command-line options your boot loader passes to the 
>> kernel.
>>    endchoice
>>    I'm not really opposed to your solution, I'm just trying to avoid
>> being different without a reason.
> 
> ATAGS and references to ARM platforms such as EBSA110 are not related 
> to RISC-V
> and I think CMDLINE_FALLBACK is more descriptive than 
> CMDLINE_FROM_BOOTLOADER.

Now that you mention it the text could be better. I just wanted to
keep them short and consistent. Do you want me to use ARM's text for
CMDLINE_EXTEND and CMDLINE_FORCE ?

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 17:14       ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-16 17:14 UTC (permalink / raw)
  To: Nick Kossifidis; +Cc: linux-riscv, Palmer Dabbelt, aou

Στις 2018-11-16 19:08, Nick Kossifidis έγραψε:
> Στις 2018-11-16 18:52, Palmer Dabbelt έγραψε:
>> On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick@ics.forth.gr wrote:
>>> Add a menu to chose how the built-in command line will be
>>> used and add CMDLINE_EXTEND for compatibility with FDT code.
>>> 
>>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>>> ---
>>>  arch/riscv/Kconfig | 45 
>>> ++++++++++++++++++++++++---------------------
>>>  1 file changed, 24 insertions(+), 21 deletions(-)
>>> 
>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>> index 55da93f4e818..81f884164b52 100644
>>> --- a/arch/riscv/Kconfig
>>> +++ b/arch/riscv/Kconfig
>>> @@ -227,39 +227,42 @@ endmenu
>>> 
>>>  menu "Boot options"
>>> 
>>> -config CMDLINE_BOOL
>>> -	bool "Built-in kernel command line"
>>> +config CMDLINE
>>> +	string "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.
>>> +	  the provided kernel command line or add a few extra options to 
>>> it.
>>> +	  For such cases, it is possible to define a built-in command line
>>> +	  here and chose how the kernel should use it later on.
>>> 
>>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>>> -	  in CONFIG_CMDLINE.
>>> +choice
>>> +	prompt "Built-in command line usage" if CMDLINE != ""
>>> +	default CMDLINE_FALLBACK
>>> +	help
>>> +	  Chose how the kernel will handle the provided built-in command
>>> +	  line.
>>> 
>>> -	  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_FALLBACK
>>> +	bool "Fallback"
>>> +	help
>>> +	  Use the built-in command line as fallback in case we get nothing
>>> +	  from the boot loader.
>>> 
>>> -config CMDLINE
>>> -	string "Built-in kernel command string"
>>> -	depends on CMDLINE_BOOL
>>> -	default ""
>>> +config CMDLINE_EXTEND
>>> +	bool "Extension"
>>>  	help
>>> -	  Supply command-line options at build time by entering them here.
>>> +	  Use the built-in command line as an extension of the command line
>>> +	  provided by the boot loader.
>>> 
>>>  config CMDLINE_FORCE
>>> -	bool "Built-in command line overrides bootloader arguments"
>>> -	depends on CMDLINE_BOOL
>>> +	bool "Forced"
>>>  	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.
>>> +	  Use the built-in command line in place of the command line
>>> +	  provided by the boot loader.
>>> 
>>> -	  If you don't know what to do here, say N.
>>> +endchoice
>>> 
>>>  endmenu
>> 
>> It looks like this is functionally equivalent to what ARM has, but the
>> polarity is a bit different and the help strings aren't as easy to
>> read.  Is there a reason we can't just copy what they do?
>> 
>>    config CMDLINE
>>            string "Default kernel command string"
>>            default ""
>>            help
>>              On some architectures (EBSA110 and CATS), there is 
>> currently no way
>>              for the boot loader to pass arguments to the kernel. For 
>> these
>>              architectures, you should supply some command-line 
>> options at build
>>              time by entering them here. As a minimum, you should 
>> specify the
>>              memory size and the root device (e.g., mem=64M 
>> root=/dev/nfs).
>>       choice
>>            prompt "Kernel command line type" if CMDLINE != ""
>>            default CMDLINE_FROM_BOOTLOADER
>>            depends on ATAGS
>>       config CMDLINE_FROM_BOOTLOADER
>>            bool "Use bootloader kernel arguments if available"
>>            help
>>              Uses the command-line options passed by the boot loader. 
>> If
>>              the boot loader doesn't provide any, the default kernel 
>> command
>>              string provided in CMDLINE will be used.
>>       config CMDLINE_EXTEND
>>            bool "Extend bootloader kernel arguments"
>>            help
>>              The command-line arguments provided by the boot loader 
>> will be
>>              appended to the default kernel command string.
>>       config CMDLINE_FORCE
>>            bool "Always use the default kernel command string"
>>            help
>>              Always use the default kernel command string, even if the 
>> boot
>>              loader passes other arguments to the kernel.
>>              This is useful if you cannot or don't want to change the
>>              command-line options your boot loader passes to the 
>> kernel.
>>    endchoice
>>    I'm not really opposed to your solution, I'm just trying to avoid
>> being different without a reason.
> 
> ATAGS and references to ARM platforms such as EBSA110 are not related 
> to RISC-V
> and I think CMDLINE_FALLBACK is more descriptive than 
> CMDLINE_FROM_BOOTLOADER.

Now that you mention it the text could be better. I just wanted to
keep them short and consistent. Do you want me to use ARM's text for
CMDLINE_EXTEND and CMDLINE_FORCE ?

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 17:27         ` Palmer Dabbelt
  0 siblings, 0 replies; 18+ messages in thread
From: Palmer Dabbelt @ 2018-11-16 17:27 UTC (permalink / raw)
  To: linux-riscv

On Fri, 16 Nov 2018 09:14:04 PST (-0800), mick at ics.forth.gr wrote:
> ???? 2018-11-16 19:08, Nick Kossifidis ??????:
>> ???? 2018-11-16 18:52, Palmer Dabbelt ??????:
>>> On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick at ics.forth.gr wrote:
>>>> Add a menu to chose how the built-in command line will be
>>>> used and add CMDLINE_EXTEND for compatibility with FDT code.
>>>>
>>>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>>>> ---
>>>>  arch/riscv/Kconfig | 45
>>>> ++++++++++++++++++++++++---------------------
>>>>  1 file changed, 24 insertions(+), 21 deletions(-)
>>>>
>>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>>> index 55da93f4e818..81f884164b52 100644
>>>> --- a/arch/riscv/Kconfig
>>>> +++ b/arch/riscv/Kconfig
>>>> @@ -227,39 +227,42 @@ endmenu
>>>>
>>>>  menu "Boot options"
>>>>
>>>> -config CMDLINE_BOOL
>>>> -	bool "Built-in kernel command line"
>>>> +config CMDLINE
>>>> +	string "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.
>>>> +	  the provided kernel command line or add a few extra options to
>>>> it.
>>>> +	  For such cases, it is possible to define a built-in command line
>>>> +	  here and chose how the kernel should use it later on.
>>>>
>>>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>>>> -	  in CONFIG_CMDLINE.
>>>> +choice
>>>> +	prompt "Built-in command line usage" if CMDLINE != ""
>>>> +	default CMDLINE_FALLBACK
>>>> +	help
>>>> +	  Chose how the kernel will handle the provided built-in command
>>>> +	  line.
>>>>
>>>> -	  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_FALLBACK
>>>> +	bool "Fallback"
>>>> +	help
>>>> +	  Use the built-in command line as fallback in case we get nothing
>>>> +	  from the boot loader.
>>>>
>>>> -config CMDLINE
>>>> -	string "Built-in kernel command string"
>>>> -	depends on CMDLINE_BOOL
>>>> -	default ""
>>>> +config CMDLINE_EXTEND
>>>> +	bool "Extension"
>>>>  	help
>>>> -	  Supply command-line options at build time by entering them here.
>>>> +	  Use the built-in command line as an extension of the command line
>>>> +	  provided by the boot loader.
>>>>
>>>>  config CMDLINE_FORCE
>>>> -	bool "Built-in command line overrides bootloader arguments"
>>>> -	depends on CMDLINE_BOOL
>>>> +	bool "Forced"
>>>>  	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.
>>>> +	  Use the built-in command line in place of the command line
>>>> +	  provided by the boot loader.
>>>>
>>>> -	  If you don't know what to do here, say N.
>>>> +endchoice
>>>>
>>>>  endmenu
>>>
>>> It looks like this is functionally equivalent to what ARM has, but the
>>> polarity is a bit different and the help strings aren't as easy to
>>> read.  Is there a reason we can't just copy what they do?
>>>
>>>    config CMDLINE
>>>            string "Default kernel command string"
>>>            default ""
>>>            help
>>>              On some architectures (EBSA110 and CATS), there is
>>> currently no way
>>>              for the boot loader to pass arguments to the kernel. For
>>> these
>>>              architectures, you should supply some command-line
>>> options at build
>>>              time by entering them here. As a minimum, you should
>>> specify the
>>>              memory size and the root device (e.g., mem=64M
>>> root=/dev/nfs).
>>>       choice
>>>            prompt "Kernel command line type" if CMDLINE != ""
>>>            default CMDLINE_FROM_BOOTLOADER
>>>            depends on ATAGS
>>>       config CMDLINE_FROM_BOOTLOADER
>>>            bool "Use bootloader kernel arguments if available"
>>>            help
>>>              Uses the command-line options passed by the boot loader.
>>> If
>>>              the boot loader doesn't provide any, the default kernel
>>> command
>>>              string provided in CMDLINE will be used.
>>>       config CMDLINE_EXTEND
>>>            bool "Extend bootloader kernel arguments"
>>>            help
>>>              The command-line arguments provided by the boot loader
>>> will be
>>>              appended to the default kernel command string.
>>>       config CMDLINE_FORCE
>>>            bool "Always use the default kernel command string"
>>>            help
>>>              Always use the default kernel command string, even if the
>>> boot
>>>              loader passes other arguments to the kernel.
>>>              This is useful if you cannot or don't want to change the
>>>              command-line options your boot loader passes to the
>>> kernel.
>>>    endchoice
>>>    I'm not really opposed to your solution, I'm just trying to avoid
>>> being different without a reason.
>>
>> ATAGS and references to ARM platforms such as EBSA110 are not related
>> to RISC-V
>> and I think CMDLINE_FALLBACK is more descriptive than
>> CMDLINE_FROM_BOOTLOADER.

OK.

> Now that you mention it the text could be better. I just wanted to
> keep them short and consistent. Do you want me to use ARM's text for
> CMDLINE_EXTEND and CMDLINE_FORCE ?

That's pretty much the only part I looked at.  "Extension" and "Forced" looked 
a bit too brief, so I grepped around and found the ARM one.  I only looked at 
the strings, I agree much of the help text makes no sense for RISC-V -- what 
was there is fine.

Can you re-spin the patch?

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 17:27         ` Palmer Dabbelt
  0 siblings, 0 replies; 18+ messages in thread
From: Palmer Dabbelt @ 2018-11-16 17:27 UTC (permalink / raw)
  To: mick; +Cc: mick, linux-riscv, aou

On Fri, 16 Nov 2018 09:14:04 PST (-0800), mick@ics.forth.gr wrote:
> Στις 2018-11-16 19:08, Nick Kossifidis έγραψε:
>> Στις 2018-11-16 18:52, Palmer Dabbelt έγραψε:
>>> On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick@ics.forth.gr wrote:
>>>> Add a menu to chose how the built-in command line will be
>>>> used and add CMDLINE_EXTEND for compatibility with FDT code.
>>>>
>>>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>>>> ---
>>>>  arch/riscv/Kconfig | 45
>>>> ++++++++++++++++++++++++---------------------
>>>>  1 file changed, 24 insertions(+), 21 deletions(-)
>>>>
>>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>>> index 55da93f4e818..81f884164b52 100644
>>>> --- a/arch/riscv/Kconfig
>>>> +++ b/arch/riscv/Kconfig
>>>> @@ -227,39 +227,42 @@ endmenu
>>>>
>>>>  menu "Boot options"
>>>>
>>>> -config CMDLINE_BOOL
>>>> -	bool "Built-in kernel command line"
>>>> +config CMDLINE
>>>> +	string "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.
>>>> +	  the provided kernel command line or add a few extra options to
>>>> it.
>>>> +	  For such cases, it is possible to define a built-in command line
>>>> +	  here and chose how the kernel should use it later on.
>>>>
>>>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>>>> -	  in CONFIG_CMDLINE.
>>>> +choice
>>>> +	prompt "Built-in command line usage" if CMDLINE != ""
>>>> +	default CMDLINE_FALLBACK
>>>> +	help
>>>> +	  Chose how the kernel will handle the provided built-in command
>>>> +	  line.
>>>>
>>>> -	  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_FALLBACK
>>>> +	bool "Fallback"
>>>> +	help
>>>> +	  Use the built-in command line as fallback in case we get nothing
>>>> +	  from the boot loader.
>>>>
>>>> -config CMDLINE
>>>> -	string "Built-in kernel command string"
>>>> -	depends on CMDLINE_BOOL
>>>> -	default ""
>>>> +config CMDLINE_EXTEND
>>>> +	bool "Extension"
>>>>  	help
>>>> -	  Supply command-line options at build time by entering them here.
>>>> +	  Use the built-in command line as an extension of the command line
>>>> +	  provided by the boot loader.
>>>>
>>>>  config CMDLINE_FORCE
>>>> -	bool "Built-in command line overrides bootloader arguments"
>>>> -	depends on CMDLINE_BOOL
>>>> +	bool "Forced"
>>>>  	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.
>>>> +	  Use the built-in command line in place of the command line
>>>> +	  provided by the boot loader.
>>>>
>>>> -	  If you don't know what to do here, say N.
>>>> +endchoice
>>>>
>>>>  endmenu
>>>
>>> It looks like this is functionally equivalent to what ARM has, but the
>>> polarity is a bit different and the help strings aren't as easy to
>>> read.  Is there a reason we can't just copy what they do?
>>>
>>>    config CMDLINE
>>>            string "Default kernel command string"
>>>            default ""
>>>            help
>>>              On some architectures (EBSA110 and CATS), there is
>>> currently no way
>>>              for the boot loader to pass arguments to the kernel. For
>>> these
>>>              architectures, you should supply some command-line
>>> options at build
>>>              time by entering them here. As a minimum, you should
>>> specify the
>>>              memory size and the root device (e.g., mem=64M
>>> root=/dev/nfs).
>>>       choice
>>>            prompt "Kernel command line type" if CMDLINE != ""
>>>            default CMDLINE_FROM_BOOTLOADER
>>>            depends on ATAGS
>>>       config CMDLINE_FROM_BOOTLOADER
>>>            bool "Use bootloader kernel arguments if available"
>>>            help
>>>              Uses the command-line options passed by the boot loader.
>>> If
>>>              the boot loader doesn't provide any, the default kernel
>>> command
>>>              string provided in CMDLINE will be used.
>>>       config CMDLINE_EXTEND
>>>            bool "Extend bootloader kernel arguments"
>>>            help
>>>              The command-line arguments provided by the boot loader
>>> will be
>>>              appended to the default kernel command string.
>>>       config CMDLINE_FORCE
>>>            bool "Always use the default kernel command string"
>>>            help
>>>              Always use the default kernel command string, even if the
>>> boot
>>>              loader passes other arguments to the kernel.
>>>              This is useful if you cannot or don't want to change the
>>>              command-line options your boot loader passes to the
>>> kernel.
>>>    endchoice
>>>    I'm not really opposed to your solution, I'm just trying to avoid
>>> being different without a reason.
>>
>> ATAGS and references to ARM platforms such as EBSA110 are not related
>> to RISC-V
>> and I think CMDLINE_FALLBACK is more descriptive than
>> CMDLINE_FROM_BOOTLOADER.

OK.

> Now that you mention it the text could be better. I just wanted to
> keep them short and consistent. Do you want me to use ARM's text for
> CMDLINE_EXTEND and CMDLINE_FORCE ?

That's pretty much the only part I looked at.  "Extension" and "Forced" looked 
a bit too brief, so I grepped around and found the ARM one.  I only looked at 
the strings, I agree much of the help text makes no sense for RISC-V -- what 
was there is fine.

Can you re-spin the patch?

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 17:33           ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-16 17:33 UTC (permalink / raw)
  To: linux-riscv

???? 2018-11-16 19:27, Palmer Dabbelt ??????:
> On Fri, 16 Nov 2018 09:14:04 PST (-0800), mick at ics.forth.gr wrote:
>> ???? 2018-11-16 19:08, Nick Kossifidis ??????:
>>> ???? 2018-11-16 18:52, Palmer Dabbelt ??????:
>>>> On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick at ics.forth.gr wrote:
>>>>> Add a menu to chose how the built-in command line will be
>>>>> used and add CMDLINE_EXTEND for compatibility with FDT code.
>>>>> 
>>>>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>>>>> ---
>>>>>  arch/riscv/Kconfig | 45
>>>>> ++++++++++++++++++++++++---------------------
>>>>>  1 file changed, 24 insertions(+), 21 deletions(-)
>>>>> 
>>>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>>>> index 55da93f4e818..81f884164b52 100644
>>>>> --- a/arch/riscv/Kconfig
>>>>> +++ b/arch/riscv/Kconfig
>>>>> @@ -227,39 +227,42 @@ endmenu
>>>>> 
>>>>>  menu "Boot options"
>>>>> 
>>>>> -config CMDLINE_BOOL
>>>>> -	bool "Built-in kernel command line"
>>>>> +config CMDLINE
>>>>> +	string "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.
>>>>> +	  the provided kernel command line or add a few extra options to
>>>>> it.
>>>>> +	  For such cases, it is possible to define a built-in command 
>>>>> line
>>>>> +	  here and chose how the kernel should use it later on.
>>>>> 
>>>>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>>>>> -	  in CONFIG_CMDLINE.
>>>>> +choice
>>>>> +	prompt "Built-in command line usage" if CMDLINE != ""
>>>>> +	default CMDLINE_FALLBACK
>>>>> +	help
>>>>> +	  Chose how the kernel will handle the provided built-in command
>>>>> +	  line.
>>>>> 
>>>>> -	  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_FALLBACK
>>>>> +	bool "Fallback"
>>>>> +	help
>>>>> +	  Use the built-in command line as fallback in case we get 
>>>>> nothing
>>>>> +	  from the boot loader.
>>>>> 
>>>>> -config CMDLINE
>>>>> -	string "Built-in kernel command string"
>>>>> -	depends on CMDLINE_BOOL
>>>>> -	default ""
>>>>> +config CMDLINE_EXTEND
>>>>> +	bool "Extension"
>>>>>  	help
>>>>> -	  Supply command-line options at build time by entering them 
>>>>> here.
>>>>> +	  Use the built-in command line as an extension of the command 
>>>>> line
>>>>> +	  provided by the boot loader.
>>>>> 
>>>>>  config CMDLINE_FORCE
>>>>> -	bool "Built-in command line overrides bootloader arguments"
>>>>> -	depends on CMDLINE_BOOL
>>>>> +	bool "Forced"
>>>>>  	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.
>>>>> +	  Use the built-in command line in place of the command line
>>>>> +	  provided by the boot loader.
>>>>> 
>>>>> -	  If you don't know what to do here, say N.
>>>>> +endchoice
>>>>> 
>>>>>  endmenu
>>>> 
>>>> It looks like this is functionally equivalent to what ARM has, but 
>>>> the
>>>> polarity is a bit different and the help strings aren't as easy to
>>>> read.  Is there a reason we can't just copy what they do?
>>>> 
>>>>    config CMDLINE
>>>>            string "Default kernel command string"
>>>>            default ""
>>>>            help
>>>>              On some architectures (EBSA110 and CATS), there is
>>>> currently no way
>>>>              for the boot loader to pass arguments to the kernel. 
>>>> For
>>>> these
>>>>              architectures, you should supply some command-line
>>>> options at build
>>>>              time by entering them here. As a minimum, you should
>>>> specify the
>>>>              memory size and the root device (e.g., mem=64M
>>>> root=/dev/nfs).
>>>>       choice
>>>>            prompt "Kernel command line type" if CMDLINE != ""
>>>>            default CMDLINE_FROM_BOOTLOADER
>>>>            depends on ATAGS
>>>>       config CMDLINE_FROM_BOOTLOADER
>>>>            bool "Use bootloader kernel arguments if available"
>>>>            help
>>>>              Uses the command-line options passed by the boot 
>>>> loader.
>>>> If
>>>>              the boot loader doesn't provide any, the default kernel
>>>> command
>>>>              string provided in CMDLINE will be used.
>>>>       config CMDLINE_EXTEND
>>>>            bool "Extend bootloader kernel arguments"
>>>>            help
>>>>              The command-line arguments provided by the boot loader
>>>> will be
>>>>              appended to the default kernel command string.
>>>>       config CMDLINE_FORCE
>>>>            bool "Always use the default kernel command string"
>>>>            help
>>>>              Always use the default kernel command string, even if 
>>>> the
>>>> boot
>>>>              loader passes other arguments to the kernel.
>>>>              This is useful if you cannot or don't want to change 
>>>> the
>>>>              command-line options your boot loader passes to the
>>>> kernel.
>>>>    endchoice
>>>>    I'm not really opposed to your solution, I'm just trying to avoid
>>>> being different without a reason.
>>> 
>>> ATAGS and references to ARM platforms such as EBSA110 are not related
>>> to RISC-V
>>> and I think CMDLINE_FALLBACK is more descriptive than
>>> CMDLINE_FROM_BOOTLOADER.
> 
> OK.
> 
>> Now that you mention it the text could be better. I just wanted to
>> keep them short and consistent. Do you want me to use ARM's text for
>> CMDLINE_EXTEND and CMDLINE_FORCE ?
> 
> That's pretty much the only part I looked at.  "Extension" and
> "Forced" looked a bit too brief, so I grepped around and found the ARM
> one.  I only looked at the strings, I agree much of the help text
> makes no sense for RISC-V -- what was there is fine.
> 
> Can you re-spin the patch?

ACK

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-16 17:33           ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-16 17:33 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: mick, linux-riscv, aou

Στις 2018-11-16 19:27, Palmer Dabbelt έγραψε:
> On Fri, 16 Nov 2018 09:14:04 PST (-0800), mick@ics.forth.gr wrote:
>> Στις 2018-11-16 19:08, Nick Kossifidis έγραψε:
>>> Στις 2018-11-16 18:52, Palmer Dabbelt έγραψε:
>>>> On Fri, 09 Nov 2018 17:02:44 PST (-0800), mick@ics.forth.gr wrote:
>>>>> Add a menu to chose how the built-in command line will be
>>>>> used and add CMDLINE_EXTEND for compatibility with FDT code.
>>>>> 
>>>>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>>>>> ---
>>>>>  arch/riscv/Kconfig | 45
>>>>> ++++++++++++++++++++++++---------------------
>>>>>  1 file changed, 24 insertions(+), 21 deletions(-)
>>>>> 
>>>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>>>> index 55da93f4e818..81f884164b52 100644
>>>>> --- a/arch/riscv/Kconfig
>>>>> +++ b/arch/riscv/Kconfig
>>>>> @@ -227,39 +227,42 @@ endmenu
>>>>> 
>>>>>  menu "Boot options"
>>>>> 
>>>>> -config CMDLINE_BOOL
>>>>> -	bool "Built-in kernel command line"
>>>>> +config CMDLINE
>>>>> +	string "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.
>>>>> +	  the provided kernel command line or add a few extra options to
>>>>> it.
>>>>> +	  For such cases, it is possible to define a built-in command 
>>>>> line
>>>>> +	  here and chose how the kernel should use it later on.
>>>>> 
>>>>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>>>>> -	  in CONFIG_CMDLINE.
>>>>> +choice
>>>>> +	prompt "Built-in command line usage" if CMDLINE != ""
>>>>> +	default CMDLINE_FALLBACK
>>>>> +	help
>>>>> +	  Chose how the kernel will handle the provided built-in command
>>>>> +	  line.
>>>>> 
>>>>> -	  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_FALLBACK
>>>>> +	bool "Fallback"
>>>>> +	help
>>>>> +	  Use the built-in command line as fallback in case we get 
>>>>> nothing
>>>>> +	  from the boot loader.
>>>>> 
>>>>> -config CMDLINE
>>>>> -	string "Built-in kernel command string"
>>>>> -	depends on CMDLINE_BOOL
>>>>> -	default ""
>>>>> +config CMDLINE_EXTEND
>>>>> +	bool "Extension"
>>>>>  	help
>>>>> -	  Supply command-line options at build time by entering them 
>>>>> here.
>>>>> +	  Use the built-in command line as an extension of the command 
>>>>> line
>>>>> +	  provided by the boot loader.
>>>>> 
>>>>>  config CMDLINE_FORCE
>>>>> -	bool "Built-in command line overrides bootloader arguments"
>>>>> -	depends on CMDLINE_BOOL
>>>>> +	bool "Forced"
>>>>>  	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.
>>>>> +	  Use the built-in command line in place of the command line
>>>>> +	  provided by the boot loader.
>>>>> 
>>>>> -	  If you don't know what to do here, say N.
>>>>> +endchoice
>>>>> 
>>>>>  endmenu
>>>> 
>>>> It looks like this is functionally equivalent to what ARM has, but 
>>>> the
>>>> polarity is a bit different and the help strings aren't as easy to
>>>> read.  Is there a reason we can't just copy what they do?
>>>> 
>>>>    config CMDLINE
>>>>            string "Default kernel command string"
>>>>            default ""
>>>>            help
>>>>              On some architectures (EBSA110 and CATS), there is
>>>> currently no way
>>>>              for the boot loader to pass arguments to the kernel. 
>>>> For
>>>> these
>>>>              architectures, you should supply some command-line
>>>> options at build
>>>>              time by entering them here. As a minimum, you should
>>>> specify the
>>>>              memory size and the root device (e.g., mem=64M
>>>> root=/dev/nfs).
>>>>       choice
>>>>            prompt "Kernel command line type" if CMDLINE != ""
>>>>            default CMDLINE_FROM_BOOTLOADER
>>>>            depends on ATAGS
>>>>       config CMDLINE_FROM_BOOTLOADER
>>>>            bool "Use bootloader kernel arguments if available"
>>>>            help
>>>>              Uses the command-line options passed by the boot 
>>>> loader.
>>>> If
>>>>              the boot loader doesn't provide any, the default kernel
>>>> command
>>>>              string provided in CMDLINE will be used.
>>>>       config CMDLINE_EXTEND
>>>>            bool "Extend bootloader kernel arguments"
>>>>            help
>>>>              The command-line arguments provided by the boot loader
>>>> will be
>>>>              appended to the default kernel command string.
>>>>       config CMDLINE_FORCE
>>>>            bool "Always use the default kernel command string"
>>>>            help
>>>>              Always use the default kernel command string, even if 
>>>> the
>>>> boot
>>>>              loader passes other arguments to the kernel.
>>>>              This is useful if you cannot or don't want to change 
>>>> the
>>>>              command-line options your boot loader passes to the
>>>> kernel.
>>>>    endchoice
>>>>    I'm not really opposed to your solution, I'm just trying to avoid
>>>> being different without a reason.
>>> 
>>> ATAGS and references to ARM platforms such as EBSA110 are not related
>>> to RISC-V
>>> and I think CMDLINE_FALLBACK is more descriptive than
>>> CMDLINE_FROM_BOOTLOADER.
> 
> OK.
> 
>> Now that you mention it the text could be better. I just wanted to
>> keep them short and consistent. Do you want me to use ARM's text for
>> CMDLINE_EXTEND and CMDLINE_FORCE ?
> 
> That's pretty much the only part I looked at.  "Extension" and
> "Forced" looked a bit too brief, so I grepped around and found the ARM
> one.  I only looked at the strings, I agree much of the help text
> makes no sense for RISC-V -- what was there is fine.
> 
> Can you re-spin the patch?

ACK

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-09 21:05     ` Palmer Dabbelt
  0 siblings, 0 replies; 18+ messages in thread
From: Palmer Dabbelt @ 2018-11-09 21:05 UTC (permalink / raw)
  To: linux-riscv

On Fri, 09 Nov 2018 10:34:00 PST (-0800), mick at ics.forth.gr wrote:
> Hello Palmer,
>
> ???? 2018-10-04 14:32, Nick Kossifidis ??????:
>> Add a menu to chose how the built-in command line will be used and
>> add CMDLINE_EXTEND for compatibility with FDT code.
>>
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>> ---
>>  arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
>>  1 file changed, 24 insertions(+), 21 deletions(-)
>>
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index 82172bf85..cce141552 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -218,39 +218,42 @@ endmenu
>>
>>  menu "Boot options"
>>
>> -config CMDLINE_BOOL
>> -	bool "Built-in kernel command line"
>> +config CMDLINE
>> +	string "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.
>> +	  the provided kernel command line or add a few extra options to it.
>> +	  For such cases, it is possible to define a built-in command line
>> +	  here and chose how the kernel should use it later on.
>>
>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>> -	  in CONFIG_CMDLINE.
>> +choice
>> +	prompt "Built-in command line usage" if CMDLINE != ""
>> +	default CMDLINE_FALLBACK
>> +	help
>> +	  Chose how the kernel will handle the provided built-in command
>> +	  line.
>>
>> -	  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_FALLBACK
>> +	bool "Fallback"
>> +	help
>> +	  Use the built-in command line as fallback in case we get nothing
>> +	  from the boot loader.
>>
>> -config CMDLINE
>> -	string "Built-in kernel command string"
>> -	depends on CMDLINE_BOOL
>> -	default ""
>> +config CMDLINE_EXTEND
>> +	bool "Extension"
>>  	help
>> -	  Supply command-line options at build time by entering them here.
>> +	  Use the built-in command line as an extension of the command line
>> +	  provided by the boot loader.
>>
>>  config CMDLINE_FORCE
>> -	bool "Built-in command line overrides bootloader arguments"
>> -	depends on CMDLINE_BOOL
>> +	bool "Forced"
>>  	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.
>> +	  Use the built-in command line in place of the command line
>> +	  provided by the boot loader.
>>
>> -	  If you don't know what to do here, say N.
>> +endchoice
>>
>>  endmenu
>
> Since we'll be using FDT only for handling cmdline, this one is still
> needed
> because FDT code uses CMDLINE_EXTEND / FALLBACK instead. Do you want me
> to
> re-send ?

That would be great, thanks.  I lost track of the discussion on the generic 
fix.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-09 21:05     ` Palmer Dabbelt
  0 siblings, 0 replies; 18+ messages in thread
From: Palmer Dabbelt @ 2018-11-09 21:05 UTC (permalink / raw)
  To: mick; +Cc: mick, linux-riscv, aou

On Fri, 09 Nov 2018 10:34:00 PST (-0800), mick@ics.forth.gr wrote:
> Hello Palmer,
>
> Στις 2018-10-04 14:32, Nick Kossifidis έγραψε:
>> Add a menu to chose how the built-in command line will be used and
>> add CMDLINE_EXTEND for compatibility with FDT code.
>>
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>> ---
>>  arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
>>  1 file changed, 24 insertions(+), 21 deletions(-)
>>
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index 82172bf85..cce141552 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -218,39 +218,42 @@ endmenu
>>
>>  menu "Boot options"
>>
>> -config CMDLINE_BOOL
>> -	bool "Built-in kernel command line"
>> +config CMDLINE
>> +	string "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.
>> +	  the provided kernel command line or add a few extra options to it.
>> +	  For such cases, it is possible to define a built-in command line
>> +	  here and chose how the kernel should use it later on.
>>
>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>> -	  in CONFIG_CMDLINE.
>> +choice
>> +	prompt "Built-in command line usage" if CMDLINE != ""
>> +	default CMDLINE_FALLBACK
>> +	help
>> +	  Chose how the kernel will handle the provided built-in command
>> +	  line.
>>
>> -	  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_FALLBACK
>> +	bool "Fallback"
>> +	help
>> +	  Use the built-in command line as fallback in case we get nothing
>> +	  from the boot loader.
>>
>> -config CMDLINE
>> -	string "Built-in kernel command string"
>> -	depends on CMDLINE_BOOL
>> -	default ""
>> +config CMDLINE_EXTEND
>> +	bool "Extension"
>>  	help
>> -	  Supply command-line options at build time by entering them here.
>> +	  Use the built-in command line as an extension of the command line
>> +	  provided by the boot loader.
>>
>>  config CMDLINE_FORCE
>> -	bool "Built-in command line overrides bootloader arguments"
>> -	depends on CMDLINE_BOOL
>> +	bool "Forced"
>>  	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.
>> +	  Use the built-in command line in place of the command line
>> +	  provided by the boot loader.
>>
>> -	  If you don't know what to do here, say N.
>> +endchoice
>>
>>  endmenu
>
> Since we'll be using FDT only for handling cmdline, this one is still
> needed
> because FDT code uses CMDLINE_EXTEND / FALLBACK instead. Do you want me
> to
> re-send ?

That would be great, thanks.  I lost track of the discussion on the generic 
fix.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-09 18:34   ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-09 18:34 UTC (permalink / raw)
  To: linux-riscv

Hello Palmer,

???? 2018-10-04 14:32, Nick Kossifidis ??????:
> Add a menu to chose how the built-in command line will be used and
> add CMDLINE_EXTEND for compatibility with FDT code.
> 
> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> ---
>  arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
>  1 file changed, 24 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 82172bf85..cce141552 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -218,39 +218,42 @@ endmenu
> 
>  menu "Boot options"
> 
> -config CMDLINE_BOOL
> -	bool "Built-in kernel command line"
> +config CMDLINE
> +	string "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.
> +	  the provided kernel command line or add a few extra options to it.
> +	  For such cases, it is possible to define a built-in command line
> +	  here and chose how the kernel should use it later on.
> 
> -	  For that, choose 'Y' here and fill in the extra boot parameters
> -	  in CONFIG_CMDLINE.
> +choice
> +	prompt "Built-in command line usage" if CMDLINE != ""
> +	default CMDLINE_FALLBACK
> +	help
> +	  Chose how the kernel will handle the provided built-in command
> +	  line.
> 
> -	  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_FALLBACK
> +	bool "Fallback"
> +	help
> +	  Use the built-in command line as fallback in case we get nothing
> +	  from the boot loader.
> 
> -config CMDLINE
> -	string "Built-in kernel command string"
> -	depends on CMDLINE_BOOL
> -	default ""
> +config CMDLINE_EXTEND
> +	bool "Extension"
>  	help
> -	  Supply command-line options at build time by entering them here.
> +	  Use the built-in command line as an extension of the command line
> +	  provided by the boot loader.
> 
>  config CMDLINE_FORCE
> -	bool "Built-in command line overrides bootloader arguments"
> -	depends on CMDLINE_BOOL
> +	bool "Forced"
>  	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.
> +	  Use the built-in command line in place of the command line
> +	  provided by the boot loader.
> 
> -	  If you don't know what to do here, say N.
> +endchoice
> 
>  endmenu

Since we'll be using FDT only for handling cmdline, this one is still 
needed
because FDT code uses CMDLINE_EXTEND / FALLBACK instead. Do you want me 
to
re-send ?

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-09 18:34   ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-11-09 18:34 UTC (permalink / raw)
  To: palmer; +Cc: mick, linux-riscv, aou

Hello Palmer,

Στις 2018-10-04 14:32, Nick Kossifidis έγραψε:
> Add a menu to chose how the built-in command line will be used and
> add CMDLINE_EXTEND for compatibility with FDT code.
> 
> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> ---
>  arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
>  1 file changed, 24 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 82172bf85..cce141552 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -218,39 +218,42 @@ endmenu
> 
>  menu "Boot options"
> 
> -config CMDLINE_BOOL
> -	bool "Built-in kernel command line"
> +config CMDLINE
> +	string "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.
> +	  the provided kernel command line or add a few extra options to it.
> +	  For such cases, it is possible to define a built-in command line
> +	  here and chose how the kernel should use it later on.
> 
> -	  For that, choose 'Y' here and fill in the extra boot parameters
> -	  in CONFIG_CMDLINE.
> +choice
> +	prompt "Built-in command line usage" if CMDLINE != ""
> +	default CMDLINE_FALLBACK
> +	help
> +	  Chose how the kernel will handle the provided built-in command
> +	  line.
> 
> -	  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_FALLBACK
> +	bool "Fallback"
> +	help
> +	  Use the built-in command line as fallback in case we get nothing
> +	  from the boot loader.
> 
> -config CMDLINE
> -	string "Built-in kernel command string"
> -	depends on CMDLINE_BOOL
> -	default ""
> +config CMDLINE_EXTEND
> +	bool "Extension"
>  	help
> -	  Supply command-line options at build time by entering them here.
> +	  Use the built-in command line as an extension of the command line
> +	  provided by the boot loader.
> 
>  config CMDLINE_FORCE
> -	bool "Built-in command line overrides bootloader arguments"
> -	depends on CMDLINE_BOOL
> +	bool "Forced"
>  	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.
> +	  Use the built-in command line in place of the command line
> +	  provided by the boot loader.
> 
> -	  If you don't know what to do here, say N.
> +endchoice
> 
>  endmenu

Since we'll be using FDT only for handling cmdline, this one is still 
needed
because FDT code uses CMDLINE_EXTEND / FALLBACK instead. Do you want me 
to
re-send ?

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-10-04 11:32 ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-10-04 11:32 UTC (permalink / raw)
  To: linux-riscv

Add a menu to chose how the built-in command line will be used and
add CMDLINE_EXTEND for compatibility with FDT code.

Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
---
 arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 21 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 82172bf85..cce141552 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -218,39 +218,42 @@ endmenu
 
 menu "Boot options"
 
-config CMDLINE_BOOL
-	bool "Built-in kernel command line"
+config CMDLINE
+	string "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.
+	  the provided kernel command line or add a few extra options to it.
+	  For such cases, it is possible to define a built-in command line
+	  here and chose how the kernel should use it later on.
 
-	  For that, choose 'Y' here and fill in the extra boot parameters
-	  in CONFIG_CMDLINE.
+choice
+	prompt "Built-in command line usage" if CMDLINE != ""
+	default CMDLINE_FALLBACK
+	help
+	  Chose how the kernel will handle the provided built-in command
+	  line.
 
-	  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_FALLBACK
+	bool "Fallback"
+	help
+	  Use the built-in command line as fallback in case we get nothing
+	  from the boot loader.
 
-config CMDLINE
-	string "Built-in kernel command string"
-	depends on CMDLINE_BOOL
-	default ""
+config CMDLINE_EXTEND
+	bool "Extension"
 	help
-	  Supply command-line options at build time by entering them here.
+	  Use the built-in command line as an extension of the command line
+	  provided by the boot loader.
 
 config CMDLINE_FORCE
-	bool "Built-in command line overrides bootloader arguments"
-	depends on CMDLINE_BOOL
+	bool "Forced"
 	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.
+	  Use the built-in command line in place of the command line
+	  provided by the boot loader.
 
-	  If you don't know what to do here, say N.
+endchoice
 
 endmenu
 
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-10-04 11:32 ` Nick Kossifidis
  0 siblings, 0 replies; 18+ messages in thread
From: Nick Kossifidis @ 2018-10-04 11:32 UTC (permalink / raw)
  To: linux-riscv; +Cc: Nick Kossifidis, palmer, aou

Add a menu to chose how the built-in command line will be used and
add CMDLINE_EXTEND for compatibility with FDT code.

Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
---
 arch/riscv/Kconfig | 45 ++++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 21 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 82172bf85..cce141552 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -218,39 +218,42 @@ endmenu
 
 menu "Boot options"
 
-config CMDLINE_BOOL
-	bool "Built-in kernel command line"
+config CMDLINE
+	string "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.
+	  the provided kernel command line or add a few extra options to it.
+	  For such cases, it is possible to define a built-in command line
+	  here and chose how the kernel should use it later on.
 
-	  For that, choose 'Y' here and fill in the extra boot parameters
-	  in CONFIG_CMDLINE.
+choice
+	prompt "Built-in command line usage" if CMDLINE != ""
+	default CMDLINE_FALLBACK
+	help
+	  Chose how the kernel will handle the provided built-in command
+	  line.
 
-	  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_FALLBACK
+	bool "Fallback"
+	help
+	  Use the built-in command line as fallback in case we get nothing
+	  from the boot loader.
 
-config CMDLINE
-	string "Built-in kernel command string"
-	depends on CMDLINE_BOOL
-	default ""
+config CMDLINE_EXTEND
+	bool "Extension"
 	help
-	  Supply command-line options at build time by entering them here.
+	  Use the built-in command line as an extension of the command line
+	  provided by the boot loader.
 
 config CMDLINE_FORCE
-	bool "Built-in command line overrides bootloader arguments"
-	depends on CMDLINE_BOOL
+	bool "Forced"
 	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.
+	  Use the built-in command line in place of the command line
+	  provided by the boot loader.
 
-	  If you don't know what to do here, say N.
+endchoice
 
 endmenu
 
-- 
2.16.4


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2018-11-16 17:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-10  1:02 [PATCH] RISC-V: Update Kconfig to better handle CMDLINE Nick Kossifidis
2018-11-10  1:02 ` Nick Kossifidis
2018-11-16 16:52 ` Palmer Dabbelt
2018-11-16 16:52   ` Palmer Dabbelt
2018-11-16 17:08   ` Nick Kossifidis
2018-11-16 17:08     ` Nick Kossifidis
2018-11-16 17:14     ` Nick Kossifidis
2018-11-16 17:14       ` Nick Kossifidis
2018-11-16 17:27       ` Palmer Dabbelt
2018-11-16 17:27         ` Palmer Dabbelt
2018-11-16 17:33         ` Nick Kossifidis
2018-11-16 17:33           ` Nick Kossifidis
  -- strict thread matches above, loose matches on Subject: below --
2018-10-04 11:32 Nick Kossifidis
2018-10-04 11:32 ` Nick Kossifidis
2018-11-09 18:34 ` Nick Kossifidis
2018-11-09 18:34   ` Nick Kossifidis
2018-11-09 21:05   ` Palmer Dabbelt
2018-11-09 21:05     ` Palmer Dabbelt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.