Skip to content

Commit 3fe88fe

Browse files
SebastienGandonBernardPuel
authored andcommitted
BSP: allow external device tree injection in source code directly
Signed-off-by: Sebastien GANDON <[email protected]>
1 parent 058e911 commit 3fe88fe

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

recipes-bsp/u-boot/u-boot-stm32mp-common_2023.10.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ SRCREV = "4459ed60cb1e0562bc5b40405e2b4b9bbf766d57"
1717

1818
SRC_URI += "\
1919
file://0001-v2023.10-stm32mp-r1.patch \
20+
file://0099-Add-external-var-to-allow-build-of-new-devicetree-fi.patch \
2021
"
2122

2223
# debug and trace
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 1905589e8153c0b8a8f2755820b88082ab9e99d7 Mon Sep 17 00:00:00 2001
2+
From: Christophe Priouzeau <[email protected]>
3+
Date: Fri, 25 Nov 2022 09:58:46 +0100
4+
Subject: [PATCH 2/2] Add external var to allow build of new devicetree file
5+
6+
Signed-off-by: Romuald JEANNE <[email protected]>
7+
---
8+
arch/arm/dts/Makefile | 6 ++++++
9+
1 file changed, 6 insertions(+)
10+
11+
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
12+
index a7b0d10b46..fbce7f538a 100644
13+
--- a/arch/arm/dts/Makefile
14+
+++ b/arch/arm/dts/Makefile
15+
@@ -1,5 +1,11 @@
16+
# SPDX-License-Identifier: GPL-2.0+
17+
18+
+DEVICE_TREE_EXT ?=
19+
+
20+
+ifneq ($(DEVICE_TREE_EXT),)
21+
+dtb-y += $(DEVICE_TREE_EXT)
22+
+endif
23+
+
24+
dtb-$(CONFIG_TARGET_SMARTWEB) += at91sam9260-smartweb.dtb
25+
dtb-$(CONFIG_TARGET_TAURUS) += at91sam9g20-taurus.dtb
26+
dtb-$(CONFIG_TARGET_CORVUS) += at91sam9g45-corvus.dtb
27+
--
28+
2.25.1
29+

recipes-bsp/u-boot/u-boot-stm32mp/README.HOW_TO.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ To compile U-Boot source code:
189189
$ make -f $PWD/../Makefile.sdk all
190190
To compile U-Boot source code for a specific config:
191191
- Compile default U-Boot configuration but applying specific devicetree(s):
192-
$ make -f $PWD/../Makefile.sdk DEVICETREE="<devicetree1> <devicetree2>" all
192+
$ make -f $PWD/../Makefile.sdk DEVICE_TREE="<devicetree1> <devicetree2>" all
193193
- Compile for a specific U-Boot configuration:
194-
$ make -f $PWD/../Makefile.sdk UBOOT_CONFIG=default UBOOT_DEFCONFIG=stm32mp15_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=stm32mp157f-dk2 all
194+
$ make -f $PWD/../Makefile.sdk UBOOT_CONFIG=default UBOOT_DEFCONFIG=stm32mp15_defconfig UBOOT_BINARY=u-boot.dtb DEVICE_TREE=stm32mp157f-dk2 all
195195
To compile U-Boot source code and overwrite the default FIP artifacts with built artifacts:
196196
$> rm -rf $FIP_DEPLOYDIR_ROOT/u-boot/*
197197
$> make -f $PWD/../Makefile.sdk DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/u-boot all

recipes-security/optee/optee-os-stm32mp-archiver.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ optee-deploy := \$(foreach config, \$(OPTEE_CONFIG), \$(foreach soc, ${STM32MP_S
128128

129129
optee-compile:= \$(foreach config, \$(OPTEE_CONFIG), \$(foreach soc, ${STM32MP_SOC_NAME}, \$(foreach dt, \$(if \$(CFG_EMBED_DTB_SOURCE_FILE), \$(CFG_EMBED_DTB_SOURCE_FILE),\$(OPTEE_DEVICETREE_\$(config))), \$(if \$(findstring \$(soc),\$(dt)), tee-\$(config)-\$(soc)-\$(dt),) )))
130130

131-
optee: \$(optee-compile)
131+
optee: \$(optee-compile) \$(optee-deploy)
132132

133133
fip: \$(optee-deploy)
134134
for fipconfig in \$(FIP_CONFIG) ; do \\

0 commit comments

Comments
 (0)