[hbbtv/youtubetv] Fixed hanup bug and segmentation fault on 3rd-party images.
[vuplus_openembedded] / recipes / linux / linux-dm8000.bb
1 DESCRIPTION = "Linux kernel for Dreambox DM8000"
2 LICENSE = "GPL"
3 PN = "linux-dm8000"
4 KV = "2.6.12"
5 PV = "2.6.12"
6 PR = "r9"
7
8 # note, the rX in the filename is *NOT* the packet revision - it's the patch revision.
9 SRC_URI += "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${KV}.tar.bz2 \
10         file://dm8000_defconfig \
11         http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-brcm-5.1.patch.bz2;patch=1;pnum=1 \
12         http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-update_dvbapi-r1.patch.bz2;patch=1;pnum=1 \
13         http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-dvb-multipid-r4.patch.bz2;patch=1;pnum=1 \
14         http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-dvb-core-fix-several-locking-problems.patch.bz2;patch=1;pnum=1 \
15         http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-dvbapi-pilot-rolloff-extension-r0.patch.bz2;patch=1;pnum=1 \
16         http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-update-wireless.patch.bz2;patch=1;pnum=1 \
17         http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-add-ioprio.patch.bz2;patch=1;pnum=1 \
18         file://linux-2.6.12-dvbapi-support-more-demux.patch;patch=1;pnum=1 \
19         file://linux-2.6.12-dream-misc.patch;patch=1;pnum=1 \
20         file://linux-2.6.12-dm8000-nand.patch;patch=1;pnum=1 \
21         file://linux-2.6.12-dream-temp.patch;patch=1;pnum=1 \
22         file://linux-2.6.12-brcm-mtd-blkdevfs-fix.diff;patch=1;pnum=1 \
23         file://linux-2.6.12-brcm-fix-usb-for-revb0.diff;patch=1;pnum=1 \
24         file://linux-2.6.12-set-custom-extraversion.patch;patch=1;pnum=1 \
25         file://linux-2.6.12-fixup-prom-args.patch;patch=1;pnum=1 \
26         file://linux-2.6.12-7400AB-enable-llsc.patch;patch=1;pnum=1 \
27         file://linuxmips-2.6.12-fix-fadvise.patch;patch=1;pnum=1 \
28         file://linuxmips-2.6.12-fix-futex.patch;patch=1;pnum=1 \
29         file://linuxmips-2.6.12-gcc4-compile-fix.patch;patch=1;pnum=1 \
30         file://linuxmips-2.6.12-gdb-fix.patch;patch=1;pnum=1 \
31         file://linux-2.6.12-brcm-fix-minipci.patch;patch=1;pnum=1 \
32         file://linux-2.6.12-fixup-memsize.patch;patch=1;pnum=1 \
33         http://trappist.elis.ugent.be/~mronsse/cdfs/download/cdfs-2.6.12.tar.bz2 \
34         file://linux-2.6-trailing-whitespaces-in-params.patch;patch=1 \
35         file://linuxmips-2.6.12-gcc433-compile-fix.patch;patch=1;pnum=1"
36
37 S = "${WORKDIR}/stblinux-2.6.12"
38
39 inherit kernel
40
41 FILES_kernel-image = "/boot/vmlinux.gz /boot/autoexec.bat"
42
43 export OS = "Linux"
44 KERNEL_IMAGETYPE = "vmlinux"
45 KERNEL_OUTPUT = "vmlinux"
46 KERNEL_OBJECT_SUFFIX = "ko"
47
48 do_munge() {
49         mv ${WORKDIR}/linux-2.6.12 ${WORKDIR}/stblinux-2.6.12
50         if [ -d ${S}/drivers/sound ]; then
51                 rm -R ${S}/drivers/sound;
52         fi;
53 }
54
55 addtask munge before do_patch after do_unpack
56
57 do_configure_prepend() {
58         oe_machinstall -m 0644 ${WORKDIR}/dm8000_defconfig ${S}/.config
59         if [ -d ${WORKDIR}/cdfs-${PV} ]; then
60                 mv ${WORKDIR}/cdfs-${PV} ${S}/fs/cdfs
61                 cd ${S} & patch -p0 < ${S}/fs/cdfs/patch.cdfs
62         fi;
63         oe_runmake oldconfig
64 }
65
66 do_install_append () {
67         install -d ${D}/boot
68         install -m 0755 vmlinux ${D}/boot/vmlinux
69         echo "/flash/bootlogo.elf" > ${D}/boot/autoexec.bat
70         gzip ${D}/boot/vmlinux
71         echo "/flash/vmlinux.gz" >> ${D}/boot/autoexec.bat
72 }
73
74 pkg_preinst_kernel-image () {
75         [ -z "$D" ] && mountpoint -q /boot && mount -o rw,remount /boot
76         true
77 }
78
79 pkg_postinst_kernel-image () {
80         [ -z "$D" ] && mountpoint -q /boot && mount -o ro,remount /boot
81         true
82 }
83
84 pkg_prerm_kernel-image () {
85         [ -z "$D" ] && mountpoint -q /boot && mount -o rw,remount /boot
86         true
87 }
88
89 pkg_postrm_kernel-image () {
90         [ -z "$D" ] && mountpoint -q /boot && mount -o ro,remount /boot
91         true
92 }