Add The Hentges ROM 2.x ( based on Ansgtrom ) to OE. Very early state.
[vuplus_openembedded] / packages / linux / linux-magicbox_2.6.19.2.bb
1 SECTION = "kernel"
2 DESCRIPTION = "Linux kernel for Magicbox ver 1.1 and 2.0 router boards"
3 LICENSE = "GPL"
4 PR = "r1"
5 DEPENDS = "u-boot"
6
7 COMPATIBLE_MACHINE = "magicbox"
8
9 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
10           file://001-squashfs.patch;patch=1 \                      
11           file://002-lzma_decompress.patch;patch=1 \  
12           file://003-squashfs_lzma.patch;patch=1 \  
13           file://004-extra_optimization.patch;patch=1 \
14           file://006-gcc4_inline_fix.patch;patch=1 \
15           file://007-samsung_flash.patch;patch=1 \
16           file://009-revert_intel_flash_breakage.patch;patch=1 \
17           file://010-disable_old_squashfs_compatibility.patch;patch=1 \
18           file://011-mips_boot.patch;patch=1 \ 
19           file://012-mips_cpu_tlb.patch;patch=1 \  
20           file://050-mtdpart_redboot_partition_truncate.patch;patch=1 \  
21           file://060-rootfs_split.patch;patch=1 \
22           file://100-netfilter_layer7_2.8.patch;patch=1 \
23           file://101-netfilter_layer7_pktmatch.patch;patch=1 \  
24           file://110-ipp2p_0.8.1rc1.patch;patch=1 \
25           file://120-openswan-2.4.0.kernel-2.6-natt.patch;patch=1 \
26           file://130-netfilter-ipset.patch;patch=1 \
27           file://140-netfilter_time.patch;patch=1 \
28           file://150-netfilter_imq.patch;patch=1 \        
29           file://160-netfilter_route.patch;patch=1 \
30           file://170-netfilter_chaostables.patch;patch=1 \       
31           file://200-sched_esfq.patch;patch=1 \
32           file://201-multiple_default_gateways.patch;patch=1 \
33           file://202-mips-freestanding.patch;patch=1 \
34           file://204-jffs2_eofdetect.patch;patch=1 \
35           file://207-powerpc_asm_segment_h.patch;patch=1 \
36           file://210-d80211_compat.patch;patch=1 \
37           file://211-no_block2mtd_readahead.patch;patch=1 \
38           file://212-block2mtd_erase_scan.patch;patch=1 \
39           file://510-Yaffs.patch;patch=1 \
40           file://600-x86_lzma.patch;patch=1 \
41           file://700-airprime.patch;patch=1 \
42           file://900-headers_type_and_time.patch;patch=1 \
43           file://901-asm_bitops_include.patch;patch=1 \
44           file://902-darwin_scripts_include.patch;patch=1 \
45           file://903-stddef_include.patch;patch=1 \
46           file://904-ls_time_locale.patch;patch=1 \
47           file://001-magicbox_support.patch;patch=1 \
48           file://002-flash_map.patch;patch=1 \
49           file://100-cf_slot.patch;patch=1 \
50
51           file://config-magicbox2\
52 "
53
54
55 S = "${WORKDIR}/linux-${PV}"
56
57 inherit kernel
58
59
60 FILES_kernel-image = "/boot/zImage.elf"
61
62 export OS = "Linux"
63 ARCH = "ppc"
64 KERNEL_IMAGETYPE = "zImage"
65 KERNEL_OUTPUT = "arch/ppc/boot/images/zImage.elf"
66
67
68
69
70 do_configure_prepend() {
71         install -m 0644 ${WORKDIR}/config-magicbox2 ${S}/.config
72 }
73
74
75 do_stage_append () {
76 #need ppc platforms includes + friends in order for external kernel modules to compile as headers as still split
77
78        install -d ${STAGING_KERNEL_DIR}/arch/
79        cp -a arch/ppc ${STAGING_KERNEL_DIR}/arch/
80        cp -a arch/powerpc ${STAGING_KERNEL_DIR}/arch/
81
82        cp -a include/asm-powerpc ${STAGING_KERNEL_DIR}/include/
83        cp -a include/asm-ppc ${STAGING_KERNEL_DIR}/include/
84 }
85
86
87
88 do_install_append () {
89         install -d  ${DEPLOY_DIR}/images
90         install -m 0755 arch/ppc/boot/images/zImage.elf ${DEPLOY_DIR}/images/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.elf
91         install -m 0755 vmlinux ${DEPLOY_DIR}/images/
92         powerpc-${TARGET_OS}-objcopy -O binary -R .note -R .comment -S ${DEPLOY_DIR}/images/vmlinux ${DEPLOY_DIR}/images/linux.bin
93         gzip -f -9 ${DEPLOY_DIR}/images/linux.bin
94         cp -a ${DEPLOY_DIR}/images/linux.bin.gz ${DEPLOY_DIR}/images/linux-${PV}-${MACHINE}-${DATETIME}.bin.gz        
95         mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 -n "magicbox"-${PV} \
96                 -d ${DEPLOY_DIR}/images/linux.bin.gz ${DEPLOY_DIR}/images/uImage-${PV}-${MACHINE}-${DATETIME}.bin        
97         rm ${DEPLOY_DIR}/images/vmlinux
98         rm ${DEPLOY_DIR}/images/linux.bin.gz
99
100
101 }
102
103
104 pkg_postinst_kernel () {
105         true
106 }
107
108 pkg_postrm_kernel () {
109         true
110 }
111
112