]> git.ipfire.org Git - people/mlorenz/ipfire-2.x.git/blobdiff - lfs/linux
glibc: Import patches from upstream
[people/mlorenz/ipfire-2.x.git] / lfs / linux
index df43caa3eda78ed28ae1a19462b0c5cfbec7bd0d..52f1fe167a67a72bad6ec6acafa161638fea1eae 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-2023  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.15.5
-ARM_PATCHES = 5.15-ipfire2
+VER         = 6.1.45
+ARM_PATCHES = 6.1.y-ipfire2
 
 THISAPP    = linux-$(VER)
 DL_FILE    = linux-$(VER).tar.xz
@@ -38,19 +38,15 @@ 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)" "armv6l"
-       KERNEL_ARCH  = arm
-       KERNEL_TARGET = zImage
+ifeq "$(BUILD_ARCH)" "riscv64"
+       KERNEL_ARCH   = riscv
+       KERNEL_TARGET = Image.gz
 endif
 
 VERSUFIX=ipfire$(KCFG)
@@ -71,14 +67,16 @@ endif
 ###############################################################################
 # Top-level Rules
 ###############################################################################
-objects =$(DL_FILE) \
+
+objects = \
+       $(DL_FILE) \
        arm-multi-patches-$(ARM_PATCHES).patch.xz
 
 $(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                                 = 3b3c90c96227030643ff4c1c191e415e
-arm-multi-patches-$(ARM_PATCHES).patch.xz_MD5  = 9cab549a71b19b07e0c5c103ccf3c321
+$(DL_FILE)_BLAKE2 = 1889f12c4bf9d09a5c3d3addbe5de7989ebacdc89c01973b33e8e11faa989eb7a0f1666c3a78ffeb6b315ec1599ab51490a97079f2d4c2109c8888a88dcf03b7
+arm-multi-patches-$(ARM_PATCHES).patch.xz_BLAKE2 = 7afc460562fb24bcd75784fc79de768f9b60780aedd88d1a847927169e31920bbb475b1ac1466c4a224a7876d16bd8d465b96202de12b74f6e2ccbfcec731ad3
 
 install : $(TARGET)
 
@@ -86,12 +84,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)) :
@@ -100,8 +99,8 @@ $(patsubst %,$(DIR_CHK)/%,$(objects)) :
 $(patsubst %,$(DIR_DL)/%,$(objects)) :
        @$(LOAD)
 
-$(subst %,%_MD5,$(objects)) :
-       @$(MD5)
+$(subst %,%_BLAKE2,$(objects)) :
+       @$(B2SUM)
 
 ###############################################################################
 # Installation Details
@@ -114,7 +113,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.15-layer7.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-6.1.27-layer7.patch
 
        # DVB Patches
        cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/v4l-dvb_fix_tua6034_pll.patch
@@ -135,10 +134,15 @@ $(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 "$(BUILD_ARCH)" "armv6l"
-       # Apply Arm-multiarch kernel patches.
-       cd $(DIR_APP) && xzcat $(DIR_DL)/arm-multi-patches-$(ARM_PATCHES).patch.xz | patch -Np1
-endif
+       # 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
+
+       # Fix external module compile
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-6.0-fix_external_module_build.patch
+
 ifeq "$(BUILD_ARCH)" "aarch64"
        # Apply Arm-multiarch kernel patches.
        cd $(DIR_APP) && xzcat $(DIR_DL)/arm-multi-patches-$(ARM_PATCHES).patch.xz | patch -Np1
@@ -245,7 +249,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