meta-bsp/common: rename to meta-dreambox
[opendreambox.git] / meta-dreambox / recipes-bsp / dreambox-dvb-modules / dreambox-dvb-modules.inc
1 SUMMARY = "Hardware drivers for Dreambox"
2 SECTION = "base"
3 LICENSE = "CLOSED"
4 DEPENDS += "virtual/kernel"
5 PRIORITY = "required"
6
7 # Use precompiled binaries from the previous opendreambox release.
8 DREAMBOX_DVB_MODULES_MIRROR ?= "http://dreamboxupdate.com/download/${DISTRO}/2.0.0/${PN}"
9
10 SRC_URI = "${DREAMBOX_DVB_MODULES_MIRROR}/dreambox-dvb-modules-${MACHINE}-${PV}.tar.bz2;name=modules"
11
12 inherit module-base
13
14 addtask make_scripts after do_patch before do_compile
15 do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
16 do_make_scripts[deptask] = "do_populate_sysroot"
17
18 do_compile() {
19 }
20 do_install() {
21     install -d ${D}/lib/modules/${DM_LOCALVERSION}/extra
22     install -m 0644 ${WORKDIR}/*.ko ${D}/lib/modules/${DM_LOCALVERSION}/extra
23     install -m 0644 ${WORKDIR}/LICENSE ${D}/lib/modules/${DM_LOCALVERSION}/extra
24 }
25 do_install_append() {
26     install -d ${D}${sysconfdir}/modules-load.d
27     if [ -f ${D}/lib/modules/${DM_LOCALVERSION}/extra/lcd.ko ]; then
28         echo lcd > ${D}${sysconfdir}/modules-load.d/01-${BPN}-lcd.conf
29         chmod 0644 ${D}${sysconfdir}/modules-load.d/01-${BPN}-lcd.conf
30     fi
31     for module in ${SOC_FAMILY} dreambox_keyboard; do
32         if [ -f ${D}/lib/modules/${DM_LOCALVERSION}/extra/$module.ko ]; then
33             echo $module >> ${D}${sysconfdir}/modules-load.d/10-${BPN}.conf
34         fi
35     done
36     chmod 0644 ${D}${sysconfdir}/modules-load.d/10-${BPN}.conf
37 }
38
39 PACKAGES =+ "${PN}-lcd"
40
41 RDEPENDS_${PN} = "${PN}-lcd kernel-${DM_LOCALVERSION}"
42 RRECOMMENDS_${PN} = "${PN}-systemd"
43
44 FILES_${PN} = "${sysconfdir}/modules-load.d/10-${BPN}.conf \
45                /lib/modules/${DM_LOCALVERSION}/extra/"
46
47 FILES_${PN}-lcd = "${sysconfdir}/modules-load.d/01-${BPN}-lcd.conf \
48                    /lib/modules/${DM_LOCALVERSION}/extra/lcd.ko"
49
50 # We don't use KERNEL_VERSION in this recipe, because the
51 # precompiled modules depend on a specific version.
52 DM_LOCALVERSION = "${@'-'.join('${PV}'.split('-')[:-1])}"