diff --git a/feeds.conf.default b/feeds.conf.default index 9224c3c1f1..9eece6fea2 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,4 @@ -src-git packages https://github.com/immortalwrt/packages.git;openwrt-21.02 -src-git luci https://github.com/immortalwrt/luci.git;openwrt-21.02 -src-git routing https://github.com/openwrt/routing.git;openwrt-21.02 -src-git telephony https://github.com/openwrt/telephony.git;openwrt-21.02 +src-git-full packages https://github.com/immortalwrt/packages.git;openwrt-21.02 +src-git-full luci https://github.com/immortalwrt/luci.git;openwrt-21.02 +src-git-full routing https://github.com/openwrt/routing.git;openwrt-21.02 +src-git-full telephony https://github.com/openwrt/telephony.git;openwrt-21.02 diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 0de062bd83..3e358ec6ac 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -18,12 +18,14 @@ alfa-network,awusfree1|\ alfa-network,quad-e4g|\ alfa-network,r36m-e4g|\ alfa-network,tube-e4g|\ -engenius,esr600h) +engenius,esr600h|\ +sitecom,wlr-4100-v1-002) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000" ;; allnet,all0256n-4m|\ allnet,all0256n-8m|\ -allnet,all5002) +allnet,all5002|\ +yuncore,ax820) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" ;; ampedwireless,ally-00x19k|\ diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 4c1da550c7..f868c5c9dd 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -310,6 +310,12 @@ define U-Boot/Bananapi_M2_Ultra BUILD_DEVICES:=sinovoip_bananapi-m2-ultra endef +define U-Boot/bananapi_m2_berry + BUILD_SUBTARGET:=cortexa7 + NAME:=Bananapi M2 Berry + BUILD_DEVICES:=sinovoip_bananapi-m2-berry +endef + UBOOT_TARGETS := \ a64-olinuxino \ a64-olinuxino-emmc \ @@ -321,6 +327,7 @@ UBOOT_TARGETS := \ A20-OLinuXino_MICRO \ bananapi_m2_plus_h3 \ Bananapi \ + bananapi_m2_berry \ Bananapi_M2_Ultra \ Bananapro \ Cubieboard \ diff --git a/package/kernel/mt76/patches/101-fix-encap-offload-ethernet-type-check.patch b/package/kernel/mt76/patches/101-fix-encap-offload-ethernet-type-check.patch new file mode 100644 index 0000000000..d81aa4dfa3 --- /dev/null +++ b/package/kernel/mt76/patches/101-fix-encap-offload-ethernet-type-check.patch @@ -0,0 +1,63 @@ +From: Felix Fietkau +To: linux-wireless@vger.kernel.org +Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= +Subject: [PATCH] mt76: fix encap offload ethernet type check +Date: Wed, 20 Apr 2022 14:33:08 +0200 +Message-Id: <20220420123308.70104-1-nbd@nbd.name> + +The driver needs to check if the format is 802.2 vs 802.3 in order to set +a tx descriptor flag. skb->protocol can't be used, since it may not be properly +initialized for packets coming in from a packet socket. +Fix misdetection by checking the ethertype from the skb data instead + +Reported-by: Thibaut VARĂˆNE +Signed-off-by: Felix Fietkau +--- + drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 4 +++- + drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +index 5f4a0e811137..e353e8c44d6c 100644 +--- a/mt7915/mac.c ++++ b/mt7915/mac.c +@@ -1016,6 +1016,7 @@ mt7915_mac_write_txwi_8023(struct mt7915_dev *dev, __le32 *txwi, + + u8 tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK; + u8 fc_type, fc_stype; ++ u16 ethertype; + bool wmm = false; + u32 val; + +@@ -1029,7 +1030,8 @@ mt7915_mac_write_txwi_8023(struct mt7915_dev *dev, __le32 *txwi, + val = FIELD_PREP(MT_TXD1_HDR_FORMAT, MT_HDR_FORMAT_802_3) | + FIELD_PREP(MT_TXD1_TID, tid); + +- if (be16_to_cpu(skb->protocol) >= ETH_P_802_3_MIN) ++ ethertype = get_unaligned_be16(&skb->data[12]); ++ if (ethertype >= ETH_P_802_3_MIN) + val |= MT_TXD1_ETH_802_3; + + txwi[1] |= cpu_to_le32(val); +diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c +index 368e54c53ddd..ac11e8b28f13 100644 +--- a/mt7921/mac.c ++++ b/mt7921/mac.c +@@ -814,6 +814,7 @@ mt7921_mac_write_txwi_8023(struct mt7921_dev *dev, __le32 *txwi, + { + u8 tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK; + u8 fc_type, fc_stype; ++ u16 ethertype; + bool wmm = false; + u32 val; + +@@ -827,7 +828,8 @@ mt7921_mac_write_txwi_8023(struct mt7921_dev *dev, __le32 *txwi, + val = FIELD_PREP(MT_TXD1_HDR_FORMAT, MT_HDR_FORMAT_802_3) | + FIELD_PREP(MT_TXD1_TID, tid); + +- if (be16_to_cpu(skb->protocol) >= ETH_P_802_3_MIN) ++ ethertype = get_unaligned_be16(&skb->data[12]); ++ if (ethertype >= ETH_P_802_3_MIN) + val |= MT_TXD1_ETH_802_3; + + txwi[1] |= cpu_to_le32(val); diff --git a/package/libs/uclibc++/patches/006-buildsys-shorten-abi-deb-file-names.patch b/package/libs/uclibc++/patches/006-buildsys-shorten-abi-deb-file-names.patch new file mode 100644 index 0000000000..8a4677c709 --- /dev/null +++ b/package/libs/uclibc++/patches/006-buildsys-shorten-abi-deb-file-names.patch @@ -0,0 +1,86 @@ +From 6687fc9276fa52defaf8592f2001c19b826aec93 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Thu, 4 Jun 2020 10:21:43 +0200 +Subject: buildsys: shorten abi dep-file names + +certain crypto-layers encode required information in the +filename hence crippling NAME_MAX from 255 down to about 143 +ascii chars. + +Since the dependency files of libgcc_eh and libsupc encode the full +path to the corresponding libraries, the names of the dep files can +get quite large. Shorten them by some (arbitrary, short) hash. + +Signed-off-by: Bernhard Reutner-Fischer +--- + Rules.mak | 2 ++ + src/abi/libgcc_eh/Makefile.in | 4 ++-- + src/abi/libsupc/Makefile.in | 4 ++-- + 3 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/Rules.mak b/Rules.mak +index 1b5ed30..9162c64 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -50,6 +50,7 @@ RM = rm -f + TAR = tar + SED = sed + AWK = awk ++MD5SUM = md5sum + + ARFLAGS:= cr + +@@ -249,6 +250,7 @@ endif + + list-archive-members = $(if $(1),$(shell $(AR) t $(1))) + variablify = $(strip $(subst /,_,$(subst :,_,$(subst ;,_,$(subst |,_,$(subst >,_,$(subst <,_,$(1)))))))) ++print-hash = $(strip $(if $(1),$(shell printf "%s" "$(1)" | $(MD5SUM) | $(SED) 's/[^0-9a-zA-Z]//g'))) + + GEN_LIBS:= -lc + ifneq ($(LIBGCC_DIR),$(UCLIBCXX_RUNTIME_LIBDIR)) +diff --git a/src/abi/libgcc_eh/Makefile.in b/src/abi/libgcc_eh/Makefile.in +index 46b0017..1553b34 100644 +--- a/src/abi/libgcc_eh/Makefile.in ++++ b/src/abi/libgcc_eh/Makefile.in +@@ -4,7 +4,7 @@ OBJS = $(call list-archive-members,$(LIBGCC_EH)) + libgcc_eh-$(IMPORT_LIBGCC_EH) := $(OBJS) + + LIBGCC_EH_VAR := $(call variablify,$(LIBGCC_EH)) +-LIBGCC_EH_DEP := $(LIBGCC_EH_OUT).$(LIBGCC_EH_VAR).dep ++LIBGCC_EH_DEP := $(LIBGCC_EH_OUT).$(call print-hash,$(LIBGCC_EH_VAR)).dep + + ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) + -include $(LIBGCC_EH_DEP) +@@ -17,7 +17,7 @@ endif + $(LIBGCC_EH_DEP): $(LIBGCC_EH) + $(Q)$(RM) $(LIBGCC_EH_OUT).*dep $(LIBGCC_EH_OUT)*.o + $(Q)$(if $(LIBGCC_EH),(cd $(LIBGCC_EH_OUT) && $(AR) x $(LIBGCC_EH))) +- $(Q)echo "libgcc_eh-y := \$$(addprefix \$$(LIBGCC_EH_OUT),$(libgcc_eh-y))" > $@ ++ $(Q)printf "# %s\n\n%s\n" "$(LIBGCC_EH)" "libgcc_eh-y := \$$(addprefix \$$(LIBGCC_EH_OUT),$(libgcc_eh-y))" > $@ + + CLEAN_src/abi/libgcc_eh: ; + DISTCLEAN_src/abi/libgcc_eh: +diff --git a/src/abi/libsupc/Makefile.in b/src/abi/libsupc/Makefile.in +index 89e0e8a..9c00df0 100644 +--- a/src/abi/libsupc/Makefile.in ++++ b/src/abi/libsupc/Makefile.in +@@ -5,7 +5,7 @@ OBJS-OMIT = $(filter new_op%.o del_op%.o pure.o new_handler.o eh_alloc.o eh_glob + libsupc-$(IMPORT_LIBSUP) := $(filter-out $(OBJS-OMIT),$(OBJS)) + + LIBSUP_VAR := $(call variablify,$(LIBSUP)) +-LIBSUP_DEP :=$(LIBSUPC_OUT).$(LIBSUP_VAR).dep ++LIBSUP_DEP := $(LIBSUPC_OUT).$(call print-hash,$(LIBSUP_VAR)).dep + + ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) + -include $(LIBSUP_DEP) +@@ -17,7 +17,7 @@ endif + $(LIBSUP_DEP): $(LIBSUP) $(LIBSUPC_OUT)Makefile.in + $(Q)$(RM) $(LIBSUPC_OUT).*dep $(LIBSUPC_OUT)*.o + $(Q)$(if $(LIBSUP),(cd $(LIBSUPC_OUT) && $(AR) x $(LIBSUP) && $(RM) $(OBJS-OMIT))) +- $(Q)echo "libsupc-y := \$$(addprefix \$$(LIBSUPC_OUT),$(libsupc-y))" > $@ ++ $(Q)printf "# %s\n\n%s\n" "$(LIBSUP)" "libsupc-y := \$$(addprefix \$$(LIBSUPC_OUT),$(libsupc-y))" > $@ + + CLEAN_src/abi/libsupc: ; + DISTCLEAN_src/abi/libsupc: +-- +cgit v1.2.3 diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index db4d7f0189..d8fdec3d24 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -441,7 +441,7 @@ { u8 dialog_token, status_code, bss_termination_delay; - const u8 *pos, *end; -+ const u8 *pos, *end, *target_bssid; ++ const u8 *pos, *end, *target_bssid = NULL; int enabled = hapd->conf->bss_transition; struct sta_info *sta; diff --git a/scripts/feeds b/scripts/feeds index eee0a50717..499354391b 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -167,8 +167,8 @@ my %update_method = ( 'init' => "git clone '%s' '%s'", 'init_branch' => "git clone --branch '%s' '%s' '%s'", 'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -", - 'update' => "git pull --ff", - 'update_force' => "git pull --ff || (git reset --hard HEAD; git pull --ff; exit 1)", + 'update' => "git pull --ff-only", + 'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)", 'post_update' => "git submodule update --init --recursive", 'controldir' => ".git", 'revision' => "git rev-parse --short HEAD | tr -d '\n'"}, diff --git a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-952ui-5ac2nd.dts b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-952ui-5ac2nd.dts new file mode 100644 index 0000000000..b32d38a697 --- /dev/null +++ b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-952ui-5ac2nd.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9533_mikrotik_routerboard-95x.dtsi" + +/ { + compatible = "mikrotik,routerboard-952ui-5ac2nd", "qca,qca9533"; + model = "MikroTik RouterBOARD 952Ui-5ac2nD (hAP ac lite)"; +}; + +&pcie0 { + status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0 0 0 0 0>; + }; +}; + diff --git a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-95x.dtsi b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-95x.dtsi new file mode 100644 index 0000000000..79c9f44d32 --- /dev/null +++ b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-95x.dtsi @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9533_mikrotik_routerboard-16m.dtsi" + +/ { + aliases { + led-boot = &led_user; + led-failsafe = &led_user; + led-running = &led_user; + led-upgrade = &led_user; + }; + + leds { + compatible = "gpio-leds"; + + led_user: user { + label = "green:user"; + gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; + }; + + port1 { + label = "green:port1"; + gpios = <&gpio_ext 0 GPIO_ACTIVE_LOW>; + }; + + port2 { + label = "green:port2"; + gpios = <&gpio_ext 1 GPIO_ACTIVE_LOW>; + }; + + port3 { + label = "green:port3"; + gpios = <&gpio_ext 2 GPIO_ACTIVE_LOW>; + }; + + port4 { + label = "green:port4"; + gpios = <&gpio_ext 3 GPIO_ACTIVE_LOW>; + }; + + port5 { + label = "green:port5"; + gpios = <&gpio_ext 4 GPIO_ACTIVE_LOW>; + }; + + }; + + gpio-export { + compatible = "gpio-export"; + + usb_power { + gpio-export,name = "usb-power"; + gpio-export,output = <1>; + gpios = <&gpio_ext 5 GPIO_ACTIVE_LOW>; + }; + + enable_poe_port5 { + gpio-export,name = "enable-poe:port5"; + gpio-export,output = <0>; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&spi { + pinctrl-names = "default"; + pinctrl-0 = <&pin_spi_cs1>; + + gpio_ext: gpio_ext@1 { + compatible = "fairchild,74hc595"; + reg = <1>; + gpio-controller; + #gpio-cells = <2>; + registers-number = <1>; + spi-max-frequency = <25000000>; + }; +}; + + +&pinmux { + pin_spi_cs1: pinmux_spi_cs1 { + pinctrl-single,bits = <0x8 0x0a000000 0xff000000>; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy4>; +}; + +&usb0 { + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-map-2nd.dts b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-map-2nd.dts new file mode 100644 index 0000000000..25971e6f43 --- /dev/null +++ b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-map-2nd.dts @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9533_mikrotik_routerboard-16m.dtsi" + +/ { + compatible = "mikrotik,routerboard-map-2nd", "qca,qca9533"; + model = "MikroTik RouterBOARD mAP-2nD (mAP)"; + + aliases { + led-boot = &led_user; + led-failsafe = &led_user; + led-running = &led_user; + led-upgrade = &led_user; + }; + + leds { + compatible = "gpio-leds"; + + power { + label = "green:power"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + eth_1 { + label = "green:eth_1"; + gpios = <&gpio_ext 0 GPIO_ACTIVE_LOW>; + }; + + eth_2 { + label = "green:eth_2"; + gpios = <&gpio_ext 1 GPIO_ACTIVE_LOW>; + }; + + poe_out { + label = "red:poe_out"; + gpios = <&gpio_ext 2 GPIO_ACTIVE_LOW>; + }; + + led_user: user { + label = "green:user"; + gpios = <&gpio_ext 3 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "green:wlan"; + gpios = <&gpio_ext 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + ap_cap { + label = "green:ap_cap"; + gpios = <&gpio_ext 6 GPIO_ACTIVE_LOW>; + }; + + }; + + gpio-export { + compatible = "gpio-export"; + + usb_power { + gpio-export,name = "usb-power"; + gpio-export,output = <1>; + gpios = <&gpio_ext 5 GPIO_ACTIVE_LOW>; + }; + + enable_poe_port5 { + gpio-export,name = "enable-poe"; + gpio-export,output = <0>; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&spi { + pinctrl-names = "default"; + pinctrl-0 = <&pin_spi_cs1>; + + gpio_ext: gpio_ext@1 { + compatible = "fairchild,74hc595"; + reg = <1>; + gpio-controller; + #gpio-cells = <2>; + registers-number = <1>; + spi-max-frequency = <25000000>; + }; +}; + + +&pinmux { + pin_spi_cs1: pinmux_spi_cs1 { + pinctrl-single,bits = <0x8 0x0a000000 0xff000000>; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy0>; + + gmac-config { + device = <&gmac>; + switch-phy-swap = <1>; + }; +}; + +&usb0 { + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; diff --git a/target/linux/ath79/image/mikrotik.mk b/target/linux/ath79/image/mikrotik.mk index b2c7000419..08759f98ad 100644 --- a/target/linux/ath79/image/mikrotik.mk +++ b/target/linux/ath79/image/mikrotik.mk @@ -37,6 +37,16 @@ define Device/mikrotik_routerboard-922uags-5hpacd endef TARGET_DEVICES += mikrotik_routerboard-922uags-5hpacd +define Device/mikrotik_routerboard-952ui-5ac2nd + $(Device/mikrotik_nor) + SOC := qca9533 + DEVICE_MODEL := RouterBOARD 952Ui-5ac2nD (hAP ac lite) + DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct + IMAGE_SIZE := 16256k + SUPPORTED_DEVICES += rb-952ui-5ac2nd +endef +TARGET_DEVICES += mikrotik_routerboard-952ui-5ac2nd + define Device/mikrotik_routerboard-lhg-2nd $(Device/mikrotik_nor) SOC := qca9533 @@ -45,6 +55,15 @@ define Device/mikrotik_routerboard-lhg-2nd endef TARGET_DEVICES += mikrotik_routerboard-lhg-2nd +define Device/mikrotik_routerboard-map-2nd + $(Device/mikrotik_nor) + SOC := qca9533 + DEVICE_MODEL := RouterBOARD mAP-2nD (mAP) + DEVICE_PACKAGES += kmod-usb2 kmod-ledtrig-gpio + IMAGE_SIZE := 16256k +endef +TARGET_DEVICES += mikrotik_routerboard-map-2nd + define Device/mikrotik_routerboard-mapl-2nd $(Device/mikrotik_nor) SOC := qca9533 diff --git a/target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds b/target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds index e95c5830e2..9f42a09a2e 100755 --- a/target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds @@ -7,10 +7,22 @@ board_config_update board=$(board_name) case "$board" in +mikrotik,routerboard-952ui-5ac2nd) + ucidef_set_led_netdev "port1" "port1" "green:port1" "eth1" + ucidef_set_led_switch "port2" "port2" "green:port2" "switch0" "0x10" + ucidef_set_led_switch "port3" "port3" "green:port3" "switch0" "0x08" + ucidef_set_led_switch "port4" "port4" "green:port4" "switch0" "0x04" + ucidef_set_led_switch "port5" "port5" "green:port5" "switch0" "0x02" + ;; mikrotik,routerboard-lhg-2nd|\ mikrotik,routerboard-mapl-2nd) ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" ;; +mikrotik,routerboard-map-2nd) + ucidef_set_led_netdev "eth_1" "eth_1" "green:eth_1" "eth1" + ucidef_set_led_switch "eth_2" "eth_2" "green:eth_2" "switch0" "0x4" + ucidef_set_led_gpio "poe" "poe" "red:poe_out" "14" "0" + ;; mikrotik,routerboard-wapr-2nd) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_led_rssi "rssilow" "rssilow" "green:rssilow" "wlan0" "1" "100" diff --git a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network index bf8b9bdac2..e14db83ed1 100755 --- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network +++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network @@ -24,6 +24,14 @@ ath79_setup_interfaces() mikrotik,routerboard-wapr-2nd) ucidef_set_interface_lan "eth0" ;; + mikrotik,routerboard-952ui-5ac2nd) + ucidef_set_interface_wan "eth1" + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" + ;; + mikrotik,routerboard-map-2nd) + ucidef_set_interface_lan "eth0 eth1" + ;; *) ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; @@ -42,6 +50,7 @@ ath79_setup_macs() mikrotik,routerboard-912uag-2hpnd|\ mikrotik,routerboard-921gs-5hpacd-15s|\ mikrotik,routerboard-lhg-2nd|\ + mikrotik,routerboard-map-2nd|\ mikrotik,routerboard-mapl-2nd|\ mikrotik,routerboard-sxt-5nd-r2|\ mikrotik,routerboard-wap-g-5hact2hnd|\ diff --git a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index eca25b69de..9d921de839 100644 --- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -29,10 +29,16 @@ case "$FIRMWARE" in mikrotik,routerboard-wapr-2nd) caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" +1) ;; + mikrotik,routerboard-map-2nd) + caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 3) + ;; mikrotik,routerboard-mapl-2nd|\ mikrotik,routerboard-wap-g-5hact2hnd) caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" +2) ;; + mikrotik,routerboard-952ui-5ac2nd) + caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 6) + ;; *) caldata_die "board $board is not supported yet" ;; diff --git a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 31d4eeedbc..0242f52644 100644 --- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -12,6 +12,7 @@ case "$FIRMWARE" in "ath10k/cal-pci-0000:00:00.0.bin") case $board in mikrotik,routerboard-921gs-5hpacd-15s|\ + mikrotik,routerboard-952ui-5ac2nd|\ mikrotik,routerboard-wap-g-5hact2hnd) caldata_sysfsload_from_file $wlan_data 0x5000 0x844 ;; 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 03904f01e6..29ec63bb50 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -60,12 +60,16 @@ ipq40xx_setup_interfaces() ;; avm,fritzbox-4040|\ linksys,ea6350v3|\ - linksys,ea8300|\ - linksys,mr8300) + linksys,ea8300) ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" ;; + linksys,mr8300) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" + ;; avm,fritzbox-7530) ucidef_add_switch "switch0" \ "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" diff --git a/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts b/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts new file mode 100644 index 0000000000..3b260c5b8d --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts @@ -0,0 +1,186 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "sitecom,wlr-4100-v1-002", "ralink,mt7620a-soc"; + model = "Sitecom WLR-4100 v1 002"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "amber:power"; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + wifi { + label = "blue:wifi"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wps { + label = "white:wps"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + usb-power { + gpio-export,name = "usb-power"; + gpio-export,output = <1>; + gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <20000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "uboot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x790000>; + }; + + partition@7e0000 { + label = "backup"; + reg = <0x7e0000 0x10000>; + read-only; + }; + + partition@7f0000 { + label = "storage"; + reg = <0x7f0000 0x10000>; + read-only; + }; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &mdio_pins>; + + mtd-mac-address = <&factory 0x4>; + + port@5 { + status = "okay"; + + phy-mode = "rgmii"; + mediatek,fixed-link = <1000 1 1 1>; + }; + + mdio-bus { + status = "okay"; + + ethernet-phy@0 { + reg = <0>; + phy-mode = "rgmii"; + + qca,ar8327-initvals = < + 0x04 0x06200000 /* PORT0 PAD MODE CTRL */ + 0x08 0x01000000 /* PORT5 PAD MODE CTRL RX delay EN all ports 0, 5, 6 */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x00000000 /* PORT6_STATUS */ + >; + }; + }; +}; + +&gsw { + mediatek,ephy-base = /bits/ 8 <8>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&wmac { + status = "okay"; + + ralink,mtd-eeprom = <&factory 0x0>; +}; + +&state_default { + gpio { + groups = "uartf", "i2c", "wled", "spi refclk"; + function = "gpio"; + }; +}; + diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts new file mode 100644 index 0000000000..9775ec3572 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "yuncore,ax820", "mediatek,mt7621-soc"; + model = "YunCore AX820"; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_green; + led-running = &led_status_green; + led-upgrade = &led_status_green; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: status_green { + label = "green:status"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; + + watchdog { + compatible = "linux,wdt-gpio"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + hw_algo = "toggle"; + hw_margin_ms = <200>; + always-running; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <80000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "Config"; + reg = <0x30000 0x10000>; + read-only; + }; + + /* range 0x40000 to 0x50000 is empty in vendor + * firmware, so we do not use it either + */ + + factory: partition@50000 { + label = "Factory"; + reg = <0x50000 0x40000>; + read-only; + }; + + partition@90000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x90000 0xf70000>; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0xe000>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe000>; + mtd-mac-address-increment = <1>; + }; + + port@1 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&state_default { + gpio { + groups = "jtag", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index dba413cf2a..4b7220bf5c 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -975,6 +975,20 @@ define Device/sercomm_na930 endef TARGET_DEVICES += sercomm_na930 +define Device/sitecom_wlr-4100-v1-002 + SOC := mt7620a + BLOCKSIZE := 4k + IMAGE_SIZE := 7744k + IMAGES += factory.dlf + IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size | \ + senao-header -r 0x0222 -p 0x104A -t 2 + DEVICE_VENDOR := Sitecom + DEVICE_MODEL := WLR-4100 + DEVICE_VARIANT := v1 002 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci uboot-envtools +endef +TARGET_DEVICES += sitecom_wlr-4100-v1-002 + define Device/tplink_archer-c20i $(Device/tplink-v2) SOC := mt7620a diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 9b56f3709e..c871ccbc46 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1577,6 +1577,15 @@ define Device/youku_yk-l2 endef TARGET_DEVICES += youku_yk-l2 +define Device/yuncore_ax820 + $(Device/dsa-migration) + IMAGE_SIZE := 15808k + DEVICE_VENDOR := YunCore + DEVICE_MODEL := AX820 + DEVICE_PACKAGES := kmod-mt7915e +endef +TARGET_DEVICES += yuncore_ax820 + define Device/zbtlink_zbt-we1326 $(Device/dsa-migration) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index e867b58aed..07b17a9daf 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -134,7 +134,8 @@ ramips_setup_interfaces() ucidef_add_switch "switch1" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" ;; - engenius,esr600) + engenius,esr600|\ + sitecom,wlr-4100-v1-002) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "0@eth0" ucidef_add_switch "switch1" \ diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 46a4359363..5c6c20b2c0 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -69,6 +69,7 @@ ramips_setup_interfaces() ubnt,edgerouter-x-sfp) ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0" ;; + yuncore,ax820|\ zyxel,nr7101) ucidef_set_interfaces_lan_wan "lan" "wan" ;; @@ -164,6 +165,9 @@ ramips_setup_macs() wan_mac=$label_mac lan_mac=$(macaddr_add $label_mac 1) ;; + yuncore,ax820) + label_mac=$(mtd_get_mac_binary Factory 0x4) + ;; esac [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index dd5be54eea..eaf65d2320 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -33,4 +33,8 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress ;; + yuncore,ax820) + [ "$PHYNBR" = "1" ] && \ + macaddr_setbit_la "$(mtd_get_mac_binary Factory 0xe000)" > /sys${DEVPATH}/macaddress + ;; esac diff --git a/target/linux/sunxi/image/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk index 86a9fe392a..df780b0a8e 100644 --- a/target/linux/sunxi/image/cortexa7.mk +++ b/target/linux/sunxi/image/cortexa7.mk @@ -77,6 +77,16 @@ define Device/lemaker_bananapi endef TARGET_DEVICES += lemaker_bananapi +define Device/sinovoip_bananapi-m2-berry + DEVICE_VENDOR := Sinovoip + DEVICE_MODEL := Banana Pi M2 Berry + DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-sunxi kmod-brcmfmac \ + brcmfmac-firmware-43430-sdio wpad-basic-openssl + SUPPORTED_DEVICES:=lemaker,bananapi-m2-berry + SOC := sun8i-v40 +endef +TARGET_DEVICES += sinovoip_bananapi-m2-berry + define Device/sinovoip_bananapi-m2-ultra DEVICE_VENDOR := Sinovoip DEVICE_MODEL := Banana Pi M2 Ultra diff --git a/tools/libelf/patches/100-linux-musl.patch b/tools/libelf/patches/100-linux-musl.patch new file mode 100644 index 0000000000..538eccd839 --- /dev/null +++ b/tools/libelf/patches/100-linux-musl.patch @@ -0,0 +1,11 @@ +--- a/config.sub 2022-01-29 02:09:42.943549003 +0000 ++++ b/config.sub 2022-01-29 02:04:23.172378567 +0000 +@@ -118,7 +118,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | linux-musl | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`