From a1c037a9fbad8aaecbc9a188707896b55ad84102 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 25 Jul 2022 14:04:41 +0200 Subject: v7a: barebox-stm32mp: start collecting device tree blobs FIP images are passed along a device tree via r2 (called hardware config). As we want barebox to be booted with the barebox DT to decouple kernel and bootloader updates, install the relevant barebox DTs, but with a barebox- prefix as they would conflict with kernel device tree blobs otherwise. Signed-off-by: Ahmad Fatoum Link: https://lore.pengutronix.de/20220725120445.1295669-4-a.fatoum@pengutronix.de Signed-off-by: Robert Schwebel --- configs/platform-v7a/rules/barebox-stm32mp.make | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'configs/platform-v7a/rules') diff --git a/configs/platform-v7a/rules/barebox-stm32mp.make b/configs/platform-v7a/rules/barebox-stm32mp.make index f120a09..aeb141f 100644 --- a/configs/platform-v7a/rules/barebox-stm32mp.make +++ b/configs/platform-v7a/rules/barebox-stm32mp.make @@ -49,7 +49,14 @@ BAREBOX_STM32MP_IMAGES := \ images/barebox-stm32mp15x-ev1.img \ images/barebox-stm32mp157c-lxa-mc1.img +BAREBOX_STM32MP_FIP_DTBS := \ + stm32mp157c-dk2.dtb \ + stm32mp157c-ev1.dtb \ + stm32mp157c-lxa-mc1.dtb + BAREBOX_STM32MP_IMAGES := $(addprefix $(BAREBOX_STM32MP_BUILD_DIR)/,$(BAREBOX_STM32MP_IMAGES)) +BAREBOX_STM32MP_FIP_DTBS := \ + $(addprefix $(BAREBOX_STM32MP_BUILD_DIR)/arch/arm/dts/,$(BAREBOX_STM32MP_FIP_DTBS)) ifdef PTXCONF_BAREBOX_STM32MP $(BAREBOX_STM32MP_CONFIG): @@ -87,6 +94,9 @@ $(STATEDIR)/barebox-stm32mp.targetinstall: @$(foreach image, $(BAREBOX_STM32MP_IMAGES), \ install -m 644 \ $(image) $(IMAGEDIR)/$(notdir $(image));) + @$(foreach dtb, $(BAREBOX_STM32MP_FIP_DTBS), \ + install -m 644 \ + $(dtb) $(IMAGEDIR)/barebox-$(notdir $(dtb));) @$(call touch) # ---------------------------------------------------------------------------- @@ -98,6 +108,8 @@ $(STATEDIR)/barebox-stm32mp.clean: @$(call clean_pkg, BAREBOX_STM32MP) @$(foreach image, $(BAREBOX_STM32MP_IMAGES), \ rm -fv $(IMAGEDIR)/$(notdir $(image))$(ptx/nl)) + @$(foreach dtb, $(BAREBOX_STM32MP_FIP_DTBS), \ + rm -fv $(IMAGEDIR)/barebox-$(notdir $(dtb))$(ptx/nl)) # ---------------------------------------------------------------------------- # oldconfig / menuconfig -- cgit v1.2.3