X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=lfs%2Flinux;h=86acc14f72e9fc757d91f469a9a35fb3554b1f1b;hb=7e27f7cdc1e1848d5e6b82f5181fffccd9597bec;hp=8092381b62c8f229810773e346b473a154ebf2e2;hpb=a2d49659f3947e5a5a77cbc1bf384eb0b2760ca9;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/lfs/linux b/lfs/linux index 8092381b62..86acc14f72 100644 --- a/lfs/linux +++ b/lfs/linux @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2019 IPFire Team # +# Copyright (C) 2007-2020 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,8 +24,8 @@ include Config -VER = 4.14.102 -ARM_PATCHES = 4.14.102-ipfire0 +VER = 4.14.229 +ARM_PATCHES = 4.14.229-ipfire0 THISAPP = linux-$(VER) DL_FILE = linux-$(VER).tar.xz @@ -34,9 +34,6 @@ DIR_APP = $(DIR_SRC)/$(THISAPP) CFLAGS = CXXFLAGS = -PAK_VER = 81 -DEPS = "" - HEADERS_ARCH = $(BUILD_PLATFORM) KERNEL_ARCH = $(BUILD_ARCH) KERNEL_TARGET = bzImage @@ -82,8 +79,8 @@ objects =$(DL_FILE) \ $(DL_FILE) = $(URL_IPFIRE)/$(DL_FILE) arm-multi-patches-$(ARM_PATCHES).patch.xz = $(URL_IPFIRE)/arm-multi-patches-$(ARM_PATCHES).patch.xz -$(DL_FILE)_MD5 = 8e45ababe805901139c58a0af3711f90 -arm-multi-patches-$(ARM_PATCHES).patch.xz_MD5 = 1cda52264dad96fcba65bd335fbbfa95 +$(DL_FILE)_MD5 = 9d4cf6e9ffff893d8a2ecea6a8c5a15b +arm-multi-patches-$(ARM_PATCHES).patch.xz_MD5 = a04b842733999abb818cabb0388572b8 install : $(TARGET) @@ -118,9 +115,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) ln -svf linux-$(VER) $(DIR_SRC)/linux - # Linux Intermediate Queueing Device - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14-imq.diff - # Layer7-patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14-layer7.patch @@ -128,7 +122,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/v4l-dvb_fix_tua6034_pll.patch # Wlan Patches - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8-ath_ignore_eeprom_regd.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14_ath_user_regd.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8-iwlwifi-noibss_only_on_radar_chan.patch # Add LED trigger @@ -146,15 +140,14 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # Fix uevent PHYSDEVDRIVER cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-2.6.32.27_mcs7830-fix-driver-name.patch -ifeq "$(KCFG)" "-kirkwood" - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14.40-kirkwood-dtb.patch -endif + # Active try to add entropy if the kernel wait for it + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-random_try_to_actively_add_entropy.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14.x-add_timer_setup_on_stack.patch ifeq "$(KCFG)" "-multi" # Apply Arm-multiarch kernel patches. cd $(DIR_APP) && xzcat $(DIR_DL)/arm-multi-patches-$(ARM_PATCHES).patch.xz | patch -Np1 endif - ifeq "$(BUILD_ARCH)" "aarch64" # Apply Arm-multiarch kernel patches. cd $(DIR_APP) && xzcat $(DIR_DL)/arm-multi-patches-$(ARM_PATCHES).patch.xz | patch -Np1 @@ -179,6 +172,12 @@ else cd $(DIR_APP) && make clean cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ -$(VERSUFIX)/' Makefile + # Copy Module signing key configuration + cp -f $(DIR_SRC)/config/kernel/x509.genkey $(DIR_APP)/certs/x509.genkey + + # Remove modules folder if exists + rm -rf /lib/modules/$(VER)-$(VERSUFIX) + # Build the kernel cd $(DIR_APP) && make $(MAKETUNING) $(KERNEL_TARGET) modules @@ -197,6 +196,49 @@ ifeq "$(BUILD_PLATFORM)" "arm" done endif + # Recreate source and build links + rm -rf /lib/modules/$(VER)-$(VERSUFIX)/{build,source} + mkdir -p /lib/modules/$(VER)-$(VERSUFIX)/build + ln -sf build /lib/modules/$(VER)-$(VERSUFIX)/source + + # Create dirs for extra modules + mkdir -p /lib/modules/$(VER)-$(VERSUFIX)/extra + + cd $(DIR_APP) && cp --parents $$(find -type f -name "Makefile*" -o -name "Kconfig*") \ + /lib/modules/$(VER)-$(VERSUFIX)/build + cd $(DIR_APP) && cp Module.symvers System.map /lib/modules/$(VER)-$(VERSUFIX)/build + rm -rf /lib/modules/$(VER)-$(VERSUFIX)/build/{Documentation,scripts,include} + + cd $(DIR_APP) && cp .config /lib/modules/$(VER)-$(VERSUFIX)/build + cd $(DIR_APP) && cp -a scripts /lib/modules/$(VER)-$(VERSUFIX)/build + find /lib/modules/$(VER)-$(VERSUFIX)/build/scripts -name "*.o" -exec rm -vf {} \; + + cd $(DIR_APP) && cp -a --parents arch/$(HEADERS_ARCH)/include /lib/modules/$(VER)-$(VERSUFIX)/build + cd $(DIR_APP) && cp -a include /lib/modules/$(VER)-$(VERSUFIX)/build/include + + # Copy module signing key for off tree modules + cd $(DIR_APP) && cp -f certs/signing_key.* /lib/modules/$(VER)-$(VERSUFIX)/build/certs/ + + # Install objtool + cd $(DIR_APP) && cp -a tools/objtool/objtool \ + /lib/modules/$(VER)-$(VERSUFIX)/build/tools/objtool/ || : + cd $(DIR_APP) && cp -a --parents tools/build/{Build,Build.include,fixdep.c} \ + tools/scripts/utilities.mak /lib/modules/$(VER)-$(VERSUFIX)/build + + # Make sure we can build external modules + touch -r /lib/modules/$(VER)-$(VERSUFIX)/build/Makefile \ + /lib/modules/$(VER)-$(VERSUFIX)/build/include/generated/uapi/linux/version.h + touch -r /lib/modules/$(VER)-$(VERSUFIX)/build/.config \ + /lib/modules/$(VER)-$(VERSUFIX)/build/autoconf.h + cp /lib/modules/$(VER)-$(VERSUFIX)/build/.config \ + /lib/modules/$(VER)-$(VERSUFIX)/build/include/config/auto.conf + + # Fix permissions + find /lib/modules/$(VER)-$(VERSUFIX) -name "modules.order" \ + -exec chmod 644 {} \; + + find /lib/modules/$(VER)-$(VERSUFIX) -name ".*.cmd" -exec rm -f {} \; + ifeq "$(LASTKERNEL)" "1" # Only do this once cd $(DIR_APP) && install -m 755 usr/gen_init_cpio /sbin/ @@ -223,5 +265,5 @@ endif -rm -f /usr/src/log/*-kmod-$(VER)-$(VERSUFIX) -rm -f /usr/src/log/linux-initrd-$(VER)-$(VERSUFIX) - @rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs* $(DIR_SRC)/netfilter-layer7-* + @rm -rf $(DIR_APP) $(DIR_SRC)/linux @$(POSTBUILD)