kernel: update 4.14.113
[ipfire-2.x.git] / lfs / linux
index 5db41c4..974c2a2 100644 (file)
--- a/lfs/linux
+++ b/lfs/linux
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2018  IPFire Team <info@ipfire.org>                      #
+# Copyright (C) 2007-2019  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # 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.40
-ARM_PATCHES = 4.14.40-ipfire0
+VER         = 4.14.113
+ARM_PATCHES = 4.14.113-ipfire0
 
 THISAPP    = linux-$(VER)
 DL_FILE    = linux-$(VER).tar.xz
@@ -34,19 +34,26 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 CFLAGS     =
 CXXFLAGS   =
 
-PAK_VER    = 73
+PAK_VER    = 82
 DEPS      = ""
 
+HEADERS_ARCH  = $(BUILD_PLATFORM)
+KERNEL_ARCH   = $(BUILD_ARCH)
+KERNEL_TARGET = bzImage
+
 ifeq "$(BUILD_ARCH)" "i586"
        KERNEL_ARCH = i386
-else
-       KERNEL_ARCH = $(BUILD_ARCH)
 endif
 
 ifeq "$(BUILD_ARCH)" "aarch64"
        HEADERS_ARCH = arm64
-else
-       HEADERS_ARCH = $(BUILD_PLATFORM)
+       KERNEL_ARCH  = arm64
+       KERNEL_TARGET = Image
+endif
+
+ifeq "$(BUILD_ARCH)" "armv5tel"
+       KERNEL_ARCH  = arm
+       KERNEL_TARGET = zImage
 endif
 
 VERSUFIX=ipfire$(KCFG)
@@ -75,8 +82,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                                 = 8376ed89777760443a359edb1d08ed9a
-arm-multi-patches-$(ARM_PATCHES).patch.xz_MD5  = ae7091bb79bad05c8394c8bacc48dd60
+$(DL_FILE)_MD5                                 = fd34a25839945f902f0c6d694d42ea7f
+arm-multi-patches-$(ARM_PATCHES).patch.xz_MD5  = 51eab5175bf8f0ad986006c74e60b472
 
 install : $(TARGET)
 
@@ -121,11 +128,8 @@ $(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/backports-4.2.6-1_ath10k_remove_logspam.patch
-       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
-#      cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8-rt2x00usb_suppress_queue_warnings.patch
-#      cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10.39-add_libertas_uap.patch
 
        # Add LED trigger
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.16-ledtrig_netdev.patch
@@ -137,19 +141,25 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8_cs5535audio_fix_logspam_on_geos.patch
 
        # Add PC Engines APU led support
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8-apu_leds.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14-apu_leds.patch
 
        # 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-3.10.10-mv_cesa_disable_failing_hmac_sha1.patch
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14.40-kirkwood-dtb.patch
 endif
 
 ifeq "$(KCFG)" "-multi"
        # Apply Arm-multiarch kernel patches.
        cd $(DIR_APP) && xzcat $(DIR_DL)/arm-multi-patches-$(ARM_PATCHES).patch.xz | patch -Np1
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14-Revert-usb-dwc2-Fix-DMA-alignment.patch
+
+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
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14-Revert-usb-dwc2-Fix-DMA-alignment.patch
 endif
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-3.14.79-amba-fix.patch
 
@@ -171,29 +181,21 @@ else
        cd $(DIR_APP) && make clean
        cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ -$(VERSUFIX)/' Makefile
 
-ifeq "$(KCFG)" "-kirkwood"
-       cd $(DIR_APP) && make $(MAKETUNING) zImage modules
-       cd $(DIR_APP) && cp -v arch/arm/boot/zImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
-#      cd $(DIR_APP) && cp -v arch/arm/boot/uImage /boot/uImage-$(VERSUFIX)
-else
-ifeq "$(KCFG)" "-multi"
-       cd $(DIR_APP) && make $(MAKETUNING) zImage modules
-       cd $(DIR_APP) && cp -v arch/arm/boot/zImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
-else
-       cd $(DIR_APP) && make $(MAKETUNING) bzImage modules
-       cd $(DIR_APP) && cp -v arch/$(KERNEL_ARCH)/boot/bzImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
-endif
-endif
+       # Build the kernel
+       cd $(DIR_APP) && make $(MAKETUNING) $(KERNEL_TARGET) modules
 
+       # Install the kernel
+       cd $(DIR_APP) && cp -v arch/$(KERNEL_ARCH)/boot/$(KERNEL_TARGET) /boot/vmlinuz-$(VER)-$(VERSUFIX)
        cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-$(VERSUFIX)
        cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-$(VERSUFIX)
        cd $(DIR_APP) && make $(MAKETUNING) modules_install
 
 ifeq "$(BUILD_PLATFORM)" "arm"
        cd $(DIR_APP) && make $(MAKETUNING) dtbs
-       cd $(DIR_APP) && for f in $$(find arch/arm/boot/dts/ -name *.dtb); do \
-                               mkdir -p /boot/dtb-$(VER)-$(VERSUFIX) ; \
-                               install -m 644 $$f /boot/dtb-$(VER)-$(VERSUFIX)/ ; \
+       mkdir -p /boot/dtb-$(VER)-$(VERSUFIX)
+       cd $(DIR_APP)/arch/$(KERNEL_ARCH)/boot/dts && for f in $$(find -name "*.dtb"); do \
+                               cp -v --parents $$f /boot/dtb-$(VER)-$(VERSUFIX)/ ; \
+                               chmod 644 /boot/dtb-$(VER)-$(VERSUFIX)/$$f ; \
                        done
 endif
 
@@ -205,14 +207,14 @@ ifeq "$(LASTKERNEL)" "1"
        echo install drm /bin/false > /etc/modprobe.d/framebuffer.conf
 
        # Blacklist old framebuffer modules
-       for f in $$(find /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/video/fbdev/ -name *.ko); do \
+       for f in $$(find /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/video/fbdev/ -name *.ko.xz); do \
                echo "blacklist $$(basename $$f)" >> /etc/modprobe.d/framebuffer.conf ; \
        done
        # Blacklist new drm framebuffer modules
-       for f in $$(find /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/gpu/drm -name *.ko); do \
+       for f in $$(find /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/gpu/drm -name *.ko.xz); do \
                echo "blacklist $$(basename $$f)" >> /etc/modprobe.d/framebuffer.conf ; \
        done    
-       sed -i -e "s|.ko||g" /etc/modprobe.d/framebuffer.conf
+       sed -i -e "s|.ko.xz||g" /etc/modprobe.d/framebuffer.conf
 
        # Disable ipv6 at runtime
        echo "options ipv6 disable_ipv6=1" > /etc/modprobe.d/ipv6.conf