Merge branch 'opendreambox' of /home/tmbinc/openembedded.git/ into opendreambox
[vuplus_openembedded] / packages / 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 = "r6"
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         http://trappist.elis.ugent.be/~mronsse/cdfs/download/cdfs-2.6.12.tar.bz2"
33
34 S = "${WORKDIR}/stblinux-2.6.12"
35
36 inherit kernel
37
38 FILES_kernel-image = "/boot/vmlinux.gz /boot/autoexec.bat"
39
40 export OS = "Linux"
41 KERNEL_IMAGETYPE = "vmlinux"
42 KERNEL_OUTPUT = "vmlinux"
43 KERNEL_OBJECT_SUFFIX = "ko"
44
45 do_munge() {
46         mv ${WORKDIR}/linux-2.6.12 ${WORKDIR}/stblinux-2.6.12
47         if [ -d ${S}/drivers/sound ]; then
48                 rm -R ${S}/drivers/sound;
49         fi;
50 }
51
52 addtask munge before do_patch after do_unpack
53
54 do_configure_prepend() {
55         oe_machinstall -m 0644 ${WORKDIR}/dm8000_defconfig ${S}/.config
56         if [ -d ${WORKDIR}/cdfs-${PV} ]; then
57                 mv ${WORKDIR}/cdfs-${PV} ${S}/fs/cdfs
58                 cd ${S} & patch -p0 < ${S}/fs/cdfs/patch.cdfs
59         fi;
60         oe_runmake oldconfig
61 }
62
63 do_install_append () {
64         install -d ${D}/boot
65         install -m 0755 vmlinux ${D}/boot/vmlinux
66         echo "/flash/bootlogo.elf" > ${D}/boot/autoexec.bat
67         gzip ${D}/boot/vmlinux
68         echo "/flash/vmlinux.gz" >> ${D}/boot/autoexec.bat
69 }
70
71 pkg_preinst_kernel-image () {
72         [ -d /proc/stb ] && mount -o rw,remount /boot
73 }
74
75 pkg_postinst_kernel-image () {
76         [ -d /proc/stb ] && mount -o ro,remount /boot
77 }
78
79 pkg_prerm_kernel-image () {
80         [ -d /proc/stb ] && mount -o rw,remount /boot
81 }
82
83 pkg_postrm_kernel-image () {
84         [ -d /proc/stb ] && mount -o ro,remount /boot
85 }