Skip to contentSkip to conversation

kbuild: buildtar: add dtbs support

PATCH In review Domenico Andreoli 2 participants 2 messages Jun 27, 2020 – Jun 28, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 kbuild: buildtar: add dtbs support

From: Domenico Andreoli <[email protected]>

Make 'make tar-pkg' install dtbs.

v4:
- Install the dtbs before modules & kernel, not after
- Check for the dtbs_install target before attempting to invoke it

v3:
- Check for CONFIG_OF_EARLY_FLATTREE=y instead of ARCH before installing dtbs

v2:
- Add the kernel release to the destination path

Cc Will Deacon <[email protected]>
Cc Catalin Marinas <[email protected]>
---
 scripts/package/buildtar |   12 ++++++++++++
 1 file changed, 12 insertions(+)
scripts/package/buildtar +12 -0
Index: b/scripts/package/buildtar
===================================================================
@@ -53,6 +53,18 @@ rm -rf -- "${tmpdir}"
 mkdir -p -- "${tmpdir}/boot"
 dirs=boot
 
+
+#
+# Try to install dtbs
+#
+if grep -q '^CONFIG_OF_EARLY_FLATTREE=y' include/config/auto.conf; then
+	# Only some architectures with OF support have this target
+	if [ -d "${srctree}/arch/${SRCARCH}/boot/dts" ]; then
+		$MAKE ARCH="${ARCH}" -f ${srctree}/Makefile INSTALL_DTBS_PATH="${tmpdir}/boot/dtbs/${KERNELRELEASE}" dtbs_install
+    fi
+fi
+
+
 #
 # Try to install modules
 #
Signature · 2 lines
rsa4096: 3B10 0CA1 8674 ACBA B4FE  FCD2 CE5B CF17 9960 DE13
ed25519: FFB4 0CC3 7F2E 091D F7DA  356E CC79 2832 ED38 CB05
#1 lore raw
Quoted 12 lines · Domenico Andreoli

From: Domenico Andreoli <[email protected]>

Make 'make tar-pkg' install dtbs.

v4:
- Install the dtbs before modules & kernel, not after
- Check for the dtbs_install target before attempting to invoke it

v3:
- Check for CONFIG_OF_EARLY_FLATTREE=y instead of ARCH before installing dtbs

Quoted 6 lines

v2:
- Add the kernel release to the destination path

Cc Will Deacon <[email protected]>
Cc Catalin Marinas <[email protected]>

Applied to linux-kbuild.
Thanks.

Quoted 31 lines
---
 scripts/package/buildtar |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: b/scripts/package/buildtar
===================================================================

scripts/package/buildtar +12 -1
@@ -53,6 +53,18 @@ rm -rf -- "${tmpdir}"
 mkdir -p -- "${tmpdir}/boot"
 dirs=boot
 
+
+#
+# Try to install dtbs
+#
+if grep -q '^CONFIG_OF_EARLY_FLATTREE=y' include/config/auto.conf; then
+       # Only some architectures with OF support have this target
+       if [ -d "${srctree}/arch/${SRCARCH}/boot/dts" ]; then
+               $MAKE ARCH="${ARCH}" -f ${srctree}/Makefile INSTALL_DTBS_PATH="${tmpdir}/boot/dtbs/${KERNELRELEASE}" dtbs_install
+    fi
+fi
+
+
 #
 # Try to install modules
 #
 
--

rsa4096: 3B10 0CA1 8674 ACBA B4FE FCD2 CE5B CF17 9960 DE13
ed25519: FFB4 0CC3 7F2E 091D F7DA 356E CC79 2832 ED38 CB05

Signature · 2 lines
Best Regards
Masahiro Yamada