Updated mISDN,mISDNuser (25.5.2010) and lcr (1.7).
[ipfire-2.x.git] / lfs / linux
index ca756f4..fa0ec1e 100644 (file)
--- a/lfs/linux
+++ b/lfs/linux
@@ -24,8 +24,8 @@
 
 include Config
 
-PATCHLEVEL = .17
-VER        = 2.6.23.17
+PATCHLEVEL = .15
+VER        = 2.6.32.15
 
 THISAPP    = linux-$(VER)
 DL_FILE    = $(THISAPP).tar.bz2
@@ -34,35 +34,44 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 CFLAGS     =
 CXXFLAGS   =
 
-# Normal build or SMP build.
+PROG      = linux-xen
+PAK_VER    = 10
+DEPS      = ""
+
+# Normal build or XEN build.
 #
-ifeq "$(SMP)" "1"
-       TARGET = $(DIR_INFO)/linux-$(VER)-smp
+
+ifeq "$(XEN)" "1"
+       VERSUFIX=ipfire-xen
 else
-       TARGET = $(DIR_INFO)/linux-$(VER)
+       VERSUFIX=ipfire
 endif
 
+TARGET = $(DIR_INFO)/linux-$(VER)-$(VERSUFIX)
 
 ###############################################################################
 # Top-level Rules
 ###############################################################################
 objects =$(DL_FILE) \
-       mISDN-1_1_8.tar.gz \
-       squashfs3.3.tgz \
-       netfilter-layer7-v2.18.tar.gz \
-       patch-2.6.16-nath323-1.3.bz2
-       
+       netfilter-layer7-v2.22.tar.gz \
+       patch-2.6.16-nath323-1.3.bz2 \
+       reiser4-for-2.6.32.patch.bz2 \
+       squashfs-lzma-linux-2.6.32-kernel-patches.tar.bz2 \
+       xen-patches-2.6.32-2.tar.bz2
+
 $(DL_FILE)                             = $(URL_IPFIRE)/$(DL_FILE)
-netfilter-layer7-v2.18.tar.gz          = $(URL_IPFIRE)/netfilter-layer7-v2.18.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.3.tgz                                = $(URL_IPFIRE)/squashfs3.3.tgz
-mISDN-1_1_8.tar.gz                     = $(URL_IPFIRE)/mISDN-1_1_8.tar.gz
+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-2.tar.bz2           = $(URL_IPFIRE)/xen-patches-2.6.32-2.tar.bz2
 
-$(DL_FILE)_MD5                         = a0300a393ac91ce9c64bf31522b45e2e
-netfilter-layer7-v2.18.tar.gz_MD5      = 8d2e2c00f5c20e8c0852998035aeffd2
+$(DL_FILE)_MD5                         = 1cbbf16e93bbe03368172872690600c0
+netfilter-layer7-v2.22.tar.gz_MD5      = 98dff8a3d5a31885b73341633f69501f
 patch-2.6.16-nath323-1.3.bz2_MD5       = f926409ff703a307baf54b57ab75d138
-squashfs3.3.tgz_MD5                    = 95c40fca0d886893631b5de14a0af25b
-mISDN-1_1_8.tar.gz_MD5                 = 29c55ffe0b35668a41eaed3b1c3ddfe2
+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       = d1d78d2e9b9b62dd869a490f4415de04
 
 install : $(TARGET)
 
@@ -72,6 +81,8 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects))
 
 md5 : $(subst %,%_MD5,$(objects))
 
+dist:
+       @$(PAK)
 ###############################################################################
 # Downloading, checking, md5sum
 ###############################################################################
@@ -91,80 +102,107 @@ $(subst %,%_MD5,$(objects)) :
 
 $(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)
+       @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)
+
        ln -s linux-$(VER) /usr/src/linux
 
-       # Security fix for CIFS & Netfilter SNMP
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.20.21-additional_check_on_BER_decoding.patch
+ifeq "$(XEN)" "1"
+       # Apply gentoo Xen patches
+       mkdir -p $(DIR_SRC)/xen-patches
+       cd $(DIR_SRC)/xen-patches && tar jxf $(DIR_DL)/xen-patches-2.6.32-2.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
 
-       # Openswan
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openswan-2.4.x.kernel-2.6.23-natt.patch
+       # 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) && patch -Np1 < $(DIR_SRC)/src/patches/reiser4-for-2.6.23.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
 
-       # SquashFS
-       cd $(DIR_SRC) && rm -rf squashfs*
-       cd $(DIR_SRC) && tar xfz $(DIR_DL)/squashfs3.3.tgz
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/squashfs3.3/kernel-patches/linux-2.6.23/squashfs3.3-patch
+       # ipp2p 0.8.2-pomng
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.8-ipp2p-0.8.2-pomng.patch
 
-       # ip_conntrack permissions from 440 to 444
-#      cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/ip_conntrack_standalone-patch-for-ipfire.patch
-       
        # Layer7-patch
-       cd $(DIR_SRC) && rm -rf $(DIR_SRC)/netfilter-layer7-v2.18
-       cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.18.tar.gz
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.18/for_older_kernels/kernel-2.6.22-2.6.24-layer7-2.18.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
 
-       # Linux Intermediate Queueing Device
-ifeq "$(XEN)" ""
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.23-imq.diff
-endif
+       # Squashfs LZMA support
+       cd $(DIR_APP) && bzcat $(DIR_DL)/squashfs-lzma-linux-2.6.32-kernel-patches.tar.bz2 | patch -Np1
 
-       # mISDN
-       cd $(DIR_SRC) && rm -rf mISDN-*
-       cd $(DIR_SRC) && tar xfz $(DIR_DL)/mISDN-1_1_8.tar.gz
-       cd $(DIR_SRC)/mISDN-1_1_8 && yes 'yes' | ./std2kern -k /usr/src/linux
-       
-       cd $(DIR_APP)/drivers/isdn/hardware/mISDN && patch -Np0 < $(DIR_SRC)/src/patches/mISDN-avmfritz.patch
+       # Add some more LED triggers
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.11-netdev-1.patch
 
-       # Cleanup kernel source
-       cd $(DIR_APP) && make mrproper
+       # Huawei (Vodafone) K3765 & K4505 Usbids
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.11-option_add_vodafone_usbids.patch
 
-ifeq "$(SMP)" "1"
-       cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).smp $(DIR_APP)/.config
-else
-       cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE) $(DIR_APP)/.config
-endif
+       # Cleanup kernel source
 
+       cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE)-$(VERSUFIX) $(DIR_APP)/.config
        cd $(DIR_APP) && make CC="$(KGCC)" oldconfig
        cd $(DIR_APP) && make CC="$(KGCC)" clean
+       cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-$(VERSUFIX)/' Makefile
 
-ifeq "$(SMP)" "1"
-       cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-ipfire-smp/' Makefile
-       cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
-       cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-ipfire-smp
-       cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-ipfire-smp
-       ln -sf vmlinuz-$(VER)-ipfire-smp /boot/vmlinuz-ipfire-smp
-       cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules
-       cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
+ifeq "$(XEN)" "1"
+       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) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-ipfire/' Makefile
        cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
-       cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-ipfire
-       cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-ipfire
-       cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-ipfire
-       ln -sf vmlinuz-$(VER)-ipfire /boot/vmlinuz-ipfire
-       ln -sf System.map-$(VER)-ipfire /boot/System.map-ipfire
+       cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
+endif
+       cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-$(VERSUFIX)
+       cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-$(VERSUFIX)
+       ln -sf vmlinuz-$(VER)-$(VERSUFIX) /boot/vmlinuz-$(VERSUFIX)
+       ln -sf System.map-$(VER)-$(VERSUFIX) /boot/System.map-$(VERSUFIX)
        cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules
        cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
-endif
+       cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) firmware_install
 
-ifeq "$(SMP)" ""
-       # Only do this once on the non-SMP pass 
+ifeq "$(XEN)" ""
+       # Only do this once on the non-XEN pass
        cd $(DIR_APP) && install -m 755 usr/gen_init_cpio /sbin/
-endif 
+endif
 
-       @rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs* $(DIR_SRC)/mISDN-* $(DIR_SRC)/netfilter-layer7-*
-       @$(POSTBUILD)
+       # 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)