Re: Netifd proto_add_host_dependency (called by wireguard) replacing unreachable route
> I think that netifd really wanted to add a dependency to the first > route, not the second one. > Maybe netifd should ignore those routes with types for host > dependencies, but I don't know the consequences of that change. Or maybe it is ok to monitor those kinds of routes if their type is preserved and it netifd consider metrics when it selects the best route. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Netifd proto_add_host_dependency (called by wireguard) replacing unreachable route
Hello, I have a static rule to reach a wireguard server through a specific interface and an unreachable route to make sure that the static route is the only way to reach that server. 10.1.2.1 via 10.3.1.5 dev eth1 src 10.3.1.6 metric 100 unreachable 10.1.2.1 metric 2147483645 After wg is up, wireguard.sh calls "proto_add_host_dependency wgint 10.1.2.1". That call modifies the unreachable route to a normal route (it removes the type). The result is this: 10.1.2.1 via 10.3.1.5 dev eth1 src 10.3.1.6 metric 100 10.1.2.1 dev lo scope link metric 2147483645 I think that netifd really wanted to add a dependency to the first route, not the second one. Maybe netifd should ignore those routes with types for host dependencies, but I don't know the consequences of that change. Regards, --- Luiz Angelo Daros de Luca luizl...@gmail.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] bcm53xx: add support for Asus RT-AC88U
Asus RT-AC88U is an AC3100 router featuring 9 Ethernet ports over the integrated Broadcom and the external Realtek switch. Hardware info: * Processor: Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz * Switch: BCM53012 in BCM4709C0KFEBG & external RTL8365MB * DDR3 RAM: 512 MB * Flash: 128 MB (ESMT F59L1G81LA-25T) * 2.4GHz: BCM4366 4×4 2.4/5G single chip 802.11ac SoC * 5GHz: BCM4366 4×4 2.4/5G single chip 802.11ac SoC * Ports: 8 Ports, 1 WAN Ports Flashing instructions: * Boot to CFE Recovery Mode by holding the reset button while power-on. * Connect to the router with an ethernet cable. * Set IPv4 address of the computer to 192.168.1.2 subnet 255.255.255.0. * Head to http://192.168.1.1. * Reset NVRAM. * Upload the OpenWrt image. CFE bootloader may reject flashing the image due to image integrity check. In that case, follow the instructions below. * Rename the OpenWrt image as firmware.trx. * Run a TFTP server on the computer and make it serve the firmware.trx file. * Run the URL below on a browser or curl. http://192.168.1.1/do.htm?cmd=flash+-noheader+192.168.1.2:firmware.trx+flash0.trx Signed-off-by: Arınç ÜNAL --- target/linux/bcm53xx/base-files/etc/board.d/01_leds | 6 ++ .../linux/bcm53xx/base-files/etc/board.d/02_network | 3 +++ .../bcm53xx/base-files/etc/init.d/set_nvram_vars| 13 + target/linux/bcm53xx/image/Makefile | 8 4 files changed, 30 insertions(+) create mode 100755 target/linux/bcm53xx/base-files/etc/init.d/set_nvram_vars diff --git a/target/linux/bcm53xx/base-files/etc/board.d/01_leds b/target/linux/bcm53xx/base-files/etc/board.d/01_leds index aba526b9c349..f37fa79d4f64 100644 --- a/target/linux/bcm53xx/base-files/etc/board.d/01_leds +++ b/target/linux/bcm53xx/base-files/etc/board.d/01_leds @@ -8,6 +8,12 @@ netgear,r8000) ucidef_set_led_usbport "usb2" "USB 2.0" "bcm53xx:white:usb2" "usb1-port2" "usb2-port2" ucidef_set_led_usbport "usb3" "USB 3.0" "bcm53xx:white:usb3" "usb1-port1" "usb2-port1" "usb4-port1" ;; +asus,rt-ac88u) + ucidef_set_led_default "power" "Power" "white:power" "1" + ucidef_set_led_netdev "lan" "LAN" "white:lan" "eth1" + ucidef_set_led_usbport "usb2" "USB 2.0" "white:usb2" "usb1-port2" + ucidef_set_led_usbport "usb3" "USB 3.0" "white:usb3" "usb1-port1" "usb4-port1" + ;; esac board_config_flush diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index 6d970e1d0e3a..822320c0a6a7 100644 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -13,6 +13,9 @@ bcm53xx_setup_interfaces() asus,rt-ac87u) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; + asus,rt-ac88u) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan" + ;; linksys,panamera) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan" ;; diff --git a/target/linux/bcm53xx/base-files/etc/init.d/set_nvram_vars b/target/linux/bcm53xx/base-files/etc/init.d/set_nvram_vars new file mode 100755 index ..9c2b3ebf4de8 --- /dev/null +++ b/target/linux/bcm53xx/base-files/etc/init.d/set_nvram_vars @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common + +START=99 +boot() { + . /lib/functions.sh + + case $(board_name) in + asus,rt-ac88u) + # clear et0macaddr which makes cfe recovery mode inaccessible, set eth1 & eth2 mac addresses and wireless LEDs behaviour variables on nvram + nvram unset et0macaddr set et1macaddr=$(nvram get 0:macaddr) set et2macaddr=$(nvram get 1:macaddr) set 0:ledbh9=0x7 set 1:ledbh9=0x7 && nvram commit + ;; + esac +} diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index cb2643ca5453..afd3380487b8 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -167,6 +167,14 @@ define Device/asus_rt-ac87u endef TARGET_DEVICES += asus_rt-ac87u +define Device/asus_rt-ac88u + $(call Device/asus) + DEVICE_MODEL := RT-AC88U + DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) + ASUS_PRODUCTID := RT-AC88U +endef +TARGET_DEVICES += asus_rt-ac88u + define Device/asus_rt-n18u $(call Device/asus) DEVICE_MODEL := RT-N18U -- 2.25.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH v2 1/2] bcm53xx: remove extsw interface on Linksys EA9500
This patch series can be disregarded as the first patch in this series causes a bigger issue than the one it fixes. Ref: https://forum.openwrt.org/t/build-for-linksys-ea9500/1817/999 Arınç On 23/10/2021 22:56, Arınç ÜNAL wrote: Remove extsw interface from the bridge as it's used as a master interface by the DSA driver. Signed-off-by: Arınç ÜNAL --- target/linux/bcm53xx/base-files/etc/board.d/02_network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index 6d970e1d0e3a..0f391f5e2d38 100644 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -14,7 +14,7 @@ bcm53xx_setup_interfaces() ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; linksys,panamera) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan" + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8" "wan" ;; luxul,xap-1610-v1) ucidef_set_interface_lan "poe lan" "dhcp" ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [RFC 1/3] kernel: allow to choose QCOM_QMI_HELPERS
niedz., 24 paź 2021 o 21:42 Janusz Dziedzic napisał(a): > > We need this when build ath11k from backports. > > Signed-off-by: Janusz Dziedzic > --- > .../generic/pending-5.10/930-qcom-qmi-helpers.patch | 13 + > 1 file changed, 13 insertions(+) > create mode 100644 > target/linux/generic/pending-5.10/930-qcom-qmi-helpers.patch > > diff --git a/target/linux/generic/pending-5.10/930-qcom-qmi-helpers.patch > b/target/linux/generic/pending-5.10/930-qcom-qmi-helpers.patch > new file mode 100644 > index 00..0a274334b9 > --- /dev/null > +++ b/target/linux/generic/pending-5.10/930-qcom-qmi-helpers.patch > @@ -0,0 +1,13 @@ > +diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig > +index 6a3b69b..58c7dd9 100644 > +--- a/drivers/soc/qcom/Kconfig > b/drivers/soc/qcom/Kconfig > +@@ -92,7 +92,7 @@ config QCOM_PDR_HELPERS > + select QCOM_QMI_HELPERS > + > + config QCOM_QMI_HELPERS > +- tristate > ++ tristate "Qualcomm QMI Helpers" > + depends on NET > + > + config QCOM_RMTFS_MEM > -- > 2.25.1 > Already resend original patch to linux-kernel group, but suspect we will need this one for a while -- Janusz Dziedzic ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] realtek: fix ZyXEL initramfs image generation
ping? Installation from OEM on ZyXEL realtek devices is currently broken. And I'm getting requests like this: https://forum.openwrt.org/t/openwrt-installation-on-a-zyxel-gs1900-8/97771/39 But I have absolutely no intention of starting up my own forked distribution... How about just applying this patch? This is also required for 21.02.xx. Bjørn Bjørn Mork writes: > The current rule produces empty trailers, causing the OEM firmware > update application to reject our images. > > The double expansion of a makefile variable does not work inside > shell code. The second round is interpreted as a shell expansion, > attempting to run the command ZYXEL_VERS instead of expanding the > $(ZYXEL_VERS) makefile variable. > > Fix by removing one level of variable indirection. > > Fixes: c6c8d597e183 ("realtek: Add generic zyxel_gs1900 image definition") > Signed-off-by: Bjørn Mork > --- > I got myself another brand new GS1900-10HP and used the opportunity to > verify the console-less installation procedure. And of course, it didn't > work > > The reason is that we currently build images with a bogus trailer, > lacking the crucial hardware version info the OEM firmware looks > for. > > This needs to be backported yto 21.02 as well. I dowloaded the > initramfs images from downloads.openwrt.org and verified that they have > the same issue: > > $ hexdump -C > openwrt-21.02.0-rc3-realtek-generic-zyxel_gs1900-10hp-initramfs-kernel.bin > |tail -4 > 005b7240 ca 0f 86 61 cc 1b 7d 0a 0b 09 45 88 fc 06 fd ac > |...a..}...E.| > 005b7250 f6 82 7e 5d 7d 13 5a 56 8c 14 fe 7f 55 bf 19 d4 > |..~]}.ZVU...| > 005b7260 ea 2d d7 00 56 45 52 53 0a |.-..VERS.| > 005b7269 > > > A proper image should have a trailer similar to this: > > $ hexdump -C openwrt-initramfs.bin |tail -4 > 005746d0 10 e1 d2 0c 73 0a ff 07 eb 12 c6 f1 0a eb ca 00 > |s...| > 005746e0 56 45 52 53 0a 56 39 2e 39 39 28 41 41 5a 49 2e > |VERS.V9.99(AAZI.| > 005746f0 30 29 20 7c 20 30 36 2f 32 34 2f 32 30 32 31 0a |0) | > 06/24/2021.| > 00574700 > > The last one is the actual image I used to my initial install from OEM. > It worked. > > > Bjørn > > target/linux/realtek/image/Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target/linux/realtek/image/Makefile > b/target/linux/realtek/image/Makefile > index ebc0c0a78480..38b4d5e441cc 100644 > --- a/target/linux/realtek/image/Makefile > +++ b/target/linux/realtek/image/Makefile > @@ -10,7 +10,7 @@ DEVICE_VARS += ZYXEL_VERS > > define Build/zyxel-vers > ( echo VERS;\ > - for hw in $(1); do\ > + for hw in $(ZYXEL_VERS); do\ > echo -n "V9.99($$hw.0) | ";\ > date -d @$(SOURCE_DATE_EPOCH) +%m/%d/%Y;\ > done ) >> $@ > @@ -117,7 +117,7 @@ define Device/zyxel_gs1900 >IMAGE_SIZE := 6976k >DEVICE_VENDOR := ZyXEL >UIMAGE_MAGIC := 0x8380 > - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers > (ZYXEL_VERS) | \ > + KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers | \ > uImage gzip > endef ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] layerscape: mkits-multiple-config: fail on invalid arguments
From: Rafał Miłecki Fail if arguments couldn't be parsed and print unrecognized part. It's important when running it from script with dynamic values. Missing value could result in skipping argument and silent failures (unexpected its). Signed-off-by: Rafał Miłecki --- target/linux/layerscape/image/mkits-multiple-config.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/target/linux/layerscape/image/mkits-multiple-config.sh b/target/linux/layerscape/image/mkits-multiple-config.sh index 68870686c5..b2d8f4ef7f 100755 --- a/target/linux/layerscape/image/mkits-multiple-config.sh +++ b/target/linux/layerscape/image/mkits-multiple-config.sh @@ -198,6 +198,11 @@ parse_args() { usage;; esac done + shift $(($OPTIND - 1)) + [ $# -gt 0 ] && { + echo "Failed to parse all passed arguments (unrecognized: \"$@\")" + exit 1 + } [ -n "${OUTPUT}" ] || OUTPUT=fitimage.its [ -n "${VERSION}" ] || VERSION="Unknown" [ -n "${ARCH}" ] || ARCH=arm -- 2.31.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [RFC 2/3] kernel: add kmod packages required by ath11k
niedz., 24 paź 2021 o 21:55 Robert Marko napisał(a): > > On Sun, 24 Oct 2021 at 21:43, Janusz Dziedzic > wrote: > > > > When build ath11k from backports we need enable > > such packages: > > - mhi-bus > > - qrtr > > - qrtr-mhi > > - michael-mic > > - qcom-qmi-helpers > > > > Signed-off-by: Janusz Dziedzic > > --- > > package/kernel/linux/modules/lib.mk | 14 > > package/kernel/linux/modules/mhi.mk | 21 +++ > > package/kernel/linux/modules/other.mk | 14 > > package/kernel/linux/modules/qrtr.mk | 51 +++ > > 4 files changed, 100 insertions(+) > > create mode 100644 package/kernel/linux/modules/mhi.mk > > create mode 100644 package/kernel/linux/modules/qrtr.mk > > > > diff --git a/package/kernel/linux/modules/lib.mk > > b/package/kernel/linux/modules/lib.mk > > index 9a341932bd..51a8c6a753 100644 > > --- a/package/kernel/linux/modules/lib.mk > > +++ b/package/kernel/linux/modules/lib.mk > > @@ -121,6 +121,20 @@ endef > > $(eval $(call KernelPackage,lib-lzo)) > > > > > > +define KernelPackage/lib-michael-mic > > Hi Janusz, > thanks for working on the kernel modules that ath11k depends on. > I have had ath11k packaged for a while, but didn't work on the > dependencies to be > packaged as kmods as well. > > That being said, there is an existing kmod-crypto-michael-mic package > in the crypto modules, > so no need for it. > Thanks! Seems I missed it :) BR Janusz > Regards, > Robert > > + SUBMENU:=$(LIB_MENU) > > + TITLE:=MICHAEL_MIC support > > + KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC > > + FILES:= $(LINUX_DIR)/crypto/michael_mic.ko > > + AUTOLOAD:=$(call AutoProbe,michael_mic) > > +endef > > + > > +define KernelPackage/lib-michael-mic/description > > + Kernel module for MICHAEL_MIC support > > +endef > > + > > +$(eval $(call KernelPackage,lib-michael-mic)) > > + > > define KernelPackage/lib-zstd > >SUBMENU:=$(LIB_MENU) > >TITLE:=ZSTD support > > diff --git a/package/kernel/linux/modules/mhi.mk > > b/package/kernel/linux/modules/mhi.mk > > new file mode 100644 > > index 00..a247b37efe > > --- /dev/null > > +++ b/package/kernel/linux/modules/mhi.mk > > @@ -0,0 +1,21 @@ > > +# > > +# Copyright (C) 2021 OpenWrt.org > > +# > > +# This is free software, licensed under the GNU General Public License v2. > > +# See /LICENSE for more information. > > +# > > + > > +MHI_MENU:=MHI support > > + > > +define KernelPackage/mhi-bus > > + SUBMENU:=$(MHI_MENU) > > + TITLE:=Support for Modem Host Interface (MHI) bus > > + KCONFIG:=CONFIG_MHI_BUS CONFIG_MHI_BUS_DEBUG=n > > + FILES:=$(LINUX_DIR)/drivers/bus/mhi/core/mhi.ko > > +endef > > + > > +define KernelPackage/mhi-bus/description > > + Kernel support for Modem Host Interface (MHI) > > +endef > > + > > +$(eval $(call KernelPackage,mhi-bus)) > > diff --git a/package/kernel/linux/modules/other.mk > > b/package/kernel/linux/modules/other.mk > > index fdcc089025..555a94c442 100644 > > --- a/package/kernel/linux/modules/other.mk > > +++ b/package/kernel/linux/modules/other.mk > > @@ -1256,3 +1256,17 @@ define KernelPackage/f71808e-wdt/description > > endef > > > > $(eval $(call KernelPackage,f71808e-wdt)) > > + > > +define KernelPackage/qcom-qmi-helpers > > + SUBMENU:=$(OTHER_MENU) > > + TITLE:=Qualcomm QMI helpers > > + KCONFIG:=CONFIG_QCOM_QMI_HELPERS > > + FILES:=$(LINUX_DIR)/drivers/soc/qcom/qmi_helpers.ko > > + AUTOLOAD:=$(call AutoProbe,qmi_helpers,1) > > +endef > > + > > +define KernelPackage/qcom-qmi-helpers/description > > + Kernel module qcom_qmi_helpers > > +endef > > + > > +$(eval $(call KernelPackage,qcom-qmi-helpers)) > > diff --git a/package/kernel/linux/modules/qrtr.mk > > b/package/kernel/linux/modules/qrtr.mk > > new file mode 100644 > > index 00..eea95bfd54 > > --- /dev/null > > +++ b/package/kernel/linux/modules/qrtr.mk > > @@ -0,0 +1,51 @@ > > +# > > +# Copyright (C) 2021 OpenWrt.org > > +# > > +# This is free software, licensed under the GNU General Public License v2. > > +# See /LICENSE for more information. > > +# > > + > > +QRTR_MENU:=Qualcomm IPC Router support > > + > > +define KernelPackage/qrtr > > + SUBMENU:=$(QRTR_MENU) > > + TITLE:=Qualcomm IPC Router support > > + KCONFIG:=CONFIG_QRTR > > + FILES:= \ > > + $(LINUX_DIR)/net/qrtr/qrtr.ko \ > > + $(LINUX_DIR)/net/qrtr/ns.ko > > +endef > > + > > +define KernelPackage/qrtr/description > > + Kernel support for Qualcomm IPC Router > > +endef > > + > > +$(eval $(call KernelPackage,qrtr)) > > + > > +define KernelPackage/qrtr-mhi > > + SUBMENU:=$(QRTR_MENU) > > + TITLE:=MHI IPC Router channels > > + KCONFIG:=CONFIG_QRTR_MHI > > + DEPENDS:=+kmod-mhi-bus +kmod-qrtr > > + FILES:= $(LINUX_DIR)/net/qrtr/qrtr-mhi.ko > > +endef > > + > > +define KernelPackage/qrtr-mhi/description > > + Kernel support for MHI IPC Router channels > > +endef > > + > > +$(eval $(call KernelPackage,qrtr-mhi)) > > + > > +define KernelPackage/qrtr-tun > > + SUBMENU:=$(QRTR_MENU) > > + TITLE:=TUN device