summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mt-dt-overlay.bb
blob: 8b4fd0ed51c648d126327f6bf7c2b13ddde7f644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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)'
dt_dir = "/boot/overlays"

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;

}