summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorEric Schikschneit <[email protected]>2025-06-03 12:06:24 -0500
committerTom Rini <[email protected]>2025-06-19 19:00:09 -0600
commit5ba5cbf5a29d54763f30b6685e6c06ffd51d29eb (patch)
treef24f27348d09c788043072fe0535e0be808e6634 /arch
parent0c6c8065a27804705c324f06998fea219e62f028 (diff)
dtc: Add Kconfig option to pad device tree blob
This will allow arch(s) that use device tree blobs to pad the end of the device tree so they can be modified by board files at run time. This will help prevent errors such as FDT_ERR_NOSPACE from occurring. Signed-off-by: Eric Schikschneit <[email protected]> [trini: Change default order so that X86 && EFI_APP works correctly]
Diffstat (limited to 'arch')
-rw-r--r--arch/Kconfig7
-rw-r--r--arch/arc/dts/Makefile2
-rw-r--r--arch/m68k/dts/Makefile2
-rw-r--r--arch/microblaze/dts/Makefile2
-rw-r--r--arch/nios2/dts/Makefile2
-rw-r--r--arch/riscv/dts/Makefile2
-rw-r--r--arch/sandbox/dts/Makefile2
-rw-r--r--arch/x86/dts/Makefile2
8 files changed, 14 insertions, 7 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index ea33d07c086..597b40ffd60 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -63,6 +63,13 @@ config SYS_CACHELINE_SIZE
default 64 if RISCV
default 32 if MIPS
+config SYS_DTC_PAD_BYTES
+ int "Size in bytes to pad device tree blob"
+ default 32768 if X86 && EFI_APP
+ default 4096 if ARC || ARM64 || M68K || MICROBLAZE || NIOS2 \
+ || RISCV || SANDBOX || X86
+ default 0
+
config LINKER_LIST_ALIGN
int
default 32 if SANDBOX
diff --git a/arch/arc/dts/Makefile b/arch/arc/dts/Makefile
index fe6ad7b849a..87c627c01c8 100644
--- a/arch/arc/dts/Makefile
+++ b/arch/arc/dts/Makefile
@@ -11,4 +11,4 @@ dtb-$(CONFIG_TARGET_IOT_DEVKIT) += iot_devkit.dtb
include $(srctree)/scripts/Makefile.dts
# Add any required device tree compiler flags here
-DTC_FLAGS += -R 4 -p 0x1000
+DTC_FLAGS += -R 4
diff --git a/arch/m68k/dts/Makefile b/arch/m68k/dts/Makefile
index 8b354b9c570..0f06109aa06 100644
--- a/arch/m68k/dts/Makefile
+++ b/arch/m68k/dts/Makefile
@@ -21,4 +21,4 @@ dtb-$(CONFIG_TARGET_STMARK2) += stmark2.dtb
include $(srctree)/scripts/Makefile.dts
# Add any required device tree compiler flags here
-DTC_FLAGS += -R 4 -p 0x1000
+DTC_FLAGS += -R 4
diff --git a/arch/microblaze/dts/Makefile b/arch/microblaze/dts/Makefile
index 9be902d3bb1..0f3a7472a67 100644
--- a/arch/microblaze/dts/Makefile
+++ b/arch/microblaze/dts/Makefile
@@ -5,4 +5,4 @@ dtb-y += $(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)).dtb
include $(srctree)/scripts/Makefile.dts
# Add any required device tree compiler flags here
-DTC_FLAGS += -R 4 -p 0x1000
+DTC_FLAGS += -R 4
diff --git a/arch/nios2/dts/Makefile b/arch/nios2/dts/Makefile
index d77db9762a1..75951164978 100644
--- a/arch/nios2/dts/Makefile
+++ b/arch/nios2/dts/Makefile
@@ -5,4 +5,4 @@ dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
include $(srctree)/scripts/Makefile.dts
# Add any required device tree compiler flags here
-DTC_FLAGS += -R 4 -p 0x1000
+DTC_FLAGS += -R 4
diff --git a/arch/riscv/dts/Makefile b/arch/riscv/dts/Makefile
index cf1872f3fdc..2b10c2d6c01 100644
--- a/arch/riscv/dts/Makefile
+++ b/arch/riscv/dts/Makefile
@@ -19,4 +19,4 @@ dtb-$(CONFIG_TARGET_ASPEED_AST2700_IBEX) += ast2700-ibex.dtb
include $(srctree)/scripts/Makefile.dts
# Add any required device tree compiler flags here
-DTC_FLAGS += -R 4 -p 0x1000
+DTC_FLAGS += -R 4
diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile
index 1c9fb4a4566..0d7b0b80e21 100644
--- a/arch/sandbox/dts/Makefile
+++ b/arch/sandbox/dts/Makefile
@@ -11,4 +11,4 @@ dtb-$(CONFIG_CMD_EXTENSION) += overlay0.dtbo overlay1.dtbo
include $(srctree)/scripts/Makefile.dts
# Add any required device tree compiler flags here
-DTC_FLAGS += -R 4 -p 0x1000
+DTC_FLAGS += -R 4
diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile
index 9a46726e026..725991e2629 100644
--- a/arch/x86/dts/Makefile
+++ b/arch/x86/dts/Makefile
@@ -24,4 +24,4 @@ dtb-y += bayleybay.dtb \
include $(srctree)/scripts/Makefile.dts
-DTC_FLAGS += -R 4 -p $(if $(CONFIG_EFI_APP),0x8000,0x1000)
+DTC_FLAGS += -R 4