From 8df663c1fd9ad5ab73d84b8806f2cc051a15e511 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Mon, 5 Jul 2021 21:44:22 +0800 Subject: [PATCH] add zb4019 --- .../linux/ipq40xx/base-files/etc/board.d/01_leds | 8 +++++++- .../linux/ipq40xx/base-files/etc/board.d/02_network | 9 +++++++++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 8 ++++++++ .../linux/ipq40xx/base-files/lib/upgrade/platform.sh | 1 + root/target/linux/ipq40xx/image/generic.mk | 11 +++++++++++ .../patches-5.4/901-arm-boot-add-dts-files.patch | 3 ++- 6 files changed, 38 insertions(+), 2 deletions(-) diff --git a/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds index 498fbeaa..a2a69eae 100644 --- a/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -59,7 +59,13 @@ pangu,l1000) ucidef_set_led_netdev "4g2" "4g2" "blue:4g2" "4g2" ucidef_set_led_netdev "4g3" "4g3" "blue:4g3" "4g3" ;; - +zbt,z4019) + ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan0" "phy0tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan1" "phy1tpt" + ucidef_set_led_netdev "wwan0" "4G" "green:4g" "wwan0" + ucidef_set_led_netdev "wwan1" "4G1" "green:4g2" "wwan1" + ucidef_set_led_netdev "wwan2" "4G2" "green:4g3" "wwan2" + ;; 8dev,jalapeno) ucidef_set_led_default "power" "POWER" "blue:power" "1" ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt" diff --git a/root/target/linux/ipq40xx/base-files/etc/board.d/02_network b/root/target/linux/ipq40xx/base-files/etc/board.d/02_network index 6be4f23d..21c076f0 100755 --- a/root/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -110,6 +110,11 @@ ipq40xx_setup_interfaces() ucidef_add_switch "switch0" \ "0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan" ;; + zbt,z4019) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" + ;; unielec,u4019-32m) ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ @@ -159,6 +164,10 @@ ipq40xx_setup_macs() lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr) label_mac=$wan_mac ;; + zbt,z4019) + wan_mac=$(mtd_get_mac_binary "0:ART" 0x0) + lan_mac=$(mtd_get_mac_binary "0:ART" 0x6) + ;; engenius,ens620ext) wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) lan_mac=$(macaddr_add "$wan_mac" 1) diff --git a/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index a20e7e6f..f073af48 100755 --- a/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -163,6 +163,10 @@ case "$FIRMWARE" in caldata_extract "ART" 0x1000 0x2f20 ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2) ;; + zbt,z4019) + caldata_extract "0:ART" 0x1000 0x2f20 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:ART" 0x6) +1) + ;; esac ;; "ath10k/pre-cal-ahb-a800000.wifi.bin") @@ -281,6 +285,10 @@ case "$FIRMWARE" in caldata_extract "ART" 0x5000 0x2f20 ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) ;; + zbt,z4019) + caldata_extract "0:ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:ART" 0x6) +2) + ;; esac ;; *) diff --git a/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 396bc5d9..2ed19f12 100755 --- a/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -72,6 +72,7 @@ platform_do_upgrade() { engenius,eap2200 |\ glinet,gl-ap1300 |\ luma,wrtq-329acn |\ + zbt,z4019 |\ mobipromo,cm520-79f |\ p2w,r619ac-64m |\ p2w,r619ac-128m |\ diff --git a/root/target/linux/ipq40xx/image/generic.mk b/root/target/linux/ipq40xx/image/generic.mk index bbd98ef4..5ff237fe 100644 --- a/root/target/linux/ipq40xx/image/generic.mk +++ b/root/target/linux/ipq40xx/image/generic.mk @@ -509,6 +509,17 @@ define Device/glinet_gl-b1300 endef TARGET_DEVICES += glinet_gl-b1300 +define Device/zbt_z4019 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := ZBT + DEVICE_MODEL := Z4019 + SOC := qcom-ipq4019 + BLOCKSIZE := 128k + PAGESIZE := 2048 +endef +TARGET_DEVICES += zbt_z4019 + define Device/glinet_gl-s1300 $(call Device/FitImage) DEVICE_VENDOR := GL.iNet diff --git a/root/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/root/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch index 79daa03f..51cd7da5 100755 --- a/root/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch +++ b/root/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -837,11 +837,59 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -837,11 +837,60 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -67,6 +67,7 @@ Signed-off-by: John Crispin + qcom-ipq4029-gl-s1300.dtb \ + qcom-ipq4029-mr33.dtb \ + qcom-ipq4019-l1000.dtb \ ++ qcom-ipq4019-z4019.dtb \ qcom-ipq8064-ap148.dtb \ qcom-msm8660-surf.dtb \ qcom-msm8960-cdp.dtb \ \ No newline at end of file