summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-03-04 18:39:33 -0600
committerJohn Klug <john.klug@multitech.com>2019-03-04 18:39:33 -0600
commit88c77423378c7890921f48e82083382367df09bc (patch)
treee675ffda22487dcfb3abd705ac5508264a192fed /recipes-bsp
parentc776086ae834b49925553e45afb5256cfa306ddc (diff)
downloadmeta-multitech-atmel-88c77423378c7890921f48e82083382367df09bc.tar.gz
meta-multitech-atmel-88c77423378c7890921f48e82083382367df09bc.tar.bz2
meta-multitech-atmel-88c77423378c7890921f48e82083382367df09bc.zip
mt-dt-overlay to test overlays
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/multitech/mt-dt-overlay.bb37
-rw-r--r--recipes-bsp/multitech/mt-dt-overlay_1.0.0.bb53
2 files changed, 53 insertions, 37 deletions
diff --git a/recipes-bsp/multitech/mt-dt-overlay.bb b/recipes-bsp/multitech/mt-dt-overlay.bb
deleted file mode 100644
index 599cd8b..0000000
--- a/recipes-bsp/multitech/mt-dt-overlay.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-DESCRIPTION = "Compile MT board device tree overlays"
-LICENSE = "(GPLv2+)"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-dt_dir = "/lib/dtoverlays"
-
-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} = "${dt_dir}"
-
-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}/${dt_dir}
- install ${MACHINE}/*.dtbo ${D}/${dt_dir}
- fi;
-
-}
-
diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.0.0.bb b/recipes-bsp/multitech/mt-dt-overlay_1.0.0.bb
new file mode 100644
index 0000000..c6048ba
--- /dev/null
+++ b/recipes-bsp/multitech/mt-dt-overlay_1.0.0.bb
@@ -0,0 +1,53 @@
+DESCRIPTION = "Compile MT board device tree overlays"
+LICENSE = "(GPLv2+)"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+# By using an overlay, we should be able to support multiple pinouts
+# using the same image. The overlays go into /lib/dtoverlays.
+# There names are: [hw-version]-driver.dtbo
+# e.g. /lib/dtoverlays/MTRV1-0.0-pps.dtbo
+# The idea is that mts-io will search for the overlays, and install the
+# appropriate device tree overlay for the current hw-version.
+
+dt_dir = "/lib/dtoverlays"
+
+PR = "r1"
+
+SRC_URI = "git://git@gitlab.multitech.net/focus/mt-dt-overlay.git;protocol=ssh"
+
+SRCREV = "${PV}"
+
+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} = "${dt_dir}"
+
+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}/${dt_dir}
+ (
+ cd ${MACHINE}
+ for f in *.dtbo ; do
+ if [[ -h $f ]] ; then
+ cp -df ${f} ${D}/${dt_dir}
+ else
+ install ${f} ${D}/${dt_dir}
+ fi
+ done
+ )
+ fi;
+}
+