]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
nios2: migrate to the generic rule for built-in DTB
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 22 Dec 2024 00:30:53 +0000 (09:30 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 5 Apr 2025 21:22:01 +0000 (06:22 +0900)
Commit 654102df2ac2 ("kbuild: add generic support for built-in boot
DTBs") introduced generic support for built-in DTBs.

Select GENERIC_BUILTIN_DTB when built-in DTB support is enabled.

To keep consistency across architectures, this commit also renames
CONFIG_NIOS2_DTB_SOURCE_BOOL to CONFIG_BUILTIN_DTB, and
CONFIG_NIOS2_DTB_SOURCE to CONFIG_BUILTIN_DTB_NAME.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
arch/nios2/Kbuild
arch/nios2/boot/dts/Makefile
arch/nios2/kernel/prom.c
arch/nios2/platform/Kconfig.platform

index fc2952edd2dec40f3b6c136a02f89d4068d56a63..fa64c5954b20d62156025d1f9bc3374849049cc5 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-obj-y += kernel/ mm/ platform/ boot/dts/
+obj-y += kernel/ mm/ platform/
 
 # for cleaning
 subdir- += boot
index 1a2e8996bec77854f976bed32aaefdb9096eb870..1b8f41c4154f268e91549e8f7edd82a9bce8b9ba 100644 (file)
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
+dtb-y := $(addsuffix .dtb, $(CONFIG_BUILTIN_DTB_NAME))
 
-dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+dtb-$(CONFIG_OF_ALL_DTBS) += $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
index db049249766fc22653f8243d85ac60923815c0bf..4f8c14da64901d3474e93daaae6563db6d73ce67 100644 (file)
@@ -32,7 +32,7 @@ void __init early_init_devtree(void *params)
        }
 #endif
 
-#ifdef CONFIG_NIOS2_DTB_SOURCE_BOOL
+#ifdef CONFIG_BUILTIN_DTB
        if (be32_to_cpu((__be32) *dtb) == OF_DT_HEADER)
                params = (void *)__dtb_start;
 #endif
index e849daff6fd1622563abbcea7920de85613bec18..c75cadd92388d185e9b509e2f92e0fc78f8d0440 100644 (file)
@@ -35,19 +35,20 @@ config NIOS2_DTB_PHYS_ADDR
        help
          Physical address of a dtb blob.
 
-config NIOS2_DTB_SOURCE_BOOL
+config BUILTIN_DTB
        bool "Compile and link device tree into kernel image"
        depends on !COMPILE_TEST
+       select GENERIC_BUILTIN_DTB
        help
          This allows you to specify a dts (device tree source) file
          which will be compiled and linked into the kernel image.
 
-config NIOS2_DTB_SOURCE
-       string "Device tree source file"
-       depends on NIOS2_DTB_SOURCE_BOOL
+config BUILTIN_DTB_NAME
+       string "Built-in device tree name"
+       depends on BUILTIN_DTB
        default ""
        help
-         Absolute path to the device tree source (dts) file describing your
+         Relative path to the device tree without suffix describing your
          system.
 
 comment "Nios II instructions"