diff mbox series

[U-Boot] Convert CONFIG_SYS_BOOT_GET_{CMDLINE, KBD} to Kconfig

Message ID 20171228072513.1068-1-woods.technical@gmail.com
State Superseded
Delegated to: Tom Rini
Headers show
Series [U-Boot] Convert CONFIG_SYS_BOOT_GET_{CMDLINE, KBD} to Kconfig | expand

Commit Message

Derald Woods Dec. 28, 2017, 7:25 a.m. UTC
This converts the following to Kconfig:
	CONFIG_SYS_BOOT_GET_CMDLINE
	CONFIG_SYS_BOOT_GET_KBD

Additionally, ARM now selects CONFIG_SYS_BOOT_GET_CMDLINE. This enables
the 'boot_get_cmdline' call to be reached from 'image_setup_linux' in
"common/image.c".

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
---
 Kconfig                           | 12 ++++++++++++
 arch/Kconfig                      |  5 +++++
 arch/m68k/include/asm/config.h    |  2 --
 arch/powerpc/include/asm/config.h |  2 --
 scripts/config_whitelist.txt      |  2 --
 5 files changed, 17 insertions(+), 6 deletions(-)

Comments

Tom Rini Jan. 22, 2018, 9:42 p.m. UTC | #1
On Thu, Dec 28, 2017 at 01:25:13AM -0600, Derald D. Woods wrote:

> This converts the following to Kconfig:
> 	CONFIG_SYS_BOOT_GET_CMDLINE
> 	CONFIG_SYS_BOOT_GET_KBD
> 
> Additionally, ARM now selects CONFIG_SYS_BOOT_GET_CMDLINE. This enables
> the 'boot_get_cmdline' call to be reached from 'image_setup_linux' in
> "common/image.c".
> 
> Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
> ---
>  Kconfig                           | 12 ++++++++++++
>  arch/Kconfig                      |  5 +++++
>  arch/m68k/include/asm/config.h    |  2 --
>  arch/powerpc/include/asm/config.h |  2 --
>  scripts/config_whitelist.txt      |  2 --
>  5 files changed, 17 insertions(+), 6 deletions(-)

Why are you enabling this on ARM as well here?  It causes a size grow
(of course, we're adding in a function) on all ARM boards and I don't
quite see why we need to put a copy of the bootargs in that location.

Off the top of my head it seems like it only makes sense on pre-DTB
PowerPC where the cmdline needed to be in a good location.  On pre-DTB
ARM that's done via ATAGS instead, so already covered.  Thanks!
diff mbox series

Patch

diff --git a/Kconfig b/Kconfig
index 9b8a807799..f713c6a9b1 100644
--- a/Kconfig
+++ b/Kconfig
@@ -83,6 +83,18 @@  config DISTRO_DEFAULTS
 	  Select this to enable various options and commands which are suitable
 	  for building u-boot for booting general purpose Linux distributions.
 
+config SYS_BOOT_GET_CMDLINE
+	bool "Enable kernel command line setup"
+	help
+	  Enables allocating and saving kernel cmdline in space between
+	  "bootm_low" and "bootm_low" + BOOTMAPSZ.
+
+config SYS_BOOT_GET_KBD
+	bool "Enable kernel board information setup"
+	help
+	  Enables allocating and saving a kernel copy of the bd_info in
+	  space between "bootm_low" and "bootm_low" + BOOTMAPSZ.
+
 config SYS_MALLOC_F
 	bool "Enable malloc() pool before relocation"
 	default y if DM
diff --git a/arch/Kconfig b/arch/Kconfig
index 0b12ed986c..41f61a46dc 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -22,10 +22,13 @@  config ARM
 	select CREATE_ARCH_SYMLINK
 	select HAVE_PRIVATE_LIBGCC if !ARM64
 	select SUPPORT_OF_CONTROL
+	select SYS_BOOT_GET_CMDLINE
 
 config M68K
 	bool "M68000 architecture"
 	select HAVE_PRIVATE_LIBGCC
+	select SYS_BOOT_GET_CMDLINE
+	select SYS_BOOT_GET_KBD
 
 config MICROBLAZE
 	bool "MicroBlaze architecture"
@@ -53,6 +56,8 @@  config PPC
 	bool "PowerPC architecture"
 	select HAVE_PRIVATE_LIBGCC
 	select SUPPORT_OF_CONTROL
+	select SYS_BOOT_GET_CMDLINE
+	select SYS_BOOT_GET_KBD
 
 config SANDBOX
 	bool "Sandbox"
diff --git a/arch/m68k/include/asm/config.h b/arch/m68k/include/asm/config.h
index 9c4d3fb8fd..fd0b5513ee 100644
--- a/arch/m68k/include/asm/config.h
+++ b/arch/m68k/include/asm/config.h
@@ -11,7 +11,5 @@ 
 
 #define CONFIG_LMB
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
-#define CONFIG_SYS_BOOT_GET_CMDLINE
-#define CONFIG_SYS_BOOT_GET_KBD
 
 #endif
diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h
index 6aec815c71..67e4b48a96 100644
--- a/arch/powerpc/include/asm/config.h
+++ b/arch/powerpc/include/asm/config.h
@@ -31,8 +31,6 @@ 
 
 #define CONFIG_LMB
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
-#define CONFIG_SYS_BOOT_GET_CMDLINE
-#define CONFIG_SYS_BOOT_GET_KBD
 
 #ifndef CONFIG_MAX_MEM_MAPPED
 #if	defined(CONFIG_E500)		|| \
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 43a4ff0892..8117d485ec 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -2322,8 +2322,6 @@  CONFIG_SYS_BOOTM_LEN
 CONFIG_SYS_BOOTPARAMS_LEN
 CONFIG_SYS_BOOTSZ
 CONFIG_SYS_BOOT_BLOCK
-CONFIG_SYS_BOOT_GET_CMDLINE
-CONFIG_SYS_BOOT_GET_KBD
 CONFIG_SYS_BOOT_RAMDISK_HIGH
 CONFIG_SYS_BR0_64M
 CONFIG_SYS_BR0_8M