include Config
-PATCHLEVEL = .25
-VER = 2.6.27.25
+PATCHLEVEL = .17
+VER = 2.6.32.17
THISAPP = linux-$(VER)
DL_FILE = $(THISAPP).tar.bz2
CXXFLAGS =
PROG = linux-xen
-PAK_VER = 3
+PAK_VER = 10
DEPS = ""
# Normal build or XEN build.
#
+
ifeq "$(XEN)" "1"
VERSUFIX=ipfire-xen
else
VERSUFIX=ipfire
endif
+
TARGET = $(DIR_INFO)/linux-$(VER)-$(VERSUFIX)
###############################################################################
# Top-level Rules
###############################################################################
objects =$(DL_FILE) \
- squashfs3.4.tar.gz \
- netfilter-layer7-v2.21.tar.gz \
+ netfilter-layer7-v2.22.tar.gz \
patch-2.6.16-nath323-1.3.bz2 \
- reiser4-for-2.6.27.19.patch.bz2
-
+ reiser4-for-2.6.32.patch.bz2 \
+ squashfs-lzma-linux-2.6.32-kernel-patches.tar.bz2 \
+ xen-patches-2.6.32-2a.tar.bz2
+
$(DL_FILE) = $(URL_IPFIRE)/$(DL_FILE)
-netfilter-layer7-v2.21.tar.gz = $(URL_IPFIRE)/netfilter-layer7-v2.21.tar.gz
+netfilter-layer7-v2.22.tar.gz = $(URL_IPFIRE)/netfilter-layer7-v2.22.tar.gz
patch-2.6.16-nath323-1.3.bz2 = $(URL_IPFIRE)/patch-2.6.16-nath323-1.3.bz2
-squashfs3.4.tar.gz = $(URL_IPFIRE)/squashfs3.4.tar.gz
-reiser4-for-2.6.27.19.patch.bz2 = $(URL_IPFIRE)/reiser4-for-2.6.27.19.patch.bz2
+reiser4-for-2.6.32.patch.bz2 = $(URL_IPFIRE)/reiser4-for-2.6.32.patch.bz2
+squashfs-lzma-linux-2.6.32-kernel-patches.tar.bz2 = $(URL_IPFIRE)/squashfs-lzma-linux-2.6.32-kernel-patches.tar.bz2
+xen-patches-2.6.32-2a.tar.bz2 = $(URL_IPFIRE)/xen-patches-2.6.32-2a.tar.bz2
-$(DL_FILE)_MD5 = 5d6dcff157f30d742c9ee28ad4589779
-netfilter-layer7-v2.21.tar.gz_MD5 = 838422e7d9a06b42e682e9064e5210b5
+$(DL_FILE)_MD5 = 33e4f0d69e5d4cb0c1bb2357b27a05be
+netfilter-layer7-v2.22.tar.gz_MD5 = 98dff8a3d5a31885b73341633f69501f
patch-2.6.16-nath323-1.3.bz2_MD5 = f926409ff703a307baf54b57ab75d138
-squashfs3.4.tar.gz_MD5 = 2a4d2995ad5aa6840c95a95ffa6b1da6
-reiser4-for-2.6.27.19.patch.bz2_MD5 = 22988387f64f299489b90b484b2642cc
+reiser4-for-2.6.32.patch.bz2_MD5 = 3246397973d9271eb8e6d7c97c5d2d91
+squashfs-lzma-linux-2.6.32-kernel-patches.tar.bz2_MD5 = d2a84311081023c7ffd28cdca67c45d4
+xen-patches-2.6.32-2.tar.bz2_MD5 = bccb78b9712cb538c6ddadff1dae0ddc
install : $(TARGET)
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
- @rm -rf $(DIR_APP) $(DIR_SRC)/linux $(DIR_SRC)/xen-* && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
- ln -s linux-$(VER) /usr/src/linux
+ @rm -rf $(DIR_APP) $(DIR_SRC)/linux $(DIR_SRC)/linux-*-suse_xen_patches $(DIR_SRC)/xen-* && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
- # Linux Intermediate Queueing Device
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.27.21-imq-test3.patch
+ ln -s linux-$(VER) /usr/src/linux
- # Xen
ifeq "$(XEN)" "1"
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60000_add-console-use-vt.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60001_linux-2.6.19-rc1-kexec-move_segment_code-i386.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60002_linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60003_ipv6-no-autoconf.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60004_pci-reassign-resources.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60005_sfc-driverlink.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60006_sfc-resource-driver.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60007_sfc-driverlink-conditional.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60008_xen3-auto-xen-arch.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60009_xen3-auto-xen-drivers.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60010_xen3-auto-include-xen-interface.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60011_xen3-auto-xen-kconfig.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xen_aio.diff
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/skbuff-xen-imq.diff
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60012_xen3-auto-common.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60013_xen3-auto-arch-x86.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60014_xen3-auto-arch-i386.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60015_xen3-auto-arch-x86_64.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60016_xen3-fixup-xen.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60017_735-balloon-exit.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60018_737-kexec-free.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60019_740-blkback-resource-leak.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60020_746-pirq-status-page.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60021_747-x86-undo-mfn-limit.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60022_748-x86-ioapic-cleanup.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60023_xen3-fixup-kconfig.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60024_xen3-fixup-common.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60025_xen3-fixup-arch-x86.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60026_xen3-fixup-sfc.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60027_xen3-patch-2.6.18.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60028_xen3-patch-2.6.19.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60029_xen3-patch-2.6.20.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60030_xen3-patch-2.6.21.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60031_xen3-patch-2.6.22.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60032_xen3-patch-2.6.23.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60033_xen3-patch-2.6.24.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60034_xen3-patch-2.6.25.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60035_xen3-patch-2.6.26.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60036_xen3-patch-2.6.27.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60037_xen3-patch-2.6.27.1-2.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60038_xen3-patch-2.6.27.3-4.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60039_xen3-patch-2.6.27.4-5.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60040_xen3-patch-2.6.27.5-6.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60041_xen3-panic-on-io-nmi.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60042_xen-balloon-max-target.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60043_xen-blkback-cdrom.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60044_xen-blktap-write-barriers.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60045_xen-scsifront-block-timeout-update.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60046_xen-op-packet.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60047_xen-blkfront-cdrom.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60048_xen-sections.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60049_xen-kconfig-compat-3.2.0.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60050_xen-cpufreq-report.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60051_xen-rt2860-build.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60052_xen-sysdev-suspend.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60053_xen-ipi-per-cpu-irq.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60054_xen-virq-per-cpu-irq.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60055_xen-configurable-guest-devices.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60056_xen-netback-nr-irqs.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60057_xen-netback-notify-multi.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60058_xen-x86-panic-no-reboot.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60059_xen-x86-dcr-fallback.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60060_xen-x86-consistent-nmi.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60061_xen-x86-no-lapic.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60062_xen-x86-pmd-handling.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60063_xen-x86-bigmem.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60064_xen-x86-machphys-prediction.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60065_xen-x86-no-lazy-tlb.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60066_xen-x86-exit-mmap.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60067_xen-i386-panic-on-oops.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60068_xen-x86_64-pgd-pin.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60069_xen-x86_64-pgd-alloc-order.patch1
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/60070_xen-x86_64-dump-user-pgt.patch1
+ # Apply gentoo Xen patches
+ mkdir -p $(DIR_SRC)/xen-patches
+ cd $(DIR_SRC)/xen-patches && tar jxf $(DIR_DL)/xen-patches-2.6.32-2a.tar.bz2
+
+ for x in `ls -1 $(DIR_SRC)/xen-patches/*.patch1`; do \
+ echo "*********** [Patch: $$x]"; \
+ cd $(DIR_APP) && pwd && patch -Np1 < $$x || exit 1; \
+ done
+ rm -rf $(DIR_SRC)/xen-patches
+
+ # Linux Intermediate Queueing Device
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.8-xen-imq-test2.patch
+else
+ # Linux Intermediate Queueing Device
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32-imq-test2.patch
endif
# Not report deprecated syscall 1.23 (for kudzu)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.25.18-not_report_sysctl_1.23.patch
-
- # Reiser4
- cd $(DIR_APP) && bzip2 -d -c $(DIR_DL)/reiser4-for-2.6.27.19.patch.bz2 | patch -Np1
-
- # SquashFS
- cd $(DIR_SRC) && rm -rf squashfs*
- cd $(DIR_SRC) && tar xfz $(DIR_DL)/squashfs3.4.tar.gz
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/squashfs3.4/kernel-patches/linux-2.6.27-rc4/squashfs3.4-patch
-
- # ip_conntrack permissions from 440 to 444
-# cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/ip_conntrack_standalone-patch-for-ipfire.patch
+
+ # Reiser4 (don't check if fail (some patches are already in xen patchset)
+ -cd $(DIR_APP) && bzcat $(DIR_DL)/reiser4-for-2.6.32.patch.bz2 | patch -Np1
# ipp2p 0.8.2-pomng
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.27.19-ipp2p-0.8.2-pomng.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.8-ipp2p-0.8.2-pomng.patch
# Layer7-patch
- cd $(DIR_SRC) && rm -rf $(DIR_SRC)/netfilter-layer7-v2.21
- cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.21.tar.gz
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.21/kernel-2.6.25-2.6.28-layer7-2.21.patch
+ cd $(DIR_SRC) && rm -rf $(DIR_SRC)/netfilter-layer7-v2.22
+ cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.22.tar.gz
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.22/kernel-2.6.25-2.6.28-layer7-2.22.patch
+
+ # Squashfs LZMA support
+ cd $(DIR_APP) && bzcat $(DIR_DL)/squashfs-lzma-linux-2.6.32-kernel-patches.tar.bz2 | patch -Np1
+
+ # Add some more LED triggers
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.11-netdev-1.patch
+
+ # Huawei (Vodafone) K3765 & K4505 Usbids
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.11-option_add_vodafone_usbids.patch
+
+ # Huawei Android Phones (Vodafone V845, T-Mobile Pulse/mini ...)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.15-option_add_huawei_android.patch
# Cleanup kernel source
- cd $(DIR_APP) && make mrproper
cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE)-$(VERSUFIX) $(DIR_APP)/.config
cd $(DIR_APP) && make CC="$(KGCC)" oldconfig
cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-$(VERSUFIX)/' Makefile
ifeq "$(XEN)" "1"
- cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)"
- cd $(DIR_APP) && cp -v vmlinux /boot/vmlinuz-$(VER)-$(VERSUFIX)
+ cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" vmlinuz
+ cd $(DIR_APP) && cp -v arch/i386/boot/vmlinuz /boot/vmlinuz-$(VER)-$(VERSUFIX)
else
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
ifeq "$(XEN)" ""
# Only do this once on the non-XEN pass
cd $(DIR_APP) && install -m 755 usr/gen_init_cpio /sbin/
-endif
+endif
# Rename ide-cd module to match with old kernel
mv /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/ide/ide-cd_mod.ko \
/lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/ide/ide-cd.ko
+ mv /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/ide/ide-gd_mod.ko \
+ /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/ide/ide-disk.ko
# Remove mISDN modules
rm -rvf /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/isdn/mISDN
rm -rvf /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/isdn/hardware/mISDN
+ifneq "$(XEN)" "1"
+ # Blacklist matroxfb_base
+ echo "blacklist matroxfb_base" >> /etc/modprobe.d/framebuffer
+ # Blacklist old framebuffer modules
+ for f in $$(find /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/video -name *fb.ko); do \
+ echo "blacklist $$(basename $$f)" >> /etc/modprobe.d/framebuffer ; \
+ done
+ # Blacklist new drm framebuffer modules
+ for f in $$(ls -1 /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/gpu/drm/*/*.ko); do \
+ echo "blacklist $$(basename $$f)" >> /etc/modprobe.d/framebuffer ; \
+ done
+ sed -i -e "s|.ko||g" /etc/modprobe.d/framebuffer
+
+ # Blacklist isdn modules
+ for f in $$(find /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/isdn -name *.ko); do \
+ echo "blacklist $$(basename $$f)" >> /etc/modprobe.d/isdn ; \
+ done
+ sed -i -e "s|.ko||g" /etc/modprobe.d/isdn
+endif
+
@rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs* $(DIR_SRC)/netfilter-layer7-*
@$(POSTBUILD)