From ee85786b43344b8ed5f722ffd3639f1e0563fd36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 7 Feb 2023 15:06:50 +0100 Subject: [PATCH 01/19] bcm47xx: relocate LZMA loader #2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increased size of the 5.15 kernel requires bumping BZ_TEXT_START again. Without this CFE hangs at the: Starting program at 0x80001000 This fixes booting 5.15 based mips74k images on: 1. BCM4706 (Luxul XWR-1750) 2. BCM5357B0 (Linksys E1000 V2.1) 3. BCM47186B0 (Luxul XWR-600) 4. BCM5358 (Linksys E2500 V3) It isn't needed but also doesn't break: 1. BCM5354 (Asus WL-500gP V2) Ref: 4cd97e476089 ("bcm47xx: relocate LZMA loader") Cc: Hauke Mehrtens Signed-off-by: Rafał Miłecki Acked-by: Hauke Mehrtens --- target/linux/bcm47xx/image/lzma-loader/src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/bcm47xx/image/lzma-loader/src/Makefile b/target/linux/bcm47xx/image/lzma-loader/src/Makefile index a3e7ae1c92..0bad8dd9bb 100644 --- a/target/linux/bcm47xx/image/lzma-loader/src/Makefile +++ b/target/linux/bcm47xx/image/lzma-loader/src/Makefile @@ -18,8 +18,8 @@ # TEXT_START := 0x80001000 -BZ_TEXT_START := 0x80700000 -BZ_STACK_START := 0x80800000 +BZ_TEXT_START := 0x80d00000 +BZ_STACK_START := 0x80e00000 OBJCOPY := $(CROSS_COMPILE)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S From eaf5c85fd3d7d8f35dd80e6816c79dc35016a83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 24 Feb 2023 12:06:10 +0100 Subject: [PATCH 02/19] bcm47xx: switch default kernel to the 5.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- target/linux/bcm47xx/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/bcm47xx/Makefile b/target/linux/bcm47xx/Makefile index ca09aea981..a56c53ca6d 100644 --- a/target/linux/bcm47xx/Makefile +++ b/target/linux/bcm47xx/Makefile @@ -10,8 +10,7 @@ BOARDNAME:=Broadcom BCM47xx/53xx (MIPS) FEATURES:=squashfs usb SUBTARGETS:=generic mips74k legacy -KERNEL_PATCHVER:=5.10 -KERNEL_TESTING_PATCHVER:=5.15 +KERNEL_PATCHVER:=5.15 define Target/Description Build firmware images for Broadcom based BCM47xx/53xx routers with MIPS CPU, *not* ARM. From f35e2422b8774a2a70c8c3cd87c4289b17b7d4a3 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Wed, 1 Feb 2023 20:30:57 -0500 Subject: [PATCH 03/19] base-files: add support for retrieving IPv6 assignments In DHCPv6-PD enabled environments, addresses are assigned to interfaces. These new functions retrieve the IPv6 assigned prefix(es). Signed-off-by: Mark Baker --- package/base-files/files/lib/functions/network.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package/base-files/files/lib/functions/network.sh b/package/base-files/files/lib/functions/network.sh index 055f18c11e..4851a5817a 100644 --- a/package/base-files/files/lib/functions/network.sh +++ b/package/base-files/files/lib/functions/network.sh @@ -90,6 +90,13 @@ network_get_prefix6() { __network_ifstatus "$1" "$2" "['ipv6-prefix'][0]['address','mask']" "/" } +# determine first IPv6 prefix assignment of given logical interface +# 1: destination variable +# 2: interface +network_get_prefix_assignment6() { + __network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][0]['address','mask']" "/" +} + # determine all IPv4 addresses of given logical interface # 1: destination variable # 2: interface @@ -187,6 +194,13 @@ network_get_prefixes6() { __network_ifstatus "$1" "$2" "['ipv6-prefix'][*]['address','mask']" "/ " } +# determine all IPv6 prefix assignments of given logical interface +# 1: destination variable +# 2: interface +network_get_prefix_assignments6() { + __network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][*]['address','mask']" "/ " +} + # determine IPv4 gateway of given logical interface # 1: destination variable # 2: interface From 530f5c2fda1893ee1e0ae8b1f5bea5eda0850a40 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 5 Feb 2023 21:38:19 +0100 Subject: [PATCH 04/19] libcap: update to 2.67 Release notes: https://sites.google.com/site/fullycapable/release-notes-for-libcap#h.o8papfkfh1x9 While working on it, remove $(AUTORELEASE). Tested-by: Linhui Liu liulinhui36@gmail.com # Xiaomi AX3600 Signed-off-by: Nick Hainke --- package/libs/libcap/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/libcap/Makefile b/package/libs/libcap/Makefile index afc66d7c09..a35b5e394f 100644 --- a/package/libs/libcap/Makefile +++ b/package/libs/libcap/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcap -PKG_VERSION:=2.66 -PKG_RELEASE:=$(AUTORELEASE) +PKG_VERSION:=2.67 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2 -PKG_HASH:=15c40ededb3003d70a283fe587a36b7d19c8b3b554e33f86129c059a4bb466b2 +PKG_HASH:=ce9b22fdc271beb6dae7543da5f74cf24cb82e6848cfd088a5a069dec5ea5198 PKG_MAINTAINER:=Paul Wassi PKG_LICENSE:=GPL-2.0-only From c98a202446848f162ae59c85a7f3f08da88a35e0 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Wed, 22 Feb 2023 15:50:43 +0100 Subject: [PATCH 05/19] ethtool: update to 6.2 Release notes: - Feature: link down event statistics (no option) - Feature: JSON output for coalesce (-c) - Feature: new link modes (no option) - Feature: JSON output for ring (-g) - Feature: netlink handler for RSS get (-x) - Fix: fix boolean value output in JSON output - Fix: fix build errors and warnings Remove upstreamed patches: - 100-uapi-Bring-in-if-h.patch - 101-netlink-Fix-maybe-uninitialized-meters-variable.patch - 102-raw-marvell-c-Fix-build-with-musl-libc.patch Signed-off-by: Nick Hainke --- package/network/utils/ethtool/Makefile | 4 +- .../patches/100-uapi-Bring-in-if-h.patch | 465 ------------------ ...-maybe-uninitialized-meters-variable.patch | 25 - ...w-marvell-c-Fix-build-with-musl-libc.patch | 63 --- 4 files changed, 2 insertions(+), 555 deletions(-) delete mode 100644 package/network/utils/ethtool/patches/100-uapi-Bring-in-if-h.patch delete mode 100644 package/network/utils/ethtool/patches/101-netlink-Fix-maybe-uninitialized-meters-variable.patch delete mode 100644 package/network/utils/ethtool/patches/102-raw-marvell-c-Fix-build-with-musl-libc.patch diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index bec26cd364..b18320bf05 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool -PKG_VERSION:=6.1 +PKG_VERSION:=6.2 PKG_RELEASE:=1 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/ethtool -PKG_HASH:=c41fc881ffa5a40432d2dd829eb44c64a49dee482e716baacf9262c64daa8f90 +PKG_HASH:=86df0114064d4d73f6bf72bf03e85c33964a519ee0c1d1ba65005ad2d0e570e1 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/utils/ethtool/patches/100-uapi-Bring-in-if-h.patch b/package/network/utils/ethtool/patches/100-uapi-Bring-in-if-h.patch deleted file mode 100644 index 09be05c1f6..0000000000 --- a/package/network/utils/ethtool/patches/100-uapi-Bring-in-if-h.patch +++ /dev/null @@ -1,465 +0,0 @@ -From: Florian Fainelli -To: netdev@vger.kernel.org -Subject: [PATCH ethtool v2 1/3] uapi: Bring in if.h -Date: Sat, 14 Jan 2023 08:34:09 -0800 - -Bring in if.h from commit eec517cdb481 ("net: Add IF_OPER_TESTING") as -well as uapi/linux/hdlc/ioctl.h. Ensure that we define all of the -necessary guards to provide updated definitions of ifmap, ifreq and -IFNAMSIZ. This resolves build issues with kernel headers < 4.11 which -lacked 2618be7dccf8739b89e1906b64bd8d551af351e6 ("uapi: fix linux/if.h -userspace compilation errors"). - -Fixes: 1fa60003a8b8 ("misc: header includes cleanup") -Reported-by: Markus Mayer -Signed-off-by: Florian Fainelli ---- - Makefile.am | 6 +- - internal.h | 7 +- - uapi/linux/hdlc/ioctl.h | 94 +++++++++++++ - uapi/linux/if.h | 296 ++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 397 insertions(+), 6 deletions(-) - create mode 100644 uapi/linux/hdlc/ioctl.h - create mode 100644 uapi/linux/if.h - ---- a/Makefile.am -+++ b/Makefile.am -@@ -7,7 +7,8 @@ EXTRA_DIST = LICENSE ethtool.8 ethtool.s - - sbin_PROGRAMS = ethtool - ethtool_SOURCES = ethtool.c uapi/linux/ethtool.h internal.h \ -- uapi/linux/net_tstamp.h rxclass.c common.c common.h \ -+ uapi/linux/net_tstamp.h uapi/linux/if.h uapi/linux/hdlc/ioctl.h \ -+ rxclass.c common.c common.h \ - json_writer.c json_writer.h json_print.c json_print.h \ - list.h - if ETHTOOL_ENABLE_PRETTY_DUMP -@@ -43,7 +44,8 @@ ethtool_SOURCES += \ - netlink/desc-rtnl.c netlink/cable_test.c netlink/tunnels.c \ - uapi/linux/ethtool_netlink.h \ - uapi/linux/netlink.h uapi/linux/genetlink.h \ -- uapi/linux/rtnetlink.h uapi/linux/if_link.h -+ uapi/linux/rtnetlink.h uapi/linux/if_link.h \ -+ uapi/linux/if.h uapi/linux/hdlc/ioctl.h - AM_CPPFLAGS += @MNL_CFLAGS@ - LDADD += @MNL_LIBS@ - endif ---- a/internal.h -+++ b/internal.h -@@ -21,6 +21,9 @@ - #include - #include - #include -+#define __UAPI_DEF_IF_IFNAMSIZ 1 -+#define __UAPI_DEF_IF_IFMAP 1 -+#define __UAPI_DEF_IF_IFREQ 1 - #include - - #include "json_writer.h" -@@ -52,10 +55,6 @@ typedef int32_t s32; - #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) - #endif - --#ifndef ALTIFNAMSIZ --#define ALTIFNAMSIZ 128 --#endif -- - #include - #include - ---- /dev/null -+++ b/uapi/linux/hdlc/ioctl.h -@@ -0,0 +1,94 @@ -+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -+#ifndef __HDLC_IOCTL_H__ -+#define __HDLC_IOCTL_H__ -+ -+ -+#define GENERIC_HDLC_VERSION 4 /* For synchronization with sethdlc utility */ -+ -+#define CLOCK_DEFAULT 0 /* Default setting */ -+#define CLOCK_EXT 1 /* External TX and RX clock - DTE */ -+#define CLOCK_INT 2 /* Internal TX and RX clock - DCE */ -+#define CLOCK_TXINT 3 /* Internal TX and external RX clock */ -+#define CLOCK_TXFROMRX 4 /* TX clock derived from external RX clock */ -+ -+ -+#define ENCODING_DEFAULT 0 /* Default setting */ -+#define ENCODING_NRZ 1 -+#define ENCODING_NRZI 2 -+#define ENCODING_FM_MARK 3 -+#define ENCODING_FM_SPACE 4 -+#define ENCODING_MANCHESTER 5 -+ -+ -+#define PARITY_DEFAULT 0 /* Default setting */ -+#define PARITY_NONE 1 /* No parity */ -+#define PARITY_CRC16_PR0 2 /* CRC16, initial value 0x0000 */ -+#define PARITY_CRC16_PR1 3 /* CRC16, initial value 0xFFFF */ -+#define PARITY_CRC16_PR0_CCITT 4 /* CRC16, initial 0x0000, ITU-T version */ -+#define PARITY_CRC16_PR1_CCITT 5 /* CRC16, initial 0xFFFF, ITU-T version */ -+#define PARITY_CRC32_PR0_CCITT 6 /* CRC32, initial value 0x00000000 */ -+#define PARITY_CRC32_PR1_CCITT 7 /* CRC32, initial value 0xFFFFFFFF */ -+ -+#define LMI_DEFAULT 0 /* Default setting */ -+#define LMI_NONE 1 /* No LMI, all PVCs are static */ -+#define LMI_ANSI 2 /* ANSI Annex D */ -+#define LMI_CCITT 3 /* ITU-T Annex A */ -+#define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */ -+ -+#ifndef __ASSEMBLY__ -+ -+typedef struct { -+ unsigned int clock_rate; /* bits per second */ -+ unsigned int clock_type; /* internal, external, TX-internal etc. */ -+ unsigned short loopback; -+} sync_serial_settings; /* V.35, V.24, X.21 */ -+ -+typedef struct { -+ unsigned int clock_rate; /* bits per second */ -+ unsigned int clock_type; /* internal, external, TX-internal etc. */ -+ unsigned short loopback; -+ unsigned int slot_map; -+} te1_settings; /* T1, E1 */ -+ -+typedef struct { -+ unsigned short encoding; -+ unsigned short parity; -+} raw_hdlc_proto; -+ -+typedef struct { -+ unsigned int t391; -+ unsigned int t392; -+ unsigned int n391; -+ unsigned int n392; -+ unsigned int n393; -+ unsigned short lmi; -+ unsigned short dce; /* 1 for DCE (network side) operation */ -+} fr_proto; -+ -+typedef struct { -+ unsigned int dlci; -+} fr_proto_pvc; /* for creating/deleting FR PVCs */ -+ -+typedef struct { -+ unsigned int dlci; -+ char master[IFNAMSIZ]; /* Name of master FRAD device */ -+}fr_proto_pvc_info; /* for returning PVC information only */ -+ -+typedef struct { -+ unsigned int interval; -+ unsigned int timeout; -+} cisco_proto; -+ -+typedef struct { -+ unsigned short dce; /* 1 for DCE (network side) operation */ -+ unsigned int modulo; /* modulo (8 = basic / 128 = extended) */ -+ unsigned int window; /* frame window size */ -+ unsigned int t1; /* timeout t1 */ -+ unsigned int t2; /* timeout t2 */ -+ unsigned int n2; /* frame retry counter */ -+} x25_hdlc_proto; -+ -+/* PPP doesn't need any info now - supply length = 0 to ioctl */ -+ -+#endif /* __ASSEMBLY__ */ -+#endif /* __HDLC_IOCTL_H__ */ ---- /dev/null -+++ b/uapi/linux/if.h -@@ -0,0 +1,296 @@ -+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -+/* -+ * INET An implementation of the TCP/IP protocol suite for the LINUX -+ * operating system. INET is implemented using the BSD Socket -+ * interface as the means of communication with the user level. -+ * -+ * Global definitions for the INET interface module. -+ * -+ * Version: @(#)if.h 1.0.2 04/18/93 -+ * -+ * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1982-1988 -+ * Ross Biro -+ * Fred N. van Kempen, -+ * -+ * 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 the Free Software Foundation; either version -+ * 2 of the License, or (at your option) any later version. -+ */ -+#ifndef _LINUX_IF_H -+#define _LINUX_IF_H -+ -+#include /* for compatibility with glibc */ -+#include /* for "__kernel_caddr_t" et al */ -+#include /* for "struct sockaddr" et al */ -+ /* for "__user" et al */ -+ -+#include /* for struct sockaddr. */ -+ -+#if __UAPI_DEF_IF_IFNAMSIZ -+#define IFNAMSIZ 16 -+#endif /* __UAPI_DEF_IF_IFNAMSIZ */ -+#define IFALIASZ 256 -+#define ALTIFNAMSIZ 128 -+#include -+ -+/* For glibc compatibility. An empty enum does not compile. */ -+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || \ -+ __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 -+/** -+ * enum net_device_flags - &struct net_device flags -+ * -+ * These are the &struct net_device flags, they can be set by drivers, the -+ * kernel and some can be triggered by userspace. Userspace can query and -+ * set these flags using userspace utilities but there is also a sysfs -+ * entry available for all dev flags which can be queried and set. These flags -+ * are shared for all types of net_devices. The sysfs entries are available -+ * via /sys/class/net//flags. Flags which can be toggled through sysfs -+ * are annotated below, note that only a few flags can be toggled and some -+ * other flags are always preserved from the original net_device flags -+ * even if you try to set them via sysfs. Flags which are always preserved -+ * are kept under the flag grouping @IFF_VOLATILE. Flags which are __volatile__ -+ * are annotated below as such. -+ * -+ * You should have a pretty good reason to be extending these flags. -+ * -+ * @IFF_UP: interface is up. Can be toggled through sysfs. -+ * @IFF_BROADCAST: broadcast address valid. Volatile. -+ * @IFF_DEBUG: turn on debugging. Can be toggled through sysfs. -+ * @IFF_LOOPBACK: is a loopback net. Volatile. -+ * @IFF_POINTOPOINT: interface is has p-p link. Volatile. -+ * @IFF_NOTRAILERS: avoid use of trailers. Can be toggled through sysfs. -+ * Volatile. -+ * @IFF_RUNNING: interface RFC2863 OPER_UP. Volatile. -+ * @IFF_NOARP: no ARP protocol. Can be toggled through sysfs. Volatile. -+ * @IFF_PROMISC: receive all packets. Can be toggled through sysfs. -+ * @IFF_ALLMULTI: receive all multicast packets. Can be toggled through -+ * sysfs. -+ * @IFF_MASTER: master of a load balancer. Volatile. -+ * @IFF_SLAVE: slave of a load balancer. Volatile. -+ * @IFF_MULTICAST: Supports multicast. Can be toggled through sysfs. -+ * @IFF_PORTSEL: can set media type. Can be toggled through sysfs. -+ * @IFF_AUTOMEDIA: auto media select active. Can be toggled through sysfs. -+ * @IFF_DYNAMIC: dialup device with changing addresses. Can be toggled -+ * through sysfs. -+ * @IFF_LOWER_UP: driver signals L1 up. Volatile. -+ * @IFF_DORMANT: driver signals dormant. Volatile. -+ * @IFF_ECHO: echo sent packets. Volatile. -+ */ -+enum net_device_flags { -+/* for compatibility with glibc net/if.h */ -+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS -+ IFF_UP = 1<<0, /* sysfs */ -+ IFF_BROADCAST = 1<<1, /* __volatile__ */ -+ IFF_DEBUG = 1<<2, /* sysfs */ -+ IFF_LOOPBACK = 1<<3, /* __volatile__ */ -+ IFF_POINTOPOINT = 1<<4, /* __volatile__ */ -+ IFF_NOTRAILERS = 1<<5, /* sysfs */ -+ IFF_RUNNING = 1<<6, /* __volatile__ */ -+ IFF_NOARP = 1<<7, /* sysfs */ -+ IFF_PROMISC = 1<<8, /* sysfs */ -+ IFF_ALLMULTI = 1<<9, /* sysfs */ -+ IFF_MASTER = 1<<10, /* __volatile__ */ -+ IFF_SLAVE = 1<<11, /* __volatile__ */ -+ IFF_MULTICAST = 1<<12, /* sysfs */ -+ IFF_PORTSEL = 1<<13, /* sysfs */ -+ IFF_AUTOMEDIA = 1<<14, /* sysfs */ -+ IFF_DYNAMIC = 1<<15, /* sysfs */ -+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */ -+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO -+ IFF_LOWER_UP = 1<<16, /* __volatile__ */ -+ IFF_DORMANT = 1<<17, /* __volatile__ */ -+ IFF_ECHO = 1<<18, /* __volatile__ */ -+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ -+}; -+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */ -+ -+/* for compatibility with glibc net/if.h */ -+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS -+#define IFF_UP IFF_UP -+#define IFF_BROADCAST IFF_BROADCAST -+#define IFF_DEBUG IFF_DEBUG -+#define IFF_LOOPBACK IFF_LOOPBACK -+#define IFF_POINTOPOINT IFF_POINTOPOINT -+#define IFF_NOTRAILERS IFF_NOTRAILERS -+#define IFF_RUNNING IFF_RUNNING -+#define IFF_NOARP IFF_NOARP -+#define IFF_PROMISC IFF_PROMISC -+#define IFF_ALLMULTI IFF_ALLMULTI -+#define IFF_MASTER IFF_MASTER -+#define IFF_SLAVE IFF_SLAVE -+#define IFF_MULTICAST IFF_MULTICAST -+#define IFF_PORTSEL IFF_PORTSEL -+#define IFF_AUTOMEDIA IFF_AUTOMEDIA -+#define IFF_DYNAMIC IFF_DYNAMIC -+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */ -+ -+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO -+#define IFF_LOWER_UP IFF_LOWER_UP -+#define IFF_DORMANT IFF_DORMANT -+#define IFF_ECHO IFF_ECHO -+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ -+ -+#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\ -+ IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) -+ -+#define IF_GET_IFACE 0x0001 /* for querying only */ -+#define IF_GET_PROTO 0x0002 -+ -+/* For definitions see hdlc.h */ -+#define IF_IFACE_V35 0x1000 /* V.35 serial interface */ -+#define IF_IFACE_V24 0x1001 /* V.24 serial interface */ -+#define IF_IFACE_X21 0x1002 /* X.21 serial interface */ -+#define IF_IFACE_T1 0x1003 /* T1 telco serial interface */ -+#define IF_IFACE_E1 0x1004 /* E1 telco serial interface */ -+#define IF_IFACE_SYNC_SERIAL 0x1005 /* can't be set by software */ -+#define IF_IFACE_X21D 0x1006 /* X.21 Dual Clocking (FarSite) */ -+ -+/* For definitions see hdlc.h */ -+#define IF_PROTO_HDLC 0x2000 /* raw HDLC protocol */ -+#define IF_PROTO_PPP 0x2001 /* PPP protocol */ -+#define IF_PROTO_CISCO 0x2002 /* Cisco HDLC protocol */ -+#define IF_PROTO_FR 0x2003 /* Frame Relay protocol */ -+#define IF_PROTO_FR_ADD_PVC 0x2004 /* Create FR PVC */ -+#define IF_PROTO_FR_DEL_PVC 0x2005 /* Delete FR PVC */ -+#define IF_PROTO_X25 0x2006 /* X.25 */ -+#define IF_PROTO_HDLC_ETH 0x2007 /* raw HDLC, Ethernet emulation */ -+#define IF_PROTO_FR_ADD_ETH_PVC 0x2008 /* Create FR Ethernet-bridged PVC */ -+#define IF_PROTO_FR_DEL_ETH_PVC 0x2009 /* Delete FR Ethernet-bridged PVC */ -+#define IF_PROTO_FR_PVC 0x200A /* for reading PVC status */ -+#define IF_PROTO_FR_ETH_PVC 0x200B -+#define IF_PROTO_RAW 0x200C /* RAW Socket */ -+ -+/* RFC 2863 operational status */ -+enum { -+ IF_OPER_UNKNOWN, -+ IF_OPER_NOTPRESENT, -+ IF_OPER_DOWN, -+ IF_OPER_LOWERLAYERDOWN, -+ IF_OPER_TESTING, -+ IF_OPER_DORMANT, -+ IF_OPER_UP, -+}; -+ -+/* link modes */ -+enum { -+ IF_LINK_MODE_DEFAULT, -+ IF_LINK_MODE_DORMANT, /* limit upward transition to dormant */ -+ IF_LINK_MODE_TESTING, /* limit upward transition to testing */ -+}; -+ -+/* -+ * Device mapping structure. I'd just gone off and designed a -+ * beautiful scheme using only loadable modules with arguments -+ * for driver options and along come the PCMCIA people 8) -+ * -+ * Ah well. The get() side of this is good for WDSETUP, and it'll -+ * be handy for debugging things. The set side is fine for now and -+ * being very small might be worth keeping for clean configuration. -+ */ -+ -+/* for compatibility with glibc net/if.h */ -+#if __UAPI_DEF_IF_IFMAP -+struct ifmap { -+ unsigned long mem_start; -+ unsigned long mem_end; -+ unsigned short base_addr; -+ unsigned char irq; -+ unsigned char dma; -+ unsigned char port; -+ /* 3 bytes spare */ -+}; -+#endif /* __UAPI_DEF_IF_IFMAP */ -+ -+struct if_settings { -+ unsigned int type; /* Type of physical device or protocol */ -+ unsigned int size; /* Size of the data allocated by the caller */ -+ union { -+ /* {atm/eth/dsl}_settings anyone ? */ -+ raw_hdlc_proto *raw_hdlc; -+ cisco_proto *cisco; -+ fr_proto *fr; -+ fr_proto_pvc *fr_pvc; -+ fr_proto_pvc_info *fr_pvc_info; -+ x25_hdlc_proto *x25; -+ -+ /* interface settings */ -+ sync_serial_settings *sync; -+ te1_settings *te1; -+ } ifs_ifsu; -+}; -+ -+/* -+ * Interface request structure used for socket -+ * ioctl's. All interface ioctl's must have parameter -+ * definitions which begin with ifr_name. The -+ * remainder may be interface specific. -+ */ -+ -+/* for compatibility with glibc net/if.h */ -+#if __UAPI_DEF_IF_IFREQ -+struct ifreq { -+#define IFHWADDRLEN 6 -+ union -+ { -+ char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ -+ } ifr_ifrn; -+ -+ union { -+ struct sockaddr ifru_addr; -+ struct sockaddr ifru_dstaddr; -+ struct sockaddr ifru_broadaddr; -+ struct sockaddr ifru_netmask; -+ struct sockaddr ifru_hwaddr; -+ short ifru_flags; -+ int ifru_ivalue; -+ int ifru_mtu; -+ struct ifmap ifru_map; -+ char ifru_slave[IFNAMSIZ]; /* Just fits the size */ -+ char ifru_newname[IFNAMSIZ]; -+ void * ifru_data; -+ struct if_settings ifru_settings; -+ } ifr_ifru; -+}; -+#endif /* __UAPI_DEF_IF_IFREQ */ -+ -+#define ifr_name ifr_ifrn.ifrn_name /* interface name */ -+#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ -+#define ifr_addr ifr_ifru.ifru_addr /* address */ -+#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */ -+#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -+#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ -+#define ifr_flags ifr_ifru.ifru_flags /* flags */ -+#define ifr_metric ifr_ifru.ifru_ivalue /* metric */ -+#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ -+#define ifr_map ifr_ifru.ifru_map /* device map */ -+#define ifr_slave ifr_ifru.ifru_slave /* slave device */ -+#define ifr_data ifr_ifru.ifru_data /* for use by interface */ -+#define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */ -+#define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */ -+#define ifr_qlen ifr_ifru.ifru_ivalue /* Queue length */ -+#define ifr_newname ifr_ifru.ifru_newname /* New name */ -+#define ifr_settings ifr_ifru.ifru_settings /* Device/proto settings*/ -+ -+/* -+ * Structure used in SIOCGIFCONF request. -+ * Used to retrieve interface configuration -+ * for machine (useful for programs which -+ * must know all networks accessible). -+ */ -+ -+/* for compatibility with glibc net/if.h */ -+#if __UAPI_DEF_IF_IFCONF -+struct ifconf { -+ int ifc_len; /* size of buffer */ -+ union { -+ char *ifcu_buf; -+ struct ifreq *ifcu_req; -+ } ifc_ifcu; -+}; -+#endif /* __UAPI_DEF_IF_IFCONF */ -+ -+#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ -+#define ifc_req ifc_ifcu.ifcu_req /* array of structures */ -+ -+#endif /* _LINUX_IF_H */ diff --git a/package/network/utils/ethtool/patches/101-netlink-Fix-maybe-uninitialized-meters-variable.patch b/package/network/utils/ethtool/patches/101-netlink-Fix-maybe-uninitialized-meters-variable.patch deleted file mode 100644 index 381b949ede..0000000000 --- a/package/network/utils/ethtool/patches/101-netlink-Fix-maybe-uninitialized-meters-variable.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Florian Fainelli -To: netdev@vger.kernel.org -Subject: [PATCH ethtool v2 2/3] netlink: Fix maybe uninitialized 'meters' variable -Date: Sat, 14 Jan 2023 08:34:10 -0800 - -GCC12 warns that 'meters' may be uninitialized, initialize it -accordingly. - -Fixes: 9561db9b76f4 ("Add cable test TDR support") -Signed-off-by: Florian Fainelli ---- - netlink/parser.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/netlink/parser.c -+++ b/netlink/parser.c -@@ -237,7 +237,7 @@ int nl_parse_direct_m2cm(struct nl_conte - struct nl_msg_buff *msgbuff, void *dest) - { - const char *arg = *nlctx->argp; -- float meters; -+ float meters = 0.0; - uint32_t cm; - int ret; - diff --git a/package/network/utils/ethtool/patches/102-raw-marvell-c-Fix-build-with-musl-libc.patch b/package/network/utils/ethtool/patches/102-raw-marvell-c-Fix-build-with-musl-libc.patch deleted file mode 100644 index 33b1715967..0000000000 --- a/package/network/utils/ethtool/patches/102-raw-marvell-c-Fix-build-with-musl-libc.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Florian Fainelli -To: netdev@vger.kernel.org -Subject: [PATCH ethtool v2 3/3] marvell.c: Fix build with musl-libc -Date: Sat, 14 Jan 2023 08:34:11 -0800 - -After commit 1fa60003a8b8 ("misc: header includes cleanup") we stopped -including net/if.h which resolved the proper defines to pull in -sys/types.h and provide a definition for u_int32_t. With musl-libc we -would need to define _GNU_SOURCE to ensure that sys/types.h does provide a -definition for u_int32_t. - -Rather, just replace u_uint{16,32}_t with the more standard -uint{16,32}_t types from stdint.h - -Fixes: 1fa60003a8b8 ("misc: header includes cleanup") -Signed-off-by: Florian Fainelli ---- - marvell.c | 34 +++++++++++++++++----------------- - 1 file changed, 17 insertions(+), 17 deletions(-) - ---- a/marvell.c -+++ b/marvell.c -@@ -31,23 +31,23 @@ static void dump_timer(const char *name, - static void dump_queue(const char *name, const void *a, int rx) - { - struct desc { -- u_int32_t ctl; -- u_int32_t next; -- u_int32_t data_lo; -- u_int32_t data_hi; -- u_int32_t status; -- u_int32_t timestamp; -- u_int16_t csum2; -- u_int16_t csum1; -- u_int16_t csum2_start; -- u_int16_t csum1_start; -- u_int32_t addr_lo; -- u_int32_t addr_hi; -- u_int32_t count_lo; -- u_int32_t count_hi; -- u_int32_t byte_count; -- u_int32_t csr; -- u_int32_t flag; -+ uint32_t ctl; -+ uint32_t next; -+ uint32_t data_lo; -+ uint32_t data_hi; -+ uint32_t status; -+ uint32_t timestamp; -+ uint16_t csum2; -+ uint16_t csum1; -+ uint16_t csum2_start; -+ uint16_t csum1_start; -+ uint32_t addr_lo; -+ uint32_t addr_hi; -+ uint32_t count_lo; -+ uint32_t count_hi; -+ uint32_t byte_count; -+ uint32_t csr; -+ uint32_t flag; - }; - const struct desc *d = a; - From 638ebd306794397975bdf8035f6b23b61bc5c1c8 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Wed, 22 Feb 2023 15:56:25 +0100 Subject: [PATCH 06/19] iproute2: update to 6.2 Release Notes: https://lwn.net/Articles/923952/ Refresh patches: - 110-darwin_fixes.patch - 115-add-config-xtlibdir.patch - 140-allow_pfifo_fast.patch - 140-keep_libmnl_optional.patch - 145-keep_libelf_optional.patch - 150-keep_libcap_optional.patch - 155-keep_tirpc_optional.patch - 170-ip_tiny.patch - 175-reduce-dynamic-syms.patch - 180-drop_FAILED_POLICY.patch - 190-fix-nls-rpath-link.patch - 195-build_variant_ip_tc.patch - 200-drop_libbsd_dependency.patch - 300-selinux-configurable.patch Remove upstreamed: - 320-configure-Remove-include-sys-stat.h.patch While working on it remove AUTORELEASE. Signed-off-by: Nick Hainke --- package/network/utils/iproute2/Makefile | 6 +-- .../iproute2/patches/110-darwin_fixes.patch | 8 ++-- .../patches/115-add-config-xtlibdir.patch | 2 +- .../patches/140-allow_pfifo_fast.patch | 2 +- .../patches/140-keep_libmnl_optional.patch | 2 +- .../patches/145-keep_libelf_optional.patch | 2 +- .../patches/150-keep_libcap_optional.patch | 2 +- .../patches/155-keep_tirpc_optional.patch | 2 +- .../utils/iproute2/patches/170-ip_tiny.patch | 4 +- .../patches/175-reduce-dynamic-syms.patch | 8 ++-- .../patches/180-drop_FAILED_POLICY.patch | 4 +- .../patches/190-fix-nls-rpath-link.patch | 4 +- .../patches/195-build_variant_ip_tc.patch | 2 +- .../patches/200-drop_libbsd_dependency.patch | 2 +- .../patches/300-selinux-configurable.patch | 2 +- ...-configure-Remove-include-sys-stat.h.patch | 43 ------------------- 16 files changed, 26 insertions(+), 69 deletions(-) delete mode 100644 package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 39c94bd6e2..302d57bf8b 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=6.1.0 -PKG_RELEASE:=$(AUTORELEASE) +PKG_VERSION:=6.2.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=5ce12a0fec6b212725ef218735941b2dab76244db7e72646a76021b0537b43ab +PKG_HASH:=4d72730200ec5b2aabaa1a2f20553c6748292f065d9a154c7d5e22559df9fd62 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/110-darwin_fixes.patch b/package/network/utils/iproute2/patches/110-darwin_fixes.patch index 1f3eb101ea..06ae59f8b4 100644 --- a/package/network/utils/iproute2/patches/110-darwin_fixes.patch +++ b/package/network/utils/iproute2/patches/110-darwin_fixes.patch @@ -1,6 +1,6 @@ --- a/netem/maketable.c +++ b/netem/maketable.c -@@ -10,7 +10,9 @@ +@@ -11,7 +11,9 @@ #include #include #include @@ -12,7 +12,7 @@ #include --- a/netem/normal.c +++ b/netem/normal.c -@@ -8,8 +8,12 @@ +@@ -9,8 +9,12 @@ #include #include @@ -27,7 +27,7 @@ #define TABLEFACTOR NETEM_DIST_SCALE --- a/netem/pareto.c +++ b/netem/pareto.c -@@ -7,8 +7,12 @@ +@@ -8,8 +8,12 @@ #include #include @@ -42,7 +42,7 @@ #define TABLESIZE 16384 --- a/netem/paretonormal.c +++ b/netem/paretonormal.c -@@ -14,10 +14,13 @@ +@@ -15,10 +15,13 @@ #include #include #include diff --git a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch index 8702d5fd2d..03df7809f7 100644 --- a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch +++ b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch @@ -1,6 +1,6 @@ --- a/tc/Makefile +++ b/tc/Makefile -@@ -128,6 +128,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR +@@ -127,6 +127,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR ifneq ($(IPT_LIB_DIR),) CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\" endif diff --git a/package/network/utils/iproute2/patches/140-allow_pfifo_fast.patch b/package/network/utils/iproute2/patches/140-allow_pfifo_fast.patch index 13de48f412..8f5a7d352e 100644 --- a/package/network/utils/iproute2/patches/140-allow_pfifo_fast.patch +++ b/package/network/utils/iproute2/patches/140-allow_pfifo_fast.patch @@ -1,6 +1,6 @@ --- a/tc/q_fifo.c +++ b/tc/q_fifo.c -@@ -95,5 +95,6 @@ struct qdisc_util pfifo_head_drop_qdisc_ +@@ -90,5 +90,6 @@ struct qdisc_util pfifo_head_drop_qdisc_ struct qdisc_util pfifo_fast_qdisc_util = { .id = "pfifo_fast", diff --git a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch index 7f68f43616..a8cdd103ba 100644 --- a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch +++ b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -412,7 +412,7 @@ check_tirpc() +@@ -411,7 +411,7 @@ check_tirpc() check_mnl() { diff --git a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch index 2eaae88198..0c5c3f59ed 100644 --- a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch +++ b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -267,7 +267,7 @@ EOF +@@ -266,7 +266,7 @@ EOF check_elf() { diff --git a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch index c574840fa8..4cce2c3ca6 100644 --- a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch +++ b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -470,7 +470,7 @@ EOF +@@ -469,7 +469,7 @@ EOF check_cap() { diff --git a/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch index 4ee6245d3b..28ba7e5217 100644 --- a/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch +++ b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -399,7 +399,7 @@ check_selinux() +@@ -398,7 +398,7 @@ check_selinux() check_tirpc() { diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index eef5e38229..71081c36bc 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -25,7 +25,7 @@ sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ --- a/ip/ip.c +++ b/ip/ip.c -@@ -65,11 +65,17 @@ static void usage(void) +@@ -61,11 +61,17 @@ static void usage(void) fprintf(stderr, "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" " ip [ -force ] -batch filename\n" @@ -43,7 +43,7 @@ " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" " -h[uman-readable] | -iec | -j[son] | -p[retty] |\n" " -f[amily] { inet | inet6 | mpls | bridge | link } |\n" -@@ -92,37 +98,49 @@ static const struct cmd { +@@ -88,37 +94,49 @@ static const struct cmd { int (*func)(int argc, char **argv); } cmds[] = { { "address", do_ipaddr }, diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch index c3892e5a0e..d0914848d5 100644 --- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch +++ b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch @@ -1,6 +1,6 @@ --- a/tc/Makefile +++ b/tc/Makefile -@@ -114,7 +114,7 @@ LDLIBS += -L. -lm +@@ -113,7 +113,7 @@ LDLIBS += -L. -lm ifeq ($(SHARED_LIBS),y) LDLIBS += -ldl @@ -9,7 +9,7 @@ endif TCLIB := tc_core.o -@@ -144,7 +144,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc +@@ -143,7 +143,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc all: tc $(TCSO) tc: $(TCOBJ) $(LIBNETLINK) libtc.a @@ -18,7 +18,7 @@ libtc.a: $(TCLIB) $(QUIET_AR)$(AR) rcs $@ $^ -@@ -166,6 +166,7 @@ install: all +@@ -165,6 +165,7 @@ install: all clean: rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \ rm -f emp_ematch.tab.* @@ -26,7 +26,7 @@ q_atm.so: q_atm.c $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm -@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c) +@@ -204,4 +205,16 @@ static-syms.h: $(wildcard *.c) sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ done > $@ diff --git a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch index 094ff393a6..9ce7dd9a13 100644 --- a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch +++ b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch @@ -11,7 +11,7 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY --- a/ip/rtm_map.c +++ b/ip/rtm_map.c -@@ -54,6 +54,8 @@ char *rtnl_rtntype_n2a(int id, char *buf +@@ -49,6 +49,8 @@ char *rtnl_rtntype_n2a(int id, char *buf return "nat"; case RTN_XRESOLVE: return "xresolve"; @@ -20,7 +20,7 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY default: snprintf(buf, len, "%d", id); return buf; -@@ -89,6 +91,8 @@ int rtnl_rtntype_a2n(int *id, char *arg) +@@ -84,6 +86,8 @@ int rtnl_rtntype_a2n(int *id, char *arg) res = RTN_UNICAST; else if (strcmp(arg, "throw") == 0) res = RTN_THROW; diff --git a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch index 2f3f90fe1a..c7fceb2e22 100644 --- a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch +++ b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -291,7 +291,7 @@ int main(int argc, char **argv) { +@@ -290,7 +290,7 @@ int main(int argc, char **argv) { } EOF @@ -9,7 +9,7 @@ local ret=$? rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test -@@ -309,7 +309,7 @@ int main(int argc, char **argv) { +@@ -308,7 +308,7 @@ int main(int argc, char **argv) { } EOF diff --git a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch index dc9c0b2969..141763460d 100644 --- a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch +++ b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch @@ -11,7 +11,7 @@ --- a/tc/Makefile +++ b/tc/Makefile -@@ -141,7 +141,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc +@@ -140,7 +140,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic $< -o $@ diff --git a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch index 052bdd84eb..d1948860e8 100644 --- a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch +++ b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -456,14 +456,8 @@ EOF +@@ -455,14 +455,8 @@ EOF if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then echo "no" else diff --git a/package/network/utils/iproute2/patches/300-selinux-configurable.patch b/package/network/utils/iproute2/patches/300-selinux-configurable.patch index adfa405c7f..817abf7d17 100644 --- a/package/network/utils/iproute2/patches/300-selinux-configurable.patch +++ b/package/network/utils/iproute2/patches/300-selinux-configurable.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -386,7 +386,7 @@ check_libbpf() +@@ -385,7 +385,7 @@ check_libbpf() check_selinux() # SELinux is a compile time option in the ss utility { diff --git a/package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch b/package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch deleted file mode 100644 index 02bb20297d..0000000000 --- a/package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 3a3a2f6be704c970938eb8dac4eb0118f1c2fb06 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Wed, 21 Dec 2022 23:26:28 +0100 -Subject: [PATCH iproute2 v2] configure: Remove include - -The check_name_to_handle_at() function in the configure script is -including sys/stat.h. This include fails with glibc 2.36 like this: -```` -In file included from /linux-5.15.84/include/uapi/linux/stat.h:5, - from /toolchain-x86_64_gcc-12.2.0_glibc/include/bits/statx.h:31, - from /toolchain-x86_64_gcc-12.2.0_glibc/include/sys/stat.h:465, - from config.YExfMc/name_to_handle_at_test.c:3: -/linux-5.15.84/include/uapi/linux/types.h:10:2: warning: #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders" [-Wcpp] - 10 | #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders" - | ^~~~~~~ -In file included from /linux-5.15.84/include/uapi/linux/posix_types.h:5, - from /linux-5.15.84/include/uapi/linux/types.h:14: -/linux-5.15.84/include/uapi/linux/stddef.h:5:10: fatal error: linux/compiler_types.h: No such file or directory - 5 | #include - | ^~~~~~~~~~~~~~~~~~~~~~~~ -compilation terminated. -```` - -Just removing the include works, the manpage of name_to_handle_at() says -only fcntl.h is needed. - -Fixes: c5b72cc56bf8 ("lib/fs: fix issue when {name,open}_to_handle_at() is not implemented") -Tested-by: Heiko Thiery -Signed-off-by: Hauke Mehrtens ---- - configure | 1 - - 1 file changed, 1 deletion(-) - ---- a/configure -+++ b/configure -@@ -215,7 +215,6 @@ check_name_to_handle_at() - cat >$TMPDIR/name_to_handle_at_test.c < --#include - #include - int main(int argc, char **argv) - { From 743c4ad6824a17a5ec102ef009684a70801bda62 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Fri, 9 Sep 2022 21:43:18 -0400 Subject: [PATCH 07/19] toolchain: fix stampfile dependency Use the gcc/final/install target stampfile as the prerequisite for the toolchain/compile target stampfile. The previous filename was also incorrect, the stampfile name format was changed (see reference) but was never updated here. The issue was never noticed because the usage of timestamp.pl was broken (fixed in previous commit) causing the extra prereq files passed to 'call stampfile' to never get checked at all. Fixes: 5149ed151 ("gcc: split up the build process into three distinct stages") Signed-off-by: Michael Pratt --- toolchain/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/Makefile b/toolchain/Makefile index 5dccf8f829..19b144ee36 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -85,12 +85,12 @@ $(curdir)/ := .config prereq $(curdir)//compile = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk $(tools/stamp-compile) ifndef DUMP_TARGET_DB -$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed: +$(TOOLCHAIN_DIR)/stamp/.gcc_final_installed: endif $(curdir)/install: $(curdir)/compile -$(eval $(call stampfile,$(curdir),toolchain,compile,$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed,,$(TOOLCHAIN_DIR))) +$(eval $(call stampfile,$(curdir),toolchain,compile,$(TOOLCHAIN_DIR)/stamp/.gcc_final_installed,,$(TOOLCHAIN_DIR))) $(eval $(call stampfile,$(curdir),toolchain,check,$(TMP_DIR)/.build)) $(eval $(call subdir,$(curdir))) From 6a7cde15000832ce0164dc27d85822b2e2dd9fe6 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 10 Aug 2022 17:56:41 -0400 Subject: [PATCH 08/19] toolchain: cleanup dependencies Reorganize dependencies between toolchain targets to save a line. This also puts them in a linear order which is easier to read. Signed-off-by: Michael Pratt --- toolchain/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toolchain/Makefile b/toolchain/Makefile index 19b144ee36..60e3507250 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -34,8 +34,8 @@ $(curdir)/builddirs := $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_EXTERNAL_TOOLCHAIN) # builddir dependencies ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) ifdef CONFIG_USE_MUSL + $(curdir)/gcc/initial/compile:=$(curdir)/binutils/compile $(curdir)/kernel-headers/compile:=$(curdir)/gcc/initial/compile - $(curdir)/$(LIBC)/compile:=$(curdir)/kernel-headers/compile else $(curdir)/builddirs += $(LIBC)/headers gcc/minimal $(curdir)/gcc/minimal/compile:=$(curdir)/binutils/compile @@ -44,9 +44,8 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) $(curdir)/gcc/initial/compile:=$(curdir)/$(LIBC)/headers/compile endif - $(curdir)/gcc/initial/compile+=$(curdir)/binutils/compile - $(curdir)/$(LIBC)/compile:=$(curdir)/gcc/initial/compile - $(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile $(curdir)/kernel-headers/compile + $(curdir)/$(LIBC)/compile:=$(curdir)/gcc/initial/compile $(curdir)/kernel-headers/compile + $(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile $(curdir)/$(LIBC)/utils/compile:=$(curdir)/gcc/final/compile endif From b2d7cdaea9fdbd4a05c90c252ef0abdeaaea4381 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Tue, 21 Feb 2023 14:58:20 -0500 Subject: [PATCH 09/19] toolchain: remove references to $(LIBC)/utils subtarget The utils subtarget was used for uClibc and eglibc which are both obsolete and replaced in Openwrt by mainline musl and glibc, which do not have a utils Makefile target. Ref: 5d19a38d8 ("toolchain: sync eglibc headers/build split with uclibc changes") Fixes: 63fb17520 ("toolchain: remove uClibc-ng") Suggested-by: Andre Heider Signed-off-by: Michael Pratt --- toolchain/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/toolchain/Makefile b/toolchain/Makefile index 60e3507250..c0046293c9 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -21,8 +21,6 @@ # build & install the final libc # 7) toolchain/gcc/final/compile # build & install the final gcc -# 8) toolchain/libc/utils/compile -# build & install libc utilities # # For musl, steps 2 and 4 are skipped, and step 3 is done after 5 @@ -46,7 +44,6 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) $(curdir)/$(LIBC)/compile:=$(curdir)/gcc/initial/compile $(curdir)/kernel-headers/compile $(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile - $(curdir)/$(LIBC)/utils/compile:=$(curdir)/gcc/final/compile endif ifndef DUMP_TARGET_DB From dd8a4a8c34c0b721000198ff01f2ff5158f32414 Mon Sep 17 00:00:00 2001 From: Xinfa Deng Date: Thu, 9 Feb 2023 15:37:30 +0800 Subject: [PATCH 10/19] ath79: add support for GL.iNet GL-X1200 This patch adds supports for GL-X1200. Specification: - SOC: QCA9563 (775MHz) - Flash: 16 MiB - RAM: 128 MiB DDR2 - Ethernet: 4x 1Gbps LAN + 1x 1Gbps WAN - Wireless: QCA9563(2.4GHz) and QCA9886(5GHz) - SIM: 2x SIM card slots - MicroSD: 1x microSD slot - Antenna: 2x external 5dBi antennas - USB: 1x USB 2.0 port - Button: 1x reset button - LED: 16x LEDs (3x GPIO controllable) - UART: 1x UART on PCB (JP1: 3.3V, RX, TX, GND) - OEM U-Boot supplies HTTP/GUI access Implementation Notes ==================== Both the NOR and NAND variants boot off a NOR-based kernel, consistent with the OEM's firmware. The mode LEDs are * Boot, Running system * Failsafe 2G * Upgrade 5G Installation ============ Using sysupgrade ---------------- sysupgrade may be used to install a NAND image on a device running a NAND image or a NOR image on a device running a NOR image. It is recommended to *not* preserve config when upgrading from OEM firmware or previous versions of OpenWrt. No supported sysupgrade path should require "force". Transitioning from NOR to NAND can be accomplished Using U-Boot ------------ The OEM U-Boot can be put into a graphical, firmware-upload mode by holding down the button on the side of the router while applying power and for a bit more than five seconds following with the current OEM U-Boot. The power LED will come on, then the 5G LED will flash five times, about once a second. When the 5G LED stops flashing and the 2G LED lights solid, the router's U-Boot will provide an upload page at http://192.168.1.1/ Either a browser may be used to upload an image, or a utility such as curl may be used: curl -X POST -F gl_firmware=\@*-nand-squashfs-factory.img \ http://192.168.1.1/index.html or curl -X POST -F gl_firmware=\@*-nor-squashfs-sysupgrade.bin \ http://192.168.1.1/index.html Note that NOR vs. NAND is based on the file name extension. Signed-off-by: Xinfa Deng --- .../dts/qca9563_glinet_gl-x1200-nor-nand.dts | 29 +++ .../ath79/dts/qca9563_glinet_gl-x1200-nor.dts | 16 ++ .../ath79/dts/qca9563_glinet_gl-x1200.dtsi | 209 ++++++++++++++++++ target/linux/ath79/image/nand.mk | 29 +++ .../nand/base-files/etc/board.d/02_network | 10 + .../nand/base-files/lib/upgrade/platform.sh | 4 +- 6 files changed, 296 insertions(+), 1 deletion(-) create mode 100644 target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor-nand.dts create mode 100644 target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor.dts create mode 100644 target/linux/ath79/dts/qca9563_glinet_gl-x1200.dtsi diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor-nand.dts b/target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor-nand.dts new file mode 100644 index 0000000000..2a26d959c9 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor-nand.dts @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9563_glinet_gl-x1200.dtsi" + +/ { + compatible = "glinet,gl-x1200-nor-nand", "qca,qca9563"; + model = "GL.iNet GL-X1200 (NOR/NAND)"; +}; + +&nor_partitions { + partition@60000 { + label = "kernel"; + reg = <0x060000 0x400000>; + + /* + * U-Boot bootcmd is "bootm 0x9f060000". + * So this might be possible to resize in the future. + */ + }; + + partition@460000 { + label = "nor_reserved"; + reg = <0x460000 0xba0000>; + }; +}; + +&nand_ubi { + label = "ubi"; +}; diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor.dts b/target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor.dts new file mode 100644 index 0000000000..dfce3818b0 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9563_glinet_gl-x1200.dtsi" + +/ { + compatible = "glinet,gl-x1200-nor", "qca,qca9563"; + model = "GL.iNet GL-X1200 (NOR)"; +}; + +&nor_partitions { + partition@60000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x060000 0xfa0000>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-x1200.dtsi b/target/linux/ath79/dts/qca9563_glinet_gl-x1200.dtsi new file mode 100644 index 0000000000..8980f772e7 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_glinet_gl-x1200.dtsi @@ -0,0 +1,209 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca956x.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + label-mac-device = ð0; + }; + + keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_system: system { + label = "red:system"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wlan5g { + label = "green:wlan5g"; + gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + }; + + gpio-export { + compatible = "gpio-export"; + + gpio_modem1_power { + gpio-export,name = "gl-x1200:4g1:power"; + gpio-export,output = <0>; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + }; + + gpio_modem2_power { + gpio-export,name = "gl-x1200:4g2:power"; + gpio-export,output = <0>; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + nor_partitions: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@50000 { + label = "art"; + reg = <0x050000 0x010000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + calibration_ath9k: calibration@1000 { + reg = <0x1000 0x440>; + }; + + calibration_ath10k: calibration@5000 { + reg = <0x5000 0x2f20>; + }; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; + + macaddr_art_5006: macaddr@5006 { + reg = <0x5006 0x6>; + }; + }; + + /* Firmware / Kernel flash type specific */ + }; + }; + + flash@1 { + compatible = "spi-nand"; + reg = <1>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + nand_ubi: partition@0 { + label = "nand_ubi"; + reg = <0x000000 0x8000000>; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&phy0>; + + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +&gpio { + usb_vbus { + gpio-hog; + gpios = <7 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "usb-vbus"; + }; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "sgmii"; + qca,ar8327-initvals = < + 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ + 0x7c 0x0000007e /* PORT0_STATUS */ + >; + }; +}; + +&pcie { + status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0 0 0 0 0>; + + nvmem-cells = <&macaddr_art_5006>, <&calibration_ath10k>; + nvmem-cell-names = "mac-address", "pre-calibration"; + }; +}; + +&usb0 { + status = "okay"; +}; + +&usb1 { + status = "okay"; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb_phy1 { + status = "okay"; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&macaddr_art_1002>, <&calibration_ath9k>; + nvmem-cell-names = "mac-address", "calibration"; +}; diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index c83beef952..40c57d8b06 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -212,6 +212,35 @@ define Device/glinet_gl-xe300 endef TARGET_DEVICES += glinet_gl-xe300 +define Device/glinet_gl-x1200-common + SOC := qca9563 + DEVICE_VENDOR := GL.iNet + DEVICE_MODEL := GL-X1200 + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct-htt kmod-usb2 \ + kmod-usb-storage block-mount kmod-usb-net-qmi-wwan uqmi + IMAGE_SIZE := 16000k +endef + +define Device/glinet_gl-x1200-nor-nand + $(Device/glinet_gl-x1200-common) + DEVICE_VARIANT := NOR/NAND + KERNEL_SIZE := 4096k + IMAGE_SIZE := 131072k + PAGESIZE := 2048 + VID_HDR_OFFSET := 2048 + BLOCKSIZE := 128k + IMAGES += factory.img + IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += glinet_gl-x1200-nor-nand + +define Device/glinet_gl-x1200-nor + $(Device/glinet_gl-x1200-common) + DEVICE_VARIANT := NOR +endef +TARGET_DEVICES += glinet_gl-x1200-nor + define Device/linksys_ea4500-v3 SOC := qca9558 DEVICE_VENDOR := Linksys diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network index b163b29db1..137f3aa11b 100644 --- a/target/linux/ath79/nand/base-files/etc/board.d/02_network +++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network @@ -30,6 +30,11 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "4:lan" ;; + glinet,gl-x1200-nor|\ + glinet,gl-x1200-nor-nand) + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" + ;; linksys,ea4500-v3) ucidef_add_switch "switch0" \ "6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" @@ -88,6 +93,11 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_binary art 0x0) label_mac=$wan_mac ;; + glinet,gl-x1200-nor|\ + glinet,gl-x1200-nor-nand) + wan_mac=$(mtd_get_mac_binary art 0x0) + lan_mac=$(macaddr_add "$wan_mac" 1) + ;; netgear,wndr3700-v4|\ netgear,wndr4300|\ netgear,wndr4300sw|\ diff --git a/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh b/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh index ea77345b06..5a4f76ba51 100644 --- a/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh @@ -19,7 +19,9 @@ platform_do_upgrade() { glinet_nand_nor_do_upgrade "$1" ;; glinet,gl-ar750s-nor|\ - glinet,gl-ar750s-nor-nand) + glinet,gl-ar750s-nor-nand|\ + glinet,gl-x1200-nor|\ + glinet,gl-x1200-nor-nand) nand_nor_do_upgrade "$1" ;; *) From 32a9fdfc02c9146b108c39a2f21679b6c64cb3e2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Feb 2023 18:37:26 +0100 Subject: [PATCH 11/19] ustream-ssl: update to Git version 2023-02-25 498f6e2 ustream-mbedtls: Use getrandom() instead of /dev/urandom Signed-off-by: Hauke Mehrtens --- package/libs/ustream-ssl/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile index c94e9a97ca..ae5c8026c2 100644 --- a/package/libs/ustream-ssl/Makefile +++ b/package/libs/ustream-ssl/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ustream-ssl -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git -PKG_SOURCE_DATE:=2022-12-08 -PKG_SOURCE_VERSION:=9217ab46536353c7c792951b57163063f5ec7a3b -PKG_MIRROR_HASH:=cd4dc6a6c18290348b1f8b1c01df3320e4954dc46d714c797bef066f7a91248d +PKG_SOURCE_DATE:=2023-02-25 +PKG_SOURCE_VERSION:=498f6e268d4d2b0ad33b430f4ba1abe397d31496 +PKG_MIRROR_HASH:=a201d065dd613e30886c9f13a0851cec79538192cfe591b6f8ecd88724d55fb1 CMAKE_INSTALL:=1 PKG_LICENSE:=ISC From 2a104365dc50e3df5d63809aee16497402278f02 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Feb 2023 19:56:12 +0100 Subject: [PATCH 12/19] netifd: update to the latest version ed65a00 netifd: bridge: Fix format string position 19372d8 netifd: Fix multiple -Wsign-compare warnings 8ebf033 netifd: Do not return values in void function c77417a netifd: Explicitly zero initialize variables 463a120 netifd: Activate -Wextra compile warnings Signed-off-by: Hauke Mehrtens --- package/network/config/netifd/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index f40a990b42..d9d1bce26f 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netifd -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2022-12-30 -PKG_SOURCE_VERSION:=81c1fbcba2f27f687c2a471f341502d47679f401 -PKG_MIRROR_HASH:=41d19f2804759aa42708942e27116bec78b169abee639d97c2ec7f0f62fa7739 +PKG_SOURCE_DATE:=2023-02-25 +PKG_SOURCE_VERSION:=463a1207f0766417866e2c28316e58a96f84370b +PKG_MIRROR_HASH:=1d407847282637f6e069b482368f2f8fc0126e66f3b37e4258e1fc1d19dd1ce5 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 From ea33a5def506b0ba647f779e60e6ccca03c29a17 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 25 Feb 2023 02:35:16 +0000 Subject: [PATCH 13/19] mvebu: puzzle: fix fan thermal cooling driver Several fixes for the Puzzle WT61P803 hwmon driver were needed to make it behave well as thermal cooling device: - wire-up cooling device with OF node in device tree - properly parse cooling-levels (u32 with range check vs. u8) - actually use cooling-levels - keep current state and only write to uC if state has changed (avoids flooding the uC with commands which will result in uC crashing) Signed-off-by: Daniel Golle --- ...d-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch | 78 +++++++++++++------ ...d-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch | 78 +++++++++++++------ 2 files changed, 110 insertions(+), 46 deletions(-) diff --git a/target/linux/mvebu/patches-5.10/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch b/target/linux/mvebu/patches-5.10/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch index 684f09c800..d31709fd85 100644 --- a/target/linux/mvebu/patches-5.10/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch +++ b/target/linux/mvebu/patches-5.10/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch @@ -53,7 +53,7 @@ Cc: Robert Marko obj-$(CONFIG_SENSORS_IBMPOWERNV)+= ibmpowernv.o --- /dev/null +++ b/drivers/hwmon/iei-wt61p803-puzzle-hwmon.c -@@ -0,0 +1,413 @@ +@@ -0,0 +1,445 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* IEI WT61P803 PUZZLE MCU HWMON Driver + * @@ -84,13 +84,17 @@ Cc: Robert Marko + * @name: Thermal cooling device name + * @pwm_channel: Controlled PWM channel (0 or 1) + * @cooling_levels: Thermal cooling device cooling levels (DT) ++ * @cur_level: Current cooling level ++ * @num_levels: Number of cooling levels + */ +struct iei_wt61p803_puzzle_thermal_cooling_device { + struct iei_wt61p803_puzzle_hwmon *mcu_hwmon; + struct thermal_cooling_device *tcdev; + char name[THERMAL_NAME_LENGTH]; + int pwm_channel; -+ u8 *cooling_levels; ++ u32 *cooling_levels; ++ int cur_level; ++ u8 num_levels; +}; + +/** @@ -326,8 +330,12 @@ Cc: Robert Marko +static int iei_wt61p803_puzzle_get_max_state(struct thermal_cooling_device *tcdev, + unsigned long *state) +{ -+ *state = IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL; ++ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; + ++ if (!cdev) ++ return -EINVAL; ++ ++ *state = cdev->num_levels - 1; + return 0; +} + @@ -335,14 +343,14 @@ Cc: Robert Marko + unsigned long *state) +{ + struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; -+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon; -+ long value; -+ int ret; + -+ ret = iei_wt61p803_puzzle_read_pwm_channel(mcu_hwmon, cdev->pwm_channel, &value); -+ if (ret) -+ return ret; -+ *state = value; ++ if (!cdev) ++ return -EINVAL; ++ ++ if (cdev->cur_level < 0) ++ return -EAGAIN; ++ ++ *state = cdev->cur_level; + return 0; +} + @@ -350,9 +358,21 @@ Cc: Robert Marko + unsigned long state) +{ + struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; -+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon; ++ u8 pwm_level; + -+ return iei_wt61p803_puzzle_write_pwm_channel(mcu_hwmon, cdev->pwm_channel, state); ++ if (!cdev) ++ return -EINVAL; ++ ++ if (state >= cdev->num_levels) ++ return -EINVAL; ++ ++ if (state == cdev->cur_level) ++ return 0; ++ ++ cdev->cur_level = state; ++ pwm_level = cdev->cooling_levels[state]; ++ ++ return iei_wt61p803_puzzle_write_pwm_channel(cdev->mcu_hwmon, cdev->pwm_channel, pwm_level); +} + +static const struct thermal_cooling_device_ops iei_wt61p803_puzzle_cooling_ops = { @@ -369,7 +389,7 @@ Cc: Robert Marko + struct iei_wt61p803_puzzle_thermal_cooling_device *cdev; + u32 pwm_channel; + u8 num_levels; -+ int ret; ++ int i, ret; + + ret = fwnode_property_read_u32(child, "reg", &pwm_channel); + if (ret) @@ -377,7 +397,7 @@ Cc: Robert Marko + + mcu_hwmon->thermal_cooling_dev_present[pwm_channel] = true; + -+ num_levels = fwnode_property_count_u8(child, "cooling-levels"); ++ num_levels = fwnode_property_count_u32(child, "cooling-levels"); + if (!num_levels) + return -EINVAL; + @@ -385,28 +405,40 @@ Cc: Robert Marko + if (!cdev) + return -ENOMEM; + -+ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u8), GFP_KERNEL); ++ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u32), GFP_KERNEL); + if (!cdev->cooling_levels) + return -ENOMEM; + -+ ret = fwnode_property_read_u8_array(child, "cooling-levels", -+ cdev->cooling_levels, -+ num_levels); ++ ret = fwnode_property_read_u32_array(child, "cooling-levels", ++ cdev->cooling_levels, ++ num_levels); + if (ret) { + dev_err(dev, "Couldn't read property 'cooling-levels'\n"); + return ret; + } + -+ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel); -+ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, NULL, cdev->name, cdev, -+ &iei_wt61p803_puzzle_cooling_ops); -+ if (IS_ERR(cdev->tcdev)) -+ return PTR_ERR(cdev->tcdev); ++ for (i = 0; i < num_levels; i++) { ++ if (cdev->cooling_levels[i] > ++ IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL) { ++ dev_err(dev, "iei_wt61p803_fan state[%d]:%d > %d\n", i, ++ cdev->cooling_levels[i], ++ IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL); ++ return -EINVAL; ++ } ++ } + + cdev->mcu_hwmon = mcu_hwmon; + cdev->pwm_channel = pwm_channel; ++ cdev->num_levels = num_levels; ++ cdev->cur_level = -1; + mcu_hwmon->cdev[pwm_channel] = cdev; + ++ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel); ++ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, to_of_node(child), cdev->name, ++ cdev, &iei_wt61p803_puzzle_cooling_ops); ++ if (IS_ERR(cdev->tcdev)) ++ return PTR_ERR(cdev->tcdev); ++ + return 0; +} + diff --git a/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch b/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch index c22314e41c..023495373b 100644 --- a/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch +++ b/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch @@ -53,7 +53,7 @@ Cc: Robert Marko obj-$(CONFIG_SENSORS_IBMPOWERNV)+= ibmpowernv.o --- /dev/null +++ b/drivers/hwmon/iei-wt61p803-puzzle-hwmon.c -@@ -0,0 +1,413 @@ +@@ -0,0 +1,445 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* IEI WT61P803 PUZZLE MCU HWMON Driver + * @@ -84,13 +84,17 @@ Cc: Robert Marko + * @name: Thermal cooling device name + * @pwm_channel: Controlled PWM channel (0 or 1) + * @cooling_levels: Thermal cooling device cooling levels (DT) ++ * @cur_level: Current cooling level ++ * @num_levels: Number of cooling levels + */ +struct iei_wt61p803_puzzle_thermal_cooling_device { + struct iei_wt61p803_puzzle_hwmon *mcu_hwmon; + struct thermal_cooling_device *tcdev; + char name[THERMAL_NAME_LENGTH]; + int pwm_channel; -+ u8 *cooling_levels; ++ u32 *cooling_levels; ++ int cur_level; ++ u8 num_levels; +}; + +/** @@ -326,8 +330,12 @@ Cc: Robert Marko +static int iei_wt61p803_puzzle_get_max_state(struct thermal_cooling_device *tcdev, + unsigned long *state) +{ -+ *state = IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL; ++ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; + ++ if (!cdev) ++ return -EINVAL; ++ ++ *state = cdev->num_levels - 1; + return 0; +} + @@ -335,14 +343,14 @@ Cc: Robert Marko + unsigned long *state) +{ + struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; -+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon; -+ long value; -+ int ret; + -+ ret = iei_wt61p803_puzzle_read_pwm_channel(mcu_hwmon, cdev->pwm_channel, &value); -+ if (ret) -+ return ret; -+ *state = value; ++ if (!cdev) ++ return -EINVAL; ++ ++ if (cdev->cur_level < 0) ++ return -EAGAIN; ++ ++ *state = cdev->cur_level; + return 0; +} + @@ -350,9 +358,21 @@ Cc: Robert Marko + unsigned long state) +{ + struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; -+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon; ++ u8 pwm_level; + -+ return iei_wt61p803_puzzle_write_pwm_channel(mcu_hwmon, cdev->pwm_channel, state); ++ if (!cdev) ++ return -EINVAL; ++ ++ if (state >= cdev->num_levels) ++ return -EINVAL; ++ ++ if (state == cdev->cur_level) ++ return 0; ++ ++ cdev->cur_level = state; ++ pwm_level = cdev->cooling_levels[state]; ++ ++ return iei_wt61p803_puzzle_write_pwm_channel(cdev->mcu_hwmon, cdev->pwm_channel, pwm_level); +} + +static const struct thermal_cooling_device_ops iei_wt61p803_puzzle_cooling_ops = { @@ -369,7 +389,7 @@ Cc: Robert Marko + struct iei_wt61p803_puzzle_thermal_cooling_device *cdev; + u32 pwm_channel; + u8 num_levels; -+ int ret; ++ int i, ret; + + ret = fwnode_property_read_u32(child, "reg", &pwm_channel); + if (ret) @@ -377,7 +397,7 @@ Cc: Robert Marko + + mcu_hwmon->thermal_cooling_dev_present[pwm_channel] = true; + -+ num_levels = fwnode_property_count_u8(child, "cooling-levels"); ++ num_levels = fwnode_property_count_u32(child, "cooling-levels"); + if (!num_levels) + return -EINVAL; + @@ -385,28 +405,40 @@ Cc: Robert Marko + if (!cdev) + return -ENOMEM; + -+ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u8), GFP_KERNEL); ++ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u32), GFP_KERNEL); + if (!cdev->cooling_levels) + return -ENOMEM; + -+ ret = fwnode_property_read_u8_array(child, "cooling-levels", -+ cdev->cooling_levels, -+ num_levels); ++ ret = fwnode_property_read_u32_array(child, "cooling-levels", ++ cdev->cooling_levels, ++ num_levels); + if (ret) { + dev_err(dev, "Couldn't read property 'cooling-levels'\n"); + return ret; + } + -+ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel); -+ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, NULL, cdev->name, cdev, -+ &iei_wt61p803_puzzle_cooling_ops); -+ if (IS_ERR(cdev->tcdev)) -+ return PTR_ERR(cdev->tcdev); ++ for (i = 0; i < num_levels; i++) { ++ if (cdev->cooling_levels[i] > ++ IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL) { ++ dev_err(dev, "iei_wt61p803_fan state[%d]:%d > %d\n", i, ++ cdev->cooling_levels[i], ++ IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL); ++ return -EINVAL; ++ } ++ } + + cdev->mcu_hwmon = mcu_hwmon; + cdev->pwm_channel = pwm_channel; ++ cdev->num_levels = num_levels; ++ cdev->cur_level = -1; + mcu_hwmon->cdev[pwm_channel] = cdev; + ++ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel); ++ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, to_of_node(child), cdev->name, ++ cdev, &iei_wt61p803_puzzle_cooling_ops); ++ if (IS_ERR(cdev->tcdev)) ++ return PTR_ERR(cdev->tcdev); ++ + return 0; +} + From aa41f4a395bda69cb6ef0ef423e2a4077284fbcd Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 25 Feb 2023 17:42:23 +0000 Subject: [PATCH 14/19] mvebu: setup effective thermal zones on Puzzle M901 and M902 Assign fan with 4 active cooling levels to be used for the main CPU as well as external SerDes units. Signed-off-by: Daniel Golle --- .../boot/dts/marvell/cn9131-puzzle-m901.dts | 27 ++++++------ .../boot/dts/marvell/cn9132-puzzle-m902.dts | 32 ++++++++------- .../boot/dts/marvell/puzzle-thermal.dtsi | 41 +++++++++++++++++++ 3 files changed, 70 insertions(+), 30 deletions(-) create mode 100644 target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts index 80d876b4ad..0ad25fafbb 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts @@ -6,6 +6,7 @@ */ #include "cn9130.dtsi" +#include "puzzle-thermal.dtsi" #include #include @@ -109,26 +110,18 @@ chassis_fan_group0: fan-group@0 { #cooling-cells = <2>; reg = <0x00>; - cooling-levels = <64 102 170 230 250>; + cooling-levels = <80 102 170 230 255>; }; }; }; }; -&ap_thermal_cpu1 { - trips { - cpu_active: cpu-active { - temperature = <44000>; - hysteresis = <2000>; - type = "active"; - }; - }; - cooling-maps { - fan-map { - trip = <&cpu_active>; - cooling-device = <&chassis_fan_group0 64 THERMAL_NO_LIMIT>; - }; - }; +&ap_thermal_ic { + PUZZLE_FAN_THERMAL(ic, &chassis_fan_group0); +}; + +&cp0_thermal_ic { + PUZZLE_FAN_THERMAL(cp0, &chassis_fan_group0); }; /* on-board eMMC - U9 */ @@ -396,6 +389,10 @@ }; }; +&cp1_thermal_ic { + PUZZLE_FAN_THERMAL(cp1, &chassis_fan_group0); +}; + &cp1_usb3_1 { status = "okay"; phys = <&cp1_comphy3 1>; diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts index fd99eb2d13..398e53a5f9 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts @@ -6,6 +6,7 @@ */ #include "cn9130.dtsi" +#include "puzzle-thermal.dtsi" #include #include @@ -154,28 +155,21 @@ chassis_fan_group0: fan-group@0 { #cooling-cells = <2>; reg = <0x00>; - cooling-levels = <64 102 170 230 250>; + cooling-levels = <80 102 170 230 255>; }; }; }; }; -&ap_thermal_cpu1 { - trips { - cpu_active: cpu-active { - temperature = <44000>; - hysteresis = <2000>; - type = "active"; - }; - }; - cooling-maps { - fan-map { - trip = <&cpu_active>; - cooling-device = <&chassis_fan_group0 64 THERMAL_NO_LIMIT>; - }; - }; +&ap_thermal_ic { + PUZZLE_FAN_THERMAL(ic, &chassis_fan_group0); }; +&cp0_thermal_ic { + PUZZLE_FAN_THERMAL(cp0, &chassis_fan_group0); +}; + + /* on-board eMMC - U9 */ &ap_sdhci0 { pinctrl-names = "default"; @@ -447,6 +441,10 @@ }; }; +&cp1_thermal_ic { + PUZZLE_FAN_THERMAL(cp1, &chassis_fan_group0); +}; + /* * Instantiate the second connected CP115 */ @@ -562,3 +560,7 @@ }; }; }; + +&cp2_thermal_ic { + PUZZLE_FAN_THERMAL(cp2, &chassis_fan_group0); +}; diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi new file mode 100644 index 0000000000..94677532f2 --- /dev/null +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi @@ -0,0 +1,41 @@ +#define PUZZLE_FAN_THERMAL(_cname, _fan) \ + trips { \ + _cname##_active_high: cpu-active-high { \ + temperature = <80000>; \ + hysteresis = <2000>; \ + type = "active"; \ + }; \ + _cname##_active_med: cpu-active-med { \ + temperature = <72000>; \ + hysteresis = <2000>; \ + type = "active"; \ + }; \ + _cname##_active_low: cpu-active-low { \ + temperature = <65000>; \ + hysteresis = <2000>; \ + type = "active"; \ + }; \ + _cname##_active_idle: cpu-active-idle { \ + temperature = <60000>; \ + hysteresis = <2000>; \ + type = "active"; \ + }; \ + }; \ + cooling-maps { \ + cpu-active-high { \ + trip = <&_cname##_active_high>; \ + cooling-device = <_fan 3 THERMAL_NO_LIMIT>; \ + }; \ + cpu-active-med { \ + trip = <&_cname##_active_med>; \ + cooling-device = <_fan 2 THERMAL_NO_LIMIT>; \ + }; \ + cpu-active-low { \ + trip = <&_cname##_active_low>; \ + cooling-device = <_fan 1 THERMAL_NO_LIMIT>; \ + }; \ + cpu-active-idle { \ + trip = <&_cname##_active_idle>; \ + cooling-device = <_fan 0 THERMAL_NO_LIMIT>; \ + }; \ + } From af5e230c2036af07ef0fca6795ee259849b51e59 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 25 Feb 2023 17:49:10 +0000 Subject: [PATCH 15/19] tools/squashfs4: fix PKG_MIRROR_HASH The hash currently matches neither the SHA256 of the Github download nor the hash of the archive generated by the OpenWrt build system. (and yes, they differ...) Set hash of Github-generated tarball. Fixes: 30f2d516ba ("tools/squashfs4: add new tool for squashfs4 images") Signed-off-by: Daniel Golle --- tools/squashfs4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/squashfs4/Makefile b/tools/squashfs4/Makefile index 9d4f6babfc..7c8bcf1a72 100644 --- a/tools/squashfs4/Makefile +++ b/tools/squashfs4/Makefile @@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools PKG_SOURCE_DATE:=2022-03-17 PKG_SOURCE_VERSION:=afdd63fc386919b4aa40d573b0a6069414d14317 -PKG_MIRROR_HASH:=caedb66cf6dcbdcee0d1525923e203d003ef15f34a13a328686794666f16171f +PKG_MIRROR_HASH:=59c294e00ddfc1f4bda658c7567584ce35fdd479c413ebdb1376981b27737be1 include $(INCLUDE_DIR)/host-build.mk From 688697889c9ceb9d2d8d413d1abcc5fa7edb402b Mon Sep 17 00:00:00 2001 From: Felix Baumann Date: Mon, 20 Feb 2023 03:40:20 +0100 Subject: [PATCH 16/19] ramips: correct the PCIe port number for some mt7621 devices MT7621 uses a new PCIe driver in the 5.15+ kernel. Allocating wrong PCIe port will cause the PCIe NIC to not work properly. This commit fixes the wrong port numbers on Netgear R6220, WAC104 and WNDR3700 v5. According to bootlog, MT7612E (5GHz) is connected to pcie0, and MT7603E (2GHz) is connected to pcie2: [2.758986] mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK) [2.772862] mt7621-pci 1e140000.pcie: PCIE0 enabled [2.782579] mt7621-pci 1e140000.pcie: PCIE2 enabled ... [3.009151] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000 [3.125715] pci 0000:02:00.0: [14c3:7603] type 00 class 0x028000 Tested-by: Maximilian Baumgartner Signed-off-by: Shiji Yang [felix.bau@gmx.de: adjust commit message for Netgear devices] Signed-off-by: Felix Baumann --- target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi | 2 +- target/linux/ramips/dts/mt7621_netgear_wac104.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi index 0ae6ab46f7..691aba1063 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi @@ -96,7 +96,7 @@ }; }; -&pcie1 { +&pcie2 { wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0 0 0 0 0>; diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts index 3b5d6ae2d9..97aa4a90d1 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts @@ -122,7 +122,7 @@ }; }; -&pcie1 { +&pcie2 { wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0 0 0 0 0>; From ed64c3323590e3c9fa8b423bf37689023a7a101f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Thu, 16 Feb 2023 23:04:20 +0100 Subject: [PATCH 17/19] ipq40xx: Linksys MR8300: fix the USB port power MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The USB port on the MR8300 randomly fails to feed bus-powered devices. This is caused by a misconfigured pinmux. The GPIO68 should be used to enable the USB power (active low), but it's inside the NAND pinmux. This GPIO pin was found in the original firmware at a startup script in both MR8300 and EA8300. Therefore apply the fix for both boards. Signed-off-by: Daniel González Cabanelas Reviewed-by: Robert Marko --- .../files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi index db9ca1e725..141ea60442 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi @@ -100,6 +100,16 @@ status = "okay"; }; }; + + regulator-usb-vbus { + compatible = "regulator-fixed"; + regulator-name = "USB_VBUS"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + gpio = <&tlmm 68 GPIO_ACTIVE_LOW>; + }; }; @@ -268,7 +278,7 @@ pins = "gpio55", "gpio56", "gpio57", "gpio60", "gpio62", "gpio63", "gpio64", "gpio65", "gpio66", - "gpio67", "gpio68", "gpio69"; + "gpio67", "gpio69"; function = "qpic"; bias-pull-down; }; From c9df2d5c640a056a7b2443f5155b275d74117cbe Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Wed, 18 Jan 2023 09:39:18 +0000 Subject: [PATCH 18/19] dnsmasq: bump to v2.89 Signed-off-by: Kevin Darbyshire-Bryant --- package/network/services/dnsmasq/Makefile | 4 ++-- .../patches/100-remove-old-runtime-kernel-support.patch | 4 ++-- package/network/services/dnsmasq/patches/200-ubus_dns.patch | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 65ef9da3a9..f555712a7f 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_UPSTREAM_VERSION:=2.88 +PKG_UPSTREAM_VERSION:=2.89 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/ -PKG_HASH:=23544deda10340c053bea6f15a93fed6ea7f5aaa85316bfc671ffa6d22fbc1b3 +PKG_HASH:=02bd230346cf0b9d5909f5e151df168b2707103785eb616b56685855adebb609 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch index 76065375bd..59b8d02c0e 100644 --- a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch +++ b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch @@ -26,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1247,7 +1247,7 @@ extern struct daemon { +@@ -1248,7 +1248,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -35,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1452,9 +1452,6 @@ int read_write(int fd, unsigned char *pa +@@ -1453,9 +1453,6 @@ int read_write(int fd, unsigned char *pa void close_fds(long max_fd, int spare1, int spare2, int spare3); int wildcard_match(const char* wildcard, const char* match); int wildcard_matchn(const char* wildcard, const char* match, int num); diff --git a/package/network/services/dnsmasq/patches/200-ubus_dns.patch b/package/network/services/dnsmasq/patches/200-ubus_dns.patch index f88763f94a..8a70bb8bdf 100644 --- a/package/network/services/dnsmasq/patches/200-ubus_dns.patch +++ b/package/network/services/dnsmasq/patches/200-ubus_dns.patch @@ -1,6 +1,6 @@ --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1630,14 +1630,26 @@ void emit_dbus_signal(int action, struct +@@ -1631,14 +1631,26 @@ void emit_dbus_signal(int action, struct /* ubus.c */ #ifdef HAVE_UBUS From 888b207f1a6cde4c954e1b3b34f8c2ba60b14cd1 Mon Sep 17 00:00:00 2001 From: Tobias Hilbig Date: Sat, 25 Feb 2023 11:40:37 +0100 Subject: [PATCH 19/19] ncurses: add alacritty terminfo Add terminfo file for the terminal emulator alacritty. https://github.com/alacritty/alacritty Signed-off-by: Tobias Hilbig --- package/libs/ncurses/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile index 29261a4cd0..4d8e685f35 100644 --- a/package/libs/ncurses/Makefile +++ b/package/libs/ncurses/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ncurses PKG_CPE_ID:=cpe:/a:gnu:ncurses PKG_VERSION:=6.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) @@ -123,6 +123,7 @@ ifneq ($(HOST_OS),FreeBSD) ) for file in \ a/ansi \ + a/alacritty \ d/dumb \ l/linux \ r/rxvt \