From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 01/10] arch: add new HAVE_ARCH_BOOTM_OFTREE symbol
Date: Wed, 28 May 2025 12:50:37 +0200 [thread overview]
Message-ID: <20250528105046.3270397-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250528105046.3270397-1-a.fatoum@pengutronix.de>
On platforms like x86, where barebox doesn't pass a device tree to the
kernel, it doesn't make sense to have CONFIG_BOOTM_OFTREE selectable, so
add a hidden symbol to hide it behind.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/Kconfig | 6 ++++++
arch/arm/Kconfig | 1 +
arch/kvx/Kconfig | 1 +
arch/mips/Kconfig | 1 +
arch/powerpc/Kconfig | 1 +
arch/riscv/Kconfig | 1 +
arch/sandbox/Kconfig | 1 +
arch/x86/configs/efi_defconfig | 1 -
common/Kconfig | 2 +-
9 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index dc5d1e454df5..890923ad059c 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -77,6 +77,12 @@ config HAVE_EFFICIENT_UNALIGNED_ACCESS
config HAVE_ARCH_BOARD_GENERIC_DT
bool
+config HAVE_ARCH_BOOTM_OFTREE
+ bool
+ help
+ Selected by architectures where barebox can pass a device tree to the
+ kernel while booting with bootm.
+
config HAVE_MOD_ARCH_SPECIFIC
bool
help
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0800b15d784c..0b1dbd43a8f0 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -14,6 +14,7 @@ config ARM
select PBL_RELOCATABLE
select USE_COMPRESSED_DTB
select HAVE_ARCH_BOARD_GENERIC_DT if OFDEVICE
+ select HAVE_ARCH_BOOTM_OFTREE
default y
config ARCH_LINUX_NAME
diff --git a/arch/kvx/Kconfig b/arch/kvx/Kconfig
index bb662e4fd8a5..987fdb2e1e89 100644
--- a/arch/kvx/Kconfig
+++ b/arch/kvx/Kconfig
@@ -4,6 +4,7 @@ config KVX
bool
select 64BIT
select BOOTM
+ select HAVE_ARCH_BOOTM_OFTREE
select BOOTM_OFTREE
select BOOTM_INITRD
select COMMON_CLK
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 43c493978c8f..44c4fc82ae5b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -12,6 +12,7 @@ config MIPS
select ARCH_HAS_DATA_ABORT_MASK
select ARCH_HAS_SJLJ
select ELF
+ select HAVE_ARCH_BOOTM_OFTREE
default y
config ARCH_LINUX_NAME
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 4e282bc3ac80..49050a26d524 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -7,6 +7,7 @@ config PPC
select HAS_MODULES
select GENERIC_FIND_NEXT_BIT
select OFTREE
+ select HAVE_ARCH_BOOTM_OFTREE
select ARCH_HAS_SJLJ
default y
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 4d56e55b533f..96d013d8514a 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -18,6 +18,7 @@ config RISCV
select RISCV_TIMER if RISCV_SBI
select HW_HAS_PCI
select HAVE_ARCH_BOARD_GENERIC_DT
+ select HAVE_ARCH_BOOTM_OFTREE
config ARCH_LINUX_NAME
string
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig
index c404f73a9970..b48eb29c7db4 100644
--- a/arch/sandbox/Kconfig
+++ b/arch/sandbox/Kconfig
@@ -20,6 +20,7 @@ config SANDBOX
select ARCH_DMA_DEFAULT_COHERENT
select ARCH_WANT_FRAME_POINTERS
select BAREBOX_CMDLINE
+ select HAVE_ARCH_BOOTM_OFTREE
default y
config ARCH_LINUX_NAME
diff --git a/arch/x86/configs/efi_defconfig b/arch/x86/configs/efi_defconfig
index 57e1080195c2..c7bdbcd5640c 100644
--- a/arch/x86/configs/efi_defconfig
+++ b/arch/x86/configs/efi_defconfig
@@ -9,7 +9,6 @@ CONFIG_MENU=y
CONFIG_BOOTM_SHOW_TYPE=y
CONFIG_BOOTM_VERBOSE=y
CONFIG_BOOTM_INITRD=y
-CONFIG_BOOTM_OFTREE=y
CONFIG_BLSPEC=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_PARTITION_DISK_EFI=y
diff --git a/common/Kconfig b/common/Kconfig
index fe50da8f3084..86a651661c35 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -633,7 +633,7 @@ config BOOTM_INITRD
config BOOTM_OFTREE
bool
- depends on BOOTM
+ depends on BOOTM && HAVE_ARCH_BOOTM_OFTREE
select OFTREE
prompt "device tree (oftree) support"
help
--
2.39.5
next prev parent reply other threads:[~2025-05-28 12:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 10:50 [PATCH 00/10] ARM32: allow disabling ATAGS and DT fallback Ahmad Fatoum
2025-05-28 10:50 ` Ahmad Fatoum [this message]
2025-05-28 10:50 ` [PATCH 02/10] bootm: enable CONFIG_BOOTM_OFTREE by default Ahmad Fatoum
2025-05-28 10:50 ` [PATCH 03/10] ARM: lib32: disable ATAGS support " Ahmad Fatoum
2025-05-28 10:50 ` [PATCH 04/10] kvx: bootm: enforce existence of device tree Ahmad Fatoum
2025-05-28 10:50 ` [PATCH 05/10] bootm: booti: make device tree optional Ahmad Fatoum
2025-05-28 10:50 ` [PATCH 06/10] filetype: add new file type for 0-sized files Ahmad Fatoum
2025-05-28 10:50 ` [PATCH 07/10] bootm: have bootm_get_devicetree return NULL if passed empty DT Ahmad Fatoum
2025-05-28 10:50 ` [PATCH 08/10] bootm: make fallback to barebox internal tree optional Ahmad Fatoum
2025-05-28 10:50 ` [PATCH 09/10] commands: oftree: add option to return device tree without fixups Ahmad Fatoum
2025-05-28 10:50 ` [PATCH 10/10] of: drop undefined fdt_get_tree declaration Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250528105046.3270397-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox