sg3-utils: add newer buildable version
[openembedded.git] / recipes / linux / linux-wrt_2.4.30.bb
1 SECTION = "kernel"
2 DESCRIPTION = "Linux kernel for the Linksys WRT54 devices"
3 HOMEPAGE = "http://openwrt.org"
4 DEPENDS = "lzma-native"
5 LICENSE = "GPLv2"
6 PR = "r2"
7
8 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.4/linux-2.4.30.tar.bz2 \
9         cvs://anonymous@openwrt.org/openwrt;module=openwrt/package/linux/kernel-source;tag=TESTED \
10         http://downloads.openwrt.org/sources/kernel-binary-wl-0.2.tar.gz \
11         http://downloads.openwrt.org/sources/kernel-source-et-0.6.tar.gz \
12         file://000-linux-mips-2_4_30.patch;patch=1 \
13         file://001-Makefile;patch=1 \
14         file://002-Rules_make;patch=1 \
15         file://003-arch_mips_Makefile;patch=1 \
16         file://005-arch_mips_config-shared_in;patch=1 \
17         file://007-arch_mips_kernel_cpu-probe_c;patch=1 \
18         file://009-arch_mips_kernel_head_S;patch=1 \
19         file://010-arch_mips_kernel_proc_c;patch=1 \
20         file://011-arch_mips_kernel_setup_c;patch=1 \
21         file://012-arch_mips_kernel_traps_c;patch=1 \
22         file://017-arch_mips_pci_Makefile;patch=1 \
23         file://018_drivers_char_mem_c;patch=1 \
24         file://019-drivers_char_serial_c;patch=1 \
25         file://020-drivers_mtd-jumbo;patch=1 \
26         file://021-drivers_net_Config_in-hnd;patch=1 \
27         file://022-drivers_net_Makefile;patch=1 \
28         file://023-drivers_parport_Makefile;patch=1 \
29         file://024-drivers_parport_Config_in;patch=1 \
30         file://028-drivers_pcmcia_Makefile;patch=1 \
31         file://029-arch_mips_mm_c-r4k_c;patch=1 \
32         file://031-include_asm-mips_bootinfo_h;patch=1 \
33         file://033-include_asm-mips_cpu_h;patch=1 \
34         file://036-include_asm-mips_serial_h;patch=1 \
35         file://037-init_do_mounts_c;patch=1 \
36         file://100-gcc3-mtune;patch=1 \
37         file://200-include_linux_netdevice_h.patch;patch=1 \
38         file://201-include_linux_skbuff_h.patch;patch=1 \
39         file://202-net_core_Makefile.patch;patch=1 \
40         file://203-net_core_dev_c.patch;patch=1 \
41         file://204-net_sched_sched_api_c.patch;patch=1 \
42         file://205-net_sched_sched_generic_c.patch;patch=1 \
43         file://206-include_net_pkt_sched_h.patch;patch=1 \
44         file://207-hfsplus-fix;patch=1 \
45         file://208-gcc-3.4-fix;patch=1 \
46         file://300-squashfs2.1;patch=1 \
47         file://301-jffs-compression;patch=1 \
48         file://302-ebtables;patch=1 \
49         file://303-mppe-mppc;patch=1 \
50         file://304-netfilter-ipp2p-0.7.4;patch=1 \
51         file://305-cifs-1.20c;patch=1 \
52         file://306-netfilter-layer7-0.9.1;patch=1 \
53         file://307-gcc-3.4-fix.patch;patch=1 \
54         file://308-netfilter-nat-pptp;patch=1 \
55         file://309-drivers_net_b44_c.patch;patch=1 \
56         file://310-netfilter-maxconn;patch=1 \
57         file://311-ipsec-nat-traversal;patch=1 \
58         file://312-netfilter-TTL;patch=1 \
59         file://313-gcc-4.0-fixes;patch=1 \
60         file://314-drivers_net_b44_h.patch;patch=1 \
61         file://315-include_linux_pci_ids_h.patch;patch=1 \
62         file://316-b44_mii_phy.patch;patch=1 \
63         file://400-i4l-cvs-2-4-29;patch=1 \
64         file://401-hfc-usb-backport-i4l-cvs;patch=1 \
65         file://402-pl2303-backport-2-4-29;patch=1 \
66         file://403-netdev_random_core.patch;patch=1 \
67         file://404-netdev_random_et.patch;patch=1 \
68         file://600-linux-squashfs-lzma;patch=1 \
69         file://600-optional-aout-support;patch=1 \
70         file://linux.config"
71
72 S = "${WORKDIR}/linux-2.4.30"
73
74 COMPATIBLE_HOST = 'mipsel.*-linux'
75
76 inherit kernel
77
78 KERNEL_OUTPUT = "arch/mips/brcm-boards/bcm947xx/compressed/piggy"
79 CMDLINE = "root=/dev/mtdblock2 rootfstype=squashfs,jffs2 console=ttyS0,115200"
80
81 KERNEL_OBJECT_SUFFIX = ".o"  ### should be auto
82
83 export CFLAGS_KERNEL="-fno-delayed-branch "
84
85 do_unpack_extra(){
86         # copy kernel source which is maintained in openwrt via cvs
87         cp -pPR ${WORKDIR}/kernel-source/* ${S}
88         # copy binary wlan driver
89         cp -pPR ${WORKDIR}/wl/*.o ${S}/drivers/net/wl
90         # copy proprietary et source
91         cp -pPR ${WORKDIR}/et/* ${S}/drivers/net/et
92         cp -pPR ${WORKDIR}/et/*.h ${S}/include/
93 }
94 addtask unpack_extra after do_unpack before do_patch
95
96 do_configure_prepend() {
97         install -m 0644 ${WORKDIR}/linux.config ${S}/.config
98         echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
99
100         sed -i -e 's/@expr length/@-expr length/' ${S}/Makefile
101         sed -i -e "s,\-mcpu=,\-mtune=,g;" ${S}/arch/mips/Makefile
102 }
103
104 do_deploy() {
105         install -d ${DEPLOY_DIR_IMAGE}
106         cat ${KERNEL_OUTPUT} | lzma e -si -so -eos > \
107                 ${DEPLOY_DIR_IMAGE}/wrt-kernel-${PV}.lzma
108 }
109
110 COMPATIBLE_MACHINE = "wrt54"