]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - lfs/linux
mympd: remove create config start
[ipfire-2.x.git] / lfs / linux
index ec768912844ca6866f1e282f192a5d11dc0ed093..ef6b2cd04fa814206a3731027cdf692ce86327d0 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-2024  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,7 @@
 
 include Config
 
-VER         = 5.10.43
-ARM_PATCHES = 5.10.43-ipfire0
+VER         = 6.6.30
 
 THISAPP    = linux-$(VER)
 DL_FILE    = linux-$(VER).tar.xz
@@ -38,19 +37,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)" "armv5tel"
-       KERNEL_ARCH  = arm
-       KERNEL_TARGET = zImage
+ifeq "$(BUILD_ARCH)" "riscv64"
+       KERNEL_ARCH   = riscv
+       KERNEL_TARGET = Image.gz
 endif
 
 VERSUFIX=ipfire$(KCFG)
@@ -71,14 +66,13 @@ endif
 ###############################################################################
 # Top-level Rules
 ###############################################################################
-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
+objects = \
+       $(DL_FILE)
 
-$(DL_FILE)_MD5                                 = 983f71287dbaa21a77410351a1c51d06
-arm-multi-patches-$(ARM_PATCHES).patch.xz_MD5  = 1b66be2d80c102c6c1963e9f601e5099
+$(DL_FILE) = $(URL_IPFIRE)/$(DL_FILE)
+
+$(DL_FILE)_BLAKE2 = 815c85dae71784bc1eb722fc7651abebf344a960f51c473daa50f51f9097b8d64c68c033a3d488f7780cebd29e360c6df6ceff255a1a07d18533d7d950e77db8
 
 install : $(TARGET)
 
@@ -86,12 +80,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 +95,8 @@ $(patsubst %,$(DIR_CHK)/%,$(objects)) :
 $(patsubst %,$(DIR_DL)/%,$(objects)) :
        @$(LOAD)
 
-$(subst %,%_MD5,$(objects)) :
-       @$(MD5)
+$(subst %,%_BLAKE2,$(objects)) :
+       @$(B2SUM)
 
 ###############################################################################
 # Installation Details
@@ -114,7 +109,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-6.6.26-layer7.patch
 
        # DVB Patches
        cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/v4l-dvb_fix_tua6034_pll.patch
@@ -123,28 +118,27 @@ $(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
 
-       # cs5535audio spams syslog if no ac97 was present (geos router)
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8_cs5535audio_fix_logspam_on_geos.patch
-
        # Fix uevent PHYSDEVDRIVER
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-2.6.32.27_mcs7830-fix-driver-name.patch
 
        # 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)" "armv5tel"
-       # 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
+       # Apply Arm kernel patches.
+       cd $(DIR_APP) && cat patch $(DIR_SRC)/src/patches/linux/aarch64/* | patch -Np1
 endif
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-3.14.79-amba-fix.patch
 
@@ -182,7 +176,7 @@ else
        cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-$(VERSUFIX)
        cd $(DIR_APP) && make $(MAKETUNING) modules_install
 
-ifeq "$(BUILD_PLATFORM)" "arm"
+ifneq "$(BUILD_PLATFORM)" "x86"
        cd $(DIR_APP) && make $(MAKETUNING) dtbs
        mkdir -p /boot/dtb-$(VER)-$(VERSUFIX)
        cd $(DIR_APP)/arch/$(KERNEL_ARCH)/boot/dts && for f in $$(find -name "*.dtb"); do \
@@ -248,11 +242,16 @@ 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
        echo "options ipv6 disable_ipv6=1" > /etc/modprobe.d/ipv6.conf
+
+       # build cpupower utility
+       cd $(DIR_APP)/tools/power/cpupower && make $(MAKETUNING)
+       cd $(DIR_APP)/tools/power/cpupower && make install
+
 endif
 endif