Update driver
[vuplus_openembedded] / recipes / vuplus / vuplus-bootlogo.bb
1 DESCRIPTION = "Bootlogo support"
2 SECTION = "base"
3 PRIORITY = "required"
4 LICENSE = "proprietary"
5
6 IMAGES_VERSION = "1"
7 BINARY_VERSION = "7"
8
9 PV = "${BINARY_VERSION}.${IMAGES_VERSION}"
10 PR = "r5"
11
12 KERNEL_VERSION = "${@base_contains('PREFERRED_VERSION_linux-${MACHINE}', '2.6.18', '2.6.18', '3.1.1', d)}"
13
14 SRC_URI = "file://bootlogo.mvi file://backdrop.mvi file://bootlogo_wait.mvi file://switchoff.mvi"
15 SRC_URI_append_vuuno = " file://splash_cfe_auto.bin"
16 SRC_URI_append_vuultimo = " file://splash_cfe_auto.bin"
17
18 S = "${WORKDIR}/"
19
20 MVI = "bootlogo backdrop bootlogo_wait"
21
22 do_install() {
23         install -d ${D}/boot
24         install -d ${D}/usr/share
25         for i in ${MVI}; do
26                 install -m 0755 ${S}/$i.mvi ${D}/usr/share/$i.mvi;
27                 ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
28         done;
29 }
30
31 do_install_vuuno() {
32         install -d ${D}/boot
33         install -d ${D}/usr/share
34         for i in ${MVI}; do
35                 install -m 0755 ${S}/$i.mvi ${D}/usr/share/$i.mvi;
36                 ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
37         done;
38         install -m 0755 ${S}/splash_cfe_auto.bin ${D}/boot/splash_cfe_auto.bin
39 }
40 do_install_vuultimo() {
41         install -d ${D}/boot
42         install -d ${D}/usr/share
43         for i in ${MVI}; do
44                 install -m 0755 ${S}/$i.mvi ${D}/usr/share/$i.mvi;
45                 ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
46         done;
47         install -m 0755 ${S}/splash_cfe_auto.bin ${D}/boot/splash_cfe_auto.bin
48 }
49
50 pkg_preinst() {
51         if [ "${KERNEL_VERSION}" = "3.1.1" ]; then
52                 [ -d /proc/stb ] && mount -o rw,remount /boot
53         fi
54 }
55
56 pkg_postinst() {
57         if [ "${KERNEL_VERSION}" = "3.1.1" ]; then
58                 [ -d /proc/stb ] && mount -o ro,remount /boot
59         fi
60 }
61
62 pkg_prerm() {
63         if [ "${KERNEL_VERSION}" = "3.1.1" ]; then
64                 [ -d /proc/stb ] && mount -o rw,remount /boot
65         fi
66 }
67
68 pkg_postrm() {
69         if [ "${KERNEL_VERSION}" = "3.1.1" ]; then
70                 [ -d /proc/stb ] && mount -o ro,remount /boot
71         fi
72 }
73
74 PACKAGE_ARCH := "${MACHINE_ARCH}"
75 FILES_${PN} = "/boot /usr/share"