[blindscan] support blindscan on vusolo2.
[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 = "r9"
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 SRC_URI_append_vuduo2 = " http://archive.vuplus.com/download/kernel/vmlinuz-initrd_${MACHINE}_20130220.tar.gz file://splash_cfe_auto.bin"
18 SRC_URI_append_vusolo2 = " http://archive.vuplus.com/download/kernel/vmlinuz-initrd_${MACHINE}_20130212.tar.gz file://splash_cfe_auto.bin"
19
20 S = "${WORKDIR}/"
21
22 MVI = "bootlogo backdrop bootlogo_wait"
23
24 do_install() {
25         install -d ${D}/boot
26         install -d ${D}/usr/share
27         for i in ${MVI}; do
28                 install -m 0755 ${S}/$i.mvi ${D}/usr/share/$i.mvi;
29                 ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
30         done;
31 }
32
33 do_install_vuuno() {
34         install -d ${D}/boot
35         install -d ${D}/usr/share
36         for i in ${MVI}; do
37                 install -m 0755 ${S}/$i.mvi ${D}/usr/share/$i.mvi;
38                 ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
39         done;
40         install -m 0755 ${S}/splash_cfe_auto.bin ${D}/boot/splash_cfe_auto.bin
41 }
42 do_install_vuultimo() {
43         install -d ${D}/boot
44         install -d ${D}/usr/share
45         for i in ${MVI}; do
46                 install -m 0755 ${S}/$i.mvi ${D}/usr/share/$i.mvi;
47                 ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
48         done;
49         install -m 0755 ${S}/splash_cfe_auto.bin ${D}/boot/splash_cfe_auto.bin
50 }
51 do_install_vuduo2() {
52         install -d ${D}/boot
53         install -d ${D}/usr/share
54         for i in ${MVI}; do
55                 install -m 0755 ${S}/$i.mvi ${D}/usr/share/$i.mvi;
56                 ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
57         done;
58         install -m 0755 ${S}/vmlinuz-initrd-7425b0 ${D}/boot/initrd_cfe_auto.bin
59         install -m 0755 ${S}/splash_cfe_auto.bin ${D}/boot/splash_cfe_auto.bin
60 }
61 do_install_vusolo2() {
62         install -d ${D}/boot
63         install -d ${D}/usr/share
64         for i in ${MVI}; do
65                 install -m 0755 ${S}/$i.mvi ${D}/usr/share/$i.mvi;
66                 ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
67         done;
68         install -m 0755 ${S}/vmlinuz-initrd-7346b0 ${D}/boot/initrd_cfe_auto.bin
69         install -m 0755 ${S}/splash_cfe_auto.bin ${D}/boot/splash_cfe_auto.bin
70 }
71
72 pkg_preinst() {
73         if [ "${KERNEL_VERSION}" = "2.6.18" ]; then
74                 [ -d /proc/stb ] && mount -o rw,remount /boot
75         fi
76 }
77
78 pkg_postinst() {
79         if [ "${KERNEL_VERSION}" = "2.6.18" ]; then
80                 [ -d /proc/stb ] && mount -o ro,remount /boot
81         fi
82 }
83
84 pkg_prerm() {
85         if [ "${KERNEL_VERSION}" = "2.6.18" ]; then
86                 [ -d /proc/stb ] && mount -o rw,remount /boot
87         fi
88 }
89
90 pkg_postrm() {
91         if [ "${KERNEL_VERSION}" = "2.6.18" ]; then
92                 [ -d /proc/stb ] && mount -o ro,remount /boot
93         fi
94 }
95
96 PACKAGE_ARCH := "${MACHINE_ARCH}"
97 FILES_${PN} = "/boot /usr/share"