Merge branch 'vuplus-1.6' of ssh://192.168.102.66/~ikseong/work/repo/openembedded...
[vuplus_openembedded] / recipes / dreambox / dreambox-dvb-modules.bb
1 DESCRIPTION = "Hardware drivers for Dreambox"
2 SECTION = "base"
3 PRIORITY = "required"
4 LICENSE = "proprietary"
5 MAINTAINER = "Felix Domke <tmbinc@elitedvb.net>"
6
7 KV_dm7020 = "2.6.9"
8 PV_dm7020 = "${KV}-20060622"
9
10 KV_dm600pvr = "2.6.12"
11 PV_dm600pvr = "${KV}-20090430"
12
13 KV_dm500plus = "2.6.12"
14 PV_dm500plus = "${KV}-20080822"
15
16 KV_dm7025 = "${@base_contains('PREFERRED_VERSION_linux-dm7025', '2.6.12.6', '2.6.12.6', '2.6.32-1.3-dm7025', d)}"
17 PV_dm7025 = "${KV}-${@base_contains('PREFERRED_VERSION_linux-dm7025', '2.6.12.6', '20110506', '20100727', d)}"
18 GCC_dm7025 = "${@base_contains('PREFERRED_VERSION_linux-dm7025', '2.6.12.6', '-gcc4.4', '', d)}"
19
20 KV_dm500hd = "${@base_contains('PREFERRED_VERSION_linux-dm500hd', '2.6.18', '2.6.18-7.4-dm500hd', '2.6.30-dm500hd', d)}"
21 PV_dm500hd = "${KV}-${@base_contains('PREFERRED_VERSION_linux-dm500hd', '2.6.18', '20110506', '20090727', d)}"
22
23 KV_dm800 = "${@base_contains('PREFERRED_VERSION_linux-dm800', '2.6.18', '2.6.18-7.4-dm800', '2.6.30-dm800', d)}"
24 PV_dm800 = "${KV}-${@base_contains('PREFERRED_VERSION_linux-dm800', '2.6.18', '20110506', '20090723', d)}"
25
26 KV_dm800se = "2.6.18-7.4-dm800se"
27 PV_dm800se = "${KV}-20110506"
28
29 KV_dm7020hd = "2.6.18-7.4-dm7020hd"
30 PV_dm7020hd = "${KV}-20110506"
31
32 KV_dm8000 = "${@base_contains('PREFERRED_VERSION_linux-dm8000', '2.6.18', '2.6.18-7.4-dm8000', '2.6.30-dm8000', d)}"
33 PV_dm8000 = "${KV}-${@base_contains('PREFERRED_VERSION_linux-dm8000', '2.6.18', '20110506', '20090820', d)}"
34
35 RDEPENDS = "kernel (${KV})"
36
37 #hack for broken busybox depmod (v4l-dvb dvb-core isn't automatically loaded on bcm740x load)
38 DEPENDS = " module-init-tools"
39 RDEPENDS_append_dm8000 = " dreambox-secondstage (>=81) module-init-tools-depmod"
40 RDEPENDS_append_dm800 = " dreambox-secondstage (>=81) module-init-tools-depmod"
41 RDEPENDS_append_dm500hd = " dreambox-secondstage (>=81) module-init-tools-depmod"
42 RDEPENDS_append_dm800se = " dreambox-secondstage (>=81) module-init-tools-depmod"
43 RDEPENDS_append_dm7020hd = " dreambox-secondstage module-init-tools-depmod"
44
45 PR = "r0"
46 GCC ?= ""
47
48 SRC_URI = "http://sources.dreamboxupdate.com/snapshots/dreambox-dvb-modules-${MACHINE}-${PV}${GCC}.tar.bz2 "
49 SRC_URI_append_dm7025 = "http://sources.dreamboxupdate.com/download/7020/fpupgrade-${MACHINE}-v7"
50 SRC_URI_append_dm8000 = "http://sources.dreamboxupdate.com/download/7020/fpupgrade-${MACHINE}-v7"
51
52 S = "${WORKDIR}"
53
54 do_install_powerpc() {
55         install -d ${D}/lib/modules/${KV}/extra
56         for f in head; do
57                 install -m 0644 $f.ko ${D}/lib/modules/${KV}/extra/$f.ko;
58         done
59 }
60
61 do_install_mipsel() {
62         install -d ${D}/lib/modules/${KV}/extra
63         for f in *.ko LICENSE; do
64                 install -m 0644 ${WORKDIR}/$f ${D}/lib/modules/${KV}/extra/$f;
65         done
66 }
67
68 do_install_mipsel_append_dm7025() {
69         install -d ${D}${sbindir}
70         install -m 0755 ${WORKDIR}/fpupgrade-${MACHINE}-v7 ${D}${sbindir}/fpupgrade
71 }
72
73 do_install_mipsel_append_dm8000() {
74         install -d ${D}${sbindir}
75         install -m 0755 ${WORKDIR}/fpupgrade-${MACHINE}-v7 ${D}${sbindir}/fpupgrade
76 }
77
78 pkg_postinst_dreambox-dvb-modules () {
79         if [ -d /proc/stb ]; then
80                 depmod -ae
81                 update-modules
82         fi
83         true
84 }
85
86 pkg_postrm_dreambox-dvb-modules () {
87         if [ -d /proc/stb ]; then
88                 update-modules
89         fi
90         true
91 }
92
93 PACKAGE_ARCH := "${MACHINE_ARCH}"
94 FILES_${PN} = "/"