[PATCH v2 1/9] MIPS: Kconfig: Allow user selection of BUILTIN_DTB with description

From: H. Nikolaus Schaller

Date: Thu Nov 12 2026 - 03:36:51 EST


Make CONFIG_BUILTIN_DTB visible in Kconfig by adding a prompt and a
detailed help text.

Previously, BUILTIN_DTB was a silent option forcefully selected by
certain machine types (such as MACH_INGENIC) whenever appended DTB
support was disabled. This prevented modern setups from turning off the
built-in DTB fallback when the bootloader is fully capable of passing a
dynamic DTB.

By adding a prompt, users can now explicitly toggle this behavior. The
added help text clarifies the distinction between MIPS_NO_APPENDED_DTB
(which controls image appending) and BUILTIN_DTB (which controls the
compiled-in fallback data and code path via get_fdt()), as well as its
relationship to BUILTIN_DTB_NAME.

Suggested-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx>
Signed-off-by: H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>
---

Notes:
Help text and commit message generated by public Google AI.

arch/mips/Kconfig | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index dac3ec5120a34..92bca520cd5ae 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2924,7 +2924,29 @@ config UHI_BOOT
bool

config BUILTIN_DTB
- bool
+ bool "Enable builtin DTB fallback support"
+ depends on USE_OF
+ help
+ Compiles a Device Tree Blob (DTB) directly into the kernel image
+ and enables the kernel to use it as a fallback during boot.
+
+ This option:
+ a) Links the DTB specified by BUILTIN_DTB_NAME into the
+ kernel binary.
+ b) Instructs the boot code (get_fdt()) to return this internal
+ DTB if no dynamic DTB from the bootloader or appended DTB
+ image data is detected.
+
+ Note on MIPS boot strategy:
+ MIPS kernels check for a DTB in the following order inside get_fdt():
+ 1. An appended DTB image (if CONFIG_MIPS_*_APPENDED_DTB is set).
+ 2. The built-in DTB fallback controlled by this option.
+
+ If your bootloader provides a valid DTB dynamically and you do not
+ rely on appended or built-in DTBs, you should enable
+ MIPS_NO_APPENDED_DTB and disable BUILTIN_DTB.
+
+ If unsure, say Y.

choice
prompt "Kernel appended dtb support"
--
2.56.0