Skip to contentSkip to conversation

boot: build arch/*/lib/bootm.c if support boot linux

PATCH NAK Rover Mo 2 participants 2 messages May 20, 2022

Subsystems (11)
Arm (32-bit) x86 PowerPC MIPS +7 more subsystems
lore
Share & tools
lore

Rover Mo

author
#0 lore raw

PATCH v3 2/2 boot: build arch/*/lib/bootm.c if support boot linux

arch/*/lib/bootm.c is for the boot Linux commands, not just for bootm command.

This commit makes CONFIG_BOOTM_LINUX selected by the boot Linux commands and arch/*/lib/bootm.c will be built if enabled CONFIG_BOOTM_LINUX.

---
 arch/arc/lib/Makefile        | 2 +-
 arch/arm/lib/Makefile        | 6 +++---
 arch/m68k/lib/Makefile       | 2 +-
 arch/microblaze/lib/Makefile | 2 +-
 arch/mips/lib/Makefile       | 2 +-
 arch/nios2/lib/Makefile      | 2 +-
 arch/powerpc/lib/Makefile    | 2 +-
 arch/riscv/lib/Makefile      | 4 ++--
 arch/sandbox/lib/Makefile    | 3 +--
 arch/sh/lib/Makefile         | 2 +-
 arch/x86/lib/Makefile        | 2 +-
 arch/xtensa/lib/Makefile     | 2 +-
 cmd/Kconfig                  | 3 +++
 13 files changed, 18 insertions(+), 16 deletions(-)
arch/arc/lib/Makefile +1 -1
index 0eb44bcf33..777380b36d 100644
@@ -12,6 +12,6 @@ obj-y += reset.o
 obj-y += ints_low.o
 obj-y += init_helpers.o
 
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 
 lib-$(CONFIG_USE_PRIVATE_LIBGCC) += _millicodethunk.o libgcc2.o
arch/arm/lib/Makefile +3 -3
index c603fe61bc..c446219b4b 100644
@@ -30,9 +30,9 @@ endif
 
 obj-$(CONFIG_CPU_V7M) += cmd_boot.o
 obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
-obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
-obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
+obj-$(CONFIG_CMD_BOOTI) += image.o
+obj-$(CONFIG_CMD_BOOTZ) += zimage.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 else
 obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o
arch/m68k/lib/Makefile +1 -1
index b66d66afd2..7fdedf6ad8 100644
@@ -8,7 +8,7 @@
 lib-$(CONFIG_USE_PRIVATE_LIBGCC) += lshrdi3.o muldi3.o ashldi3.o
 
 obj-y	+= bdinfo.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 obj-y	+= cache.o
 obj-y	+= interrupts.o
 obj-y	+= time.o
arch/microblaze/lib/Makefile +1 -1
index 05f447abba..b523d18a78 100644
@@ -3,5 +3,5 @@
 # (C) Copyright 2003-2006
 # Wolfgang Denk, DENX Software Engineering, [email protected].
 
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 obj-y	+= muldi3.o
arch/mips/lib/Makefile +1 -1
index 9ee1fcb5c7..0fc66f1c49 100644
@@ -10,7 +10,7 @@ obj-y	+= reloc.o
 obj-y	+= stack.o
 obj-y	+= traps.o
 
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 obj-$(CONFIG_CMD_GO) += boot.o
 obj-$(CONFIG_SPL_BUILD) += spl.o
 
arch/nios2/lib/Makefile +1 -1
index a9f3c7100e..fdd671a3b8 100644
@@ -4,5 +4,5 @@
 # Wolfgang Denk, DENX Software Engineering, [email protected].
 
 obj-y	+= cache.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 obj-y	+= libgcc.o
arch/powerpc/lib/Makefile +1 -1
index 2782740bf5..16374e33fb 100644
@@ -33,7 +33,7 @@ endif
 obj-y	+= reloc.o
 
 obj-$(CONFIG_BAT_RW) += bat_rw.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 obj-y	+= cache.o
 obj-y	+= extable.o
 obj-y	+= interrupts.o
arch/riscv/lib/Makefile +2 -2
index 06020fcc2a..48d6366136 100644
@@ -6,8 +6,8 @@
 # Copyright (C) 2017 Andes Technology Corporation
 # Rick Chen, Andes Technology Corporation <[email protected]>
 
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
-obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
+obj-$(CONFIG_CMD_BOOTI) += image.o
 obj-$(CONFIG_CMD_GO) += boot.o
 obj-y	+= cache.o
 obj-$(CONFIG_SIFIVE_CACHE) += sifive_cache.o
arch/sandbox/lib/Makefile +1 -2
index a2bc5a7ee6..a0eedf0273 100644
@@ -7,5 +7,4 @@
 
 obj-y	+= fdt_fixup.o interrupts.o sections.o
 obj-$(CONFIG_PCI)	+= pci_io.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
-obj-$(CONFIG_CMD_BOOTZ) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
arch/sh/lib/Makefile +1 -1
index e7520a328d..840edf2942 100644
@@ -6,7 +6,7 @@
 extra-y	+= start.o
 
 obj-y	+= board.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 obj-y	+= time.o
 obj-$(CONFIG_CMD_SH_ZIMAGEBOOT) += zimageboot.o
 
arch/x86/lib/Makefile +1 -1
index a6f2244147..9f99b78679 100644
@@ -13,7 +13,7 @@ endif
 obj-y += string.o
 endif
 ifndef CONFIG_SPL_BUILD
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 endif
 obj-y	+= cmd_boot.o
 obj-$(CONFIG_$(SPL_)COREBOOT_SYSINFO)	+= coreboot/
arch/xtensa/lib/Makefile +1 -1
index ad4fe32cb6..4c54b845e2 100644
@@ -3,6 +3,6 @@
 # (C) Copyright 2007 - 2013 Tensilica Inc.
 # (C) Copyright 2014 - 2016 Cadence Design Systems Inc.
 
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_LINUX) += bootm.o
 
 obj-y	+= cache.o misc.o relocate.o time.o
cmd/Kconfig +3 -0
index 6baa85bfdd..46291b3b07 100644
@@ -197,6 +197,7 @@ config CMD_BOOTD
 
 config CMD_BOOTM
 	bool "bootm"
+	select BOOTM_LINUX
 	default y
 	help
 	  Boot an application image from the memory.
@@ -259,6 +260,7 @@ config BOOTM_EFI
 
 config CMD_BOOTZ
 	bool "bootz"
+	select BOOTM_LINUX
 	default y if !FIT_SIGNATURE && !EFI_SECURE_BOOT
 	help
 	  Boot the Linux zImage
@@ -268,6 +270,7 @@ config CMD_BOOTZ
 
 config CMD_BOOTI
 	bool "booti"
+	select BOOTM_LINUX
 	depends on ARM64 || RISCV
 	default y if !FIT_SIGNATURE && !EFI_SECURE_BOOT
 	help
Signature · 1 line
2.25.1
#1 lore raw
Quoted 7 lines · Rover Mo

arch/*/lib/bootm.c is for the boot Linux commands, not just for bootm command.

This commit makes CONFIG_BOOTM_LINUX selected by the boot Linux commands and arch/*/lib/bootm.c will be built if enabled CONFIG_BOOTM_LINUX.

NAK.

bootm is also used for booting VxWorks.

Quoted 18 lines
---
 arch/arc/lib/Makefile        | 2 +-
 arch/arm/lib/Makefile        | 6 +++---
 arch/m68k/lib/Makefile       | 2 +-
 arch/microblaze/lib/Makefile | 2 +-
 arch/mips/lib/Makefile       | 2 +-
 arch/nios2/lib/Makefile      | 2 +-
 arch/powerpc/lib/Makefile    | 2 +-
 arch/riscv/lib/Makefile      | 4 ++--
 arch/sandbox/lib/Makefile    | 3 +--
 arch/sh/lib/Makefile         | 2 +-
 arch/x86/lib/Makefile        | 2 +-
 arch/xtensa/lib/Makefile     | 2 +-
 cmd/Kconfig                  | 3 +++
 13 files changed, 18 insertions(+), 16 deletions(-)

Regards,
Bin