]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - lfs/linux
Revert "kernel: update to 5.15.59"
[people/pmueller/ipfire-2.x.git] / lfs / linux
index 16018d8381ba5a66dae706de47ee7011fa4ff21f..07e838933b9b20fe7074d6b9b4face856d5023d6 100644 (file)
--- a/lfs/linux
+++ b/lfs/linux
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2021  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2022  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         = 5.10.30
-ARM_PATCHES = 4.14.212-ipfire0
+VER         = 5.15.57
+ARM_PATCHES = 5.15-ipfire5
 
 THISAPP    = linux-$(VER)
 DL_FILE    = linux-$(VER).tar.xz
@@ -38,26 +38,28 @@ HEADERS_ARCH  = $(BUILD_PLATFORM)
 KERNEL_ARCH   = $(BUILD_ARCH)
 KERNEL_TARGET = bzImage
 
-ifeq "$(BUILD_ARCH)" "i586"
-       KERNEL_ARCH = i386
-endif
-
 ifeq "$(BUILD_ARCH)" "aarch64"
        HEADERS_ARCH = arm64
        KERNEL_ARCH  = arm64
        KERNEL_TARGET = Image
 endif
 
-ifeq "$(BUILD_ARCH)" "armv5tel"
+ifeq "$(BUILD_ARCH)" "armv6l"
        KERNEL_ARCH  = arm
        KERNEL_TARGET = zImage
 endif
 
+ifeq "$(BUILD_ARCH)" "riscv64"
+       KERNEL_ARCH   = riscv
+       KERNEL_TARGET = Image.gz
+endif
+
 VERSUFIX=ipfire$(KCFG)
 
 ifeq "$(TOOLCHAIN)" "1"
        TARGET = $(DIR_INFO)/linux-$(VER)-$(VERSUFIX)-tools
        HEADERS_PREFIX = $(TOOLS_DIR)
+       EXTRAMAKE = CROSS_COMPILE=$(CROSSTARGET)-
 else
        TARGET = $(DIR_INFO)/linux-$(VER)-$(VERSUFIX)
        HEADERS_PREFIX = /usr
@@ -66,9 +68,6 @@ endif
 ifeq "$(KCFG)" ""
 LASTKERNEL=1
 endif
-ifeq "$(KCFG)" "-multi"
-LASTKERNEL=1
-endif
 
 ###############################################################################
 # Top-level Rules
@@ -79,8 +78,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                                 = 58f1210c3714f4c0baae9898111909a2
-arm-multi-patches-$(ARM_PATCHES).patch.xz_MD5  = 2b0e8e3ebe9827b2bfed7397b043dbc5
+$(DL_FILE)_BLAKE2 = 9adea6b8ee97ead38ecab39b1ef08b2ee1647eebbb2a8ccd2ba253eeebfd6435c83a03e83e186809473a982a373185874c0082aa0c56f5928d304c7df56dfb86
+arm-multi-patches-$(ARM_PATCHES).patch.xz_BLAKE2 = 58a70e757a9121a0aac83604a37aa787ec7ac0ee4970c5a3ac3bcb2dbaca32b00089cae6c0da5cf2fe0a2e156427b5165c6a86e0371a3e896f4c7cdd699c34a0
 
 install : $(TARGET)
 
@@ -88,12 +87,13 @@ check : $(patsubst %,$(DIR_CHK)/%,$(objects))
 
 download :$(patsubst %,$(DIR_DL)/%,$(objects))
 
-md5 : $(subst %,%_MD5,$(objects))
+b2 : $(subst %,%_BLAKE2,$(objects))
 
 dist:
        @$(PAK)
+
 ###############################################################################
-# Downloading, checking, md5sum
+# Downloading, checking, b2sum
 ###############################################################################
 
 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
@@ -102,8 +102,8 @@ $(patsubst %,$(DIR_CHK)/%,$(objects)) :
 $(patsubst %,$(DIR_DL)/%,$(objects)) :
        @$(LOAD)
 
-$(subst %,%_MD5,$(objects)) :
-       @$(MD5)
+$(subst %,%_BLAKE2,$(objects)) :
+       @$(B2SUM)
 
 ###############################################################################
 # Installation Details
@@ -116,7 +116,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        ln -svf linux-$(VER) $(DIR_SRC)/linux
 
        # Layer7-patch
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-5.10-layer7.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-5.15.46-layer7.patch
 
        # DVB Patches
        cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/v4l-dvb_fix_tua6034_pll.patch
@@ -125,9 +125,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        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
 
-       # Fix apu1 led detection with newer bios versions
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-5.10.16-apu1-led-new-bios.patch
-
        # Fix igb and e1000e crash
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14.1-igb-e1000e_fix_lock_at_update_stats.patch
 
@@ -140,19 +137,28 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # fix Boot with enabled usercopy hardening
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-5.9-crypto_testmgr_allocate_buffers_with____GFP_COMP.patch
 
-ifeq "$(KCFG)" "-multi"
+       # Patch performance monitoring restrictions to allow further hardening
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-5.15.17-security-perf-allow-further-restriction-of-perf_event_open.patch
+
+       # https://bugzilla.ipfire.org/show_bug.cgi?id=12760
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-5.15-NFQUEUE-Hold-RCU-read-lock-while-calling-nf_reinject.patch
+
+       # https://bugzilla.ipfire.org/show_bug.cgi?id=12889
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/devtmpfs-mount-with-noexec-and-nosuid.patch
+
+ifeq "$(BUILD_ARCH)" "armv6l"
        # Apply Arm-multiarch kernel patches.
-#      cd $(DIR_APP) && xzcat $(DIR_DL)/arm-multi-patches-$(ARM_PATCHES).patch.xz | patch -Np1
+       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
+       cd $(DIR_APP) && xzcat $(DIR_DL)/arm-multi-patches-$(ARM_PATCHES).patch.xz | patch -Np1
 endif
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-3.14.79-amba-fix.patch
 
 ifeq "$(KCFG)" "-headers"
        # Install the header files
-       cd $(DIR_APP) && make ARCH=$(HEADERS_ARCH) headers
+       cd $(DIR_APP) && make ARCH=$(HEADERS_ARCH) $(EXTRAMAKE) headers
        -mkdir -pv $(BUILDROOT)/$(HEADERS_PREFIX)/include
        cd $(DIR_APP) && find usr/include -name '.*' -delete
        cd $(DIR_APP) && rm usr/include/Makefile
@@ -250,7 +256,7 @@ ifeq "$(LASTKERNEL)" "1"
        # Blacklist new drm framebuffer modules
        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    
+       done
        sed -i -e "s|.ko.xz||g" /etc/modprobe.d/framebuffer.conf
 
        # Disable ipv6 at runtime