[hbbtv/youtubetv] Fixed hanup bug and segmentation fault on 3rd-party images.
[vuplus_openembedded] / recipes / linux / linux-opendreambox.inc
1 DESCRIPTION = "Linux Kernel"
2 SECTION = "kernel"
3 LICENSE = "GPL"
4
5 inherit kernel
6
7 PATCHLEVEL ?= ""
8
9 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}${PATCHLEVEL}.tar.bz2 \
10         http://sources.dreamboxupdate.com/download/kernel-patches/${P}-${SRCREV}.patch.bz2;patch=1 \
11         file://defconfig"
12
13 S = "${WORKDIR}/linux-${PV}"
14
15 FILES_kernel-image = "/boot/vmlinux.gz /boot/autoexec.bat"
16
17 KERNEL_IMAGETYPE = "vmlinux"
18 KERNEL_OUTPUT = "vmlinux"
19
20 PKG_kernel-image = "kernel-image"
21 PKG_kernel-base = "kernel-base"
22 RPROVIDES_kernel = "kernel-${KERNEL_VERSION}"
23 RPROVIDES_kernel-image = "kernel-image-${KERNEL_VERSION}"
24 RPROVIDES_kernel-base = "kernel-base-${KERNEL_VERSION}"
25 PROVIDES += "kernel-${KERNEL_VERSION} kernel-image-${KERNEL_VERSION} kernel-base-${KERNEL_VERSION}"
26
27 addtask munge after before do_patch after do_unpack
28
29 do_munge () {
30         if [ ${PATCHLEVEL} != "" ]; then
31                 mv ${S}${PATCHLEVEL} ${S};
32         fi;
33 }
34
35 do_configure_prepend () {
36         install -m 0644 ${WORKDIR}/defconfig ${S}/.config
37         oe_runmake oldconfig
38 }
39
40 do_install_append () {
41         install -d ${D}/boot
42         install -m 0755 vmlinux ${D}/boot/vmlinux
43         echo "/flash/bootlogo.elf" > ${D}/boot/autoexec.bat
44         gzip ${D}/boot/vmlinux
45         echo "/flash/vmlinux.gz" >> ${D}/boot/autoexec.bat
46 }
47
48 pkg_preinst_kernel-image () {
49         [ -z "$D" ] && mountpoint -q /boot && mount -o rw,remount /boot
50         true
51 }
52
53 pkg_postinst_kernel-image () {
54         [ -z "$D" ] && mountpoint -q /boot && mount -o ro,remount /boot
55         true
56 }
57
58 pkg_prerm_kernel-image () {
59         [ -z "$D" ] && mountpoint -q /boot && mount -o rw,remount /boot
60         true
61 }
62
63 pkg_postrm_kernel-image () {
64         [ -z "$D" ] && mountpoint -q /boot && mount -o ro,remount /boot
65         true
66 }