Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / linux / linux-dm800.bb
1 DESCRIPTION = "Linux kernel for Dreambox DM8000"
2 LICENSE = "GPL"
3 PN = "linux-dm800"
4 KV = "2.6.12"
5 PV = "2.6.12"
6 PR = "r8"
7
8 # note, the rX in the filename is *NOT* the packet revision - it's the patch revision.
9 SRC_URI += "ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-${KV}.tar.bz2 \
10         file://dm800_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-dream-misc.patch;patch=1;pnum=1 \
19         file://linux-2.6.12-fix-serial.patch;patch=1;pnum=1 \
20         file://linux-2.6.12-dm800-flash-layout.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-set-custom-extraversion.patch;patch=1;pnum=1 \
24         file://linux-2.6.12-7401C0-enable-llsc.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-fixup-memsize.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
32 S = "${WORKDIR}/stblinux-2.6.12"
33
34 inherit kernel
35
36 FILES_kernel-image = "/boot/vmlinux.gz /boot/autoexec.bat"
37
38 export OS = "Linux"
39 KERNEL_IMAGETYPE = "vmlinux"
40 KERNEL_OUTPUT = "vmlinux"
41 KERNEL_OBJECT_SUFFIX = "ko"
42
43 do_munge() {
44         mv ${WORKDIR}/linux-2.6.12 ${WORKDIR}/stblinux-2.6.12
45         if [ -d ${S}/drivers/sound ]; then
46                 rm -R ${S}/drivers/sound;
47         fi;
48 }
49
50 addtask munge before do_patch after do_unpack
51
52 do_configure_prepend() {
53         oe_machinstall -m 0644 ${WORKDIR}/dm800_defconfig ${S}/.config
54         oe_runmake oldconfig
55 }
56
57 do_install_append () {
58         install -d ${D}/boot
59         install -m 0755 vmlinux ${D}/boot/vmlinux
60         echo "/flash/bootlogo.elf" > ${D}/boot/autoexec.bat
61         gzip ${D}/boot/vmlinux
62         echo "/flash/vmlinux.gz" >> ${D}/boot/autoexec.bat
63 }
64
65 pkg_preinst_kernel-image () {
66         [ -d /proc/stb ] && mount -o rw,remount /boot
67 }
68
69 pkg_postinst_kernel-image () {
70         [ -d /proc/stb ] && mount -o ro,remount /boot
71 }
72
73 pkg_prerm_kernel-image () {
74         [ -d /proc/stb ] && mount -o rw,remount /boot
75 }
76
77 pkg_postrm_kernel-image () {
78         [ -d /proc/stb ] && mount -o ro,remount /boot
79 }