Skip to content

Commit

Permalink
kernel: add linux 6.0 stable release support
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Oct 14, 2022
1 parent 0a4a1af commit 677b831
Show file tree
Hide file tree
Showing 151 changed files with 30,776 additions and 14 deletions.
2 changes: 2 additions & 0 deletions include/kernel-6.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LINUX_VERSION-6.0 = .1
LINUX_KERNEL_HASH-6.0.1 = 8ede745a69351ea0f27fe0c48780d4efa37ff086135e129358ce09694957e8f9
8 changes: 4 additions & 4 deletions package/kernel/linux/modules/fs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ define KernelPackage/fs-cifs
+kmod-crypto-ccm \
+kmod-crypto-ecb \
+kmod-crypto-des \
+(LINUX_5_15||LINUX_5_19):kmod-asn1-decoder \
+(LINUX_5_15||LINUX_5_19):kmod-oid-registry \
+(LINUX_5_15||LINUX_5_19):kmod-dnsresolver
+(LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-asn1-decoder \
+(LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-oid-registry \
+(LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-dnsresolver
endef

define KernelPackage/fs-cifs/description
Expand Down Expand Up @@ -530,7 +530,7 @@ $(eval $(call KernelPackage,fs-ntfs))
define KernelPackage/fs-ntfs3
SUBMENU:=$(FS_MENU)
TITLE:=NTFS3 Read-Write file system support
DEPENDS:=@(LINUX_5_4||LINUX_5_10||LINUX_5_15||LINUX_5_19) +kmod-nls-base
DEPENDS:=@(LINUX_5_4||LINUX_5_10||LINUX_5_15||LINUX_5_19||LINUX_6_0) +kmod-nls-base
KCONFIG:= \
CONFIG_NTFS3_FS \
CONFIG_NTFS3_64BIT_CLUSTER=y \
Expand Down
6 changes: 3 additions & 3 deletions package/kernel/linux/modules/netdevices.mk
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ $(eval $(call KernelPackage,mii))
define KernelPackage/mdio-devres
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Supports MDIO device registration
DEPENDS:=@(LINUX_5_10||LINUX_5_15||LINUX_5_19) +kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio
DEPENDS:=@(LINUX_5_10||LINUX_5_15||LINUX_5_19||LINUX_6_0) +kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio
KCONFIG:=CONFIG_MDIO_DEVRES
HIDDEN:=1
FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko
Expand Down Expand Up @@ -563,7 +563,7 @@ $(eval $(call KernelPackage,8139cp))
define KernelPackage/r8169
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=RealTek RTL-8169 PCI Gigabit Ethernet Adapter kernel support
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +(LINUX_5_10||LINUX_5_15||LINUX_5_19):kmod-mdio-devres
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +(LINUX_5_10||LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-mdio-devres
KCONFIG:= \
CONFIG_R8169 \
CONFIG_R8169_NAPI=y \
Expand Down Expand Up @@ -689,7 +689,7 @@ $(eval $(call KernelPackage,igbvf))
define KernelPackage/ixgbe
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_19):kmod-mdio-devres
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-mdio-devres
KCONFIG:=CONFIG_IXGBE \
CONFIG_IXGBE_VXLAN=n \
CONFIG_IXGBE_HWMON=y \
Expand Down
6 changes: 3 additions & 3 deletions package/kernel/linux/modules/other.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,8 @@ $(eval $(call KernelPackage,keys-trusted))
define KernelPackage/tpm
SUBMENU:=$(OTHER_MENU)
TITLE:=TPM Hardware Support
DEPENDS:= +kmod-random-core +(LINUX_5_15||LINUX_5_19):kmod-asn1-decoder \
+(LINUX_5_15||LINUX_5_19):kmod-asn1-encoder +(LINUX_5_15||LINUX_5_19):kmod-oid-registry
DEPENDS:= +kmod-random-core +(LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-asn1-decoder \
+(LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-asn1-encoder +(LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-oid-registry
KCONFIG:= CONFIG_TCG_TPM
FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko
AUTOLOAD:=$(call AutoLoad,10,tpm,1)
Expand Down Expand Up @@ -1283,7 +1283,7 @@ $(eval $(call KernelPackage,qcom-qmi-helpers))
define KernelPackage/mhi
SUBMENU:=$(OTHER_MENU)
TITLE:=Modem Host Interface (MHI) bus
DEPENDS:=@(LINUX_5_15||LINUX_5_19)
DEPENDS:=@(LINUX_5_15||LINUX_5_19||LINUX_6_0)
KCONFIG:=CONFIG_MHI_BUS \
CONFIG_MHI_BUS_DEBUG=y \
CONFIG_MHI_BUS_PCI_GENERIC=n \
Expand Down
2 changes: 1 addition & 1 deletion package/kernel/linux/modules/usb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ $(eval $(call KernelPackage,usb-net-aqc111))

define KernelPackage/usb-net-asix
TITLE:=Kernel module for USB-to-Ethernet Asix convertors
DEPENDS:=+kmod-libphy +(LINUX_5_15||LINUX_5_19):kmod-mdio-devres
DEPENDS:=+kmod-libphy +(LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-mdio-devres
KCONFIG:=CONFIG_USB_NET_AX8817X
FILES:= \
$(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.ko \
Expand Down
4 changes: 2 additions & 2 deletions package/kernel/linux/modules/video.mk
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ define KernelPackage/drm
SUBMENU:=$(VIDEO_MENU)
TITLE:=Direct Rendering Manager (DRM) support
HIDDEN:=1
DEPENDS:=+kmod-dma-buf +kmod-i2c-core +kmod-i2c-algo-bit +PACKAGE_kmod-backlight:kmod-backlight \
+(LINUX_5_15||LINUX_5_19):kmod-fb
DEPENDS:=+kmod-dma-buf +kmod-i2c-core +kmod-i2c-algo-bit +PACKAGE_kmod-backlight:kmod-backlight \
+(LINUX_5_15||LINUX_5_19||LINUX_6_0):kmod-fb
KCONFIG:= \
CONFIG_DRM \
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1386,16 +1386,6 @@ config BOOT_CONFIG_EMBED_FILE
This bootconfig will be used if there is no initrd or no other
bootconfig in the initrd.

-config INITRAMFS_PRESERVE_MTIME
- bool "Preserve cpio archive mtimes in initramfs"
- default y
- help
- Each entry in an initramfs cpio archive carries an mtime value. When
- enabled, extracted cpio items take this mtime, with directory mtime
- setting deferred until after creation of any child entries.
-
- If unsure, say Y.
-
choice
prompt "Compiler optimization level"
default CC_OPTIMIZE_FOR_PERFORMANCE
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -127,17 +127,15 @@ static void __init free_hash(void)
}
}

-#ifdef CONFIG_INITRAMFS_PRESERVE_MTIME
-static void __init do_utime(char *filename, time64_t mtime)
+static long __init do_utime(char *filename, time64_t mtime)
{
- struct timespec64 t[2] = { { .tv_sec = mtime }, { .tv_sec = mtime } };
- init_utimes(filename, t);
-}
+ struct timespec64 t[2];

-static void __init do_utime_path(const struct path *path, time64_t mtime)
-{
- struct timespec64 t[2] = { { .tv_sec = mtime }, { .tv_sec = mtime } };
- vfs_utimes(path, t);
+ t[0].tv_sec = mtime;
+ t[0].tv_nsec = 0;
+ t[1].tv_sec = mtime;
+ t[1].tv_nsec = 0;
+ return init_utimes(filename, t);
}

static __initdata LIST_HEAD(dir_list);
@@ -170,12 +168,6 @@ static void __init dir_utime(void)
kfree(de);
}
}
-#else
-static void __init do_utime(char *filename, time64_t mtime) {}
-static void __init do_utime_path(const struct path *path, time64_t mtime) {}
-static void __init dir_add(const char *name, time64_t mtime) {}
-static void __init dir_utime(void) {}
-#endif

static __initdata time64_t mtime;

@@ -407,10 +399,14 @@ static int __init do_name(void)
static int __init do_copy(void)
{
if (byte_count >= body_len) {
+ struct timespec64 t[2] = { };
if (xwrite(wfile, victim, body_len, &wfile_pos) != body_len)
error("write error");

- do_utime_path(&wfile->f_path, mtime);
+ t[0].tv_sec = mtime;
+ t[1].tv_sec = mtime;
+ vfs_utimes(&wfile->f_path, t);
+
fput(wfile);
if (csum_present && io_csum != hdr_csum)
error("bad data checksum");
122 changes: 122 additions & 0 deletions target/linux/generic/backport-6.0/002-struct-net_device.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2133,8 +2133,6 @@ struct net_device {

/* Protocol-specific pointers */

- struct in_device __rcu *ip_ptr;
- struct inet6_dev __rcu *ip6_ptr;
#if IS_ENABLED(CONFIG_VLAN_8021Q)
struct vlan_info __rcu *vlan_info;
#endif
@@ -2147,18 +2145,16 @@ struct net_device {
#if IS_ENABLED(CONFIG_ATALK)
void *atalk_ptr;
#endif
+ struct in_device __rcu *ip_ptr;
#if IS_ENABLED(CONFIG_DECNET)
struct dn_dev __rcu *dn_ptr;
#endif
+ struct inet6_dev __rcu *ip6_ptr;
#if IS_ENABLED(CONFIG_AX25)
void *ax25_ptr;
#endif
-#if IS_ENABLED(CONFIG_CFG80211)
struct wireless_dev *ieee80211_ptr;
-#endif
-#if IS_ENABLED(CONFIG_IEEE802154) || IS_ENABLED(CONFIG_6LOWPAN)
struct wpan_dev *ieee802154_ptr;
-#endif
#if IS_ENABLED(CONFIG_MPLS_ROUTING)
struct mpls_dev __rcu *mpls_ptr;
#endif
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -8379,9 +8379,7 @@ int cfg80211_register_netdevice(struct n
*/
static inline void cfg80211_unregister_netdevice(struct net_device *dev)
{
-#if IS_ENABLED(CONFIG_CFG80211)
cfg80211_unregister_wdev(dev->ieee80211_ptr);
-#endif
}

/**
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -373,7 +373,6 @@ struct wpan_dev {

#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)

-#if IS_ENABLED(CONFIG_IEEE802154) || IS_ENABLED(CONFIG_6LOWPAN)
static inline int
wpan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
const struct ieee802154_addr *daddr,
@@ -384,7 +383,6 @@ wpan_dev_hard_header(struct sk_buff *skb

return wpan_dev->header_ops->create(skb, dev, daddr, saddr, len);
}
-#endif

struct wpan_phy *
wpan_phy_new(const struct cfg802154_ops *ops, size_t priv_size);
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -308,11 +308,9 @@ static bool batadv_is_cfg80211_netdev(st
if (!net_device)
return false;

-#if IS_ENABLED(CONFIG_CFG80211)
/* cfg80211 drivers have to set ieee80211_ptr */
if (net_device->ieee80211_ptr)
return true;
-#endif

return false;
}
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -747,6 +747,7 @@ static const struct attribute_group nets
.attrs = netstat_attrs,
};

+#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211)
static struct attribute *wireless_attrs[] = {
NULL
};
@@ -755,19 +756,7 @@ static const struct attribute_group wire
.name = "wireless",
.attrs = wireless_attrs,
};
-
-static bool wireless_group_needed(struct net_device *ndev)
-{
-#if IS_ENABLED(CONFIG_CFG80211)
- if (ndev->ieee80211_ptr)
- return true;
#endif
-#if IS_ENABLED(CONFIG_WIRELESS_EXT)
- if (ndev->wireless_handlers)
- return true;
-#endif
- return false;
-}

#else /* CONFIG_SYSFS */
#define net_class_groups NULL
@@ -2008,8 +1997,14 @@ int netdev_register_kobject(struct net_d

*groups++ = &netstat_group;

- if (wireless_group_needed(ndev))
+#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211)
+ if (ndev->ieee80211_ptr)
+ *groups++ = &wireless_group;
+#if IS_ENABLED(CONFIG_WIRELESS_EXT)
+ else if (ndev->wireless_handlers)
*groups++ = &wireless_group;
+#endif
+#endif
#endif /* CONFIG_SYSFS */

error = device_add(dev);
21 changes: 21 additions & 0 deletions target/linux/generic/backport-6.0/011-kbuild-export-SUBARCH.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From 173019b66dcc9d68ad9333aa744dad1e369b5aa8 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Sun, 9 Jul 2017 00:26:53 +0200
Subject: [PATCH 34/34] kernel: add compile fix for linux 4.9 on x86

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -537,7 +537,7 @@ KBUILD_LDFLAGS_MODULE :=
KBUILD_LDFLAGS :=
CLANG_FLAGS :=

-export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG
+export ARCH SRCARCH SUBARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
export PERL PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
Loading

0 comments on commit 677b831

Please sign in to comment.