]> code.ossystems Code Review - meta-freescale.git/commitdiff
dtc-145: Deploy renamed binary only and add new class
authorMax Krummenacher <max.krummenacher@toradex.com>
Mon, 23 Jul 2018 20:13:19 +0000 (22:13 +0200)
committerFabio Berton <fabio.berton@ossystems.com.br>
Mon, 30 Jul 2018 13:42:46 +0000 (10:42 -0300)
dtc-145-native is used by older U-Boot recipes. U-Boot only depends on
the native dtc binary. So, to not clash with files from the regular dtc native
build do only install the dtc binary renamed to dtc-145. Also, create
a new class to handle with dtc-145 dependency.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
classes/dtc-145.bbclass [new file with mode: 0644]
recipes-bsp/u-boot/u-boot-imx_2017.03.bb
recipes-kernel/dtc/dtc-145_git.bb

diff --git a/classes/dtc-145.bbclass b/classes/dtc-145.bbclass
new file mode 100644 (file)
index 0000000..d4a3071
--- /dev/null
@@ -0,0 +1,7 @@
+# Use this class for U-Boot 2017.03 or older.
+
+DEPENDS_append = " dtc-145-native"
+
+do_configure_prepend () {
+    sed -i -e 's/^DTC[[:space:]]*=[[:space:]]*dtc[[:space:]]*$/DTC = dtc-145/' ${S}/Makefile
+}
index 52ebee99483d815bf19e82815c08d75f072dde0b..0e4ba7b32adad1c2944387599d9809f5a5e8b43c 100644 (file)
@@ -6,7 +6,6 @@ DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
 require recipes-bsp/u-boot/u-boot.inc
 
 PROVIDES += "u-boot"
-DEPENDS_append = "dtc-145-native"
 
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
@@ -17,7 +16,7 @@ SRCREV = "b76bb1bf9fd21e21006d79552e28855ac43ad43c"
 
 S = "${WORKDIR}/git"
 
-inherit fsl-u-boot-localversion
+inherit dtc-145 fsl-u-boot-localversion
 
 LOCALVERSION ?= "-${SRCBRANCH}"
 
index afed62fdb2f894c6e4965c5d9d2a0681f3775cca..2776cc5edba60deac4f19024d0975aa8983a2a73 100644 (file)
@@ -10,3 +10,9 @@ SRCREV = "22a65c5331c22979d416738eb756b9541672e00d"
 S = "${WORKDIR}/git"
 
 BBCLASSEXTEND = "native nativesdk"
+
+# only install the dtc binary renamed to dtc-145
+do_install () {
+    install -d ${D}/${bindir}
+    install -m 755 dtc ${D}/${bindir}/dtc-145
+}