Apply gcc 4.4
[vuplus_openembedded] / recipes / linux / linux-bm750_2.6.18.bb
1 DESCRIPTION = "Linux kernel for vuplus duo"
2 LICENSE = "GPL"
3 KV = "2.6.18-7.3"
4 PV = "2.6.18"
5 PR = "r4"
6
7 MODULE = "stblinux-2.6.18"
8
9
10 SRC_URI = "http://archive.vuplus.com/download/stblinux-${KV}.tar.bz2 \
11         file://linux_bm750_nand.patch;patch=1;pnum=0 \
12         file://linux_bm750_proc.patch;patch=1;pnum=0 \
13         file://linux_bm750_resource.patch;patch=1;pnum=0 \
14         file://linux_bm750_serial.patch;patch=1;pnum=0 \
15         file://linux_bm750_setup.patch;patch=1;pnum=0 \
16         file://linux_bm750_gcc_4.4.patch;patch=1;pnum=1 \
17         file://linux_bm750_arch_makefile.patch;patch=1;pnum=0 \
18         file://linux_bm750_kobject.patch;patch=1;pnum=0 \
19         file://linux_bm750_dvb-core_fe.patch;patch=1;pnum=0 \
20         file://bm750_defconfig \
21         "
22
23
24 S = "${WORKDIR}/stblinux-2.6.18"
25
26 inherit kernel
27
28 FILES_kernel-image = "/boot/vmlinux.gz /boot/autoexec.bat"
29
30 export OS = "Linux"
31 KERNEL_IMAGETYPE = "vmlinux"
32 KERNEL_OUTPUT = "vmlinux"
33 KERNEL_OBJECT_SUFFIX = "ko"
34
35
36 do_configure_prepend() {
37         oe_machinstall -m 0644 ${WORKDIR}/bm750_defconfig ${S}/.config
38         if [ -d ${WORKDIR}/cdfs-${PV} ]; then
39                 mv ${WORKDIR}/cdfs-${PV} ${S}/fs/cdfs
40                 cd ${S} & patch -p0 < ${S}/fs/cdfs/patch.cdfs
41         fi;
42         oe_runmake oldconfig
43 }
44
45 do_install_append () {
46         install -d ${D}/boot
47         install -m 0755 vmlinux ${D}/boot/vmlinux
48         gzip ${D}/boot/vmlinux
49 }
50
51 pkg_preinst_kernel-image () {
52         [ -d /proc/stb ] && mount -o rw,remount /boot
53         true
54         if [ -f /boot/vmlinux.gz ];
55         then rm -f /boot/vmlinux.gz;
56         fi
57 }
58
59 pkg_postinst_kernel-image () {
60         if [ -d /proc/stb ];
61         then flash_eraseall /dev/mtd1; nandwrite /dev/mtd1 /boot/vmlinux.gz -p;
62         fi
63         [ -d /proc/stb ] && mount -o ro,remount /boot
64         true
65
66 }
67
68 pkg_prerm_kernel-image () {
69         [ -d /proc/stb ] && mount -o rw,remount /boot
70         true
71 }
72
73 pkg_postrm_kernel-image () {
74         [ -d /proc/stb ] && mount -o ro,remount /boot
75         true
76 }