summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mt-dt-overlay.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/multitech/mt-dt-overlay.bb')
-rw-r--r--recipes-bsp/multitech/mt-dt-overlay.bb39
1 files changed, 39 insertions, 0 deletions
diff --git a/recipes-bsp/multitech/mt-dt-overlay.bb b/recipes-bsp/multitech/mt-dt-overlay.bb
new file mode 100644
index 0000000..e4a3866
--- /dev/null
+++ b/recipes-bsp/multitech/mt-dt-overlay.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Compile MT board device tree overlays"
+LICENSE = "(GPLv2+)"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+#inherit deploy
+
+# "or" more machines in the future
+COMPATIBLE_MACHINE = '(mtcdt)'
+
+SRC_URI = "git://git@gitlab.multitech.net/focus/mt-dt-overlay.git;protocol=ssh"
+
+PV = "1.0git${SRCPV}"
+SRCREV = "${AUTOREV}"
+
+DEPENDS = "virtual/kernel u-boot-mkimage-native"
+
+S = "${WORKDIR}/git"
+
+do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir"
+do_compile[nostamp] = "1"
+
+do_compile () {
+ echo MACHINE is ${MACHINE}
+ oe_runmake DTC=/usr/bin/dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${MACHINE}_dtbos
+}
+
+FILES_${PN} = "${base_libdir}"
+
+addtask install after do_compile
+
+do_install () {
+ # Copy files to /lib/dt-overlay/main (mtac cards will be in mtac)
+ if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then
+ install -d ${D}/${base_libdir}/dt-overlay/main
+ install ${MACHINE}/*.dtbo ${D}/${base_libdir}/dt-overlay/main
+ fi;
+
+}
+