diff --git a/feeds/tip/certificates/files/lib/preinit/75_certificates b/feeds/tip/certificates/files/lib/preinit/75_certificates index fba1be7f7..666701289 100644 --- a/feeds/tip/certificates/files/lib/preinit/75_certificates +++ b/feeds/tip/certificates/files/lib/preinit/75_certificates @@ -1,6 +1,6 @@ generate_certificate_volume() { grep certificates /proc/mtd > /dev/null - [ $? -eq 0 ] || return + [ $? -eq 0 ] && return ls /dev/ubi0 > /dev/null [ $? -eq 0 ] || return diff --git a/feeds/ucentral/ucentral-schema/Makefile b/feeds/ucentral/ucentral-schema/Makefile index 078348531..b126c5ca4 100644 --- a/feeds/ucentral/ucentral-schema/Makefile +++ b/feeds/ucentral/ucentral-schema/Makefile @@ -6,7 +6,7 @@ PKG_RELEASE:=1 PKG_SOURCE_URL=https://github.com/blogic/ucentral-schema.git PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2021-02-15 -PKG_SOURCE_VERSION:=515c892d3a50a9a971d284a0a1366d8ef7a22f73 +PKG_SOURCE_VERSION:=5e24baf301653ee08ee8ad85fc9be5fbe2759df5 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=BSD-3-Clause diff --git a/patches/0014-ipq806x-simplify-ecw5410-dts.patch b/patches/0014-ipq806x-simplify-ecw5410-dts.patch new file mode 100644 index 000000000..1501e2885 --- /dev/null +++ b/patches/0014-ipq806x-simplify-ecw5410-dts.patch @@ -0,0 +1,98 @@ +From 1cfbebfc9cf3fea769474ab92b3ffeaf9e8a7169 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Thu, 17 Jun 2021 16:13:40 +0200 +Subject: [PATCH] ipq806x: simplify ecw5410 dts + +Signed-off-by: John Crispin +--- + .../arm/boot/dts/qcom-ipq8068-ecw5410.dts | 67 ++++++++++--------- + 1 file changed, 34 insertions(+), 33 deletions(-) + +diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts +index 712910c261..cd5255fea8 100644 +--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts ++++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts +@@ -259,39 +259,6 @@ + }; + + &soc { +- nand@1ac00000 { +- status = "okay"; +- +- pinctrl-0 = <&nand_pins>; +- pinctrl-names = "default"; +- +- nand@0 { +- compatible = "qcom,nandcs"; +- +- reg = <0>; +- +- nand-ecc-strength = <4>; +- nand-bus-width = <8>; +- nand-ecc-step-size = <512>; +- +- partitions { +- compatible = "fixed-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; +- +- rootfs1@0 { +- label = "rootfs1"; +- reg = <0x0000000 0x4000000>; +- }; +- +- rootfs2@4000000 { +- label = "rootfs2"; +- reg = <0x4000000 0x4000000>; +- }; +- }; +- }; +- }; +- + mdio1: mdio { + compatible = "virtual,mdio-gpio"; + #address-cells = <1>; +@@ -314,6 +281,40 @@ + }; + }; + ++&nand_controller { ++ status = "okay"; ++ ++ pinctrl-0 = <&nand_pins>; ++ pinctrl-names = "default"; ++ ++ nand@0 { ++ compatible = "qcom,nandcs"; ++ ++ reg = <0>; ++ ++ nand-ecc-strength = <4>; ++ nand-bus-width = <8>; ++ nand-ecc-step-size = <512>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ rootfs1@0 { ++ label = "rootfs1"; ++ reg = <0x0000000 0x4000000>; ++ }; ++ ++ rootfs2@4000000 { ++ label = "rootfs2"; ++ reg = <0x4000000 0x4000000>; ++ }; ++ }; ++ }; ++}; ++ ++ + &gmac2 { + status = "okay"; + +-- +2.25.1 + diff --git a/patches/0032-ipq40xx-add-tplink-ec420-support.patch b/patches/0032-ipq40xx-add-tplink-ec420-support.patch new file mode 100644 index 000000000..7f86f8266 --- /dev/null +++ b/patches/0032-ipq40xx-add-tplink-ec420-support.patch @@ -0,0 +1,404 @@ +From b5ee5c6077b1f7fc7f3c4bd544f49270bff5075a Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Fri, 18 Jun 2021 11:07:02 +0200 +Subject: [PATCH] ipq40xx: add tplink ec420 support + +Signed-off-by: John Crispin +--- + package/firmware/ipq-wifi/Makefile | 4 +- + .../etc/hotplug.d/firmware/11-ath10k-caldata | 7 +- + .../base-files/lib/upgrade/platform.sh | 3 +- + .../dts/qcom-ipq4019-tp-link-ec420-g1.dts | 276 ++++++++++++++++++ + target/linux/ipq40xx/image/generic.mk | 15 + + .../patches-5.4/998-tp-link-ec420-g1.patch | 12 + + 6 files changed, 312 insertions(+), 5 deletions(-) + create mode 100755 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-tp-link-ec420-g1.dts + create mode 100644 target/linux/ipq40xx/patches-5.4/998-tp-link-ec420-g1.patch + +diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile +index 513ad4ea67..87dcf9a769 100644 +--- a/package/firmware/ipq-wifi/Makefile ++++ b/package/firmware/ipq-wifi/Makefile +@@ -48,7 +48,8 @@ ALLWIFIBOARDS:= \ + plasmacloud_pa1200 \ + plasmacloud_pa2200 \ + qxwlan_e2600ac \ +- cig_wf610d ++ cig_wf610d \ ++ tp-link_ec420-g1 + + ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) + +@@ -133,5 +134,6 @@ $(eval $(call generate-ipq-wifi-package,plasmacloud_pa1200,Plasma Cloud PA1200)) + $(eval $(call generate-ipq-wifi-package,plasmacloud_pa2200,Plasma Cloud PA2200)) + $(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC)) + $(eval $(call generate-ipq-wifi-package,cig_wf610d,CIG WF_610D)) ++$(eval $(call generate-ipq-wifi-package,tp-link_ec420-g1,tp-link EC420-G1)) + + $(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE)))) +diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +index 5eae9c6e80..a9bbc791b8 100644 +--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata ++++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +@@ -154,6 +154,9 @@ case "$FIRMWARE" in + caldata_extract "ART" 0x1000 0x2f20 + ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2) + ;; ++ tp-link,ec420-g1) ++ ath10kcal_extract "0:ART" 0x1000 0x2f20 ++ ;; + esac + ;; + "ath10k/pre-cal-ahb-a800000.wifi.bin") +@@ -262,10 +265,8 @@ case "$FIRMWARE" in + caldata_extract "ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) + ;; +- tp-link,ap2220 |\ + tp-link,ec420-g1) +- ath10kcal_extract "0:ART" 4096 12064 +- ath10kcal_patch_mac_crc $(macaddr_add "$(get_tip mac_address)" 9) #2.4G, wlan1 ++ ath10kcal_extract "0:ART" 0x5000 0x2f20 + ;; + esac + ;; +diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +index 5582696759..530545e442 100644 +--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +@@ -72,7 +72,8 @@ platform_do_upgrade() { + glinet,gl-ap1300 |\ + luma,wrtq-329acn |\ + mobipromo,cm520-79f |\ +- qxwlan,e2600ac-c2) ++ qxwlan,e2600ac-c2 |\ ++ tp-link,ec420-g1) + nand_do_upgrade "$1" + ;; + alfa-network,ap120c-ac) +diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-tp-link-ec420-g1.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-tp-link-ec420-g1.dts +new file mode 100755 +index 0000000000..e2062e7cd0 +--- /dev/null ++++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-tp-link-ec420-g1.dts +@@ -0,0 +1,276 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qcom-ipq4019.dtsi" ++#include ++#include ++#include ++ ++/ { ++ model = "tp-link EC420 G1"; ++ compatible = "tp-link,ec420-g1"; ++ ++ aliases { ++ led-boot = &led_green; ++ led-failsafe = &led_green; ++ led-running = &led_green; ++ led-upgrade = &led_green; ++ }; ++ ++ soc { ++ mdio@90000 { ++ status = "okay"; ++ }; ++ ++ ess-psgmii@98000 { ++ status = "okay"; ++ }; ++ ++ tcsr@1949000 { ++ compatible = "qcom,tcsr"; ++ reg = <0x1949000 0x100>; ++ qcom,wifi_glb_cfg = ; ++ }; ++ ++ ess_tcsr@1953000 { ++ compatible = "qcom,tcsr"; ++ reg = <0x1953000 0x1000>; ++ qcom,ess-interface-select = ; ++ }; ++ ++ tcsr@1957000 { ++ compatible = "qcom,tcsr"; ++ reg = <0x1957000 0x100>; ++ qcom,wifi_noc_memtype_m0_m2 = ; ++ }; ++ ++ crypto@8e3a000 { ++ status = "okay"; ++ }; ++ ++ watchdog@b017000 { ++ status = "okay"; ++ }; ++ ++ ess-switch@c000000 { ++ status = "okay"; ++ switch_mac_mode = <0x0>; /* mac mode for RGMII RMII */ ++ switch_initvlas = <0x0007c 0x54>; /* port0 status */ ++ switch_lan_bmp = <0x10>; ++ }; ++ ++ edma@c080000 { ++ status = "okay"; ++ }; ++ }; ++ ++ key { ++ compatible = "gpio-keys"; ++ ++ button@1 { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&tlmm 10 GPIO_ACTIVE_LOW>; ++ linux,input-type = <1>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led_red { ++ label = "ec420:red:status"; ++ gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ led_green: power { ++ label = "ec420:green:status"; ++ gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ led_blue { ++ label = "ec420:blue:status"; ++ gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++}; ++ ++&tlmm { ++ serial_0_pins: serial_pinmux { ++ mux { ++ pins = "gpio16", "gpio17"; ++ function = "blsp_uart0"; ++ bias-disable; ++ }; ++ }; ++ ++spi_0_pins: spi_0_pinmux { ++ pinmux { ++ function = "blsp_spi0"; ++ pins = "gpio13", "gpio14", "gpio15"; ++ drive-strength = <12>; ++ bias-disable; ++ }; ++ ++ pinmux_cs { ++ function = "gpio"; ++ pins = "gpio12"; ++ drive-strength = <2>; ++ bias-disable; ++ output-high; ++ }; ++}; ++ ++nand_pins: nand_pins { ++ pullups { ++ pins = "gpio53", "gpio58", "gpio59"; ++ function = "qpic"; ++ bias-pull-up; ++ }; ++ ++ pulldowns { ++ pins = "gpio54", "gpio55", "gpio56", ++ "gpio57", "gpio60", "gpio61", ++ "gpio62", "gpio63", "gpio64", ++ "gpio65", "gpio66", "gpio67", ++ "gpio68", "gpio69"; ++ function = "qpic"; ++ bias-pull-down; ++ }; ++ }; ++}; ++ ++&cryptobam { ++ status = "okay"; ++}; ++ ++&blsp1_spi1 { ++ pinctrl-0 = <&spi_0_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; ++ ++ flash@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ linux,modalias = "m25p80", "gd25q256"; ++ spi-max-frequency = <24000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition0@0 { ++ label = "0:SBL1"; ++ reg = <0x00000000 0x00040000>; ++ read-only; ++ }; ++ partition1@40000 { ++ label = "0:MIBIB"; ++ reg = <0x00040000 0x00020000>; ++ read-only; ++ }; ++ partition2@60000 { ++ label = "0:QSEE"; ++ reg = <0x00060000 0x00060000>; ++ read-only; ++ }; ++ partition3@c0000 { ++ label = "0:CDT"; ++ reg = <0x000c0000 0x00010000>; ++ read-only; ++ }; ++ partition4@d0000 { ++ label = "0:DDRPARAMS"; ++ reg = <0x000d0000 0x00010000>; ++ read-only; ++ }; ++ partition5@e0000 { ++ label = "0:APPSBLENV"; ++ reg = <0x000e0000 0x00010000>; ++ read-only; ++ }; ++ partition6@f0000 { ++ label = "0:APPSBL"; ++ reg = <0x000f0000 0x00080000>; ++ read-only; ++ }; ++ partition7@170000 { ++ label = "0:ART"; ++ reg = <0x00170000 0x00010000>; ++ read-only; ++ }; ++ partition8@180000 { ++ label = "product_info"; ++ reg = <0x00180000 0x00010000>; ++ }; ++ partition9@190000 { ++ label = "factory_fw"; ++ reg = <0x00190000 0x01e70000>; ++ }; ++ }; ++ }; ++}; ++ ++&nand { ++ pinctrl-0 = <&nand_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ nand@0 { ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "ubi"; ++ reg = <0x00000000 0x10000000>; ++ }; ++ }; ++ }; ++}; ++ ++&blsp_dma { ++ status = "okay"; ++}; ++ ++&blsp1_uart1 { ++ pinctrl-0 = <&serial_0_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++}; ++ ++&qpic_bam { ++ status = "okay"; ++}; ++ ++&wifi0 { ++ status = "okay"; ++}; ++ ++&wifi1 { ++ status = "disabled"; ++}; ++ ++&pcie0 { ++ status = "okay"; ++ perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>; ++ wake-gpio = <&tlmm 40 GPIO_ACTIVE_LOW>; ++ ++ bridge@0,0 { ++ reg = <0x00000000 0 0 0 0>; ++ #address-cells = <3>; ++ #size-cells = <2>; ++ ranges; ++ ++ wifi2: wifi@1,0 { ++ compatible = "qcom,ath10k"; ++ status = "okay"; ++ reg = <0x00010000 0 0 0 0>; ++ }; ++ }; ++}; ++ +diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk +index 487bba77b0..ee648edc50 100644 +--- a/target/linux/ipq40xx/image/generic.mk ++++ b/target/linux/ipq40xx/image/generic.mk +@@ -820,3 +820,18 @@ define Device/zyxel_wre6606 + DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers + endef + TARGET_DEVICES += zyxel_wre6606 ++ ++define Device/tp-link_ec420_g1 ++ $(call Device/FitImage) ++ $(call Device/UbiFit) ++ DEVICE_TITLE := tp-link EC420 G1 ++ BOARD_NAME := ec420_g1 ++ DEVICE_DTS := qcom-ipq4019-tp-link-ec420-g1 ++ KERNEL_SIZE := 4096k ++ IMAGE_SIZE := 26624k ++ BLOCKSIZE := 128k ++ PAGESIZE := 2048 ++ SUPPORTED_DEVICES := tp-link,ec420-g1 ++ DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-tp-link_ec420-g1 ++endef ++TARGET_DEVICES += tp-link_ec420_g1 +diff --git a/target/linux/ipq40xx/patches-5.4/998-tp-link-ec420-g1.patch b/target/linux/ipq40xx/patches-5.4/998-tp-link-ec420-g1.patch +new file mode 100644 +index 0000000000..40c913323f +--- /dev/null ++++ b/target/linux/ipq40xx/patches-5.4/998-tp-link-ec420-g1.patch +@@ -0,0 +1,12 @@ ++Index: linux-5.4.111/arch/arm/boot/dts/Makefile ++=================================================================== ++--- linux-5.4.111.orig/arch/arm/boot/dts/Makefile +++++ linux-5.4.111/arch/arm/boot/dts/Makefile ++@@ -883,6 +883,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \ ++ qcom-ipq4019-u4019-32m.dtb \ ++ qcom-ipq4019-wpj419.dtb \ ++ qcom-ipq4019-wtr-m2133hp.dtb \ +++ qcom-ipq4019-tp-link-ec420-g1.dtb \ ++ qcom-ipq4028-wpj428.dtb \ ++ qcom-ipq4029-ap-303.dtb \ ++ qcom-ipq4029-ap-303h.dtb \ +-- +2.25.1 + diff --git a/profiles/edgecore_ecw5410.yml b/profiles/edgecore_ecw5410.yml new file mode 100644 index 000000000..d80d49d0c --- /dev/null +++ b/profiles/edgecore_ecw5410.yml @@ -0,0 +1,16 @@ +--- +profile: edgecore_ecw5410 +target: ipq806x +subtarget: generic +description: Build image for the EdgeCore ECW5410 +image: bin/targets/ipq806x/generic/openwrt-ipq806x-generic-edgecore_ecw5410-squashfs-nand-sysupgrade.bin +include: + - ucentral-ap +packages: + - ath10k-firmware-qca4019-ct-htt + - ath10k-firmware-qca9888-ct-htt + - ath10k-firmware-qca9984-ct-htt +diffconfig: | + # CONFIG_PACKAGE_ath10k-firmware-qca4019-ct is not set + # CONFIG_PACKAGE_ath10k-firmware-qca9888-ct is not set + # CONFIG_PACKAGE_ath10k-firmware-qca9984-ct is not set diff --git a/profiles/edgecore_oap100.yml b/profiles/edgecore_oap100.yml new file mode 100644 index 000000000..2f13672ab --- /dev/null +++ b/profiles/edgecore_oap100.yml @@ -0,0 +1,16 @@ +--- +profile: edgecore_oap100 +target: ipq40xx +subtarget: generic +description: Build image for the Edgecore OPA100 +image: bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-edgecore_oap100-squashfs-nand-sysupgrade.bin +include: + - ucentral-ap +packages: + - ath10k-firmware-qca4019-ct-htt + - ath10k-firmware-qca9888-ct-htt + - ath10k-firmware-qca9984-ct-htt +diffconfig: | + # CONFIG_PACKAGE_ath10k-firmware-qca4019-ct is not set + # CONFIG_PACKAGE_ath10k-firmware-qca9888-ct is not set + # CONFIG_PACKAGE_ath10k-firmware-qca9984-ct is not set diff --git a/profiles/tplink_ec420.yml b/profiles/tplink_ec420.yml new file mode 100644 index 000000000..88ee8c46f --- /dev/null +++ b/profiles/tplink_ec420.yml @@ -0,0 +1,16 @@ +--- +profile: tp-link_ec420_g1 +target: ipq40xx +subtarget: generic +description: Build image for the TP-Link EC420 +image: bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-tp-link_ec420_g1-squashfs-nand- +include: + - ucentral-ap +packages: + - ath10k-firmware-qca4019-ct-htt + - ath10k-firmware-qca9888-ct-htt + - ath10k-firmware-qca9984-ct-htt +diffconfig: | + # CONFIG_PACKAGE_ath10k-firmware-qca4019-ct is not set + # CONFIG_PACKAGE_ath10k-firmware-qca9888-ct is not set + # CONFIG_PACKAGE_ath10k-firmware-qca9984-ct is not set