From 121c021989929c33036cc75ab9a8363200e8da0c Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 7 Aug 2020 11:56:43 +0200 Subject: [PATCH 01/20] ramips: invert wpad selection for mt7621 For ramips/mt7621, the wpad-basic package is not selected by default, but added for every device individually as needed. While this might be technically correct if the SoC does not come with a Wifi module, only 18 of 97 devices for that platform are set up _without_ wpad-basic currently. Therefore, it seems more convenient to add wpad-basic by default for the subtarget and then just remove it for the 18 mentioned devices, instead of having to add it for about 60 times instead. This would also match the behavior of the 5 other subtargets, where wpad-basic/wpad-mini is added by default as well, and thus be more obvious to developers without detailed SoC knowledge. Signed-off-by: Adrian Schmutzler --- target/linux/ramips/image/mt7621.mk | 167 ++++++++++++++------------- target/linux/ramips/mt7621/target.mk | 2 + 2 files changed, 89 insertions(+), 80 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index d296e389a4..7050b90cbb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -109,7 +109,7 @@ define Device/adslr_g7 IMAGE_SIZE := 16064k DEVICE_VENDOR := ADSLR DEVICE_MODEL := G7 - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += adslr_g7 @@ -118,7 +118,7 @@ define Device/afoundry_ew1200 DEVICE_VENDOR := AFOUNDRY DEVICE_MODEL := EW1200 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += ew1200 endef TARGET_DEVICES += afoundry_ew1200 @@ -127,7 +127,8 @@ define Device/alfa-network_quad-e4g IMAGE_SIZE := 16064k DEVICE_VENDOR := ALFA Network DEVICE_MODEL := Quad-E4G - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools \ + -wpad-basic endef TARGET_DEVICES += alfa-network_quad-e4g @@ -135,7 +136,7 @@ define Device/asiarf_ap7621-001 IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-001 - DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 + DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic endef TARGET_DEVICES += asiarf_ap7621-001 @@ -143,7 +144,7 @@ define Device/asiarf_ap7621-nv1 IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-NV1 - DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 + DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic endef TARGET_DEVICES += asiarf_ap7621-nv1 @@ -152,7 +153,7 @@ define Device/asus_rt-ac57u DEVICE_MODEL := RT-AC57U IMAGE_SIZE := 16064k DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += asus_rt-ac57u @@ -168,7 +169,7 @@ define Device/asus_rt-ac65p IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware wpad-basic uboot-envtools + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools endef TARGET_DEVICES += asus_rt-ac65p @@ -184,7 +185,7 @@ define Device/asus_rt-ac85p IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware wpad-basic uboot-envtools + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools endef TARGET_DEVICES += asus_rt-ac85p @@ -194,7 +195,7 @@ define Device/buffalo_wsr-1166dhp IMAGE_SIZE := 15936k DEVICE_VENDOR := Buffalo DEVICE_MODEL := WSR-1166DHP - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 SUPPORTED_DEVICES += wsr-1166 endef TARGET_DEVICES += buffalo_wsr-1166dhp @@ -207,7 +208,7 @@ define Device/buffalo_wsr-2533dhpl DEVICE_ALT0_VENDOR := Buffalo DEVICE_ALT0_MODEL := WSR-2533DHP IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += buffalo_wsr-2533dhpl @@ -215,7 +216,7 @@ define Device/buffalo_wsr-600dhp IMAGE_SIZE := 16064k DEVICE_VENDOR := Buffalo DEVICE_MODEL := WSR-600DHP - DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci SUPPORTED_DEVICES += wsr-600 endef TARGET_DEVICES += buffalo_wsr-600dhp @@ -223,7 +224,7 @@ TARGET_DEVICES += buffalo_wsr-600dhp define Device/dlink_dir-8xx-a1 IMAGE_SIZE := 16000k DEVICE_VENDOR := D-Link - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr 96 IMAGES += factory.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\ @@ -239,8 +240,8 @@ define Device/dlink_dir-xx60-a1 IMAGE_SIZE := 40960k UBINIZE_OPTS := -E 5 DEVICE_VENDOR := D-Link - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic \ - kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \ + kmod-usb-ledtrig-usbport KERNEL := $$(KERNEL) | uimage-padhdr 96 IMAGES += factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata @@ -266,7 +267,7 @@ define Device/dlink_dir-860l-b1 DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-860L DEVICE_VARIANT := B1 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += dir-860l-b1 endef TARGET_DEVICES += dlink_dir-860l-b1 @@ -299,7 +300,7 @@ define Device/d-team_newifi-d2 DEVICE_VENDOR := Newifi DEVICE_MODEL := D2 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += d-team_newifi-d2 @@ -308,7 +309,7 @@ define Device/d-team_pbr-m1 DEVICE_VENDOR := PandoraBox DEVICE_MODEL := PBR-M1 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ - kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + kmod-usb3 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += pbr-m1 endef TARGET_DEVICES += d-team_pbr-m1 @@ -323,7 +324,7 @@ define Device/edimax_ra21s IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 02020040 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += edimax_ra21s @@ -341,7 +342,7 @@ define Device/edimax_re23s IMAGE/factory.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \ check-size - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += edimax_re23s @@ -353,7 +354,7 @@ define Device/edimax_rg21s IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 02020038 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += edimax_rg21s @@ -364,7 +365,7 @@ define Device/elecom_wrc-1167ghbk2-s IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-wrc-factory WRC-1167GHBK2-S 0.00 - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += elecom_wrc-1167ghbk2-s @@ -374,7 +375,7 @@ define Device/elecom_wrc-gs IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00 - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef define Device/elecom_wrc-1750gs @@ -421,7 +422,7 @@ define Device/firefly_firewrt IMAGE_SIZE := 16064k DEVICE_VENDOR := Firefly DEVICE_MODEL := FireWRT - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += firewrt endef TARGET_DEVICES += firefly_firewrt @@ -431,14 +432,14 @@ define Device/gehua_ghl-r-001 DEVICE_VENDOR := GeHua DEVICE_MODEL := GHL-R-001 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += gehua_ghl-r-001 define Device/gnubee_gb-pc1 DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud One - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic IMAGE_SIZE := 32448k endef TARGET_DEVICES += gnubee_gb-pc1 @@ -446,7 +447,7 @@ TARGET_DEVICES += gnubee_gb-pc1 define Device/gnubee_gb-pc2 DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud Two - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic IMAGE_SIZE := 32448k endef TARGET_DEVICES += gnubee_gb-pc2 @@ -463,7 +464,7 @@ define Device/hiwifi_hc5962 check-size DEVICE_VENDOR := HiWiFi DEVICE_MODEL := HC5962 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 endef TARGET_DEVICES += hiwifi_hc5962 @@ -474,7 +475,7 @@ define Device/iodata_wn-ax1167gr iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin DEVICE_VENDOR := I-O DATA DEVICE_MODEL := WN-AX1167GR - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 endef TARGET_DEVICES += iodata_wn-ax1167gr @@ -496,7 +497,7 @@ define Device/iodata_wn-ax1167gr2 DEVICE_MODEL := WN-AX1167GR2 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ custom-initramfs-uimage 3.10(XBC.1)b10 | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += iodata_wn-ax1167gr2 @@ -506,7 +507,7 @@ define Device/iodata_wn-ax2033gr DEVICE_MODEL := WN-AX2033GR KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ custom-initramfs-uimage 3.10(VST.1)C10 | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += iodata_wn-ax2033gr @@ -516,7 +517,7 @@ define Device/iodata_wn-dx1167r DEVICE_MODEL := WN-DX1167R KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ custom-initramfs-uimage 3.10(XIK.1)b10 | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += iodata_wn-dx1167r @@ -525,7 +526,7 @@ define Device/iodata_wn-gx300gr IMAGE_SIZE := 7616k DEVICE_VENDOR := I-O DATA DEVICE_MODEL := WN-GX300GR - DEVICE_PACKAGES := kmod-mt7603 wpad-basic + DEVICE_PACKAGES := kmod-mt7603 endef TARGET_DEVICES += iodata_wn-gx300gr @@ -537,7 +538,7 @@ define Device/iodata_wnpr2600g IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 0104003a 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += iodata_wnpr2600g @@ -546,7 +547,8 @@ define Device/iptime_a6ns-m UIMAGE_NAME := a6nm DEVICE_VENDOR := ipTIME DEVICE_MODEL := A6ns-M - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \ + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += iptime_a6ns-m @@ -555,7 +557,7 @@ define Device/iptime_a8004t UIMAGE_NAME := a8004t DEVICE_VENDOR := ipTIME DEVICE_MODEL := A8004T - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 endef TARGET_DEVICES += iptime_a8004t @@ -566,7 +568,8 @@ define Device/jcg_jhr-ac876m JCG_MAXSIZE := 16064k DEVICE_VENDOR := JCG DEVICE_MODEL := JHR-AC876M - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \ + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += jcg_jhr-ac876m @@ -576,7 +579,7 @@ define Device/lenovo_newifi-d1 DEVICE_VENDOR := Newifi DEVICE_MODEL := D1 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += newifi-d1 endef TARGET_DEVICES += lenovo_newifi-d1 @@ -588,7 +591,7 @@ define Device/linksys_ea7xxx KERNEL_SIZE := 4096k IMAGE_SIZE := 36864k DEVICE_VENDOR := Linksys - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware wpad-basic \ + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware \ uboot-envtools UBINIZE_OPTS := -E 5 IMAGES := sysupgrade.bin factory.bin @@ -617,7 +620,7 @@ define Device/linksys_re6500 IMAGE_SIZE := 7872k DEVICE_VENDOR := Linksys DEVICE_MODEL := RE6500 - DEVICE_PACKAGES := kmod-mt76x2 wpad-basic + DEVICE_PACKAGES := kmod-mt76x2 SUPPORTED_DEVICES += re6500 endef TARGET_DEVICES += linksys_re6500 @@ -626,7 +629,7 @@ define Device/mediatek_ap-mt7621a-v60 IMAGE_SIZE := 7872k DEVICE_VENDOR := Mediatek DEVICE_MODEL := AP-MT7621A-V60 EVB - DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 + DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 -wpad-basic endef TARGET_DEVICES += mediatek_ap-mt7621a-v60 @@ -635,6 +638,7 @@ define Device/mediatek_mt7621-eval-board IMAGE_SIZE := 15104k DEVICE_VENDOR := MediaTek DEVICE_MODEL := MT7621 EVB + DEVICE_PACKAGES := -wpad-basic SUPPORTED_DEVICES += mt7621 endef TARGET_DEVICES += mediatek_mt7621-eval-board @@ -654,7 +658,7 @@ endef define Device/mikrotik_routerboard-750gr3 $(Device/MikroTik) DEVICE_MODEL := RouterBOARD 750Gr3 - DEVICE_PACKAGES += kmod-gpio-beeper + DEVICE_PACKAGES += kmod-gpio-beeper -wpad-basic SUPPORTED_DEVICES += mikrotik,rb750gr3 endef TARGET_DEVICES += mikrotik_routerboard-750gr3 @@ -662,6 +666,7 @@ TARGET_DEVICES += mikrotik_routerboard-750gr3 define Device/mikrotik_routerboard-m11g $(Device/MikroTik) DEVICE_MODEL := RouterBOARD M11G + DEVICE_PACKAGES := -wpad-basic SUPPORTED_DEVICES += mikrotik,rbm11g endef TARGET_DEVICES += mikrotik_routerboard-m11g @@ -669,6 +674,7 @@ TARGET_DEVICES += mikrotik_routerboard-m11g define Device/mikrotik_routerboard-m33g $(Device/MikroTik) DEVICE_MODEL := RouterBOARD M33G + DEVICE_PACKAGES := -wpad-basic SUPPORTED_DEVICES += mikrotik,rbm33g endef TARGET_DEVICES += mikrotik_routerboard-m33g @@ -678,7 +684,7 @@ define Device/mqmaker_witi DEVICE_VENDOR := MQmaker DEVICE_MODEL := WiTi DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m endef TARGET_DEVICES += mqmaker_witi @@ -689,14 +695,14 @@ define Device/mtc_wr1201 DEVICE_MODEL := Wireless Router WR1201 KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage WR1201_8_128 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += mtc_wr1201 define Device/netgear_ex6150 DEVICE_VENDOR := NETGEAR DEVICE_MODEL := EX6150 - DEVICE_PACKAGES := kmod-mt76x2 wpad-basic + DEVICE_PACKAGES := kmod-mt76x2 NETGEAR_BOARD_ID := U12H318T00_NETGEAR IMAGE_SIZE := 14848k IMAGES += factory.chk @@ -718,7 +724,7 @@ define Device/netgear_sercomm_nand IMAGE/kernel.bin := append-kernel IMAGE/rootfs.bin := append-ubi | check-size DEVICE_VENDOR := NETGEAR - DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport endef define Device/netgear_r6220 @@ -838,7 +844,7 @@ define Device/netgear_wndr3700-v5 SERCOMM_SWVER := 0x1054 SERCOMM_PAD := 320k DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += wndr3700v5 endef TARGET_DEVICES += netgear_wndr3700-v5 @@ -858,7 +864,7 @@ define Device/netis_wf2881 check-size DEVICE_VENDOR := NETIS DEVICE_MODEL := WF2881 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += netis_wf2881 @@ -869,7 +875,7 @@ define Device/phicomm_k2p DEVICE_ALT0_VENDOR := Phicomm DEVICE_ALT0_MODEL := KE 2P SUPPORTED_DEVICES += k2p - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += phicomm_k2p @@ -878,7 +884,7 @@ define Device/planex_vr500 IMAGE_SIZE := 65216k DEVICE_VENDOR := Planex DEVICE_MODEL := VR500 - DEVICE_PACKAGES := kmod-usb3 + DEVICE_PACKAGES := kmod-usb3 -wpad-basic SUPPORTED_DEVICES += vr500 endef TARGET_DEVICES += planex_vr500 @@ -888,7 +894,7 @@ define Device/samknows_whitebox-v8 DEVICE_VENDOR := SamKnows DEVICE_MODEL := Whitebox 8 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport uboot-envtools wpad-basic + kmod-usb-ledtrig-usbport uboot-envtools SUPPORTED_DEVICES += sk-wb8 endef TARGET_DEVICES += samknows_whitebox-v8 @@ -897,7 +903,7 @@ define Device/storylink_sap-g3200u3 IMAGE_SIZE := 7872k DEVICE_VENDOR := STORYLiNK DEVICE_MODEL := SAP-G3200U3 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += sap-g3200u3 endef TARGET_DEVICES += storylink_sap-g3200u3 @@ -906,7 +912,7 @@ define Device/telco-electronics_x1 IMAGE_SIZE := 16064k DEVICE_VENDOR := Telco Electronics DEVICE_MODEL := X1 - DEVICE_PACKAGES := kmod-usb3 kmod-mt76 wpad-basic + DEVICE_PACKAGES := kmod-usb3 kmod-mt76 endef TARGET_DEVICES += telco-electronics_x1 @@ -915,7 +921,7 @@ define Device/thunder_timecloud IMAGE_SIZE := 16064k DEVICE_VENDOR := Thunder DEVICE_MODEL := Timecloud - DEVICE_PACKAGES := kmod-usb3 + DEVICE_PACKAGES := kmod-usb3 -wpad-basic SUPPORTED_DEVICES += timecloud endef TARGET_DEVICES += thunder_timecloud @@ -925,7 +931,7 @@ define Device/totolink_a7000r UIMAGE_NAME := C8340R1C-9999 DEVICE_VENDOR := TOTOLINK DEVICE_MODEL := A7000R - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += totolink_a7000r @@ -933,7 +939,7 @@ define Device/tplink_re350-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE350 DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 TPLINK_BOARD_ID := RE350-V1 IMAGE_SIZE := 6016k SUPPORTED_DEVICES += re350-v1 @@ -944,7 +950,7 @@ define Device/tplink_re500-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE500 DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware TPLINK_BOARD_ID := RE500-V1 IMAGE_SIZE := 14208k endef @@ -954,7 +960,7 @@ define Device/tplink_re650-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE650 DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware TPLINK_BOARD_ID := RE650-V1 IMAGE_SIZE := 14208k endef @@ -969,6 +975,7 @@ define Device/ubnt_edgerouter_common KERNEL_INITRAMFS := $$(KERNEL) | \ ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + DEVICE_PACKAGES += -wpad-basic endef define Device/ubnt_edgerouter-x @@ -989,7 +996,7 @@ TARGET_DEVICES += ubnt_edgerouter-x-sfp define Device/ubnt_unifi-nanohd DEVICE_VENDOR := Ubiquiti DEVICE_MODEL := UniFi nanoHD - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware IMAGE_SIZE := 15552k endef TARGET_DEVICES += ubnt_unifi-nanohd @@ -999,7 +1006,7 @@ define Device/unielec_u7621-06-16m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 16M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m endef TARGET_DEVICES += unielec_u7621-06-16m @@ -1009,7 +1016,7 @@ define Device/unielec_u7621-06-64m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 64M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic SUPPORTED_DEVICES += unielec,u7621-06-512m-64m endef TARGET_DEVICES += unielec_u7621-06-64m @@ -1020,7 +1027,7 @@ define Device/wevo_11acnas DEVICE_VENDOR := WeVO DEVICE_MODEL := 11AC NAS Router DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += 11acnas endef TARGET_DEVICES += wevo_11acnas @@ -1032,7 +1039,7 @@ define Device/wevo_w2914ns-v2 DEVICE_MODEL := W2914NS DEVICE_VARIANT := v2 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += w2914nsv2 endef TARGET_DEVICES += wevo_w2914ns-v2 @@ -1045,7 +1052,7 @@ define Device/winstars_ws-wn583a6 DEVICE_ALT0_VENDOR := Gemeita DEVICE_ALT0_MODEL := AC2100 KERNEL_INITRAMFS_SUFFIX := -WN583A6$$(KERNEL_SUFFIX) - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += winstars_ws-wn583a6 @@ -1061,7 +1068,8 @@ define Device/xiaomi-ac2100 IMAGE/rootfs0.bin := append-ubi | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_VENDOR := Xiaomi - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware wpad-basic uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware \ + uboot-envtools endef define Device/xiaomi_mi-router-ac2100 @@ -1086,7 +1094,7 @@ define Device/xiaomi_mir3g SUPPORTED_DEVICES += R3G SUPPORTED_DEVICES += mir3g DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic uboot-envtools + kmod-usb-ledtrig-usbport uboot-envtools endef TARGET_DEVICES += xiaomi_mir3g @@ -1099,7 +1107,7 @@ define Device/xiaomi_mir3g-v2 DEVICE_ALT0_VENDOR := Xiaomi DEVICE_ALT0_MODEL := Mi Router 4A DEVICE_ALT0_VARIANT := Gigabit Edition - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 endef TARGET_DEVICES += xiaomi_mir3g-v2 @@ -1116,8 +1124,8 @@ define Device/xiaomi_mir3p IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 kmod-usb-ledtrig-usbport \ - wpad-basic uboot-envtools + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \ + kmod-usb-ledtrig-usbport uboot-envtools endef TARGET_DEVICES += xiaomi_mir3p @@ -1131,7 +1139,7 @@ define Device/xiaoyu_xy-c5 IMAGE_SIZE := 32448k DEVICE_VENDOR := XiaoYu DEVICE_MODEL := XY-C5 - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic endef TARGET_DEVICES += xiaoyu_xy-c5 @@ -1140,7 +1148,7 @@ define Device/xzwifi_creativebox-v1 DEVICE_VENDOR := CreativeBox DEVICE_MODEL := v1 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ - kmod-usb3 + kmod-usb3 -wpad-basic endef TARGET_DEVICES += xzwifi_creativebox-v1 @@ -1149,7 +1157,7 @@ define Device/youhua_wr1200js DEVICE_VENDOR := YouHua DEVICE_MODEL := WR1200JS DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += youhua_wr1200js @@ -1158,7 +1166,7 @@ define Device/youku_yk-l2 DEVICE_VENDOR := Youku DEVICE_MODEL := YK-L2 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += youku_yk-l2 @@ -1166,8 +1174,7 @@ define Device/zbtlink_zbt-we1326 IMAGE_SIZE := 16064k DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WE1326 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \ - wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 SUPPORTED_DEVICES += zbt-we1326 endef TARGET_DEVICES += zbtlink_zbt-we1326 @@ -1177,7 +1184,7 @@ define Device/zbtlink_zbt-we3526 DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WE3526 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += zbtlink_zbt-we3526 @@ -1186,7 +1193,7 @@ define Device/zbtlink_zbt-wg2626 DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WG2626 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += zbt-wg2626 endef TARGET_DEVICES += zbtlink_zbt-wg2626 @@ -1197,7 +1204,7 @@ define Device/zbtlink_zbt-wg3526-16m DEVICE_MODEL := ZBT-WG3526 DEVICE_VARIANT := 16M DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \ - kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + kmod-usb3 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M endef TARGET_DEVICES += zbtlink_zbt-wg3526-16m @@ -1208,7 +1215,7 @@ define Device/zbtlink_zbt-wg3526-32m DEVICE_MODEL := ZBT-WG3526 DEVICE_VARIANT := 32M DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \ - kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + kmod-usb3 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M endef TARGET_DEVICES += zbtlink_zbt-wg3526-32m @@ -1218,7 +1225,7 @@ define Device/zio_freezio DEVICE_VENDOR := ZIO DEVICE_MODEL := FREEZIO DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic + kmod-usb-ledtrig-usbport endef TARGET_DEVICES += zio_freezio @@ -1230,7 +1237,7 @@ define Device/zyxel_wap6805 IMAGE_SIZE := 32448k DEVICE_VENDOR := ZyXEL DEVICE_MODEL := WAP6805 - DEVICE_PACKAGES := kmod-mt7603 wpad-basic kmod-mt7621-qtn-rgmii + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7621-qtn-rgmii KERNEL := $(KERNEL_DTB) | uImage lzma | uimage-padhdr 160 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef diff --git a/target/linux/ramips/mt7621/target.mk b/target/linux/ramips/mt7621/target.mk index c2eba1d0da..be7c9b604a 100644 --- a/target/linux/ramips/mt7621/target.mk +++ b/target/linux/ramips/mt7621/target.mk @@ -7,6 +7,8 @@ BOARDNAME:=MT7621 based boards FEATURES+=nand ramdisk rtc usb minor CPU_TYPE:=24kc +DEFAULT_PACKAGES += wpad-basic + define Target/Description Build firmware images for Ralink MT7621 based boards. endef From c487cf8e94cbdf582dfc3c2bdaab913a146a2100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 4 Aug 2020 16:24:35 +0200 Subject: [PATCH 02/20] hostapd: add wpad-basic-wolfssl variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add package which provides size optimized wpad with support for just WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w. Signed-off-by: Petr Štetiar [adapt to recent changes, add dependency for WPA_WOLFSSL config] Signed-off-by: Adrian Schmutzler --- include/target.mk | 2 +- package/network/services/hostapd/Config.in | 3 +++ package/network/services/hostapd/Makefile | 13 +++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/target.mk b/include/target.mk index aba477e83b..6ed6565bda 100644 --- a/include/target.mk +++ b/include/target.mk @@ -56,7 +56,7 @@ endif DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE)) filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1)) -extra_packages = $(if $(filter wpad-mini wpad-basic wpad nas,$(1)),iwinfo) +extra_packages = $(if $(filter wpad-mini wpad-basic wpad-basic-wolfssl wpad nas,$(1)),iwinfo) define ProfileDefault NAME:= diff --git a/package/network/services/hostapd/Config.in b/package/network/services/hostapd/Config.in index 81a374c652..b211877fb3 100644 --- a/package/network/services/hostapd/Config.in +++ b/package/network/services/hostapd/Config.in @@ -13,6 +13,7 @@ config WPA_RFKILL_SUPPORT PACKAGE_wpad-openssl || \ PACKAGE_wpad-wolfssl || \ PACKAGE_wpad-basic || \ + PACKAGE_wpad-basic-wolfssl || \ PACKAGE_wpad-mini || \ PACKAGE_wpad-mesh-openssl || \ PACKAGE_wpad-mesh-wolfssl @@ -32,6 +33,7 @@ config WPA_MSG_MIN_PRIORITY PACKAGE_wpad-openssl || \ PACKAGE_wpad-wolfssl || \ PACKAGE_wpad-basic || \ + PACKAGE_wpad-basic-wolfssl || \ PACKAGE_wpad-mini || \ PACKAGE_wpad-mesh-openssl || \ PACKAGE_wpad-mesh-wolfssl @@ -49,6 +51,7 @@ config WPA_WOLFSSL bool default PACKAGE_wpa-supplicant-wolfssl ||\ PACKAGE_wpad-wolfssl ||\ + PACKAGE_wpad-basic-wolfssl || \ PACKAGE_wpad-mesh-wolfssl ||\ PACKAGE_eapol-test-wolfssl select WOLFSSL_HAS_AES_CCM diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 44312db590..b3e93cb770 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -250,6 +250,17 @@ define Package/wpad-basic/description This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, 802.11r and 802.11w support. endef +define Package/wpad-basic-wolfssl +$(call Package/wpad/Default,$(1)) + TITLE+= (wolfSSL, 11r, 11w) + VARIANT:=wpad-basic-wolfssl + DEPENDS+=+libwolfssl +endef + +define Package/wpad-basic-wolfssl/description + This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w support. +endef + define Package/wpad-mini $(call Package/wpad/Default,$(1)) TITLE+= (WPA-PSK only) @@ -575,6 +586,7 @@ define Package/wpad/install $(LN) wpad $(1)/usr/sbin/wpa_supplicant endef Package/wpad-basic/install = $(Package/wpad/install) +Package/wpad-basic-wolfssl/install = $(Package/wpad/install) Package/wpad-mini/install = $(Package/wpad/install) Package/wpad-openssl/install = $(Package/wpad/install) Package/wpad-wolfssl/install = $(Package/wpad/install) @@ -630,6 +642,7 @@ $(eval $(call BuildPackage,wpad)) $(eval $(call BuildPackage,wpad-mesh-openssl)) $(eval $(call BuildPackage,wpad-mesh-wolfssl)) $(eval $(call BuildPackage,wpad-basic)) +$(eval $(call BuildPackage,wpad-basic-wolfssl)) $(eval $(call BuildPackage,wpad-mini)) $(eval $(call BuildPackage,wpad-openssl)) $(eval $(call BuildPackage,wpad-wolfssl)) From 7c07a0f4c335bd79b0cac3d91192e76a42bc4e18 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 3 Aug 2020 23:11:01 +0200 Subject: [PATCH 03/20] ramips/mt7620: fix portmap based on board.d port assignment When comparing to the port assignment in board.d/02_network, many devices seem to use the wrong setup of mediatek,portmap. The corrects the values for mt7620 subtarget based on the location of the wan port. A previous cleanup of obviously wrong values has already been done in d3c0a944059b ("ramips: mt7620/mt7621: remove invalid mediatek,portmap") Cc: Sungbo Eo Signed-off-by: Adrian Schmutzler --- target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts | 2 +- target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts | 2 +- target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts | 2 +- target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts | 2 -- target/linux/ramips/dts/mt7620a_sanlinking_d240.dts | 2 +- target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts | 2 +- target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi | 2 +- target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts | 2 +- target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts | 2 +- 9 files changed, 8 insertions(+), 10 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts index c9ecf78573..c8d67db884 100644 --- a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts +++ b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts @@ -124,7 +124,7 @@ ðernet { mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; + mediatek,portmap = "wllll"; }; &wmac { diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts index a772bca605..c9b2abd5fb 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts @@ -134,7 +134,7 @@ ðernet { mtd-mac-address = <&factory 0x4000>; - mediatek,portmap = "llllw"; + mediatek,portmap = "wllll"; }; &wmac { diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts index 8951044f63..fc4b807ffd 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts @@ -76,7 +76,7 @@ mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; + mediatek,portmap = "llllw"; port@5 { status = "okay"; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts index 2932b5a3dc..f003df6859 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts @@ -46,6 +46,4 @@ pinctrl-0 = <&ephy_pins>; mtd-mac-address = <&factory 0x28>; - - mediatek,portmap = "llllw"; }; diff --git a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts index 79649a5990..9a9201b6ae 100644 --- a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts +++ b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts @@ -171,7 +171,7 @@ ðernet { mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; + mediatek,portmap = "llllw"; }; &wmac { diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts index 4aa404542f..53d98cf35a 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts @@ -114,7 +114,7 @@ mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; + mediatek,portmap = "llllw"; }; &wmac { diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi index 9ebd10bbb0..0e3d689b4f 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi @@ -76,7 +76,7 @@ ðernet { mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; + mediatek,portmap = "llllw"; }; &wmac { diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts index 5e610be862..64f32ac5d4 100644 --- a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts +++ b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts @@ -110,7 +110,7 @@ ðernet { mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; + mediatek,portmap = "llllw"; }; &wmac { diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts index e5d3cc0a29..5f6925bb88 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts @@ -96,7 +96,7 @@ ðernet { mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; + mediatek,portmap = "llllw"; }; &wmac { From f74edb3e95a5bd3da8f0eed9099d1dd926126b17 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Fri, 7 Aug 2020 13:35:18 +0200 Subject: [PATCH 04/20] nat46: update to latest git HEAD 71e9f09 nat46-core: fix compilation with kernel 5.4 Remove 100-kernel-5.4-compat patch as upstream accepted Signed-off-by: Hans Dedecker --- package/kernel/nat46/Makefile | 6 ++-- .../nat46/patches/100-kernel-5.4-compat.patch | 34 ------------------- 2 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 package/kernel/nat46/patches/100-kernel-5.4-compat.patch diff --git a/package/kernel/nat46/Makefile b/package/kernel/nat46/Makefile index 0178ade6ab..f37ee6e395 100644 --- a/package/kernel/nat46/Makefile +++ b/package/kernel/nat46/Makefile @@ -3,11 +3,11 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=nat46 -PKG_MIRROR_HASH:=24a22c8cb38983b55e7ad55c796f3835aa8702ad6f868953448e3b5e61ab6991 +PKG_MIRROR_HASH:=d0bc80038cadeb7e857118e8d6bae242670ab27377af49f74bad494e0e5da598 PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git -PKG_SOURCE_DATE:=2020-07-16 +PKG_SOURCE_DATE:=2020-08-06 PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=ac712ad2bedf107329285af1909310675afe872d +PKG_SOURCE_VERSION:=71e9f0941a666c7010bb6d31d45bb795439038fa PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 diff --git a/package/kernel/nat46/patches/100-kernel-5.4-compat.patch b/package/kernel/nat46/patches/100-kernel-5.4-compat.patch deleted file mode 100644 index 6a638e96b5..0000000000 --- a/package/kernel/nat46/patches/100-kernel-5.4-compat.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/nat46/modules/nat46-core.c -+++ b/nat46/modules/nat46-core.c -@@ -17,6 +17,7 @@ - */ - - #include -+#include - - #include "nat46-glue.h" - #include "nat46-core.h" -@@ -1601,7 +1602,11 @@ void nat46_ipv6_input(struct sk_buff *ol - /* Remove any debris in the socket control block */ - memset(IPCB(new_skb), 0, sizeof(struct inet_skb_parm)); - /* Remove netfilter references to IPv6 packet, new netfilter references will be created based on IPv4 packet */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) - nf_reset(new_skb); -+#else -+ nf_reset_ct(new_skb); -+#endif - - /* modify packet: actual IPv6->IPv4 transformation */ - truncSize = v6packet_l3size - sizeof(struct iphdr); /* chop first 20 bytes */ -@@ -1806,7 +1811,11 @@ void nat46_ipv4_input(struct sk_buff *ol - /* Remove any debris in the socket control block */ - memset(IPCB(new_skb), 0, sizeof(struct inet_skb_parm)); - /* Remove netfilter references to IPv4 packet, new netfilter references will be created based on IPv6 packet */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) - nf_reset(new_skb); -+#else -+ nf_reset_ct(new_skb); -+#endif - - /* expand header (add 20 extra bytes at the beginning of sk_buff) */ - pskb_expand_head(new_skb, IPV6V4HDRDELTA + (add_frag_header?8:0), 0, GFP_ATOMIC); From 1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 7 Aug 2020 14:47:31 +0200 Subject: [PATCH 05/20] ramips: switch rt288x subtarget to kernel 5.4 The sbutarget has testing support for kernel 5.4 for quite a while and builds fine, however, only one devices there is > 4 MiB. Since it's unlikely to get a Tested-by for that device, and the other ralink subtargets appear to be working with 5.4 so far, let's set this target to 5.4 by default as well. That way, even if the device happens to break, we'll still have at least usable SDK and IB for people to use. Signed-off-by: Adrian Schmutzler --- target/linux/ramips/rt288x/target.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/linux/ramips/rt288x/target.mk b/target/linux/ramips/rt288x/target.mk index 917f150f24..57b0ee2251 100644 --- a/target/linux/ramips/rt288x/target.mk +++ b/target/linux/ramips/rt288x/target.mk @@ -9,8 +9,6 @@ CPU_TYPE:=24kc DEFAULT_PACKAGES += kmod-rt2800-soc wpad-mini swconfig -KERNEL_PATCHVER:=4.14 - define Target/Description Build firmware images for Ralink RT288x based boards. endef From 1d5b08ca51e5f766ebb206dfad20daa6f0d12c19 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 7 Aug 2020 16:29:23 +0200 Subject: [PATCH 06/20] om-watchdog: fix board name for teltonika,rut5xx The board name is equivalent to the compatible, not the device definition. Fix it. Fixes: b4588c853838 ("kernel/om-watchdog: Apply device renames from ramips") Signed-off-by: Adrian Schmutzler --- package/kernel/om-watchdog/Makefile | 2 +- package/kernel/om-watchdog/files/om-watchdog.init | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/om-watchdog/Makefile b/package/kernel/om-watchdog/Makefile index a7e859dc8b..6f2ac372fb 100644 --- a/package/kernel/om-watchdog/Makefile +++ b/package/kernel/om-watchdog/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=om-watchdog -PKG_RELEASE:=2 +PKG_RELEASE:=3 include $(INCLUDE_DIR)/package.mk diff --git a/package/kernel/om-watchdog/files/om-watchdog.init b/package/kernel/om-watchdog/files/om-watchdog.init index 4c407dadae..12ff665837 100644 --- a/package/kernel/om-watchdog/files/om-watchdog.init +++ b/package/kernel/om-watchdog/files/om-watchdog.init @@ -47,7 +47,7 @@ get_gpio() { return 17 ;; esac - elif [ "$board" = "teltonika_rut5xx" ]; then + elif [ "$board" = "teltonika,rut5xx" ]; then # ramips return 11 else From a4e72013e7cf8fbdaa8b36544be1e9dd7b5d45f6 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 6 Aug 2020 21:24:43 +0200 Subject: [PATCH 07/20] exfat: add dependency on nls-base Add a dependency on kmod-nls-base for the new exfat driver. Otherwise the build fails on ramips and ath79 on kernel 5.4: Package kmod-fs-exfat is missing dependencies for the following libraries: nls_base.ko Fixes commit cd41234d2f63 ("exfat: add out of tree module") Signed-off-by: David Bauer --- package/kernel/exfat/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/exfat/Makefile b/package/kernel/exfat/Makefile index 539bdfd295..1fa859c607 100644 --- a/package/kernel/exfat/Makefile +++ b/package/kernel/exfat/Makefile @@ -36,6 +36,7 @@ define KernelPackage/fs-exfat TITLE:=exFAT kernel module FILES:=$(PKG_BUILD_DIR)/exfat.ko AUTOLOAD:=$(call AutoProbe,exfat) + DEPENDS:= +kmod-nls-base endef define KernelPackage/exfat/description From 321503dbf3d8ac0da8c1693a94a334f8072c72ac Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 7 Aug 2020 20:50:55 +0200 Subject: [PATCH 08/20] hostapd: make "key" option optional if "wpa_psk_file" is provided If an existing "wpa_psk_file" is passed to hostapd, the "key" option may be omitted. While we're at it, also improve the passphrase length checking to ensure that it is either exactly 64 bytes or 8 to 63 bytes. Fixes: FS#2689 Ref: https://github.com/openwrt/openwrt/pull/3283 Suggested-by: Michael Jones Signed-off-by: Jo-Philipp Wich --- package/network/services/hostapd/files/hostapd.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 268a41a82b..5cab11022f 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -402,13 +402,13 @@ hostapd_set_bss_options() { ;; psk|sae|psk-sae) json_get_vars key wpa_psk_file - if [ ${#key} -lt 8 ]; then + if [ ${#key} -eq 64 ]; then + append bss_conf "wpa_psk=$key" "$N" + elif [ ${#key} -ge 8 ] && [ ${#key} -le 63 ]; then + append bss_conf "wpa_passphrase=$key" "$N" + elif [ -n "$key" ] || [ -z "$wpa_psk_file" ]; then wireless_setup_vif_failed INVALID_WPA_PSK return 1 - elif [ ${#key} -eq 64 ]; then - append bss_conf "wpa_psk=$key" "$N" - else - append bss_conf "wpa_passphrase=$key" "$N" fi [ -z "$wpa_psk_file" ] && set_default wpa_psk_file /var/run/hostapd-$ifname.psk [ -n "$wpa_psk_file" ] && { From bc1c9fdc2075a5f93046be74782be024c4f3fb3f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 7 Aug 2020 21:19:29 +0200 Subject: [PATCH 09/20] hostapd: recognize option "key" as alias for "auth_secret" The hostapd configuration logic is supposed to accept "option key" as legacy alias for "option auth_secret". This particular fallback option failed to work though because "key" was not a registered configuration variable. Fix this issue by registering the "key" option as well, similar to the existing "server" nad "port" options. Ref: https://github.com/openwrt/openwrt/pull/3282 Suggested-by: Michael Jones Signed-off-by: Jo-Philipp Wich --- package/network/services/hostapd/Makefile | 2 +- package/network/services/hostapd/files/hostapd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index b3e93cb770..3aa17b4d3a 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 5cab11022f..fe5b407bc1 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -196,7 +196,7 @@ hostapd_common_add_bss_config() { config_add_int eapol_version config_add_string 'auth_server:host' 'server:host' - config_add_string auth_secret + config_add_string auth_secret key config_add_int 'auth_port:port' 'port:port' config_add_string acct_server From 1bfba18a3643f2e73c7e7e7ed3cd3a350900a9cd Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 8 Aug 2020 00:32:49 +0200 Subject: [PATCH 10/20] mac80211: exchange mesh 6GHz IE patch for upstream accepted Exchange the patch fixing the kernel ringbuffer WARNING flood for the one accepted upstream. Fixes commit a956c14d6aa4 ("mac80211: util: don't warn on missing sband iftype data") Signed-off-by: David Bauer --- ...600-fix-warning-in-6-ghz-ie-addition.patch | 64 +++++++++++++++++++ ...n-t-warn-on-missing-sband-iftype-dat.patch | 28 -------- 2 files changed, 64 insertions(+), 28 deletions(-) create mode 100644 package/kernel/mac80211/patches/subsys/600-fix-warning-in-6-ghz-ie-addition.patch delete mode 100644 package/kernel/mac80211/patches/subsys/600-mac80211-util-don-t-warn-on-missing-sband-iftype-dat.patch diff --git a/package/kernel/mac80211/patches/subsys/600-fix-warning-in-6-ghz-ie-addition.patch b/package/kernel/mac80211/patches/subsys/600-fix-warning-in-6-ghz-ie-addition.patch new file mode 100644 index 0000000000..31dedf2739 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/600-fix-warning-in-6-ghz-ie-addition.patch @@ -0,0 +1,64 @@ +From 65ad3ef9fced4062dfd74e2f89443fb5ce184321 Mon Sep 17 00:00:00 2001 +From: Rajkumar Manoharan +Date: Wed, 1 Jul 2020 19:20:24 -0700 +Subject: mac80211: fix warning in 6 GHz IE addition in mesh mode + +The commit 24a2042cb22f ("mac80211: add HE 6 GHz Band Capability +element") failed to check device capability before adding HE 6 GHz +capability element. Below warning is reported in 11ac device in mesh. +Fix that by checking device capability at HE 6 GHz cap IE addition +in mesh beacon and association request. + +WARNING: CPU: 1 PID: 1897 at net/mac80211/util.c:2878 +ieee80211_ie_build_he_6ghz_cap+0x149/0x150 [mac80211] +[ 3138.720358] Call Trace: +[ 3138.720361] ieee80211_mesh_build_beacon+0x462/0x530 [mac80211] +[ 3138.720363] ieee80211_start_mesh+0xa8/0xf0 [mac80211] +[ 3138.720365] __cfg80211_join_mesh+0x122/0x3e0 [cfg80211] +[ 3138.720368] nl80211_join_mesh+0x3d3/0x510 [cfg80211] + +Fixes: 24a2042cb22f ("mac80211: add HE 6 GHz Band Capability element") +Reported-by: Markus Theil +Signed-off-by: Rajkumar Manoharan +Link: https://lore.kernel.org/r/1593656424-18240-1-git-send-email-rmanohar@codeaurora.org +Signed-off-by: Johannes Berg +--- + net/mac80211/mesh.c | 13 +++++++++++++ + net/mac80211/util.c | 4 ++++ + 2 files changed, 17 insertions(+) + +--- a/net/mac80211/mesh.c ++++ b/net/mac80211/mesh.c +@@ -617,6 +617,19 @@ int mesh_add_he_oper_ie(struct ieee80211 + int mesh_add_he_6ghz_cap_ie(struct ieee80211_sub_if_data *sdata, + struct sk_buff *skb) + { ++ struct ieee80211_supported_band *sband; ++ const struct ieee80211_sband_iftype_data *iftd; ++ ++ sband = ieee80211_get_sband(sdata); ++ if (!sband) ++ return -EINVAL; ++ ++ iftd = ieee80211_get_sband_iftype_data(sband, ++ NL80211_IFTYPE_MESH_POINT); ++ /* The device doesn't support HE in mesh mode or at all */ ++ if (!iftd) ++ return 0; ++ + ieee80211_ie_build_he_6ghz_cap(sdata, skb); + return 0; + } +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -2878,6 +2878,10 @@ void ieee80211_ie_build_he_6ghz_cap(stru + if (WARN_ON(!iftd)) + return; + ++ /* Check for device HE 6 GHz capability before adding element */ ++ if (!iftd->he_6ghz_capa.capa) ++ return; ++ + cap = le16_to_cpu(iftd->he_6ghz_capa.capa); + cap &= ~IEEE80211_HE_6GHZ_CAP_SM_PS; + diff --git a/package/kernel/mac80211/patches/subsys/600-mac80211-util-don-t-warn-on-missing-sband-iftype-dat.patch b/package/kernel/mac80211/patches/subsys/600-mac80211-util-don-t-warn-on-missing-sband-iftype-dat.patch deleted file mode 100644 index 65689c0717..0000000000 --- a/package/kernel/mac80211/patches/subsys/600-mac80211-util-don-t-warn-on-missing-sband-iftype-dat.patch +++ /dev/null @@ -1,28 +0,0 @@ -From db6d1e942f5a2828e1245e16ceb997f537a2d1a4 Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Sat, 25 Jul 2020 01:43:26 +0200 -Subject: [PATCH] mac80211: util: don't warn on missing sband iftype data - -The kernel currently floods the ringbuffer with warnings when adding a -mesh interface for a device not support HE 6GHz modes. - -Return without warning in this case, as mesh_add_he_6ghz_cap_ie calls -ieee80211_ie_build_he_6ghz_cap regardless of the supported interface -modes. - -Signed-off-by: David Bauer ---- - net/mac80211/util.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/net/mac80211/util.c -+++ b/net/mac80211/util.c -@@ -2875,7 +2875,7 @@ void ieee80211_ie_build_he_6ghz_cap(stru - return; - - iftd = ieee80211_get_sband_iftype_data(sband, iftype); -- if (WARN_ON(!iftd)) -+ if (!iftd) - return; - - cap = le16_to_cpu(iftd->he_6ghz_capa.capa); From a40ddc2195350149aadbdb6077b17d4787becd9d Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Wed, 5 Aug 2020 01:03:42 +0900 Subject: [PATCH 11/20] ramips: adjust LZMA_TEXT_START for 32MB RAM devices Currently the lzma-loader is placed in RAM at 32MB offset, which does not make sense for devices with only 32MB RAM. If we adjust LZMA_TEXT_START to 24MB offset, then the lzma-loader can be used on those devices and still about 24MB memory will be available for uncompressed image, which should be enough for most use cases. Signed-off-by: Sungbo Eo --- target/linux/ramips/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index c0890e6bb3..f5166f8ae1 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -64,7 +64,7 @@ define Build/loader-common PKG_BUILD_DIR="$@.src" \ TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \ BOARD="$(BOARDNAME)" PLATFORM="$(LOADER_PLATFORM)" \ - LZMA_TEXT_START=0x82000000 LOADADDR=$(KERNEL_LOADADDR) \ + LZMA_TEXT_START=0x81800000 LOADADDR=$(KERNEL_LOADADDR) \ $(1) compile loader.$(LOADER_TYPE) mv "$@.$(LOADER_TYPE)" "$@" rm -rf $@.src From de78747de111ba5e4c978fe8067b2260efe01d0d Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Wed, 5 Aug 2020 01:04:59 +0900 Subject: [PATCH 12/20] ramips: use lzma-loader for RT5350F-OLinuXino devices The bootloader fails to extract a big kernel, e.g. v5.4 kernel image with ALL_KMODS enabled. This can be fixed by using lzma-loader. Signed-off-by: Sungbo Eo --- target/linux/ramips/image/rt305x.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index b75d9078e5..2cda2fa51b 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -767,6 +767,7 @@ endef TARGET_DEVICES += nixcore_x1-8m define Device/olimex_rt5350f-olinuxino + $(Device/uimage-lzma-loader) SOC := rt5350 IMAGE_SIZE := 7872k DEVICE_VENDOR := OLIMEX @@ -777,6 +778,7 @@ endef TARGET_DEVICES += olimex_rt5350f-olinuxino define Device/olimex_rt5350f-olinuxino-evb + $(Device/uimage-lzma-loader) SOC := rt5350 IMAGE_SIZE := 7872k DEVICE_VENDOR := OLIMEX From a9703db72030a43c5a22f02411d3680ba2e2faf3 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 6 Aug 2020 14:43:16 +0200 Subject: [PATCH 13/20] mvebu: fix sysupgrade experience for early DSA-adopters Conceptually, the compat-version during sysupgrade is meant to describe the config. Therefore, if somebody starts with a device on 19.07 and swconfig, and that person does a forceful upgrade into a DSA-based firmware without wiping his/her config, then the local compat-version should stay at 1.0 according to the config present (and not get updated). However, this poses a problem for those people that early-adopted DSA in master, as they already have adjusted their config for DSA, but it still is "1.0" as far as sysupgrade is concerned. This can be healed by a simple uci set system.@system[0].compat_version="1.1" uci commit system But this needs to be applied _after_ the upgrade (as the "old" fwtool on the old installation does not know about compat_version) and it requires access via SSH (i.e. no pure GUI solution is available for this group of people, apart from wiping their config _again_ for no technical reason). Despite, the situation will not become obvious to those just upgrading via GUI, they will just have the experience of a "broken upgrade". This is a conflict which cannot be resolved by achieving both goals, we have to decide to either keep the strict concept or improve the situation for early adopters. In this patch, we address the issue by providing a uci-defaults script that will raise the compat_version for _all_ people upgrading into a 1.1 image, no matter whether they have reset config or not. The idea is to implement this as a _temporary_ solution, so early adopters can upgrade into the new mechanism without issues, and after a few weeks/months we could remove the uci-defaults script again. If we e.g. remove the script just before 20.xx.0-rc1, early adopters should have moved on by then, and existing stable users would still get the intended experience. Signed-off-by: Adrian Schmutzler --- .../etc/uci-defaults/05_fix-compat-version | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version new file mode 100644 index 0000000000..5965fdc2f5 --- /dev/null +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version @@ -0,0 +1,21 @@ +# +# Copyright (C) 2020 OpenWrt.org +# + +. /lib/functions.sh + +case "$(board_name)" in + linksys,wrt1200ac|\ + linksys,wrt1900ac-v1|\ + linksys,wrt1900ac-v2|\ + linksys,wrt1900acs|\ + linksys,wrt3200acm|\ + linksys,wrt32x|\ + solidrun,clearfog-base-a1|\ + solidrun,clearfog-pro-a1) + uci set system.@system[0].compat_version="1.1" + uci commit system + ;; +esac + +exit 0 From 86c89bf5e8f570214371824587b38220cf05bdac Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 6 Aug 2020 14:59:51 +0200 Subject: [PATCH 14/20] kirkwood: fix sysupgrade experience for early DSA-adopters Conceptually, the compat-version during sysupgrade is meant to describe the config. Therefore, if somebody starts with a device on 19.07 and swconfig, and that person does a forceful upgrade into a DSA-based firmware without wiping his/her config, then the local compat-version should stay at 1.0 according to the config present (and not get updated). However, this poses a problem for those people that early-adopted DSA in master, as they already have adjusted their config for DSA, but it still is "1.0" as far as sysupgrade is concerned. This can be healed by a simple uci set system.@system[0].compat_version="1.1" uci commit system But this needs to be applied _after_ the upgrade (as the "old" fwtool on the old installation does not know about compat_version) and it requires access via SSH (i.e. no pure GUI solution is available for this group of people, apart from wiping their config _again_ for no technical reason). Despite, the situation will not become obvious to those just upgrading via GUI, they will just have the experience of a "broken upgrade". This is a conflict which cannot be resolved by achieving both goals, we have to decide to either keep the strict concept or improve the situation for early adopters. In this patch, we address the issue by providing a uci-defaults script that will raise the compat_version for _all_ people upgrading into a 1.1 image, no matter whether they have reset config or not. The idea is to implement this as a _temporary_ solution, so early adopters can upgrade into the new mechanism without issues, and after a few weeks/months we could remove the uci-defaults script again. If we e.g. remove the script just before 20.xx.0-rc1, early adopters should have moved on by then, and existing stable users would still get the intended experience. Signed-off-by: Adrian Schmutzler --- .../etc/uci-defaults/05_fix-compat-version | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version new file mode 100644 index 0000000000..d7f8488e88 --- /dev/null +++ b/target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version @@ -0,0 +1,16 @@ +# +# Copyright (C) 2020 OpenWrt.org +# + +. /lib/functions.sh + +case "$(board_name)" in + linksys,e4200-v2|\ + linksys,ea3500|\ + linksys,ea4500) + uci set system.@system[0].compat_version="1.1" + uci commit system + ;; +esac + +exit 0 From fbd4214bb0727268aa535af5b600d38939ec8dbc Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 6 Aug 2020 15:14:49 +0200 Subject: [PATCH 15/20] build: improve message for incompatible image on "legacy" devices It has been reported that the current message displayed during upgrade with compat_version change is misleading for "legacy" devices, i.e. those without the "new" fwtool. This is partially caused by the fact that we need to exploit the supported_devices string to get some message text displayed for these devices. This patch modifies the message to make it more helpful and include additional information, e.g. Device linksys,wrt3200acm not supported by this image Supported devices: linksys,wrt3200acm linksys-whateverelse - Image version mismatch: image 1.1, device 1.0. Please wipe config during upgrade (force required) or reinstall. Reason: Config cannot be migrated from swconfig to DSA Note that the line breaks (except the one before Supported devices) are added manually here, I hesitate to hack \n into the supported_devices as well. The "Reason:" will only be displayed if DEVICE_COMPAT_MESSAGE is set for the device, otherwise "Please check documentation ..." will be shown instead. While at it, also rearrange the code in image-commands.mk to make lines shorter and remove the double filter-out command. Signed-off-by: Adrian Schmutzler --- include/image-commands.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 8ed705a7f4..9516801c8d 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -382,15 +382,20 @@ endef compat_version=$(if $(DEVICE_COMPAT_VERSION),$(DEVICE_COMPAT_VERSION),1.0) json_quote=$(subst ','\'',$(subst ",\",$(1))) #")') + +legacy_supported_message=$(SUPPORTED_DEVICES) - Image version mismatch: image $(compat_version), \ + device 1.0. Please wipe config during upgrade (force required) or reinstall. \ + $(if $(DEVICE_COMPAT_MESSAGE),Reason: $(DEVICE_COMPAT_MESSAGE),Please check documentation ...) + metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))")))) metadata_json = \ '{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \ "metadata_version": "1.1", \ "compat_version": "$(call json_quote,$(compat_version))", \ $(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \ - $(if $(filter-out 1.0,$(compat_version)),"new_supported_devices":[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma)) \ - $(if $(filter-out 1.0,$(compat_version)),"supported_devices": \ - ["$(call json_quote,Image version $(compat_version) incompatible to device: $(if $(DEVICE_COMPAT_MESSAGE),$(DEVICE_COMPAT_MESSAGE),Please check documentation ...))"]$(comma)) \ + $(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \ + [$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma) \ + "supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \ $(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma)) \ "version": { \ "dist": "$(call json_quote,$(VERSION_DIST))", \ From 1eac573b530425c80c046eaa0b373b5e63d92451 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 14 Jul 2020 16:42:40 +0200 Subject: [PATCH 16/20] ramips: mt7621: implement compatibility version for DSA migration This implements the newly introduced compat-version to prevent broken upgrade between swconfig and DSA for ramips' mt7621 subtarget. In order to make the situation more transparent for the user, and to prevent large switch-cases for devices, it is more convenient to have the entire subtarget 1.1-by-default. This means that new devices will be added with 1.1 from the start, but in contrast we don't need to switch them in board.d files. Apart from that, users that manually backport devices to 19.07 with swconfig will have an equivalent upgrade experience to officially supported devices. Since DSA support on mt7621 is out for a while already, this applies the same uci-defaults workaround for early adopters as already done for kirkwood and mvebu in previous commits. Signed-off-by: Adrian Schmutzler --- target/linux/ramips/image/mt7621.mk | 82 +++++++++++++++++++ .../base-files/etc/board.d/05_compat-version | 19 +++++ .../etc/uci-defaults/05_fix-compat-version | 8 ++ 3 files changed, 109 insertions(+) create mode 100755 target/linux/ramips/mt7621/base-files/etc/board.d/05_compat-version create mode 100644 target/linux/ramips/mt7621/base-files/etc/uci-defaults/05_fix-compat-version diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 7050b90cbb..34f0ee7e3c 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -105,7 +105,13 @@ define Build/ubnt-erx-factory-image fi endef +define Device/dsa-migration + DEVICE_COMPAT_VERSION := 1.1 + DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA +endef + define Device/adslr_g7 + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := ADSLR DEVICE_MODEL := G7 @@ -114,6 +120,7 @@ endef TARGET_DEVICES += adslr_g7 define Device/afoundry_ew1200 + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := AFOUNDRY DEVICE_MODEL := EW1200 @@ -124,6 +131,7 @@ endef TARGET_DEVICES += afoundry_ew1200 define Device/alfa-network_quad-e4g + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := ALFA Network DEVICE_MODEL := Quad-E4G @@ -133,6 +141,7 @@ endef TARGET_DEVICES += alfa-network_quad-e4g define Device/asiarf_ap7621-001 + $(Device/dsa-migration) IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-001 @@ -141,6 +150,7 @@ endef TARGET_DEVICES += asiarf_ap7621-001 define Device/asiarf_ap7621-nv1 + $(Device/dsa-migration) IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-NV1 @@ -149,6 +159,7 @@ endef TARGET_DEVICES += asiarf_ap7621-nv1 define Device/asus_rt-ac57u + $(Device/dsa-migration) DEVICE_VENDOR := ASUS DEVICE_MODEL := RT-AC57U IMAGE_SIZE := 16064k @@ -158,6 +169,7 @@ endef TARGET_DEVICES += asus_rt-ac57u define Device/asus_rt-ac65p + $(Device/dsa-migration) DEVICE_VENDOR := ASUS DEVICE_MODEL := RT-AC65P IMAGE_SIZE := 51200k @@ -174,6 +186,7 @@ endef TARGET_DEVICES += asus_rt-ac65p define Device/asus_rt-ac85p + $(Device/dsa-migration) DEVICE_VENDOR := ASUS DEVICE_MODEL := RT-AC85P IMAGE_SIZE := 51200k @@ -190,6 +203,7 @@ endef TARGET_DEVICES += asus_rt-ac85p define Device/buffalo_wsr-1166dhp + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata IMAGE_SIZE := 15936k @@ -201,6 +215,7 @@ endef TARGET_DEVICES += buffalo_wsr-1166dhp define Device/buffalo_wsr-2533dhpl + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 7936k DEVICE_VENDOR := Buffalo @@ -213,6 +228,7 @@ endef TARGET_DEVICES += buffalo_wsr-2533dhpl define Device/buffalo_wsr-600dhp + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := Buffalo DEVICE_MODEL := WSR-600DHP @@ -222,6 +238,7 @@ endef TARGET_DEVICES += buffalo_wsr-600dhp define Device/dlink_dir-8xx-a1 + $(Device/dsa-migration) IMAGE_SIZE := 16000k DEVICE_VENDOR := D-Link DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware @@ -234,6 +251,7 @@ define Device/dlink_dir-8xx-a1 endef define Device/dlink_dir-xx60-a1 + $(Device/dsa-migration) BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k @@ -257,6 +275,7 @@ endef TARGET_DEVICES += dlink_dir-1960-a1 define Device/dlink_dir-860l-b1 + $(Device/dsa-migration) $(Device/seama) BLOCKSIZE := 64k SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb @@ -295,6 +314,7 @@ endef TARGET_DEVICES += dlink_dir-882-a1 define Device/d-team_newifi-d2 + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 32448k DEVICE_VENDOR := Newifi @@ -305,6 +325,7 @@ endef TARGET_DEVICES += d-team_newifi-d2 define Device/d-team_pbr-m1 + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := PandoraBox DEVICE_MODEL := PBR-M1 @@ -315,6 +336,7 @@ endef TARGET_DEVICES += d-team_pbr-m1 define Device/edimax_ra21s + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 16064k DEVICE_VENDOR := Edimax @@ -329,6 +351,7 @@ endef TARGET_DEVICES += edimax_ra21s define Device/edimax_re23s + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 15680k DEVICE_VENDOR := Edimax @@ -347,6 +370,7 @@ endef TARGET_DEVICES += edimax_re23s define Device/edimax_rg21s + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 16064k DEVICE_VENDOR := Edimax @@ -359,6 +383,7 @@ endef TARGET_DEVICES += edimax_rg21s define Device/elecom_wrc-1167ghbk2-s + $(Device/dsa-migration) IMAGE_SIZE := 15488k DEVICE_VENDOR := ELECOM DEVICE_MODEL := WRC-1167GHBK2-S @@ -370,6 +395,7 @@ endef TARGET_DEVICES += elecom_wrc-1167ghbk2-s define Device/elecom_wrc-gs + $(Device/dsa-migration) $(Device/uimage-lzma-loader) DEVICE_VENDOR := ELECOM IMAGES += factory.bin @@ -419,6 +445,7 @@ endef TARGET_DEVICES += elecom_wrc-2533gst2 define Device/firefly_firewrt + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := Firefly DEVICE_MODEL := FireWRT @@ -428,6 +455,7 @@ endef TARGET_DEVICES += firefly_firewrt define Device/gehua_ghl-r-001 + $(Device/dsa-migration) IMAGE_SIZE := 32448k DEVICE_VENDOR := GeHua DEVICE_MODEL := GHL-R-001 @@ -437,6 +465,7 @@ endef TARGET_DEVICES += gehua_ghl-r-001 define Device/gnubee_gb-pc1 + $(Device/dsa-migration) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud One DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic @@ -445,6 +474,7 @@ endef TARGET_DEVICES += gnubee_gb-pc1 define Device/gnubee_gb-pc2 + $(Device/dsa-migration) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud Two DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic @@ -453,6 +483,7 @@ endef TARGET_DEVICES += gnubee_gb-pc2 define Device/hiwifi_hc5962 + $(Device/dsa-migration) BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k @@ -469,6 +500,7 @@ endef TARGET_DEVICES += hiwifi_hc5962 define Device/iodata_wn-ax1167gr + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 15552k KERNEL_INITRAMFS := $$(KERNEL) | \ @@ -480,6 +512,7 @@ endef TARGET_DEVICES += iodata_wn-ax1167gr define Device/iodata_nand + $(Device/dsa-migration) DEVICE_VENDOR := I-O DATA BLOCKSIZE := 128k PAGESIZE := 2048 @@ -522,6 +555,7 @@ endef TARGET_DEVICES += iodata_wn-dx1167r define Device/iodata_wn-gx300gr + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 7616k DEVICE_VENDOR := I-O DATA @@ -531,6 +565,7 @@ endef TARGET_DEVICES += iodata_wn-gx300gr define Device/iodata_wnpr2600g + $(Device/dsa-migration) $(Device/uimage-lzma-loader) DEVICE_VENDOR := I-O DATA DEVICE_MODEL := WNPR2600G @@ -543,6 +578,7 @@ endef TARGET_DEVICES += iodata_wnpr2600g define Device/iptime_a6ns-m + $(Device/dsa-migration) IMAGE_SIZE := 16128k UIMAGE_NAME := a6nm DEVICE_VENDOR := ipTIME @@ -553,6 +589,7 @@ endef TARGET_DEVICES += iptime_a6ns-m define Device/iptime_a8004t + $(Device/dsa-migration) IMAGE_SIZE := 16128k UIMAGE_NAME := a8004t DEVICE_VENDOR := ipTIME @@ -562,6 +599,7 @@ endef TARGET_DEVICES += iptime_a8004t define Device/jcg_jhr-ac876m + $(Device/dsa-migration) IMAGE_SIZE := 16064k IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | jcg-header 89.1 @@ -574,6 +612,7 @@ endef TARGET_DEVICES += jcg_jhr-ac876m define Device/lenovo_newifi-d1 + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 32448k DEVICE_VENDOR := Newifi @@ -585,6 +624,7 @@ endef TARGET_DEVICES += lenovo_newifi-d1 define Device/linksys_ea7xxx + $(Device/dsa-migration) $(Device/uimage-lzma-loader) BLOCKSIZE := 128k PAGESIZE := 2048 @@ -617,6 +657,7 @@ endef TARGET_DEVICES += linksys_ea7500-v2 define Device/linksys_re6500 + $(Device/dsa-migration) IMAGE_SIZE := 7872k DEVICE_VENDOR := Linksys DEVICE_MODEL := RE6500 @@ -626,6 +667,7 @@ endef TARGET_DEVICES += linksys_re6500 define Device/mediatek_ap-mt7621a-v60 + $(Device/dsa-migration) IMAGE_SIZE := 7872k DEVICE_VENDOR := Mediatek DEVICE_MODEL := AP-MT7621A-V60 EVB @@ -634,6 +676,7 @@ endef TARGET_DEVICES += mediatek_ap-mt7621a-v60 define Device/mediatek_mt7621-eval-board + $(Device/dsa-migration) BLOCKSIZE := 64k IMAGE_SIZE := 15104k DEVICE_VENDOR := MediaTek @@ -644,6 +687,7 @@ endef TARGET_DEVICES += mediatek_mt7621-eval-board define Device/MikroTik + $(Device/dsa-migration) DEVICE_VENDOR := MikroTik BLOCKSIZE := 64k IMAGE_SIZE := 16128k @@ -680,6 +724,7 @@ endef TARGET_DEVICES += mikrotik_routerboard-m33g define Device/mqmaker_witi + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := MQmaker DEVICE_MODEL := WiTi @@ -690,6 +735,7 @@ endef TARGET_DEVICES += mqmaker_witi define Device/mtc_wr1201 + $(Device/dsa-migration) IMAGE_SIZE := 16000k DEVICE_VENDOR := MTC DEVICE_MODEL := Wireless Router WR1201 @@ -700,6 +746,7 @@ endef TARGET_DEVICES += mtc_wr1201 define Device/netgear_ex6150 + $(Device/dsa-migration) DEVICE_VENDOR := NETGEAR DEVICE_MODEL := EX6150 DEVICE_PACKAGES := kmod-mt76x2 @@ -711,6 +758,7 @@ endef TARGET_DEVICES += netgear_ex6150 define Device/netgear_sercomm_nand + $(Device/dsa-migration) $(Device/uimage-lzma-loader) BLOCKSIZE := 128k PAGESIZE := 2048 @@ -833,6 +881,7 @@ endef TARGET_DEVICES += netgear_wac124 define Device/netgear_wndr3700-v5 + $(Device/dsa-migration) $(Device/netgear_sercomm_nor) $(Device/uimage-lzma-loader) IMAGE_SIZE := 15232k @@ -850,6 +899,7 @@ endef TARGET_DEVICES += netgear_wndr3700-v5 define Device/netis_wf2881 + $(Device/dsa-migration) BLOCKSIZE := 128k PAGESIZE := 2048 FILESYSTEMS := squashfs @@ -869,6 +919,7 @@ endef TARGET_DEVICES += netis_wf2881 define Device/phicomm_k2p + $(Device/dsa-migration) IMAGE_SIZE := 15744k DEVICE_VENDOR := Phicomm DEVICE_MODEL := K2P @@ -880,6 +931,7 @@ endef TARGET_DEVICES += phicomm_k2p define Device/planex_vr500 + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 65216k DEVICE_VENDOR := Planex @@ -890,6 +942,7 @@ endef TARGET_DEVICES += planex_vr500 define Device/samknows_whitebox-v8 + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := SamKnows DEVICE_MODEL := Whitebox 8 @@ -900,6 +953,7 @@ endef TARGET_DEVICES += samknows_whitebox-v8 define Device/storylink_sap-g3200u3 + $(Device/dsa-migration) IMAGE_SIZE := 7872k DEVICE_VENDOR := STORYLiNK DEVICE_MODEL := SAP-G3200U3 @@ -909,6 +963,7 @@ endef TARGET_DEVICES += storylink_sap-g3200u3 define Device/telco-electronics_x1 + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := Telco Electronics DEVICE_MODEL := X1 @@ -917,6 +972,7 @@ endef TARGET_DEVICES += telco-electronics_x1 define Device/thunder_timecloud + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 16064k DEVICE_VENDOR := Thunder @@ -927,6 +983,7 @@ endef TARGET_DEVICES += thunder_timecloud define Device/totolink_a7000r + $(Device/dsa-migration) IMAGE_SIZE := 16064k UIMAGE_NAME := C8340R1C-9999 DEVICE_VENDOR := TOTOLINK @@ -936,6 +993,7 @@ endef TARGET_DEVICES += totolink_a7000r define Device/tplink_re350-v1 + $(Device/dsa-migration) $(Device/tplink-safeloader) DEVICE_MODEL := RE350 DEVICE_VARIANT := v1 @@ -947,6 +1005,7 @@ endef TARGET_DEVICES += tplink_re350-v1 define Device/tplink_re500-v1 + $(Device/dsa-migration) $(Device/tplink-safeloader) DEVICE_MODEL := RE500 DEVICE_VARIANT := v1 @@ -957,6 +1016,7 @@ endef TARGET_DEVICES += tplink_re500-v1 define Device/tplink_re650-v1 + $(Device/dsa-migration) $(Device/tplink-safeloader) DEVICE_MODEL := RE650 DEVICE_VARIANT := v1 @@ -967,6 +1027,7 @@ endef TARGET_DEVICES += tplink_re650-v1 define Device/ubnt_edgerouter_common + $(Device/dsa-migration) $(Device/uimage-lzma-loader) DEVICE_VENDOR := Ubiquiti IMAGE_SIZE := 256768k @@ -994,6 +1055,7 @@ endef TARGET_DEVICES += ubnt_edgerouter-x-sfp define Device/ubnt_unifi-nanohd + $(Device/dsa-migration) DEVICE_VENDOR := Ubiquiti DEVICE_MODEL := UniFi nanoHD DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware @@ -1002,6 +1064,7 @@ endef TARGET_DEVICES += ubnt_unifi-nanohd define Device/unielec_u7621-06-16m + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 @@ -1012,6 +1075,7 @@ endef TARGET_DEVICES += unielec_u7621-06-16m define Device/unielec_u7621-06-64m + $(Device/dsa-migration) IMAGE_SIZE := 65216k DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 @@ -1022,6 +1086,7 @@ endef TARGET_DEVICES += unielec_u7621-06-64m define Device/wevo_11acnas + $(Device/dsa-migration) IMAGE_SIZE := 16064k UIMAGE_NAME := 11AC-NAS-Router(0.0.0) DEVICE_VENDOR := WeVO @@ -1033,6 +1098,7 @@ endef TARGET_DEVICES += wevo_11acnas define Device/wevo_w2914ns-v2 + $(Device/dsa-migration) IMAGE_SIZE := 16064k UIMAGE_NAME := W2914NS-V2(0.0.0) DEVICE_VENDOR := WeVO @@ -1045,6 +1111,7 @@ endef TARGET_DEVICES += wevo_w2914ns-v2 define Device/winstars_ws-wn583a6 + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 7872k DEVICE_VENDOR := Winstars @@ -1057,6 +1124,7 @@ endef TARGET_DEVICES += winstars_ws-wn583a6 define Device/xiaomi-ac2100 + $(Device/dsa-migration) $(Device/uimage-lzma-loader) BLOCKSIZE := 128k PAGESIZE := 2048 @@ -1079,6 +1147,7 @@ endef TARGET_DEVICES += xiaomi_mi-router-ac2100 define Device/xiaomi_mir3g + $(Device/dsa-migration) $(Device/uimage-lzma-loader) BLOCKSIZE := 128k PAGESIZE := 2048 @@ -1099,6 +1168,7 @@ endef TARGET_DEVICES += xiaomi_mir3g define Device/xiaomi_mir3g-v2 + $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 14848k DEVICE_VENDOR := Xiaomi @@ -1112,6 +1182,7 @@ endef TARGET_DEVICES += xiaomi_mir3g-v2 define Device/xiaomi_mir3p + $(Device/dsa-migration) $(Device/uimage-lzma-loader) BLOCKSIZE := 128k PAGESIZE := 2048 @@ -1136,6 +1207,7 @@ endef TARGET_DEVICES += xiaomi_redmi-router-ac2100 define Device/xiaoyu_xy-c5 + $(Device/dsa-migration) IMAGE_SIZE := 32448k DEVICE_VENDOR := XiaoYu DEVICE_MODEL := XY-C5 @@ -1144,6 +1216,7 @@ endef TARGET_DEVICES += xiaoyu_xy-c5 define Device/xzwifi_creativebox-v1 + $(Device/dsa-migration) IMAGE_SIZE := 32448k DEVICE_VENDOR := CreativeBox DEVICE_MODEL := v1 @@ -1153,6 +1226,7 @@ endef TARGET_DEVICES += xzwifi_creativebox-v1 define Device/youhua_wr1200js + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := YouHua DEVICE_MODEL := WR1200JS @@ -1162,6 +1236,7 @@ endef TARGET_DEVICES += youhua_wr1200js define Device/youku_yk-l2 + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := Youku DEVICE_MODEL := YK-L2 @@ -1171,6 +1246,7 @@ endef TARGET_DEVICES += youku_yk-l2 define Device/zbtlink_zbt-we1326 + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WE1326 @@ -1180,6 +1256,7 @@ endef TARGET_DEVICES += zbtlink_zbt-we1326 define Device/zbtlink_zbt-we3526 + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WE3526 @@ -1189,6 +1266,7 @@ endef TARGET_DEVICES += zbtlink_zbt-we3526 define Device/zbtlink_zbt-wg2626 + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WG2626 @@ -1199,6 +1277,7 @@ endef TARGET_DEVICES += zbtlink_zbt-wg2626 define Device/zbtlink_zbt-wg3526-16m + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WG3526 @@ -1210,6 +1289,7 @@ endef TARGET_DEVICES += zbtlink_zbt-wg3526-16m define Device/zbtlink_zbt-wg3526-32m + $(Device/dsa-migration) IMAGE_SIZE := 32448k DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WG3526 @@ -1221,6 +1301,7 @@ endef TARGET_DEVICES += zbtlink_zbt-wg3526-32m define Device/zio_freezio + $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := ZIO DEVICE_MODEL := FREEZIO @@ -1230,6 +1311,7 @@ endef TARGET_DEVICES += zio_freezio define Device/zyxel_wap6805 + $(Device/dsa-migration) BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/05_compat-version b/target/linux/ramips/mt7621/base-files/etc/board.d/05_compat-version new file mode 100755 index 0000000000..d79092f76f --- /dev/null +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/05_compat-version @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Copyright (C) 2020 OpenWrt.org +# + +. /lib/functions.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in + *) + ucidef_set_compat_version "1.1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/ramips/mt7621/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/05_fix-compat-version new file mode 100644 index 0000000000..09cce180e4 --- /dev/null +++ b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/05_fix-compat-version @@ -0,0 +1,8 @@ +# +# Copyright (C) 2020 OpenWrt.org +# + +uci set system.@system[0].compat_version="1.1" +uci commit system + +exit 0 From 4f1a51f438c422730b4f48fd808dc236bb8bc0b2 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 5 Aug 2020 12:05:24 +0200 Subject: [PATCH 17/20] ath79: drop redundant kmods-leds-gpio The ath79 target has CONFIG_LEDS_GPIO=y set in kernel config, so no need to pull the kmod-leds-gpio module for specific devices. Signed-off-by: Adrian Schmutzler --- target/linux/ath79/image/generic.mk | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 2e52be0959..6b7bfb4639 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -367,7 +367,7 @@ define Device/comfast_cf-e110n-v2 DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-E110N DEVICE_VARIANT := v2 - DEVICE_PACKAGES := rssileds kmod-leds-gpio -swconfig -uboot-envtools + DEVICE_PACKAGES := rssileds -swconfig -uboot-envtools IMAGE_SIZE := 16192k endef TARGET_DEVICES += comfast_cf-e110n-v2 @@ -377,7 +377,7 @@ define Device/comfast_cf-e120a-v3 DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-E120A DEVICE_VARIANT := v3 - DEVICE_PACKAGES := rssileds kmod-leds-gpio -uboot-envtools + DEVICE_PACKAGES := rssileds -uboot-envtools IMAGE_SIZE := 8000k endef TARGET_DEVICES += comfast_cf-e120a-v3 @@ -387,7 +387,7 @@ define Device/comfast_cf-e130n-v2 DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-E130N DEVICE_VARIANT := v2 - DEVICE_PACKAGES := rssileds kmod-leds-gpio -swconfig -uboot-envtools + DEVICE_PACKAGES := rssileds -swconfig -uboot-envtools IMAGE_SIZE := 7936k endef TARGET_DEVICES += comfast_cf-e130n-v2 @@ -396,7 +396,7 @@ define Device/comfast_cf-e313ac SOC := qca9531 DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-E313AC - DEVICE_PACKAGES := rssileds kmod-leds-gpio kmod-ath10k-ct-smallbuffers \ + DEVICE_PACKAGES := rssileds kmod-ath10k-ct-smallbuffers \ ath10k-firmware-qca9888-ct -swconfig -uboot-envtools IMAGE_SIZE := 7936k endef @@ -416,7 +416,7 @@ define Device/comfast_cf-e5 SOC := qca9531 DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-E5/E7 - DEVICE_PACKAGES := rssileds kmod-leds-gpio kmod-usb2 kmod-usb-net \ + DEVICE_PACKAGES := rssileds kmod-usb2 kmod-usb-net \ kmod-usb-net-qmi-wwan -swconfig -uboot-envtools IMAGE_SIZE := 16192k endef @@ -426,8 +426,7 @@ define Device/comfast_cf-e560ac SOC := qca9531 DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-E560AC - DEVICE_PACKAGES := kmod-leds-gpio kmod-usb2 kmod-ath10k-ct \ - ath10k-firmware-qca9888-ct + DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9888-ct IMAGE_SIZE := 16128k endef TARGET_DEVICES += comfast_cf-e560ac From df3ad130d561c55bf7c48ad5cff1a79de144413e Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Sat, 8 Aug 2020 17:05:48 +0200 Subject: [PATCH 18/20] ipq806x: replace patches with upstream version Replace all the custom patches with the backported upstream version Signed-off-by: Ansuel Smith [refresh patches] Signed-off-by: Adrian Schmutzler --- ...e-scm_call-to-route-GPIO-irq-to-Apps.patch | 79 ------------- ...e-scm_call-to-route-GPIO-irq-to-Apps.patch | 104 ++++++++++++++++++ ...ixed-missing-RGMII-pincontrol-defin.patch} | 14 ++- ...-disable-pretimeout-on-timer-platfo.patch} | 11 +- ...d-the-enable-regs-and-mask-for-PRNG.patch} | 13 ++- ...patch => 090-v5.8-clk-clk-rpm-fixes.patch} | 65 +++++------ ...1-v5.8-regulator-add-smb208-support.patch} | 16 ++- ...6x-net-mdio-add-ipq8064-mdio-driver.patch} | 82 ++++++++------ 8 files changed, 218 insertions(+), 166 deletions(-) delete mode 100644 target/linux/ipq806x/patches-5.4/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch create mode 100644 target/linux/ipq806x/patches-5.4/086-v5.8-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch rename target/linux/ipq806x/patches-5.4/{0075-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch => 087-v5.8-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch} (80%) rename target/linux/ipq806x/patches-5.4/{0076-watchdog-qcom-wdt-disable-pretimeout-on-timer-platfo.patch => 088-v5.8-watchdog-qcom-wdt-disable-pretimeout-on-timer-platfo.patch} (87%) rename target/linux/ipq806x/patches-5.4/{0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch => 089-v5.8-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch} (52%) rename target/linux/ipq806x/patches-5.4/{0064-clk-clk-rpm-fixes.patch => 090-v5.8-clk-clk-rpm-fixes.patch} (80%) rename target/linux/ipq806x/patches-5.4/{0053-regulator-add-smb208-support.patch => 091-v5.8-regulator-add-smb208-support.patch} (78%) rename target/linux/ipq806x/patches-5.4/{700-net-mdio-add-ipq8064-mdio-driver.patch => 094-v5.7-ipq806x-net-mdio-add-ipq8064-mdio-driver.patch} (74%) diff --git a/target/linux/ipq806x/patches-5.4/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch b/target/linux/ipq806x/patches-5.4/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch deleted file mode 100644 index 53e81b7a78..0000000000 --- a/target/linux/ipq806x/patches-5.4/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 2034addc7e193dc81d7ca60d8884832751b76758 Mon Sep 17 00:00:00 2001 -From: Ajay Kishore -Date: Tue, 24 Jan 2017 14:14:16 +0530 -Subject: pinctrl: qcom: use scm_call to route GPIO irq to Apps - -For IPQ806x targets, TZ protects the registers that are used to -configure the routing of interrupts to a target processor. -To resolve this, this patch uses scm call to route GPIO interrupts -to application processor. Also the scm call interface is changed. - -Change-Id: Ib6c06829d04bc8c20483c36e63da92e26cdef9ce -Signed-off-by: Ajay Kishore ---- - ---- a/drivers/pinctrl/qcom/pinctrl-msm.c -+++ b/drivers/pinctrl/qcom/pinctrl-msm.c -@@ -22,7 +22,8 @@ - #include - #include - #include -- -+#include -+#include - #include "../core.h" - #include "../pinconf.h" - #include "pinctrl-msm.h" -@@ -706,6 +707,9 @@ static void msm_gpio_irq_mask(struct irq - const struct msm_pingroup *g; - unsigned long flags; - u32 val; -+ u32 addr; -+ int ret; -+ const __be32 *reg; - - g = &pctrl->soc->groups[d->hwirq]; - -@@ -819,6 +823,7 @@ static int msm_gpio_irq_set_type(struct - const struct msm_pingroup *g; - unsigned long flags; - u32 val; -+ int ret; - - g = &pctrl->soc->groups[d->hwirq]; - -@@ -832,11 +837,30 @@ static int msm_gpio_irq_set_type(struct - else - clear_bit(d->hwirq, pctrl->dual_edge_irqs); - -+ ret = of_device_is_compatible(pctrl->dev->of_node, -+ "qcom,ipq8064-pinctrl"); - /* Route interrupts to application cpu */ -- val = msm_readl_intr_target(pctrl, g); -- val &= ~(7 << g->intr_target_bit); -- val |= g->intr_target_kpss_val << g->intr_target_bit; -- msm_writel_intr_target(val, pctrl, g); -+ if (!ret) { -+ val = msm_readl_intr_target(pctrl, g); -+ val &= ~(7 << g->intr_target_bit); -+ val |= g->intr_target_kpss_val << g->intr_target_bit; -+ msm_writel_intr_target(val, pctrl, g); -+ } else { -+ const __be32 *reg = of_get_property(pctrl->dev->of_node, "reg", NULL); -+ if (reg) { -+ u32 addr = be32_to_cpup(reg) + g->intr_target_reg; -+ qcom_scm_io_readl(addr, &val); -+ __iormb(); -+ -+ val &= ~(7 << g->intr_target_bit); -+ val |= g->intr_target_kpss_val << g->intr_target_bit; -+ -+ __iowmb(); -+ ret = qcom_scm_io_writel(addr, val); -+ if (ret) -+ pr_err("\n Routing interrupts to Apps proc failed"); -+ } -+ } - - /* Update configuration for gpio. - * RAW_STATUS_EN is left on for all gpio irqs. Due to the diff --git a/target/linux/ipq806x/patches-5.4/086-v5.8-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch b/target/linux/ipq806x/patches-5.4/086-v5.8-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch new file mode 100644 index 0000000000..2b5171fc54 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/086-v5.8-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch @@ -0,0 +1,104 @@ +From 13bec8d49bdf10aab4e1570ef42417f6bfbb6126 Mon Sep 17 00:00:00 2001 +From: Ajay Kishore +Date: Fri, 27 Mar 2020 23:32:08 +0100 +Subject: pinctrl: qcom: use scm_call to route GPIO irq to Apps + +For IPQ806x targets, TZ protects the registers that are used to +configure the routing of interrupts to a target processor. +To resolve this, this patch uses scm call to route GPIO interrupts +to application processor. Also the scm call interface is changed. + +Signed-off-by: Ajay Kishore +Signed-off-by: Ansuel Smith +Link: https://lore.kernel.org/r/20200327223209.20409-1-ansuelsmth@gmail.com +Reviewed-by: Bjorn Andersson +Signed-off-by: Linus Walleij +--- + drivers/pinctrl/qcom/pinctrl-msm.c | 43 ++++++++++++++++++++++++++++++++------ + 1 file changed, 37 insertions(+), 6 deletions(-) + +(limited to 'drivers/pinctrl/qcom/pinctrl-msm.c') + +--- a/drivers/pinctrl/qcom/pinctrl-msm.c ++++ b/drivers/pinctrl/qcom/pinctrl-msm.c +@@ -22,6 +22,8 @@ + #include + #include + #include ++#include ++#include + + #include "../core.h" + #include "../pinconf.h" +@@ -57,6 +59,8 @@ struct msm_pinctrl { + struct irq_chip irq_chip; + int irq; + ++ bool intr_target_use_scm; ++ + raw_spinlock_t lock; + + DECLARE_BITMAP(dual_edge_irqs, MAX_NR_GPIO); +@@ -64,6 +68,7 @@ struct msm_pinctrl { + + const struct msm_pinctrl_soc_data *soc; + void __iomem *regs[MAX_NR_TILES]; ++ u32 phys_base[MAX_NR_TILES]; + }; + + #define MSM_ACCESSOR(name) \ +@@ -832,11 +837,30 @@ static int msm_gpio_irq_set_type(struct + else + clear_bit(d->hwirq, pctrl->dual_edge_irqs); + +- /* Route interrupts to application cpu */ +- val = msm_readl_intr_target(pctrl, g); +- val &= ~(7 << g->intr_target_bit); +- val |= g->intr_target_kpss_val << g->intr_target_bit; +- msm_writel_intr_target(val, pctrl, g); ++ /* Route interrupts to application cpu. ++ * With intr_target_use_scm interrupts are routed to ++ * application cpu using scm calls. ++ */ ++ if (pctrl->intr_target_use_scm) { ++ u32 addr = pctrl->phys_base[0] + g->intr_target_reg; ++ int ret; ++ ++ qcom_scm_io_readl(addr, &val); ++ ++ val &= ~(7 << g->intr_target_bit); ++ val |= g->intr_target_kpss_val << g->intr_target_bit; ++ ++ ret = qcom_scm_io_writel(addr, val); ++ if (ret) ++ dev_err(pctrl->dev, ++ "Failed routing %lu interrupt to Apps proc", ++ d->hwirq); ++ } else { ++ val = msm_readl_intr_target(pctrl, g); ++ val &= ~(7 << g->intr_target_bit); ++ val |= g->intr_target_kpss_val << g->intr_target_bit; ++ msm_writel_intr_target(val, pctrl, g); ++ } + + /* Update configuration for gpio. + * RAW_STATUS_EN is left on for all gpio irqs. Due to the +@@ -1138,6 +1162,9 @@ int msm_pinctrl_probe(struct platform_de + pctrl->dev = &pdev->dev; + pctrl->soc = soc_data; + pctrl->chip = msm_gpio_template; ++ pctrl->intr_target_use_scm = of_device_is_compatible( ++ pctrl->dev->of_node, ++ "qcom,ipq8064-pinctrl"); + + raw_spin_lock_init(&pctrl->lock); + +@@ -1154,6 +1181,8 @@ int msm_pinctrl_probe(struct platform_de + pctrl->regs[0] = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(pctrl->regs[0])) + return PTR_ERR(pctrl->regs[0]); ++ ++ pctrl->phys_base[0] = res->start; + } + + msm_pinctrl_setup_pm_reset(pctrl); diff --git a/target/linux/ipq806x/patches-5.4/0075-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch b/target/linux/ipq806x/patches-5.4/087-v5.8-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch similarity index 80% rename from target/linux/ipq806x/patches-5.4/0075-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch rename to target/linux/ipq806x/patches-5.4/087-v5.8-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch index a0ea8eba54..612c33cd0e 100644 --- a/target/linux/ipq806x/patches-5.4/0075-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch +++ b/target/linux/ipq806x/patches-5.4/087-v5.8-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch @@ -1,9 +1,15 @@ -From a3488aa9bed37c56e405967d44e821c484b5d6b9 Mon Sep 17 00:00:00 2001 -From: Ram Chandra Jangir -Date: Fri, 28 Sep 2018 15:19:50 +0530 -Subject: [PATCH] ipq8064: pinctrl: Fixed missing RGMII pincontrol definitions +From 8d8cec9bf6e9260397872785f249dfb59a417d08 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Wed, 19 Feb 2020 18:59:39 +0100 +Subject: ipq8064: pinctrl: Fixed missing RGMII pincontrol definitions + +Add missing gpio definition for mdio and rgmii2. Signed-off-by: Ram Chandra Jangir +Signed-off-by: Ansuel Smith +Link: https://lore.kernel.org/r/20200219175940.744-1-ansuelsmth@gmail.com +Acked-by: Bjorn Andersson +Signed-off-by: Linus Walleij --- drivers/pinctrl/qcom/pinctrl-ipq8064.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/linux/ipq806x/patches-5.4/0076-watchdog-qcom-wdt-disable-pretimeout-on-timer-platfo.patch b/target/linux/ipq806x/patches-5.4/088-v5.8-watchdog-qcom-wdt-disable-pretimeout-on-timer-platfo.patch similarity index 87% rename from target/linux/ipq806x/patches-5.4/0076-watchdog-qcom-wdt-disable-pretimeout-on-timer-platfo.patch rename to target/linux/ipq806x/patches-5.4/088-v5.8-watchdog-qcom-wdt-disable-pretimeout-on-timer-platfo.patch index cc60cd7a08..605eb7d07b 100644 --- a/target/linux/ipq806x/patches-5.4/0076-watchdog-qcom-wdt-disable-pretimeout-on-timer-platfo.patch +++ b/target/linux/ipq806x/patches-5.4/088-v5.8-watchdog-qcom-wdt-disable-pretimeout-on-timer-platfo.patch @@ -1,7 +1,7 @@ -From 53ae145a7afa7686e03332d61eed90b7fa7c2529 Mon Sep 17 00:00:00 2001 +From 000de5417107623925a4cf0310579f744ff43c28 Mon Sep 17 00:00:00 2001 From: Ansuel Smith -Date: Tue, 4 Feb 2020 19:38:06 +0100 -Subject: [PATCH v2] watchdog: qcom-wdt: disable pretimeout on timer platform +Date: Tue, 4 Feb 2020 20:56:48 +0100 +Subject: watchdog: qcom-wdt: disable pretimeout on timer platform Some platform like ipq806x doesn't support pretimeout and define some interrupts used by qcom,msm-timer. Change the driver to check @@ -9,6 +9,11 @@ and use pretimeout only on qcom,kpss-wdt as it's the only platform that actually supports it. Signed-off-by: Ansuel Smith +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/20200204195648.23350-1-ansuelsmth@gmail.com +[groeck: Conflict resolution] +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/qcom-wdt.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/target/linux/ipq806x/patches-5.4/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch b/target/linux/ipq806x/patches-5.4/089-v5.8-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch similarity index 52% rename from target/linux/ipq806x/patches-5.4/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch rename to target/linux/ipq806x/patches-5.4/089-v5.8-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch index 0965a31d90..015a917e20 100644 --- a/target/linux/ipq806x/patches-5.4/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch +++ b/target/linux/ipq806x/patches-5.4/089-v5.8-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch @@ -1,13 +1,16 @@ -From a16fcf911a020e46439a3bb3e702463fc3159831 Mon Sep 17 00:00:00 2001 +From 1aec193ea41d672d11592714cdda8167eb3b38fc Mon Sep 17 00:00:00 2001 From: Abhishek Sahu -Date: Wed, 18 Nov 2015 12:38:56 +0530 -Subject: [PATCH 62/69] ipq806x: gcc: Added the enable regs and mask for PRNG +Date: Wed, 18 Mar 2020 14:16:56 +0100 +Subject: ipq806x: gcc: Added the enable regs and mask for PRNG -kernel got hanged while reading from /dev/hwrng at the +Kernel got hanged while reading from /dev/hwrng at the time of PRNG clock enable -Change-Id: I89856c7e19e6639508e6a2774304583a3ec91172 +Fixes: 24d8fba44af3 "clk: qcom: Add support for IPQ8064's global clock controller (GCC)" Signed-off-by: Abhishek Sahu +Signed-off-by: Ansuel Smith +Link: https://lkml.kernel.org/r/20200318131657.345-1-ansuelsmth@gmail.com +Signed-off-by: Stephen Boyd --- drivers/clk/qcom/gcc-ipq806x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/ipq806x/patches-5.4/0064-clk-clk-rpm-fixes.patch b/target/linux/ipq806x/patches-5.4/090-v5.8-clk-clk-rpm-fixes.patch similarity index 80% rename from target/linux/ipq806x/patches-5.4/0064-clk-clk-rpm-fixes.patch rename to target/linux/ipq806x/patches-5.4/090-v5.8-clk-clk-rpm-fixes.patch index e3a955b659..a28570974e 100644 --- a/target/linux/ipq806x/patches-5.4/0064-clk-clk-rpm-fixes.patch +++ b/target/linux/ipq806x/patches-5.4/090-v5.8-clk-clk-rpm-fixes.patch @@ -1,9 +1,16 @@ -From d30840e2b1cf79d90392e6051b0c0b6006d29d8b Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Thu, 9 Mar 2017 09:32:40 +0100 -Subject: [PATCH 64/69] clk: clk-rpm fixes +From eec152734be10c72d2d413a27ca9d282c28cdb61 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 10 Mar 2020 15:37:56 +0100 +Subject: clk: qcom: clk-rpm: add missing rpm clk for ipq806x + +Add missing definition of rpm clk for ipq806x soc Signed-off-by: John Crispin +Signed-off-by: Ansuel Smith +Acked-by: John Crispin +Reviewed-by: Rob Herring +Link: https://lkml.kernel.org/r/20200310143756.244-1-ansuelsmth@gmail.com +Signed-off-by: Stephen Boyd --- .../devicetree/bindings/clock/qcom,rpmcc.txt | 1 + drivers/clk/qcom/clk-rpm.c | 35 ++++++++++++++++++++++ @@ -12,32 +19,19 @@ Signed-off-by: John Crispin --- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt -@@ -16,6 +16,7 @@ Required properties : +@@ -15,6 +15,7 @@ Required properties : + "qcom,rpmcc-msm8916", "qcom,rpmcc" "qcom,rpmcc-msm8974", "qcom,rpmcc" "qcom,rpmcc-apq8064", "qcom,rpmcc" - "qcom,rpmcc-msm8996", "qcom,rpmcc" + "qcom,rpmcc-ipq806x", "qcom,rpmcc" + "qcom,rpmcc-msm8996", "qcom,rpmcc" "qcom,rpmcc-msm8998", "qcom,rpmcc" "qcom,rpmcc-qcs404", "qcom,rpmcc" - ---- a/include/dt-bindings/clock/qcom,rpmcc.h -+++ b/include/dt-bindings/clock/qcom,rpmcc.h -@@ -37,6 +37,10 @@ - #define RPM_XO_A0 27 - #define RPM_XO_A1 28 - #define RPM_XO_A2 29 -+#define RPM_NSS_FABRIC_0_CLK 30 -+#define RPM_NSS_FABRIC_0_A_CLK 31 -+#define RPM_NSS_FABRIC_1_CLK 32 -+#define RPM_NSS_FABRIC_1_A_CLK 33 - - /* SMD RPM clocks */ - #define RPM_SMD_XO_CLK_SRC 0 --- a/drivers/clk/qcom/clk-rpm.c +++ b/drivers/clk/qcom/clk-rpm.c -@@ -512,6 +512,16 @@ DEFINE_CLK_RPM_XO_BUFFER(apq8064, xo_a0_ - DEFINE_CLK_RPM_XO_BUFFER(apq8064, xo_a1_clk, xo_a1_a_clk, 24); - DEFINE_CLK_RPM_XO_BUFFER(apq8064, xo_a2_clk, xo_a2_a_clk, 28); +@@ -543,10 +543,45 @@ static const struct rpm_clk_desc rpm_clk + .num_clks = ARRAY_SIZE(apq8064_clks), + }; +/* ipq806x */ +DEFINE_CLK_RPM(ipq806x, afab_clk, afab_a_clk, QCOM_RPM_APPS_FABRIC_CLK); @@ -49,13 +43,6 @@ Signed-off-by: John Crispin +DEFINE_CLK_RPM(ipq806x, nss_fabric_0_clk, nss_fabric_0_a_clk, QCOM_RPM_NSS_FABRIC_0_CLK); +DEFINE_CLK_RPM(ipq806x, nss_fabric_1_clk, nss_fabric_1_a_clk, QCOM_RPM_NSS_FABRIC_1_CLK); + - static struct clk_rpm *apq8064_clks[] = { - [RPM_APPS_FABRIC_CLK] = &apq8064_afab_clk, - [RPM_APPS_FABRIC_A_CLK] = &apq8064_afab_a_clk, -@@ -538,15 +548,40 @@ static struct clk_rpm *apq8064_clks[] = - [RPM_XO_A2] = &apq8064_xo_a2_clk, - }; - +static struct clk_rpm *ipq806x_clks[] = { + [RPM_APPS_FABRIC_CLK] = &ipq806x_afab_clk, + [RPM_APPS_FABRIC_A_CLK] = &ipq806x_afab_a_clk, @@ -75,11 +62,6 @@ Signed-off-by: John Crispin + [RPM_NSS_FABRIC_1_A_CLK] = &ipq806x_nss_fabric_1_a_clk, +}; + - static const struct rpm_clk_desc rpm_clk_apq8064 = { - .clks = apq8064_clks, - .num_clks = ARRAY_SIZE(apq8064_clks), - }; - +static const struct rpm_clk_desc rpm_clk_ipq806x = { + .clks = ipq806x_clks, + .num_clks = ARRAY_SIZE(ipq806x_clks), @@ -93,3 +75,16 @@ Signed-off-by: John Crispin { } }; MODULE_DEVICE_TABLE(of, rpm_clk_match_table); +--- a/include/dt-bindings/clock/qcom,rpmcc.h ++++ b/include/dt-bindings/clock/qcom,rpmcc.h +@@ -37,6 +37,10 @@ + #define RPM_XO_A0 27 + #define RPM_XO_A1 28 + #define RPM_XO_A2 29 ++#define RPM_NSS_FABRIC_0_CLK 30 ++#define RPM_NSS_FABRIC_0_A_CLK 31 ++#define RPM_NSS_FABRIC_1_CLK 32 ++#define RPM_NSS_FABRIC_1_A_CLK 33 + + /* SMD RPM clocks */ + #define RPM_SMD_XO_CLK_SRC 0 diff --git a/target/linux/ipq806x/patches-5.4/0053-regulator-add-smb208-support.patch b/target/linux/ipq806x/patches-5.4/091-v5.8-regulator-add-smb208-support.patch similarity index 78% rename from target/linux/ipq806x/patches-5.4/0053-regulator-add-smb208-support.patch rename to target/linux/ipq806x/patches-5.4/091-v5.8-regulator-add-smb208-support.patch index 058b303798..42a02865a3 100644 --- a/target/linux/ipq806x/patches-5.4/0053-regulator-add-smb208-support.patch +++ b/target/linux/ipq806x/patches-5.4/091-v5.8-regulator-add-smb208-support.patch @@ -1,9 +1,17 @@ -From ef10381ca4d01848ebedb4afb2c78feb8052f103 Mon Sep 17 00:00:00 2001 -From: Adrian Panella -Date: Thu, 9 Mar 2017 08:26:54 +0100 -Subject: [PATCH 53/69] regulator: add smb208 support +From b5f25304aece9f2e7eaab275bbb5461c666bf38c Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Wed, 19 Feb 2020 17:37:11 +0100 +Subject: regulator: add smb208 support +Smb208 regulators are used on some ipq806x soc. +Add support for it to make it avaiable on some routers +that use it. + +Signed-off-by: Ansuel Smith Signed-off-by: Adrian Panella +Acked-by: Lee Jones +Link: https://lore.kernel.org/r/20200219163711.479-1-ansuelsmth@gmail.com +Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/mfd/qcom-rpm.txt | 4 ++++ drivers/regulator/qcom_rpm-regulator.c | 9 +++++++++ diff --git a/target/linux/ipq806x/patches-5.4/700-net-mdio-add-ipq8064-mdio-driver.patch b/target/linux/ipq806x/patches-5.4/094-v5.7-ipq806x-net-mdio-add-ipq8064-mdio-driver.patch similarity index 74% rename from target/linux/ipq806x/patches-5.4/700-net-mdio-add-ipq8064-mdio-driver.patch rename to target/linux/ipq806x/patches-5.4/094-v5.7-ipq806x-net-mdio-add-ipq8064-mdio-driver.patch index 8ed3e035fd..fb8c827d65 100644 --- a/target/linux/ipq806x/patches-5.4/700-net-mdio-add-ipq8064-mdio-driver.patch +++ b/target/linux/ipq806x/patches-5.4/094-v5.7-ipq806x-net-mdio-add-ipq8064-mdio-driver.patch @@ -1,14 +1,21 @@ -From 5de1da6c862de6a92ac9aed521f21fd5a180f22b Mon Sep 17 00:00:00 2001 -From: Christian Lamparter -Date: Sat, 2 Feb 2019 02:48:35 +0100 -Subject: [PATCH] net: mdio: add ipq8064 mdio driver +From caaa71fac36ec8c19145dbf8262a9b77ab09f1a1 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Wed, 4 Mar 2020 22:38:32 +0100 +Subject: net: mdio: add ipq8064 mdio driver +Currently ipq806x soc use generic bitbang driver to +comunicate with the gmac ethernet interface. +Add a dedicated driver created by chunkeey to fix this. + +Co-developed-by: Christian Lamparter Signed-off-by: Christian Lamparter +Signed-off-by: Ansuel Smith +Signed-off-by: David S. Miller --- drivers/net/phy/Kconfig | 8 ++ drivers/net/phy/Makefile | 1 + - drivers/net/phy/mdio-ipq8064.c | 163 +++++++++++++++++++++++++++++++++ - 3 files changed, 172 insertions(+) + drivers/net/phy/mdio-ipq8064.c | 166 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 175 insertions(+) create mode 100644 drivers/net/phy/mdio-ipq8064.c --- a/drivers/net/phy/Kconfig @@ -40,12 +47,13 @@ Signed-off-by: Christian Lamparter obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o --- /dev/null +++ b/drivers/net/phy/mdio-ipq8064.c -@@ -0,0 +1,163 @@ +@@ -0,0 +1,166 @@ +// SPDX-License-Identifier: GPL-2.0 -+// -+// Qualcomm IPQ8064 MDIO interface driver -+// -+// Copyright (C) 2019 Christian Lamparter ++/* Qualcomm IPQ8064 MDIO interface driver ++ * ++ * Copyright (C) 2019 Christian Lamparter ++ * Copyright (C) 2020 Ansuel Smith ++ */ + +#include +#include @@ -74,8 +82,8 @@ Signed-off-by: Christian Lamparter + +#define MII_DATA_REG_ADDR 0x14 + -+#define MII_MDIO_DELAY (1000) -+#define MII_MDIO_RETRY (10) ++#define MII_MDIO_DELAY_USEC (1000) ++#define MII_MDIO_RETRY_MSEC (10) + +struct ipq8064_mdio { + struct regmap *base; /* NSS_GMAC0_BASE */ @@ -84,34 +92,30 @@ Signed-off-by: Christian Lamparter +static int +ipq8064_mdio_wait_busy(struct ipq8064_mdio *priv) +{ -+ int i; ++ u32 busy; + -+ for (i = 0; i < MII_MDIO_RETRY; i++) { -+ unsigned int busy; -+ -+ regmap_read(priv->base, MII_ADDR_REG_ADDR, &busy); -+ if (!(busy & MII_BUSY)) -+ return 0; -+ -+ udelay(MII_MDIO_DELAY); -+ } -+ -+ return -ETIMEDOUT; ++ return regmap_read_poll_timeout(priv->base, MII_ADDR_REG_ADDR, busy, ++ !(busy & MII_BUSY), MII_MDIO_DELAY_USEC, ++ MII_MDIO_RETRY_MSEC * USEC_PER_MSEC); +} + +static int +ipq8064_mdio_read(struct mii_bus *bus, int phy_addr, int reg_offset) +{ -+ struct ipq8064_mdio *priv = bus->priv; + u32 miiaddr = MII_BUSY | MII_CLKRANGE_250_300M; ++ struct ipq8064_mdio *priv = bus->priv; + u32 ret_val; + int err; + ++ /* Reject clause 45 */ ++ if (reg_offset & MII_ADDR_C45) ++ return -EOPNOTSUPP; ++ + miiaddr |= ((phy_addr << MII_ADDR_SHIFT) & MII_ADDR_MASK) | + ((reg_offset << MII_REG_SHIFT) & MII_REG_MASK); + + regmap_write(priv->base, MII_ADDR_REG_ADDR, miiaddr); -+ udelay(10); ++ usleep_range(8, 10); + + err = ipq8064_mdio_wait_busy(priv); + if (err) @@ -124,8 +128,12 @@ Signed-off-by: Christian Lamparter +static int +ipq8064_mdio_write(struct mii_bus *bus, int phy_addr, int reg_offset, u16 data) +{ -+ struct ipq8064_mdio *priv = bus->priv; + u32 miiaddr = MII_WRITE | MII_BUSY | MII_CLKRANGE_250_300M; ++ struct ipq8064_mdio *priv = bus->priv; ++ ++ /* Reject clause 45 */ ++ if (reg_offset & MII_ADDR_C45) ++ return -EOPNOTSUPP; + + regmap_write(priv->base, MII_DATA_REG_ADDR, data); + @@ -133,7 +141,7 @@ Signed-off-by: Christian Lamparter + ((reg_offset << MII_REG_SHIFT) & MII_REG_MASK); + + regmap_write(priv->base, MII_ADDR_REG_ADDR, miiaddr); -+ udelay(10); ++ usleep_range(8, 10); + + return ipq8064_mdio_wait_busy(priv); +} @@ -157,13 +165,14 @@ Signed-off-by: Christian Lamparter + bus->parent = &pdev->dev; + + priv = bus->priv; -+ priv->base = syscon_node_to_regmap(np); -+ if (IS_ERR_OR_NULL(priv->base)) { -+ priv->base = syscon_regmap_lookup_by_phandle(np, "master"); -+ if (IS_ERR_OR_NULL(priv->base)) { -+ pr_err("master phandle not found\n"); -+ return -EINVAL; -+ } ++ priv->base = device_node_to_regmap(np); ++ if (IS_ERR(priv->base)) { ++ if (priv->base == ERR_PTR(-EPROBE_DEFER)) ++ return -EPROBE_DEFER; ++ ++ dev_err(&pdev->dev, "error getting device regmap, error=%pe\n", ++ priv->base); ++ return PTR_ERR(priv->base); + } + + ret = of_mdiobus_register(bus, np); @@ -203,4 +212,5 @@ Signed-off-by: Christian Lamparter + +MODULE_DESCRIPTION("Qualcomm IPQ8064 MDIO interface driver"); +MODULE_AUTHOR("Christian Lamparter "); ++MODULE_AUTHOR("Ansuel Smith "); +MODULE_LICENSE("GPL"); From 372529d3117ef8cd6dc37d61d405e24ccba3584a Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 15 Apr 2020 13:19:33 +0200 Subject: [PATCH 19/20] ath79: add support for TP-Link TL-WA901ND v3 This ports support for the TL-WA901ND v3 from ar71xx to ath79. Most of the hardware is shared with the TL-WA850/860RE v1 range extenders. It completes the TL-WA901ND series in ath79. Specifications: Board: AP123 / AR9341 Flash/RAM: 4/32 MiB CPU: 535 MHz WiFi: 2.4 GHz b/g/n Ethernet: 1 port (100M) Flashing instructions: Upload the factory image via the vendor firmware upgrade option. This has not been tested on device, but port from ar71xx is straightforward and the device will be disabled by default anyway. Signed-off-by: Adrian Schmutzler --- .../ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts | 52 +++++++++++++++++++ target/linux/ath79/image/tiny-tp-link.mk | 10 ++++ .../ath79/tiny/base-files/etc/board.d/01_leds | 1 + .../tiny/base-files/etc/board.d/02_network | 1 + 4 files changed, 64 insertions(+) create mode 100644 target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts new file mode 100644 index 0000000000..4abdd60c3c --- /dev/null +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9341_tplink_tl-wa.dtsi" + +/ { + model = "TP-Link TL-WA901ND v3"; + compatible = "tplink,tl-wa901nd-v3", "qca,ar9341"; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + lan { + label = "tp-link:green:lan"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "tp-link:green:wlan"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + qss { + label = "tp-link:green:qss"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + led_system: system { + label = "tp-link:green:system"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + }; +}; diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk index 0da712c5d4..c918c6baa6 100644 --- a/target/linux/ath79/image/tiny-tp-link.mk +++ b/target/linux/ath79/image/tiny-tp-link.mk @@ -191,6 +191,16 @@ define Device/tplink_tl-wa901nd-v2 endef TARGET_DEVICES += tplink_tl-wa901nd-v2 +define Device/tplink_tl-wa901nd-v3 + $(Device/tplink-4mlzma) + SOC := ar9341 + DEVICE_MODEL := TL-WA901ND + DEVICE_VARIANT := v3 + TPLINK_HWID := 0x09010003 + SUPPORTED_DEVICES += tl-wa901nd-v3 +endef +TARGET_DEVICES += tplink_tl-wa901nd-v3 + define Device/tplink_tl-wa901nd-v4 $(Device/tplink-4mlzma) SOC := tp9343 diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds index ec8e2d60c5..bc0b15bba5 100755 --- a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds @@ -50,6 +50,7 @@ tplink,tl-wa801nd-v4|\ tplink,tl-wa830re-v1|\ tplink,tl-wa860re-v1|\ tplink,tl-wa901nd-v1|\ +tplink,tl-wa901nd-v3|\ tplink,tl-wa901nd-v4|\ tplink,tl-wa901nd-v5) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/02_network b/target/linux/ath79/tiny/base-files/etc/board.d/02_network index 87f8d27ec9..cbcdbe9a89 100755 --- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network +++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network @@ -43,6 +43,7 @@ ath79_setup_interfaces() tplink,tl-wa860re-v1|\ tplink,tl-wa901nd-v1|\ tplink,tl-wa901nd-v2|\ + tplink,tl-wa901nd-v3|\ tplink,tl-wa901nd-v4|\ tplink,tl-wa901nd-v5|\ tplink,tl-wr703n|\ From e81e625ca375d6dc3c885ec870ec15757ac76d72 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 8 Aug 2020 20:53:38 +0200 Subject: [PATCH 20/20] treewide: add sysupgrade comment for early DSA-adopters Add a specific comment for early DSA-adopters that they can keep their config when prompted due to compat-version increase. This is a temporary solution, the patch should be simply reverted before any release. Signed-off-by: Adrian Schmutzler --- target/linux/kirkwood/image/Makefile | 3 ++- target/linux/mvebu/image/cortexa9.mk | 3 ++- target/linux/ramips/image/mt7621.mk | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index 46aef31bee..c6d1c335ca 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -12,7 +12,8 @@ KERNEL_LOADADDR:=0x8000 define Device/dsa-migration DEVICE_COMPAT_VERSION := 1.1 - DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA + DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA \ + (early adopters with DSA already set up may just force-flash keeping existing config) endef define Device/Default diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index 245e8a2d69..08ad4f8c8a 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -8,7 +8,8 @@ define Device/dsa-migration DEVICE_COMPAT_VERSION := 1.1 - DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA + DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA \ + (early adopters with DSA already set up may just force-flash keeping existing config) endef define Device/buffalo_ls421de diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 34f0ee7e3c..c922303c54 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -107,7 +107,8 @@ endef define Device/dsa-migration DEVICE_COMPAT_VERSION := 1.1 - DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA + DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA \ + (early adopters with DSA already set up may just force-flash keeping existing config) endef define Device/adslr_g7