diff --git a/build_patches/openwrt/0001-Disable-OpenWrt-config-migration-mechanisms.patch b/build_patches/openwrt/0001-Disable-OpenWrt-config-migration-mechanisms.patch index f6e86e1..84a74cc 100644 --- a/build_patches/openwrt/0001-Disable-OpenWrt-config-migration-mechanisms.patch +++ b/build_patches/openwrt/0001-Disable-OpenWrt-config-migration-mechanisms.patch @@ -6,10 +6,10 @@ This disables all OpenWrt config migration mechanisms except for files listed in /etc/sysupgrade.conf diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade -index 7e0a00e13b8ee4be7163936fd01a7beff0ce5c99..97f50dc83088e29fba651741fff28c70f7585b3f 100755 +index 9315091302..be8325463e 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade -@@ -135,14 +135,14 @@ list_static_conffiles() { +@@ -139,14 +139,14 @@ list_static_conffiles() { local filter=$1 find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \ diff --git a/build_patches/openwrt/0002-set-root-password.patch b/build_patches/openwrt/0002-set-root-password.patch index 9655010..571ae77 100644 --- a/build_patches/openwrt/0002-set-root-password.patch +++ b/build_patches/openwrt/0002-set-root-password.patch @@ -3,7 +3,7 @@ Date: Sat, 8 Jul 2017 10:47:28 +0200 Subject: set root password diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow -index 4b4154f21f478cc025a350363b3e34319c6afacc..b8d180a95691ab09f9c4d759ffd97da34a022623 100644 +index 39bdb9c90a..b8d180a956 100644 --- a/package/base-files/files/etc/shadow +++ b/package/base-files/files/etc/shadow @@ -1,4 +1,4 @@ diff --git a/build_patches/openwrt/0004-build-remove-libustream-and-certs-from-default-packa.patch b/build_patches/openwrt/0004-build-remove-libustream-and-certs-from-default-packa.patch index 3c1369f..b45398e 100644 --- a/build_patches/openwrt/0004-build-remove-libustream-and-certs-from-default-packa.patch +++ b/build_patches/openwrt/0004-build-remove-libustream-and-certs-from-default-packa.patch @@ -5,13 +5,12 @@ Subject: build: remove libustream and certs from default packages This effectively reverts upstream commit e79df3516d3e ("build: add libustream and certs to default pkgs"). -The libustream-wolfssl library conflicts with the libustream-mbedtls -we are selecting in fff-web-ui and is probably much bigger. - Signed-off-by: Adrian Schmutzler +[fabian@blaese.de: Rebase onto OpenWrt 23.05] +Signed-off-by: Fabian Bläse diff --git a/include/target.mk b/include/target.mk -index 7526224972e18148fec8a12318ca7f90a382475f..338e97f836759fc454986210e5818ad390ba6efb 100644 +index b5e3e7ff6f..2324b6cc11 100644 --- a/include/target.mk +++ b/include/target.mk @@ -12,12 +12,10 @@ DEVICE_TYPE?=router @@ -23,7 +22,7 @@ index 7526224972e18148fec8a12318ca7f90a382475f..338e97f836759fc454986210e5818ad3 fstools \ libc \ libgcc \ -- libustream-wolfssl \ +- libustream-mbedtls \ logd \ mtd \ netifd \ diff --git a/build_patches/openwrt/0050-Disable-ipq40xx-lan-wan-separation.patch b/build_patches/openwrt/0050-Disable-ipq40xx-lan-wan-separation.patch deleted file mode 100644 index f318485..0000000 --- a/build_patches/openwrt/0050-Disable-ipq40xx-lan-wan-separation.patch +++ /dev/null @@ -1,132 +0,0 @@ -From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= -Date: Sat, 7 Aug 2021 00:40:34 +0200 -Subject: [PATCH] Disable ipq40xx lan/wan separation - -While the ipq40xx only has a single MDIO connection to the switch chip, -the ipq40xx essedma ethernet driver configures two gmac interfaces, -which are seperated into WAN and LAN ports using vlan cid at driver -level. Linux is not aware of these vlan tags. - -However, this configuration does interfere with the vlan ids we use in -our firmware. Therefore, this feature is disabled by setting the default -vlan id for all gmacs to 0, changing the port mask so all physical ports -are connected to the first gmac, and reducing the amount of configured -gmacs to one. The definition of the second gmac is kept, because it is -referenced by some devices. The default configuration of the switch chip -is removed accordingly. - -These changes are currently only done with the FritzBox 4040 in mind. ---- - .../linux/ipq40xx/base-files/etc/board.d/01_leds | 2 +- - .../ipq40xx/base-files/etc/board.d/02_network | 3 +-- - .../ipq40xx/files-5.10/drivers/net/mdio/ar40xx.c | 2 ++ - .../drivers/net/ethernet/qualcomm/essedma/edma.h | 16 ++++++++-------- - ...1-dts-ipq4019-add-ethernet-essedma-node.patch | 6 +++--- - 5 files changed, 15 insertions(+), 14 deletions(-) - -diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds -index 884b265dcb..77b0754635 100644 ---- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds -+++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds -@@ -24,7 +24,7 @@ asus,rt-ac58u) - ;; - avm,fritzbox-4040) - ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" "phy1tpt" -- ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" -+ ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x20" - ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e" - ;; - avm,fritzbox-7530 |\ -diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network -index 2aa4886e6a..7390769661 100644 ---- a/target/linux/ipq40xx/base-files/etc/board.d/02_network -+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network -@@ -68,9 +68,8 @@ ipq40xx_setup_interfaces() - avm,fritzbox-4040|\ - linksys,ea6350v3|\ - linksys,ea8300) -- ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ -- "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" -+ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" - ;; - linksys,mr8300) - ucidef_set_interfaces_lan_wan "eth0" "eth1" -diff --git a/target/linux/ipq40xx/files-5.10/drivers/net/mdio/ar40xx.c b/target/linux/ipq40xx/files-5.10/drivers/net/mdio/ar40xx.c -index f7ce42b9ff..a8da7ac653 100644 ---- a/target/linux/ipq40xx/files-5.10/drivers/net/mdio/ar40xx.c -+++ b/target/linux/ipq40xx/files-5.10/drivers/net/mdio/ar40xx.c -@@ -1481,6 +1481,7 @@ ar40xx_vlan_init(struct ar40xx_priv *priv) - unsigned long bmp; - - /* By default Enable VLAN */ -+ /* - priv->vlan = 1; - priv->vlan_table[AR40XX_LAN_VLAN] = priv->cpu_bmp | priv->lan_bmp; - priv->vlan_table[AR40XX_WAN_VLAN] = priv->cpu_bmp | priv->wan_bmp; -@@ -1492,6 +1493,7 @@ ar40xx_vlan_init(struct ar40xx_priv *priv) - bmp = priv->wan_bmp; - for_each_set_bit(port, &bmp, AR40XX_NUM_PORTS) - priv->pvid[port] = AR40XX_WAN_VLAN; -+ */ - - return 0; - } -diff --git a/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma.h b/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma.h -index 015e5f5026..daa60639d1 100644 ---- a/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma.h -+++ b/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma.h -@@ -57,14 +57,14 @@ - #define EDMA_LAN 1 - - /* VLAN tag */ --#define EDMA_LAN_DEFAULT_VLAN 1 --#define EDMA_WAN_DEFAULT_VLAN 2 -- --#define EDMA_DEFAULT_GROUP1_VLAN 1 --#define EDMA_DEFAULT_GROUP2_VLAN 2 --#define EDMA_DEFAULT_GROUP3_VLAN 3 --#define EDMA_DEFAULT_GROUP4_VLAN 4 --#define EDMA_DEFAULT_GROUP5_VLAN 5 -+#define EDMA_LAN_DEFAULT_VLAN 0 -+#define EDMA_WAN_DEFAULT_VLAN 0 -+ -+#define EDMA_DEFAULT_GROUP1_VLAN 0 -+#define EDMA_DEFAULT_GROUP2_VLAN 0 -+#define EDMA_DEFAULT_GROUP3_VLAN 0 -+#define EDMA_DEFAULT_GROUP4_VLAN 0 -+#define EDMA_DEFAULT_GROUP5_VLAN 0 - - /* Queues exposed to linux kernel */ - #define EDMA_NETDEV_TX_QUEUE 4 -diff --git a/target/linux/ipq40xx/patches-5.10/711-dts-ipq4019-add-ethernet-essedma-node.patch b/target/linux/ipq40xx/patches-5.10/711-dts-ipq4019-add-ethernet-essedma-node.patch -index 3567eb7810..b13b312a91 100644 ---- a/target/linux/ipq40xx/patches-5.10/711-dts-ipq4019-add-ethernet-essedma-node.patch -+++ b/target/linux/ipq40xx/patches-5.10/711-dts-ipq4019-add-ethernet-essedma-node.patch -@@ -36,7 +36,7 @@ Signed-off-by: Christian Lamparter - + qcom,rx_head_buf_size = <1540>; - + qcom,mdio_supported; - + qcom,poll_required = <1>; --+ qcom,num_gmac = <2>; -++ qcom,num_gmac = <1>; - + interrupts = <0 65 IRQ_TYPE_EDGE_RISING - + 0 66 IRQ_TYPE_EDGE_RISING - + 0 67 IRQ_TYPE_EDGE_RISING -@@ -74,7 +74,7 @@ Signed-off-by: Christian Lamparter - + - + gmac0: gmac0 { - + local-mac-address = [00 00 00 00 00 00]; --+ vlan_tag = <1 0x1f>; -++ vlan_tag = <0 0x3f>; - + }; - + - + gmac1: gmac1 { -@@ -83,7 +83,7 @@ Signed-off-by: Christian Lamparter - + qcom,poll_required = <1>; - + qcom,forced_speed = <1000>; - + qcom,forced_duplex = <1>; --+ vlan_tag = <2 0x20>; -++ vlan_tag = <0 0x00>; - + }; - + }; - + diff --git a/build_patches/openwrt/0050-ipq40xx-restore-label-mac-alias.patch b/build_patches/openwrt/0050-ipq40xx-restore-label-mac-alias.patch new file mode 100644 index 0000000..93c7b5a --- /dev/null +++ b/build_patches/openwrt/0050-ipq40xx-restore-label-mac-alias.patch @@ -0,0 +1,27 @@ +From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= +Date: Sun, 6 Aug 2023 19:57:16 +0200 +Subject: [PATCH 1/2] ipq40xx: re-add label MAC address for FritzBox 4040 + +The MAC address of the GMAC is contained inside the CWMP-Account +number on the label. + +The label MAC address alias was defined previously, but it has been +removed with the switch to IPQESS / DSA. + +Restore the label MAC address alias. + +Fixes: 27b441cbaf42 ("ipq40xx: drop ESSEDMA + AR40xx DTS nodes") +Signed-off-by: Fabian Bläse + +diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts +index e448206c36..ec1112ee2b 100644 +--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts ++++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts +@@ -14,6 +14,7 @@ + led-failsafe = &flash; + led-running = &power; + led-upgrade = &flash; ++ label-mac-device = &gmac; + }; + + soc { diff --git a/build_patches/openwrt/0100-Add-hack-which-fixes-forwarding-on-a-stacked-bridge-.patch b/build_patches/openwrt/0100-Add-hack-which-fixes-forwarding-on-a-stacked-bridge-.patch index 1be0651..f20c092 100644 --- a/build_patches/openwrt/0100-Add-hack-which-fixes-forwarding-on-a-stacked-bridge-.patch +++ b/build_patches/openwrt/0100-Add-hack-which-fixes-forwarding-on-a-stacked-bridge-.patch @@ -6,13 +6,13 @@ Subject: [PATCH] Add hack which fixes forwarding on a stacked bridge --- .../999-fix-stacked-bridge-forwarding.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) - create mode 100644 target/linux/generic/hack-5.10/999-fix-stacked-bridge-forwarding.patch + create mode 100644 target/linux/generic/hack-5.15/999-fix-stacked-bridge-forwarding.patch -diff --git a/target/linux/generic/hack-5.10/999-fix-stacked-bridge-forwarding.patch b/target/linux/generic/hack-5.10/999-fix-stacked-bridge-forwarding.patch +diff --git a/target/linux/generic/hack-5.15/999-fix-stacked-bridge-forwarding.patch b/target/linux/generic/hack-5.15/999-fix-stacked-bridge-forwarding.patch new file mode 100644 index 0000000000..e1d4cb9cd5 --- /dev/null -+++ b/target/linux/generic/hack-5.10/999-fix-stacked-bridge-forwarding.patch ++++ b/target/linux/generic/hack-5.15/999-fix-stacked-bridge-forwarding.patch @@ -0,0 +1,12 @@ +--- a/net/bridge/br_input.c ++++ b/net/bridge/br_input.c diff --git a/buildscript b/buildscript index ce95bd1..d7e81d3 100755 --- a/buildscript +++ b/buildscript @@ -7,9 +7,9 @@ set -o pipefail builddir=./build # OpenWrt: package hashes correspond to core repo version -OPENWRTREV="v22.03.3" -PACKAGEREV="2048c5bbf6c482e45b080eef4c1c531936f7f41b" -ROUTINGREV="1a87333f268bcf0a11e3a665a357cb0d4ec2d680" +OPENWRTREV="v23.05.0" +PACKAGEREV="0da9f622975aa1e4efe452da4acbae15479bee63" +ROUTINGREV="2272106e0839ee06957e88e3596489e1b510d3c2" # Gluon packages: master from 2020-02-04 GLUONREV="12e41d0ff07ec54bbd67a31ab50d12ca04f2238c" diff --git a/src/packages/fff/fff-network/arm/network.avm,fritzbox-4040 b/src/packages/fff/fff-network/arm/network.avm,fritzbox-4040 index 6586ff2..2aff959 100644 --- a/src/packages/fff/fff-network/arm/network.avm,fritzbox-4040 +++ b/src/packages/fff/fff-network/arm/network.avm,fritzbox-4040 @@ -1,5 +1,6 @@ -WANDEV=eth0 -SWITCHDEV=eth0 -CLIENT_PORTS="0t 3 4" -WAN_PORTS="0t 5" -BATMAN_PORTS="0t 1 2" +WANDEV=switch0 +SWITCHDEV=switch0 +CLIENT_PORTS="lan3 lan4" +WAN_PORTS="wan" +BATMAN_PORTS="lan1 lan2" +DSA=1 diff --git a/src/packages/fff/fff-network/files/lib/functions/fff/portorder b/src/packages/fff/fff-network/files/lib/functions/fff/portorder index 6736438..98dfc03 100644 --- a/src/packages/fff/fff-network/files/lib/functions/fff/portorder +++ b/src/packages/fff/fff-network/files/lib/functions/fff/portorder @@ -7,9 +7,6 @@ get_port_order() { local PORTORDER case "$BOARD" in - avm,fritzbox-4040) - PORTORDER="5 1 2 3 4" - ;; glinet,gl-ar150) PORTORDER="1" ;;