Skip to content

Commit 82e81b8

Browse files
masahir0yAlexandre Ghiti
authored andcommitted
riscv: migrate to the generic rule for built-in DTB
Commit 654102d ("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_BUILTIN_DTB_SOURCE to CONFIG_BUILTIN_DTB_NAME. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241222000836.2578171-1-masahiroy@kernel.org Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
1 parent bba5478 commit 82e81b8

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

arch/riscv/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22

33
obj-y += kernel/ mm/ net/
4-
obj-$(CONFIG_BUILTIN_DTB) += boot/dts/
54
obj-$(CONFIG_CRYPTO) += crypto/
65
obj-y += errata/
76
obj-$(CONFIG_KVM) += kvm/

arch/riscv/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,13 +1272,14 @@ config RISCV_ISA_FALLBACK
12721272
config BUILTIN_DTB
12731273
bool "Built-in device tree"
12741274
depends on OF && NONPORTABLE
1275+
select GENERIC_BUILTIN_DTB
12751276
help
12761277
Build a device tree into the Linux image.
12771278
This option should be selected if no bootloader is being used.
12781279
If unsure, say N.
12791280

12801281

1281-
config BUILTIN_DTB_SOURCE
1282+
config BUILTIN_DTB_NAME
12821283
string "Built-in device tree source"
12831284
depends on BUILTIN_DTB
12841285
help

arch/riscv/boot/dts/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@ subdir-y += sophgo
88
subdir-y += spacemit
99
subdir-y += starfive
1010
subdir-y += thead
11-
12-
obj-$(CONFIG_BUILTIN_DTB) := $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))

arch/riscv/configs/nommu_k210_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ CONFIG_NR_CPUS=2
3535
CONFIG_CMDLINE="earlycon console=ttySIF0"
3636
CONFIG_CMDLINE_FORCE=y
3737
CONFIG_BUILTIN_DTB=y
38-
CONFIG_BUILTIN_DTB_SOURCE="canaan/k210_generic"
38+
CONFIG_BUILTIN_DTB_NAME="canaan/k210_generic"
3939
# CONFIG_SECCOMP is not set
4040
# CONFIG_STACKPROTECTOR is not set
4141
# CONFIG_GCC_PLUGINS is not set

arch/riscv/configs/nommu_k210_sdcard_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CONFIG_NR_CPUS=2
2727
CONFIG_CMDLINE="earlycon console=ttySIF0 root=/dev/mmcblk0p1 rootwait ro"
2828
CONFIG_CMDLINE_FORCE=y
2929
CONFIG_BUILTIN_DTB=y
30-
CONFIG_BUILTIN_DTB_SOURCE="canaan/k210_generic"
30+
CONFIG_BUILTIN_DTB_NAME="canaan/k210_generic"
3131
# CONFIG_SECCOMP is not set
3232
# CONFIG_STACKPROTECTOR is not set
3333
# CONFIG_GCC_PLUGINS is not set

0 commit comments

Comments
 (0)