linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: update Kconfig to better handle CMDLINE
@ 2019-09-20 16:42 ja.kaisrlik
  2019-09-27 13:51 ` Jan Kaisrlik
  2019-09-29 10:16 ` Catalin Marinas
  0 siblings, 2 replies; 4+ messages in thread
From: ja.kaisrlik @ 2019-09-20 16:42 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: catalin.marinas, Jan Kaisrlik, will

From: Jan Kaisrlik <ja.kaisrlik@gmail.com>

Added a menu to choose how to CMDLINE will be handled. Config strings
were copied from arm32 port.

Signed-off-by: Jan Kaisrlik <ja.kaisrlik@gmail.com>
---
 arch/arm64/Kconfig | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 3adcec05b1f6..b1dd948f9665 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1538,6 +1538,23 @@ config CMDLINE
 	  entering them here. As a minimum, you should specify the the
 	  root device (e.g. root=/dev/nfs).
 
+choice
+	prompt "Kernel command line type" if CMDLINE != ""
+	default CMDLINE_FROM_BOOTLOADER
+
+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
@@ -1545,6 +1562,7 @@ config CMDLINE_FORCE
 	  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
 
 config EFI_STUB
 	bool
-- 
2.23.0


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

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

* Re: [PATCH] arm64: update Kconfig to better handle CMDLINE
  2019-09-20 16:42 [PATCH] arm64: update Kconfig to better handle CMDLINE ja.kaisrlik
@ 2019-09-27 13:51 ` Jan Kaisrlik
  2019-09-29 10:16 ` Catalin Marinas
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Kaisrlik @ 2019-09-27 13:51 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel; +Cc: catalin.marinas, will

+ linux-kernel


On Fri, Sep 20, 2019 at 6:43 PM <ja.kaisrlik@gmail.com> wrote:
>
> From: Jan Kaisrlik <ja.kaisrlik@gmail.com>
>
> Added a menu to choose how to CMDLINE will be handled. Config strings
> were copied from arm32 port.
>
> Signed-off-by: Jan Kaisrlik <ja.kaisrlik@gmail.com>
> ---
>  arch/arm64/Kconfig | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 3adcec05b1f6..b1dd948f9665 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -1538,6 +1538,23 @@ config CMDLINE
>           entering them here. As a minimum, you should specify the the
>           root device (e.g. root=/dev/nfs).
>
> +choice
> +       prompt "Kernel command line type" if CMDLINE != ""
> +       default CMDLINE_FROM_BOOTLOADER
> +
> +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
> @@ -1545,6 +1562,7 @@ config CMDLINE_FORCE
>           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
>
>  config EFI_STUB
>         bool
> --
> 2.23.0
>

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

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

* Re: [PATCH] arm64: update Kconfig to better handle CMDLINE
  2019-09-20 16:42 [PATCH] arm64: update Kconfig to better handle CMDLINE ja.kaisrlik
  2019-09-27 13:51 ` Jan Kaisrlik
@ 2019-09-29 10:16 ` Catalin Marinas
  2019-10-01  7:13   ` Jan Kaisrlik
  1 sibling, 1 reply; 4+ messages in thread
From: Catalin Marinas @ 2019-09-29 10:16 UTC (permalink / raw)
  To: ja.kaisrlik; +Cc: will, linux-arm-kernel

On Fri, Sep 20, 2019 at 06:42:49PM +0200, ja.kaisrlik@gmail.com wrote:
> Added a menu to choose how to CMDLINE will be handled. Config strings
> were copied from arm32 port.

This was proposed before but we rejected it. Do you have a good reason,
other than arm32 having it?

https://patchwork.kernel.org/patch/9459341/

-- 
Catalin

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

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

* Re: [PATCH] arm64: update Kconfig to better handle CMDLINE
  2019-09-29 10:16 ` Catalin Marinas
@ 2019-10-01  7:13   ` Jan Kaisrlik
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kaisrlik @ 2019-10-01  7:13 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: will, linux-arm-kernel

Hello Catalin,

sorry, I did not notice the similar patch already exists.

On Sun, Sep 29, 2019 at 12:16 PM Catalin Marinas
<catalin.marinas@arm.com> wrote:
>
> On Fri, Sep 20, 2019 at 06:42:49PM +0200, ja.kaisrlik@gmail.com wrote:
> > Added a menu to choose how to CMDLINE will be handled. Config strings
> > were copied from arm32 port.
>
> This was proposed before but we rejected it. Do you have a good reason,
> other than arm32 having it?
>
> https://patchwork.kernel.org/patch/9459341/

I have a similar reason like Geoff from the mentioned patch. The main
difference is I'm not able to modify kernel arguments in the
bootloader. Also, I observe that Risc-v also adopt this patch and
maybe others can find it useful as well.

Let me know if you would like to improve it.

Best regards,
Jan Kaisrlik

>
> --
> Catalin

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

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

end of thread, other threads:[~2019-10-01  7:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 16:42 [PATCH] arm64: update Kconfig to better handle CMDLINE ja.kaisrlik
2019-09-27 13:51 ` Jan Kaisrlik
2019-09-29 10:16 ` Catalin Marinas
2019-10-01  7:13   ` Jan Kaisrlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).