Linux-RISC-V Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
@ 2018-11-19 21:09 palmer
  2018-11-19 21:09 ` Palmer Dabbelt
  2018-11-19 22:37 ` atish.patra
  0 siblings, 2 replies; 10+ messages in thread
From: palmer @ 2018-11-19 21:09 UTC (permalink / raw)
  To: linux-riscv

From: Nick Kossifidis <mick@ics.forth.gr>

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

v2: Improved help messages, removed references to bootloader
and made them more descriptive. I also asked help from a
friend who's a language expert just in case.

v3: This time used the corrected text

v4: Copy the config strings from the arm32 port.

v5: Actually copy the config strings from the arm32 port.

Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
 arch/riscv/Kconfig | 57 +++++++++++++++++++++++++++-------------------
 1 file changed, 33 insertions(+), 24 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 55da93f4e818..23ac6d6f9ab2 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -227,39 +227,48 @@ endmenu
 
 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.
+	  For most platforms, the arguments for the kernel's command line
+	  are provided at run-time, during boot. However, there are cases
+	  where either no arguments are being provided or the provided
+	  arguments are insufficient or even invalid.
 
-	  For that, choose 'Y' here and fill in the extra boot parameters
-	  in CONFIG_CMDLINE.
+	  When that occurs, it is possible to define a built-in command
+	  line here and choose how the kernel should use it later on.
 
-	  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.
+choice
+	prompt "Built-in command line usage" if CMDLINE != ""
+	default CMDLINE_FALLBACK
+	help
+	  Choose how the kernel will handle the provided built-in command
+	  line.
 
-config CMDLINE
-	string "Built-in kernel command string"
-	depends on CMDLINE_BOOL
-	default ""
+config CMDLINE_FALLBACK
+	bool "Use bootloader kernel arguments if available"
 	help
-	  Supply command-line options at build time by entering them here.
+	  Use the built-in command line as fallback in case we get nothing
+	  during boot. This is the default behaviour.
+
+config CMDLINE_EXTEND
+	bool "Extend bootloader kernel arguments"
+	help
+	  The command-line arguments provided during boot will be
+	  appended to the built-in command line. This is useful in
+	  cases where the provided arguments are insufficient and
+	  you don't want to or cannot modify them.
+
 
 config CMDLINE_FORCE
-	bool "Built-in command line overrides bootloader arguments"
-	depends on CMDLINE_BOOL
+	bool "Always use the default kernel command string"
 	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.
+	  Always use the built-in command line, even if we get one during
+	  boot. This is useful in case you need to override the provided
+	  command line on systems where you don't have or want control
+	  over it.
 
-	  If you don't know what to do here, say N.
+endchoice
 
 endmenu
 
-- 
2.18.1

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

* [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
  2018-11-19 21:09 [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE palmer
@ 2018-11-19 21:09 ` Palmer Dabbelt
  2018-11-19 22:37 ` atish.patra
  1 sibling, 0 replies; 10+ messages in thread
From: Palmer Dabbelt @ 2018-11-19 21:09 UTC (permalink / raw)
  To: mick, dmaliotaki; +Cc: linux-riscv, Palmer Dabbelt

From: Nick Kossifidis <mick@ics.forth.gr>

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

v2: Improved help messages, removed references to bootloader
and made them more descriptive. I also asked help from a
friend who's a language expert just in case.

v3: This time used the corrected text

v4: Copy the config strings from the arm32 port.

v5: Actually copy the config strings from the arm32 port.

Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
 arch/riscv/Kconfig | 57 +++++++++++++++++++++++++++-------------------
 1 file changed, 33 insertions(+), 24 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 55da93f4e818..23ac6d6f9ab2 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -227,39 +227,48 @@ endmenu
 
 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.
+	  For most platforms, the arguments for the kernel's command line
+	  are provided at run-time, during boot. However, there are cases
+	  where either no arguments are being provided or the provided
+	  arguments are insufficient or even invalid.
 
-	  For that, choose 'Y' here and fill in the extra boot parameters
-	  in CONFIG_CMDLINE.
+	  When that occurs, it is possible to define a built-in command
+	  line here and choose how the kernel should use it later on.
 
-	  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.
+choice
+	prompt "Built-in command line usage" if CMDLINE != ""
+	default CMDLINE_FALLBACK
+	help
+	  Choose how the kernel will handle the provided built-in command
+	  line.
 
-config CMDLINE
-	string "Built-in kernel command string"
-	depends on CMDLINE_BOOL
-	default ""
+config CMDLINE_FALLBACK
+	bool "Use bootloader kernel arguments if available"
 	help
-	  Supply command-line options at build time by entering them here.
+	  Use the built-in command line as fallback in case we get nothing
+	  during boot. This is the default behaviour.
+
+config CMDLINE_EXTEND
+	bool "Extend bootloader kernel arguments"
+	help
+	  The command-line arguments provided during boot will be
+	  appended to the built-in command line. This is useful in
+	  cases where the provided arguments are insufficient and
+	  you don't want to or cannot modify them.
+
 
 config CMDLINE_FORCE
-	bool "Built-in command line overrides bootloader arguments"
-	depends on CMDLINE_BOOL
+	bool "Always use the default kernel command string"
 	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.
+	  Always use the built-in command line, even if we get one during
+	  boot. This is useful in case you need to override the provided
+	  command line on systems where you don't have or want control
+	  over it.
 
-	  If you don't know what to do here, say N.
+endchoice
 
 endmenu
 
-- 
2.18.1


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

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

* [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
  2018-11-19 21:09 [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE palmer
  2018-11-19 21:09 ` Palmer Dabbelt
@ 2018-11-19 22:37 ` atish.patra
  2018-11-19 22:37   ` Atish Patra
                     ` (2 more replies)
  1 sibling, 3 replies; 10+ messages in thread
From: atish.patra @ 2018-11-19 22:37 UTC (permalink / raw)
  To: linux-riscv

On 11/19/18 1:10 PM, Palmer Dabbelt wrote:
> From: Nick Kossifidis <mick@ics.forth.gr>
> 
> Added a menu to choose how the built-in command line will be
> used and CMDLINE_EXTEND for compatibility with FDT code.
> 
> v2: Improved help messages, removed references to bootloader
> and made them more descriptive. I also asked help from a
> friend who's a language expert just in case.
> 
> v3: This time used the corrected text
> 
> v4: Copy the config strings from the arm32 port.
> 
> v5: Actually copy the config strings from the arm32 port.

Why not use CMDLINE_FROM_BOOTLOADER instead of CMDLINE_FALLBACK in that 
case? To my ears, CMDLINE_FROM_BOOTLOADER made more sense given the 
description. If CMDLINE_FALLBACK is retained intentionally, then it's ok.

Regards,
Atish
> 
> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
> ---
>   arch/riscv/Kconfig | 57 +++++++++++++++++++++++++++-------------------
>   1 file changed, 33 insertions(+), 24 deletions(-)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 55da93f4e818..23ac6d6f9ab2 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -227,39 +227,48 @@ endmenu
>   
>   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.
> +	  For most platforms, the arguments for the kernel's command line
> +	  are provided at run-time, during boot. However, there are cases
> +	  where either no arguments are being provided or the provided
> +	  arguments are insufficient or even invalid.
>   
> -	  For that, choose 'Y' here and fill in the extra boot parameters
> -	  in CONFIG_CMDLINE.
> +	  When that occurs, it is possible to define a built-in command
> +	  line here and choose how the kernel should use it later on.
>   
> -	  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.
> +choice
> +	prompt "Built-in command line usage" if CMDLINE != ""
> +	default CMDLINE_FALLBACK
> +	help
> +	  Choose how the kernel will handle the provided built-in command
> +	  line.
>   
> -config CMDLINE
> -	string "Built-in kernel command string"
> -	depends on CMDLINE_BOOL
> -	default ""
> +config CMDLINE_FALLBACK
> +	bool "Use bootloader kernel arguments if available"
>   	help
> -	  Supply command-line options at build time by entering them here.
> +	  Use the built-in command line as fallback in case we get nothing
> +	  during boot. This is the default behaviour.
> 
> +config CMDLINE_EXTEND
> +	bool "Extend bootloader kernel arguments"
> +	help
> +	  The command-line arguments provided during boot will be
> +	  appended to the built-in command line. This is useful in
> +	  cases where the provided arguments are insufficient and
> +	  you don't want to or cannot modify them.
> +
>   
>   config CMDLINE_FORCE
> -	bool "Built-in command line overrides bootloader arguments"
> -	depends on CMDLINE_BOOL
> +	bool "Always use the default kernel command string"
>   	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.
> +	  Always use the built-in command line, even if we get one during
> +	  boot. This is useful in case you need to override the provided
> +	  command line on systems where you don't have or want control
> +	  over it.
>   
> -	  If you don't know what to do here, say N.
> +endchoice
>   
>   endmenu
>   
> 

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

* Re: [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
  2018-11-19 22:37 ` atish.patra
@ 2018-11-19 22:37   ` Atish Patra
  2018-11-19 22:48   ` mick
  2018-11-20 16:12   ` palmer
  2 siblings, 0 replies; 10+ messages in thread
From: Atish Patra @ 2018-11-19 22:37 UTC (permalink / raw)
  To: Palmer Dabbelt, mick, dmaliotaki; +Cc: linux-riscv

On 11/19/18 1:10 PM, Palmer Dabbelt wrote:
> From: Nick Kossifidis <mick@ics.forth.gr>
> 
> Added a menu to choose how the built-in command line will be
> used and CMDLINE_EXTEND for compatibility with FDT code.
> 
> v2: Improved help messages, removed references to bootloader
> and made them more descriptive. I also asked help from a
> friend who's a language expert just in case.
> 
> v3: This time used the corrected text
> 
> v4: Copy the config strings from the arm32 port.
> 
> v5: Actually copy the config strings from the arm32 port.

Why not use CMDLINE_FROM_BOOTLOADER instead of CMDLINE_FALLBACK in that 
case? To my ears, CMDLINE_FROM_BOOTLOADER made more sense given the 
description. If CMDLINE_FALLBACK is retained intentionally, then it's ok.

Regards,
Atish
> 
> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
> ---
>   arch/riscv/Kconfig | 57 +++++++++++++++++++++++++++-------------------
>   1 file changed, 33 insertions(+), 24 deletions(-)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 55da93f4e818..23ac6d6f9ab2 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -227,39 +227,48 @@ endmenu
>   
>   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.
> +	  For most platforms, the arguments for the kernel's command line
> +	  are provided at run-time, during boot. However, there are cases
> +	  where either no arguments are being provided or the provided
> +	  arguments are insufficient or even invalid.
>   
> -	  For that, choose 'Y' here and fill in the extra boot parameters
> -	  in CONFIG_CMDLINE.
> +	  When that occurs, it is possible to define a built-in command
> +	  line here and choose how the kernel should use it later on.
>   
> -	  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.
> +choice
> +	prompt "Built-in command line usage" if CMDLINE != ""
> +	default CMDLINE_FALLBACK
> +	help
> +	  Choose how the kernel will handle the provided built-in command
> +	  line.
>   
> -config CMDLINE
> -	string "Built-in kernel command string"
> -	depends on CMDLINE_BOOL
> -	default ""
> +config CMDLINE_FALLBACK
> +	bool "Use bootloader kernel arguments if available"
>   	help
> -	  Supply command-line options at build time by entering them here.
> +	  Use the built-in command line as fallback in case we get nothing
> +	  during boot. This is the default behaviour.
> 
> +config CMDLINE_EXTEND
> +	bool "Extend bootloader kernel arguments"
> +	help
> +	  The command-line arguments provided during boot will be
> +	  appended to the built-in command line. This is useful in
> +	  cases where the provided arguments are insufficient and
> +	  you don't want to or cannot modify them.
> +
>   
>   config CMDLINE_FORCE
> -	bool "Built-in command line overrides bootloader arguments"
> -	depends on CMDLINE_BOOL
> +	bool "Always use the default kernel command string"
>   	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.
> +	  Always use the built-in command line, even if we get one during
> +	  boot. This is useful in case you need to override the provided
> +	  command line on systems where you don't have or want control
> +	  over it.
>   
> -	  If you don't know what to do here, say N.
> +endchoice
>   
>   endmenu
>   
> 


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

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

* [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
  2018-11-19 22:37 ` atish.patra
  2018-11-19 22:37   ` Atish Patra
@ 2018-11-19 22:48   ` mick
  2018-11-19 22:48     ` Nick Kossifidis
  2018-11-19 22:58     ` atish.patra
  2018-11-20 16:12   ` palmer
  2 siblings, 2 replies; 10+ messages in thread
From: mick @ 2018-11-19 22:48 UTC (permalink / raw)
  To: linux-riscv

???? 2018-11-20 00:37, Atish Patra ??????:
> On 11/19/18 1:10 PM, Palmer Dabbelt wrote:
>> From: Nick Kossifidis <mick@ics.forth.gr>
>> 
>> Added a menu to choose how the built-in command line will be
>> used and CMDLINE_EXTEND for compatibility with FDT code.
>> 
>> v2: Improved help messages, removed references to bootloader
>> and made them more descriptive. I also asked help from a
>> friend who's a language expert just in case.
>> 
>> v3: This time used the corrected text
>> 
>> v4: Copy the config strings from the arm32 port.
>> 
>> v5: Actually copy the config strings from the arm32 port.
> 
> Why not use CMDLINE_FROM_BOOTLOADER instead of CMDLINE_FALLBACK in
> that case? To my ears, CMDLINE_FROM_BOOTLOADER made more sense given
> the description. If CMDLINE_FALLBACK is retained intentionally, then
> it's ok.
> 
> Regards,
> Atish

They are both used as placeholders so that we don't trigger
CMDLINE_EXTEND or CMDLINE_FORCE so it doesn't really matter
how we call them. To me CMDLINE_FROM_BOOTLOADER implies that
we get the command line from the bootloader where in fact we
get it from the device tree and we might get it from other
channels in the future (e.g. kexec). I think it's misleading
to have any references on how we get the command line, that's
why I removed any references to the bootloader from the text
as well, CMDLINE_FALLBACK on the other hand describes how
we use the provided command line, which is more appropriate
IMHO.

Regards,
Nick

>> 
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>> Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
>> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
>> ---
>>   arch/riscv/Kconfig | 57 
>> +++++++++++++++++++++++++++-------------------
>>   1 file changed, 33 insertions(+), 24 deletions(-)
>> 
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index 55da93f4e818..23ac6d6f9ab2 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -227,39 +227,48 @@ endmenu
>>     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.
>> +	  For most platforms, the arguments for the kernel's command line
>> +	  are provided at run-time, during boot. However, there are cases
>> +	  where either no arguments are being provided or the provided
>> +	  arguments are insufficient or even invalid.
>>   -	  For that, choose 'Y' here and fill in the extra boot parameters
>> -	  in CONFIG_CMDLINE.
>> +	  When that occurs, it is possible to define a built-in command
>> +	  line here and choose how the kernel should use it later on.
>>   -	  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.
>> +choice
>> +	prompt "Built-in command line usage" if CMDLINE != ""
>> +	default CMDLINE_FALLBACK
>> +	help
>> +	  Choose how the kernel will handle the provided built-in command
>> +	  line.
>>   -config CMDLINE
>> -	string "Built-in kernel command string"
>> -	depends on CMDLINE_BOOL
>> -	default ""
>> +config CMDLINE_FALLBACK
>> +	bool "Use bootloader kernel arguments if available"
>>   	help
>> -	  Supply command-line options at build time by entering them here.
>> +	  Use the built-in command line as fallback in case we get nothing
>> +	  during boot. This is the default behaviour.
>> 
>> +config CMDLINE_EXTEND
>> +	bool "Extend bootloader kernel arguments"
>> +	help
>> +	  The command-line arguments provided during boot will be
>> +	  appended to the built-in command line. This is useful in
>> +	  cases where the provided arguments are insufficient and
>> +	  you don't want to or cannot modify them.
>> +
>>     config CMDLINE_FORCE
>> -	bool "Built-in command line overrides bootloader arguments"
>> -	depends on CMDLINE_BOOL
>> +	bool "Always use the default kernel command string"
>>   	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.
>> +	  Always use the built-in command line, even if we get one during
>> +	  boot. This is useful in case you need to override the provided
>> +	  command line on systems where you don't have or want control
>> +	  over it.
>>   -	  If you don't know what to do here, say N.
>> +endchoice
>>     endmenu
>> 

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

* Re: [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
  2018-11-19 22:48   ` mick
@ 2018-11-19 22:48     ` Nick Kossifidis
  2018-11-19 22:58     ` atish.patra
  1 sibling, 0 replies; 10+ messages in thread
From: Nick Kossifidis @ 2018-11-19 22:48 UTC (permalink / raw)
  To: Atish Patra; +Cc: mick, dmaliotaki, linux-riscv, Palmer Dabbelt

Στις 2018-11-20 00:37, Atish Patra έγραψε:
> On 11/19/18 1:10 PM, Palmer Dabbelt wrote:
>> From: Nick Kossifidis <mick@ics.forth.gr>
>> 
>> Added a menu to choose how the built-in command line will be
>> used and CMDLINE_EXTEND for compatibility with FDT code.
>> 
>> v2: Improved help messages, removed references to bootloader
>> and made them more descriptive. I also asked help from a
>> friend who's a language expert just in case.
>> 
>> v3: This time used the corrected text
>> 
>> v4: Copy the config strings from the arm32 port.
>> 
>> v5: Actually copy the config strings from the arm32 port.
> 
> Why not use CMDLINE_FROM_BOOTLOADER instead of CMDLINE_FALLBACK in
> that case? To my ears, CMDLINE_FROM_BOOTLOADER made more sense given
> the description. If CMDLINE_FALLBACK is retained intentionally, then
> it's ok.
> 
> Regards,
> Atish

They are both used as placeholders so that we don't trigger
CMDLINE_EXTEND or CMDLINE_FORCE so it doesn't really matter
how we call them. To me CMDLINE_FROM_BOOTLOADER implies that
we get the command line from the bootloader where in fact we
get it from the device tree and we might get it from other
channels in the future (e.g. kexec). I think it's misleading
to have any references on how we get the command line, that's
why I removed any references to the bootloader from the text
as well, CMDLINE_FALLBACK on the other hand describes how
we use the provided command line, which is more appropriate
IMHO.

Regards,
Nick

>> 
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>> Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
>> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
>> ---
>>   arch/riscv/Kconfig | 57 
>> +++++++++++++++++++++++++++-------------------
>>   1 file changed, 33 insertions(+), 24 deletions(-)
>> 
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index 55da93f4e818..23ac6d6f9ab2 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -227,39 +227,48 @@ endmenu
>>     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.
>> +	  For most platforms, the arguments for the kernel's command line
>> +	  are provided at run-time, during boot. However, there are cases
>> +	  where either no arguments are being provided or the provided
>> +	  arguments are insufficient or even invalid.
>>   -	  For that, choose 'Y' here and fill in the extra boot parameters
>> -	  in CONFIG_CMDLINE.
>> +	  When that occurs, it is possible to define a built-in command
>> +	  line here and choose how the kernel should use it later on.
>>   -	  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.
>> +choice
>> +	prompt "Built-in command line usage" if CMDLINE != ""
>> +	default CMDLINE_FALLBACK
>> +	help
>> +	  Choose how the kernel will handle the provided built-in command
>> +	  line.
>>   -config CMDLINE
>> -	string "Built-in kernel command string"
>> -	depends on CMDLINE_BOOL
>> -	default ""
>> +config CMDLINE_FALLBACK
>> +	bool "Use bootloader kernel arguments if available"
>>   	help
>> -	  Supply command-line options at build time by entering them here.
>> +	  Use the built-in command line as fallback in case we get nothing
>> +	  during boot. This is the default behaviour.
>> 
>> +config CMDLINE_EXTEND
>> +	bool "Extend bootloader kernel arguments"
>> +	help
>> +	  The command-line arguments provided during boot will be
>> +	  appended to the built-in command line. This is useful in
>> +	  cases where the provided arguments are insufficient and
>> +	  you don't want to or cannot modify them.
>> +
>>     config CMDLINE_FORCE
>> -	bool "Built-in command line overrides bootloader arguments"
>> -	depends on CMDLINE_BOOL
>> +	bool "Always use the default kernel command string"
>>   	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.
>> +	  Always use the built-in command line, even if we get one during
>> +	  boot. This is useful in case you need to override the provided
>> +	  command line on systems where you don't have or want control
>> +	  over it.
>>   -	  If you don't know what to do here, say N.
>> +endchoice
>>     endmenu
>> 


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

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

* [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
  2018-11-19 22:48   ` mick
  2018-11-19 22:48     ` Nick Kossifidis
@ 2018-11-19 22:58     ` atish.patra
  2018-11-19 22:58       ` Atish Patra
  1 sibling, 1 reply; 10+ messages in thread
From: atish.patra @ 2018-11-19 22:58 UTC (permalink / raw)
  To: linux-riscv

On 11/19/18 2:50 PM, Nick Kossifidis wrote:
> ???? 2018-11-20 00:37, Atish Patra ??????:
>> On 11/19/18 1:10 PM, Palmer Dabbelt wrote:
>>> From: Nick Kossifidis <mick@ics.forth.gr>
>>>
>>> Added a menu to choose how the built-in command line will be
>>> used and CMDLINE_EXTEND for compatibility with FDT code.
>>>
>>> v2: Improved help messages, removed references to bootloader
>>> and made them more descriptive. I also asked help from a
>>> friend who's a language expert just in case.
>>>
>>> v3: This time used the corrected text
>>>
>>> v4: Copy the config strings from the arm32 port.
>>>
>>> v5: Actually copy the config strings from the arm32 port.
>>
>> Why not use CMDLINE_FROM_BOOTLOADER instead of CMDLINE_FALLBACK in
>> that case? To my ears, CMDLINE_FROM_BOOTLOADER made more sense given
>> the description. If CMDLINE_FALLBACK is retained intentionally, then
>> it's ok.
>>
>> Regards,
>> Atish
> 
> They are both used as placeholders so that we don't trigger
> CMDLINE_EXTEND or CMDLINE_FORCE so it doesn't really matter
> how we call them. To me CMDLINE_FROM_BOOTLOADER implies that
> we get the command line from the bootloader where in fact we
> get it from the device tree and we might get it from other
> channels in the future (e.g. kexec). I think it's misleading
> to have any references on how we get the command line, that's
> why I removed any references to the bootloader from the text
> as well, CMDLINE_FALLBACK on the other hand describes how
> we use the provided command line, which is more appropriate
> IMHO.
> 

I am not too pedantic about the names either. But the description says
"bool Use bootloader kernel arguments if available"

This was the exact one used for arm32 as well and indicates that we 
prefer to get it from bootloader if this option is set. Hence the 
comment. May be revise the description ?


Regards,
Atish
> Regards,
> Nick
> 
>>>
>>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>>> Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
>>> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
>>> ---
>>>    arch/riscv/Kconfig | 57
>>> +++++++++++++++++++++++++++-------------------
>>>    1 file changed, 33 insertions(+), 24 deletions(-)
>>>
>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>> index 55da93f4e818..23ac6d6f9ab2 100644
>>> --- a/arch/riscv/Kconfig
>>> +++ b/arch/riscv/Kconfig
>>> @@ -227,39 +227,48 @@ endmenu
>>>      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.
>>> +	  For most platforms, the arguments for the kernel's command line
>>> +	  are provided at run-time, during boot. However, there are cases
>>> +	  where either no arguments are being provided or the provided
>>> +	  arguments are insufficient or even invalid.
>>>    -	  For that, choose 'Y' here and fill in the extra boot parameters
>>> -	  in CONFIG_CMDLINE.
>>> +	  When that occurs, it is possible to define a built-in command
>>> +	  line here and choose how the kernel should use it later on.
>>>    -	  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.
>>> +choice
>>> +	prompt "Built-in command line usage" if CMDLINE != ""
>>> +	default CMDLINE_FALLBACK
>>> +	help
>>> +	  Choose how the kernel will handle the provided built-in command
>>> +	  line.
>>>    -config CMDLINE
>>> -	string "Built-in kernel command string"
>>> -	depends on CMDLINE_BOOL
>>> -	default ""
>>> +config CMDLINE_FALLBACK
>>> +	bool "Use bootloader kernel arguments if available"
>>>    	help
>>> -	  Supply command-line options at build time by entering them here.
>>> +	  Use the built-in command line as fallback in case we get nothing
>>> +	  during boot. This is the default behaviour.
>>>
>>> +config CMDLINE_EXTEND
>>> +	bool "Extend bootloader kernel arguments"
>>> +	help
>>> +	  The command-line arguments provided during boot will be
>>> +	  appended to the built-in command line. This is useful in
>>> +	  cases where the provided arguments are insufficient and
>>> +	  you don't want to or cannot modify them.
>>> +
>>>      config CMDLINE_FORCE
>>> -	bool "Built-in command line overrides bootloader arguments"
>>> -	depends on CMDLINE_BOOL
>>> +	bool "Always use the default kernel command string"
>>>    	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.
>>> +	  Always use the built-in command line, even if we get one during
>>> +	  boot. This is useful in case you need to override the provided
>>> +	  command line on systems where you don't have or want control
>>> +	  over it.
>>>    -	  If you don't know what to do here, say N.
>>> +endchoice
>>>      endmenu
>>>
> 
> 

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

* Re: [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
  2018-11-19 22:58     ` atish.patra
@ 2018-11-19 22:58       ` Atish Patra
  0 siblings, 0 replies; 10+ messages in thread
From: Atish Patra @ 2018-11-19 22:58 UTC (permalink / raw)
  To: Nick Kossifidis; +Cc: dmaliotaki, linux-riscv, Palmer Dabbelt

On 11/19/18 2:50 PM, Nick Kossifidis wrote:
> Στις 2018-11-20 00:37, Atish Patra έγραψε:
>> On 11/19/18 1:10 PM, Palmer Dabbelt wrote:
>>> From: Nick Kossifidis <mick@ics.forth.gr>
>>>
>>> Added a menu to choose how the built-in command line will be
>>> used and CMDLINE_EXTEND for compatibility with FDT code.
>>>
>>> v2: Improved help messages, removed references to bootloader
>>> and made them more descriptive. I also asked help from a
>>> friend who's a language expert just in case.
>>>
>>> v3: This time used the corrected text
>>>
>>> v4: Copy the config strings from the arm32 port.
>>>
>>> v5: Actually copy the config strings from the arm32 port.
>>
>> Why not use CMDLINE_FROM_BOOTLOADER instead of CMDLINE_FALLBACK in
>> that case? To my ears, CMDLINE_FROM_BOOTLOADER made more sense given
>> the description. If CMDLINE_FALLBACK is retained intentionally, then
>> it's ok.
>>
>> Regards,
>> Atish
> 
> They are both used as placeholders so that we don't trigger
> CMDLINE_EXTEND or CMDLINE_FORCE so it doesn't really matter
> how we call them. To me CMDLINE_FROM_BOOTLOADER implies that
> we get the command line from the bootloader where in fact we
> get it from the device tree and we might get it from other
> channels in the future (e.g. kexec). I think it's misleading
> to have any references on how we get the command line, that's
> why I removed any references to the bootloader from the text
> as well, CMDLINE_FALLBACK on the other hand describes how
> we use the provided command line, which is more appropriate
> IMHO.
> 

I am not too pedantic about the names either. But the description says
"bool Use bootloader kernel arguments if available"

This was the exact one used for arm32 as well and indicates that we 
prefer to get it from bootloader if this option is set. Hence the 
comment. May be revise the description ?


Regards,
Atish
> Regards,
> Nick
> 
>>>
>>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>>> Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
>>> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
>>> ---
>>>    arch/riscv/Kconfig | 57
>>> +++++++++++++++++++++++++++-------------------
>>>    1 file changed, 33 insertions(+), 24 deletions(-)
>>>
>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>> index 55da93f4e818..23ac6d6f9ab2 100644
>>> --- a/arch/riscv/Kconfig
>>> +++ b/arch/riscv/Kconfig
>>> @@ -227,39 +227,48 @@ endmenu
>>>      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.
>>> +	  For most platforms, the arguments for the kernel's command line
>>> +	  are provided at run-time, during boot. However, there are cases
>>> +	  where either no arguments are being provided or the provided
>>> +	  arguments are insufficient or even invalid.
>>>    -	  For that, choose 'Y' here and fill in the extra boot parameters
>>> -	  in CONFIG_CMDLINE.
>>> +	  When that occurs, it is possible to define a built-in command
>>> +	  line here and choose how the kernel should use it later on.
>>>    -	  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.
>>> +choice
>>> +	prompt "Built-in command line usage" if CMDLINE != ""
>>> +	default CMDLINE_FALLBACK
>>> +	help
>>> +	  Choose how the kernel will handle the provided built-in command
>>> +	  line.
>>>    -config CMDLINE
>>> -	string "Built-in kernel command string"
>>> -	depends on CMDLINE_BOOL
>>> -	default ""
>>> +config CMDLINE_FALLBACK
>>> +	bool "Use bootloader kernel arguments if available"
>>>    	help
>>> -	  Supply command-line options at build time by entering them here.
>>> +	  Use the built-in command line as fallback in case we get nothing
>>> +	  during boot. This is the default behaviour.
>>>
>>> +config CMDLINE_EXTEND
>>> +	bool "Extend bootloader kernel arguments"
>>> +	help
>>> +	  The command-line arguments provided during boot will be
>>> +	  appended to the built-in command line. This is useful in
>>> +	  cases where the provided arguments are insufficient and
>>> +	  you don't want to or cannot modify them.
>>> +
>>>      config CMDLINE_FORCE
>>> -	bool "Built-in command line overrides bootloader arguments"
>>> -	depends on CMDLINE_BOOL
>>> +	bool "Always use the default kernel command string"
>>>    	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.
>>> +	  Always use the built-in command line, even if we get one during
>>> +	  boot. This is useful in case you need to override the provided
>>> +	  command line on systems where you don't have or want control
>>> +	  over it.
>>>    -	  If you don't know what to do here, say N.
>>> +endchoice
>>>      endmenu
>>>
> 
> 


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

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

* [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
  2018-11-19 22:37 ` atish.patra
  2018-11-19 22:37   ` Atish Patra
  2018-11-19 22:48   ` mick
@ 2018-11-20 16:12   ` palmer
  2018-11-20 16:12     ` Palmer Dabbelt
  2 siblings, 1 reply; 10+ messages in thread
From: palmer @ 2018-11-20 16:12 UTC (permalink / raw)
  To: linux-riscv

On Mon, 19 Nov 2018 14:37:40 PST (-0800), atish.patra at wdc.com wrote:
> On 11/19/18 1:10 PM, Palmer Dabbelt wrote:
>> From: Nick Kossifidis <mick@ics.forth.gr>
>>
>> Added a menu to choose how the built-in command line will be
>> used and CMDLINE_EXTEND for compatibility with FDT code.
>>
>> v2: Improved help messages, removed references to bootloader
>> and made them more descriptive. I also asked help from a
>> friend who's a language expert just in case.
>>
>> v3: This time used the corrected text
>>
>> v4: Copy the config strings from the arm32 port.
>>
>> v5: Actually copy the config strings from the arm32 port.
>
> Why not use CMDLINE_FROM_BOOTLOADER instead of CMDLINE_FALLBACK in that
> case? To my ears, CMDLINE_FROM_BOOTLOADER made more sense given the
> description. If CMDLINE_FALLBACK is retained intentionally, then it's ok.

I don't really care that much about the names, so I just picked what Nick did.  
In this case I think "fallback" is better than "from bootloader", as when the 
config is appended it's also taken from the bootloader.

If you feel strongly then you're welcome to submit a v6... :)

>
> Regards,
> Atish
>>
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>> Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
>> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
>> ---
>>   arch/riscv/Kconfig | 57 +++++++++++++++++++++++++++-------------------
>>   1 file changed, 33 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index 55da93f4e818..23ac6d6f9ab2 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -227,39 +227,48 @@ endmenu
>>
>>   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.
>> +	  For most platforms, the arguments for the kernel's command line
>> +	  are provided at run-time, during boot. However, there are cases
>> +	  where either no arguments are being provided or the provided
>> +	  arguments are insufficient or even invalid.
>>
>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>> -	  in CONFIG_CMDLINE.
>> +	  When that occurs, it is possible to define a built-in command
>> +	  line here and choose how the kernel should use it later on.
>>
>> -	  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.
>> +choice
>> +	prompt "Built-in command line usage" if CMDLINE != ""
>> +	default CMDLINE_FALLBACK
>> +	help
>> +	  Choose how the kernel will handle the provided built-in command
>> +	  line.
>>
>> -config CMDLINE
>> -	string "Built-in kernel command string"
>> -	depends on CMDLINE_BOOL
>> -	default ""
>> +config CMDLINE_FALLBACK
>> +	bool "Use bootloader kernel arguments if available"
>>   	help
>> -	  Supply command-line options at build time by entering them here.
>> +	  Use the built-in command line as fallback in case we get nothing
>> +	  during boot. This is the default behaviour.
>>
>> +config CMDLINE_EXTEND
>> +	bool "Extend bootloader kernel arguments"
>> +	help
>> +	  The command-line arguments provided during boot will be
>> +	  appended to the built-in command line. This is useful in
>> +	  cases where the provided arguments are insufficient and
>> +	  you don't want to or cannot modify them.
>> +
>>
>>   config CMDLINE_FORCE
>> -	bool "Built-in command line overrides bootloader arguments"
>> -	depends on CMDLINE_BOOL
>> +	bool "Always use the default kernel command string"
>>   	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.
>> +	  Always use the built-in command line, even if we get one during
>> +	  boot. This is useful in case you need to override the provided
>> +	  command line on systems where you don't have or want control
>> +	  over it.
>>
>> -	  If you don't know what to do here, say N.
>> +endchoice
>>
>>   endmenu
>>
>>

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

* Re: [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE
  2018-11-20 16:12   ` palmer
@ 2018-11-20 16:12     ` Palmer Dabbelt
  0 siblings, 0 replies; 10+ messages in thread
From: Palmer Dabbelt @ 2018-11-20 16:12 UTC (permalink / raw)
  To: atish.patra; +Cc: mick, dmaliotaki, linux-riscv

On Mon, 19 Nov 2018 14:37:40 PST (-0800), atish.patra@wdc.com wrote:
> On 11/19/18 1:10 PM, Palmer Dabbelt wrote:
>> From: Nick Kossifidis <mick@ics.forth.gr>
>>
>> Added a menu to choose how the built-in command line will be
>> used and CMDLINE_EXTEND for compatibility with FDT code.
>>
>> v2: Improved help messages, removed references to bootloader
>> and made them more descriptive. I also asked help from a
>> friend who's a language expert just in case.
>>
>> v3: This time used the corrected text
>>
>> v4: Copy the config strings from the arm32 port.
>>
>> v5: Actually copy the config strings from the arm32 port.
>
> Why not use CMDLINE_FROM_BOOTLOADER instead of CMDLINE_FALLBACK in that
> case? To my ears, CMDLINE_FROM_BOOTLOADER made more sense given the
> description. If CMDLINE_FALLBACK is retained intentionally, then it's ok.

I don't really care that much about the names, so I just picked what Nick did.  
In this case I think "fallback" is better than "from bootloader", as when the 
config is appended it's also taken from the bootloader.

If you feel strongly then you're welcome to submit a v6... :)

>
> Regards,
> Atish
>>
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
>> Signed-off-by: Debbie Maliotaki <dmaliotaki@gmail.com>
>> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
>> ---
>>   arch/riscv/Kconfig | 57 +++++++++++++++++++++++++++-------------------
>>   1 file changed, 33 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index 55da93f4e818..23ac6d6f9ab2 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -227,39 +227,48 @@ endmenu
>>
>>   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.
>> +	  For most platforms, the arguments for the kernel's command line
>> +	  are provided at run-time, during boot. However, there are cases
>> +	  where either no arguments are being provided or the provided
>> +	  arguments are insufficient or even invalid.
>>
>> -	  For that, choose 'Y' here and fill in the extra boot parameters
>> -	  in CONFIG_CMDLINE.
>> +	  When that occurs, it is possible to define a built-in command
>> +	  line here and choose how the kernel should use it later on.
>>
>> -	  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.
>> +choice
>> +	prompt "Built-in command line usage" if CMDLINE != ""
>> +	default CMDLINE_FALLBACK
>> +	help
>> +	  Choose how the kernel will handle the provided built-in command
>> +	  line.
>>
>> -config CMDLINE
>> -	string "Built-in kernel command string"
>> -	depends on CMDLINE_BOOL
>> -	default ""
>> +config CMDLINE_FALLBACK
>> +	bool "Use bootloader kernel arguments if available"
>>   	help
>> -	  Supply command-line options at build time by entering them here.
>> +	  Use the built-in command line as fallback in case we get nothing
>> +	  during boot. This is the default behaviour.
>>
>> +config CMDLINE_EXTEND
>> +	bool "Extend bootloader kernel arguments"
>> +	help
>> +	  The command-line arguments provided during boot will be
>> +	  appended to the built-in command line. This is useful in
>> +	  cases where the provided arguments are insufficient and
>> +	  you don't want to or cannot modify them.
>> +
>>
>>   config CMDLINE_FORCE
>> -	bool "Built-in command line overrides bootloader arguments"
>> -	depends on CMDLINE_BOOL
>> +	bool "Always use the default kernel command string"
>>   	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.
>> +	  Always use the built-in command line, even if we get one during
>> +	  boot. This is useful in case you need to override the provided
>> +	  command line on systems where you don't have or want control
>> +	  over it.
>>
>> -	  If you don't know what to do here, say N.
>> +endchoice
>>
>>   endmenu
>>
>>

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

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

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-19 21:09 [PATCH v5] RISC-V: Update Kconfig to better handle CMDLINE palmer
2018-11-19 21:09 ` Palmer Dabbelt
2018-11-19 22:37 ` atish.patra
2018-11-19 22:37   ` Atish Patra
2018-11-19 22:48   ` mick
2018-11-19 22:48     ` Nick Kossifidis
2018-11-19 22:58     ` atish.patra
2018-11-19 22:58       ` Atish Patra
2018-11-20 16:12   ` palmer
2018-11-20 16:12     ` Palmer Dabbelt

Linux-RISC-V Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-riscv/0 linux-riscv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-riscv linux-riscv/ https://lore.kernel.org/linux-riscv \
		linux-riscv@lists.infradead.org infradead-linux-riscv@archiver.kernel.org
	public-inbox-index linux-riscv


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-riscv


AGPL code for this site: git clone https://public-inbox.org/ public-inbox