1 # Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
2 # Released under the MIT license (see packages/COPYING)
4 DESCRIPTION = "Linux kernel for Magicbox ver 1.1 and 2.0 router boards"
9 COMPATIBLE_MACHINE = "magicbox"
11 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
12 file://001-squashfs.patch;patch=1 \
13 file://002-lzma_decompress.patch;patch=1 \
14 file://003-squashfs_lzma.patch;patch=1 \
15 file://004-extra_optimization.patch;patch=1 \
16 file://006-gcc4_inline_fix.patch;patch=1 \
17 file://007-samsung_flash.patch;patch=1 \
18 file://009-revert_intel_flash_breakage.patch;patch=1 \
19 file://010-disable_old_squashfs_compatibility.patch;patch=1 \
20 file://011-mips_boot.patch;patch=1 \
21 file://012-mips_cpu_tlb.patch;patch=1 \
22 file://050-mtdpart_redboot_partition_truncate.patch;patch=1 \
23 file://060-rootfs_split.patch;patch=1 \
24 file://100-netfilter_layer7_2.8.patch;patch=1 \
25 file://101-netfilter_layer7_pktmatch.patch;patch=1 \
26 file://110-ipp2p_0.8.1rc1.patch;patch=1 \
27 file://120-openswan-2.4.0.kernel-2.6-natt.patch;patch=1 \
28 file://130-netfilter-ipset.patch;patch=1 \
29 file://140-netfilter_time.patch;patch=1 \
30 file://150-netfilter_imq.patch;patch=1 \
31 file://160-netfilter_route.patch;patch=1 \
32 file://170-netfilter_chaostables.patch;patch=1 \
33 file://200-sched_esfq.patch;patch=1 \
34 file://201-multiple_default_gateways.patch;patch=1 \
35 file://202-mips-freestanding.patch;patch=1 \
36 file://204-jffs2_eofdetect.patch;patch=1 \
37 file://207-powerpc_asm_segment_h.patch;patch=1 \
38 file://210-d80211_compat.patch;patch=1 \
39 file://211-no_block2mtd_readahead.patch;patch=1 \
40 file://212-block2mtd_erase_scan.patch;patch=1 \
41 file://510-Yaffs.patch;patch=1 \
42 file://600-x86_lzma.patch;patch=1 \
43 file://700-airprime.patch;patch=1 \
44 file://900-headers_type_and_time.patch;patch=1 \
45 file://901-asm_bitops_include.patch;patch=1 \
46 file://902-darwin_scripts_include.patch;patch=1 \
47 file://903-stddef_include.patch;patch=1 \
48 file://904-ls_time_locale.patch;patch=1 \
49 file://001-magicbox_support.patch;patch=1 \
50 file://002-flash_map.patch;patch=1 \
51 file://100-cf_slot.patch;patch=1 \
53 file://config-magicbox2\
57 S = "${WORKDIR}/linux-${PV}"
62 FILES_kernel-image = "/boot/zImage.elf"
66 KERNEL_OUTPUT = "arch/ppc/boot/images/zImage.elf"
71 do_configure_prepend() {
72 install -m 0644 ${WORKDIR}/config-magicbox2 ${S}/.config
77 #need ppc platforms includes + friends in order for external kernel modules to compile as headers as still split
79 install -d ${STAGING_KERNEL_DIR}/arch/
80 cp -pPR arch/ppc ${STAGING_KERNEL_DIR}/arch/
81 cp -pPR arch/powerpc ${STAGING_KERNEL_DIR}/arch/
83 cp -pPR include/asm-powerpc ${STAGING_KERNEL_DIR}/include/
84 cp -pPR include/asm-ppc ${STAGING_KERNEL_DIR}/include/
89 do_install_append () {
90 install -d ${DEPLOY_DIR_IMAGE}
91 install -m 0755 arch/ppc/boot/images/zImage.elf ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.elf
92 install -m 0755 vmlinux ${DEPLOY_DIR_IMAGE}/
93 powerpc${TARGET_VENDOR}-${TARGET_OS}-objcopy -O binary -R .note -R .comment -S ${DEPLOY_DIR_IMAGE}/vmlinux \
94 ${DEPLOY_DIR_IMAGE}/linux.bin
95 gzip -f -9 ${DEPLOY_DIR_IMAGE}/linux.bin
96 cp -pPR ${DEPLOY_DIR_IMAGE}/linux.bin.gz ${DEPLOY_DIR_IMAGE}/linux-${PV}-${MACHINE}-${DATETIME}.bin.gz
97 mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 -n "magicbox"-${PV} \
98 -d ${DEPLOY_DIR_IMAGE}/linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${MACHINE}-${DATETIME}.bin
99 rm ${DEPLOY_DIR_IMAGE}/vmlinux
100 rm ${DEPLOY_DIR_IMAGE}/linux.bin.gz
106 pkg_postinst_kernel () {
110 pkg_postrm_kernel () {