diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 472cb87c7c..b6eec27713 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -782,7 +782,7 @@ menu "Filesystem ACL and attr support options" select KERNEL_FS_POSIX_ACL default y if USE_FS_ACL_ATTR - config KERNEL_HFSPLUG_FS_POSIX_ACL + config KERNEL_HFSPLUS_FS_POSIX_ACL bool "Enable POSIX ACL for HFS+ Filesystems" select KERNEL_FS_POSIX_ACL default y if USE_FS_ACL_ATTR diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile index 87aad9d44d..ea34b7550b 100644 --- a/package/network/services/wireguard/Makefile +++ b/package/network/services/wireguard/Makefile @@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=wireguard -PKG_VERSION:=0.0.20191012 +PKG_VERSION:=0.0.20191127 PKG_RELEASE:=1 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/ -PKG_HASH:=93573193c9c1c22fde31eb1729ad428ca39da77a603a3d81561a9816ccecfa8e +PKG_HASH:=7d4e80a6f84564d4826dd05da2b59e8d17645072c0345d0fc0d197be176c3d06 PKG_LICENSE:=GPL-2.0 Apache-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts b/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts index 82f864b8e3..757654eaee 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts @@ -26,7 +26,7 @@ /* default for ar934x, except for 1000M and 10M */ pll-data = <0x06000000 0x00000101 0x00001313>; - mtd-mac-address = <&eeprom 0x0>; + mtd-mac-address = <&art 0x0>; phy-mode = "rgmii"; phy-handle = <&phy4>; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanobeam-ac.dts b/target/linux/ath79/dts/ar9342_ubnt_nanobeam-ac.dts index 6e64c7faad..30d054dfed 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanobeam-ac.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanobeam-ac.dts @@ -51,7 +51,7 @@ /* default for ar934x, except for 1000M and 10M */ pll-data = <0x06000000 0x00000101 0x00001313>; - mtd-mac-address = <&eeprom 0x0>; + mtd-mac-address = <&art 0x0>; phy-mode = "rgmii"; phy-handle = <&phy4>; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts index 9b26d1a628..89904721c0 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts @@ -27,7 +27,7 @@ /* default for ar934x, except for 1000M and 10M */ pll-data = <0x06000000 0x00000101 0x00001313>; - mtd-mac-address = <&eeprom 0x0>; + mtd-mac-address = <&art 0x0>; phy-mode = "rgmii"; phy-handle = <&phy4>; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts index b591925154..97597e5f15 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts @@ -58,7 +58,7 @@ /* default for ar934x, except for 1000M and 10M */ pll-data = <0x06000000 0x00000101 0x00001313>; - mtd-mac-address = <&eeprom 0x0>; + mtd-mac-address = <&art 0x0>; phy-mode = "rgmii"; phy-handle = <&phy0>; @@ -73,5 +73,5 @@ &wmac { status = "okay"; - mtd-cal-data = <&eeprom 0x1000>; + mtd-cal-data = <&art 0x1000>; }; diff --git a/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi b/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi index 30fa299638..2847d4098c 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi @@ -75,8 +75,8 @@ read-only; }; - eeprom: partition@ff0000 { - label = "EEPROM"; + art: partition@ff0000 { + label = "art"; reg = <0xff0000 0x010000>; read-only; }; @@ -88,5 +88,5 @@ status = "okay"; qca,disable-5ghz; - mtd-cal-data = <&eeprom 0x1000>; + mtd-cal-data = <&art 0x1000>; }; diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi index ee42498af1..cf24aba5aa 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi @@ -103,8 +103,8 @@ read-only; }; - eeprom: partition@7f0000 { - label = "EEPROM"; + art: partition@7f0000 { + label = "art"; reg = <0x7f0000 0x010000>; read-only; }; @@ -115,9 +115,9 @@ &wmac { status = "okay"; - mtd-cal-data = <&eeprom 0x1000>; + mtd-cal-data = <&art 0x1000>; }; ð0 { - mtd-mac-address = <&eeprom 0x0>; + mtd-mac-address = <&art 0x0>; }; diff --git a/target/linux/ath79/dts/qca9533_ubnt_acb-isp.dts b/target/linux/ath79/dts/qca9533_ubnt_acb-isp.dts index 629899e1a2..ded95f3a18 100644 --- a/target/linux/ath79/dts/qca9533_ubnt_acb-isp.dts +++ b/target/linux/ath79/dts/qca9533_ubnt_acb-isp.dts @@ -64,8 +64,8 @@ read-only; }; - eeprom: partition@ff0000 { - label = "EEPROM"; + art: partition@ff0000 { + label = "art"; reg = <0xff0000 0x010000>; read-only; }; @@ -79,13 +79,13 @@ ð0 { status = "okay"; - mtd-mac-address = <&eeprom 0x0>; + mtd-mac-address = <&art 0x0>; phy-handle = <&swphy4>; }; ð1 { status = "okay"; - mtd-mac-address = <&eeprom 0x6>; + mtd-mac-address = <&art 0x6>; gmac-config { device = <&gmac>; @@ -94,5 +94,5 @@ &wmac { status = "okay"; - mtd-cal-data = <&eeprom 0x1000>; + mtd-cal-data = <&art 0x1000>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts new file mode 100644 index 0000000000..3a6f00bf4e --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "qca9563_tplink_archer-x6-v2.dtsi" + +/ { + compatible = "tplink,archer-c6-v2-us", "qca,qca9563"; + model = "TP-Link Archer C6 v2 (US) / A6 v2 (US/TW)"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "tp-link:green:power"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + wlan2g { + label = "tp-link:green:wlan2g"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wlan5g { + label = "tp-link:green:wlan5g"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + lan { + label = "tp-link:green:lan"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "tp-link:green:wan"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + + wan_fail { + label = "tp-link:amber:wan"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "tp-link:green:wps"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + label = "WPS button"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&spi { + status = "okay"; + + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "factory-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + mac: partition@20000 { + label = "mac"; + reg = <0x020000 0x010000>; + read-only; + }; + + partition@30000 { + label = "u-boot"; + reg = <0x030000 0x020000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x050000 0xf80000>; + }; + + partition@fd0000 { + label = "tplink"; + reg = <0xfd0000 0x020000>; + read-only; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts index 5caec6fab1..e7ceec9b37 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts @@ -5,5 +5,120 @@ / { compatible = "tplink,archer-c6-v2", "qca,qca9563"; - model = "TP-Link Archer C6 v2"; + model = "TP-Link Archer C6 v2 (EU/RU/JP)"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "tp-link:green:power"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + wlan2g { + label = "tp-link:green:wlan2g"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wlan5g { + label = "tp-link:green:wlan5g"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + lan { + label = "tp-link:green:lan"; + gpios = <&gpio 20 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "tp-link:green:wan"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + + wan_fail { + label = "tp-link:amber:wan"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "tp-link:green:wps"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + label = "WPS button"; + linux,code = ; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&spi { + status = "okay"; + + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + mac: partition@20000 { + label = "mac"; + reg = <0x020000 0x010000>; + read-only; + }; + + partition@30000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x030000 0x7a0000>; + }; + + partition@7d0000 { + label = "tplink"; + reg = <0x7d0000 0x020000>; + read-only; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x010000>; + read-only; + }; + }; + }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi index f1a1f5673d..367f826b9d 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; #include #include @@ -7,76 +6,12 @@ #include "qca956x.dtsi" / { - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - aliases { - led-boot = &led_power; - led-failsafe = &led_power; - led-running = &led_power; - led-upgrade = &led_power; label-mac-device = ð0; }; - leds { - compatible = "gpio-leds"; - - led_power: power { - label = "tp-link:green:power"; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - default-state = "on"; - }; - - wlan2g { - label = "tp-link:green:wlan2g"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy1tpt"; - }; - - wlan5g { - label = "tp-link:green:wlan5g"; - gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - - lan { - label = "tp-link:green:lan"; - gpios = <&gpio 20 GPIO_ACTIVE_LOW>; - }; - - wan { - label = "tp-link:green:wan"; - gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - }; - - wan_fail { - label = "tp-link:amber:wan"; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - }; - - wps { - label = "tp-link:green:wps"; - gpios = <&gpio 9 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "Reset button"; - linux,code = ; - gpios = <&gpio 5 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - wps { - label = "WPS button"; - linux,code = ; - gpios = <&gpio 6 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; + chosen { + bootargs = "console=ttyS0,115200n8"; }; }; @@ -92,54 +27,6 @@ status = "okay"; }; -&spi { - status = "okay"; - - num-cs = <1>; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x000000 0x020000>; - read-only; - }; - - mac: partition@20000 { - label = "mac"; - reg = <0x020000 0x010000>; - read-only; - }; - - partition@30000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x030000 0x7a0000>; - }; - - partition@7d0000 { - label = "tplink"; - reg = <0x7d0000 0x020000>; - read-only; - }; - - art: partition@7f0000 { - label = "art"; - reg = <0x7f0000 0x010000>; - read-only; - }; - }; - }; -}; - &mdio0 { status = "okay"; @@ -161,8 +48,9 @@ status = "okay"; phy-mode = "sgmii"; - mtd-mac-address = <&mac 0x8>; phy-handle = <&phy0>; + + mtd-mac-address = <&mac 0x8>; }; &wmac { diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi index 4f77661fbd..8248e060c5 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi @@ -21,6 +21,6 @@ ð0 { status = "okay"; - mtd-mac-address = <&eeprom 0x0>; + mtd-mac-address = <&art 0x0>; phy-handle = <&phy4>; }; diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi index 3a6c0cd3fa..5a0cf4bade 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi @@ -25,6 +25,6 @@ ð0 { status = "okay"; - mtd-mac-address = <&eeprom 0x0>; + mtd-mac-address = <&art 0x0>; phy-handle = <&phy0>; }; diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi index bb20caba47..bfad3ff306 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi @@ -104,8 +104,8 @@ read-only; }; - eeprom: partition@ff0000 { - label = "EEPROM"; + art: partition@ff0000 { + label = "art"; reg = <0xff0000 0x010000>; read-only; }; @@ -116,5 +116,5 @@ &wmac { status = "okay"; - mtd-cal-data = <&eeprom 0x1000>; + mtd-cal-data = <&art 0x1000>; }; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index c914090cf9..5561677ec3 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -146,7 +146,8 @@ tplink,tl-wr1043n-v5) ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04" ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02" ;; -tplink,archer-c6-v2) +tplink,archer-c6-v2|\ +tplink,archer-c6-v2-us) ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x3C" ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x02" ;; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 7090825c2f..e811f85f0e 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -207,6 +207,7 @@ ath79_setup_interfaces() ;; tplink,archer-a7-v5|\ tplink,archer-c6-v2|\ + tplink,archer-c6-v2-us|\ tplink,archer-c7-v4|\ tplink,archer-c7-v5|\ tplink,tl-wdr3600-v1|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 0965965931..062caf6ad5 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -12,6 +12,15 @@ case "$FIRMWARE" in case $board in comfast,cf-wr650ac-v1|\ comfast,cf-wr650ac-v2|\ + ubnt,unifiac-lite|\ + ubnt,unifiac-lr|\ + ubnt,unifiac-mesh|\ + ubnt,unifiac-mesh-pro|\ + ubnt,lap-120|\ + ubnt,nanobeam-ac|\ + ubnt,nanostation-ac|\ + ubnt,nanostation-ac-loco|\ + ubnt,unifiac-pro|\ yuncore,a770) caldata_extract "art" 0x5000 0x844 ;; @@ -101,17 +110,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1) ;; - ubnt,unifiac-lite|\ - ubnt,unifiac-lr|\ - ubnt,unifiac-mesh|\ - ubnt,unifiac-mesh-pro|\ - ubnt,lap-120|\ - ubnt,nanobeam-ac|\ - ubnt,nanostation-ac|\ - ubnt,nanostation-ac-loco|\ - ubnt,unifiac-pro) - caldata_extract "EEPROM" 0x5000 0x844 - ;; esac ;; "ath10k/pre-cal-pci-0000:00:00.0.bin") @@ -148,7 +146,8 @@ case "$FIRMWARE" in tplink,archer-c59-v2|\ tplink,archer-c60-v1|\ tplink,archer-c60-v2|\ - tplink,archer-c6-v2) + tplink,archer-c6-v2|\ + tplink,archer-c6-v2-us) caldata_extract "art" 0x5000 0x2f20 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mac 0x8) -1) ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index ae956eb98e..f5e1a90418 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -88,12 +88,26 @@ define Device/tplink_archer-c6-v2 ATH_SOC := qca9563 IMAGE_SIZE := 7808k DEVICE_MODEL := Archer C6 - DEVICE_VARIANT := v2 + DEVICE_VARIANT := v2 (EU/RU/JP) TPLINK_BOARD_ID := ARCHER-C6-V2 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct endef TARGET_DEVICES += tplink_archer-c6-v2 +define Device/tplink_archer-c6-v2-us + $(Device/tplink-safeloader-uimage) + ATH_SOC := qca9563 + IMAGE_SIZE := 15872k + DEVICE_MODEL := Archer C6 + DEVICE_VARIANT := v2 (US) + DEVICE_ALT0_VENDOR := TP-Link + DEVICE_ALT0_MODEL := Archer A6 + DEVICE_ALT0_VARIANT := v2 (US/TW) + TPLINK_BOARD_ID := ARCHER-C6-V2-US + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct +endef +TARGET_DEVICES += tplink_archer-c6-v2-us + define Device/tplink_archer-c60-v1 $(Device/tplink-safeloader-uimage) ATH_SOC := qca9561 diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile index 156f1e6eda..ee1663018e 100644 --- a/target/linux/mpc85xx/image/Makefile +++ b/target/linux/mpc85xx/image/Makefile @@ -37,16 +37,17 @@ endef define Device/Default PROFILES := Default - DEVICE_DTS := $(1) + DEVICE_DTS := $(lastword $(subst _, ,$(1))) KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) KERNEL_ENTRY := 0x00000000 KERNEL_LOADADDR := 0x00000000 KERNEL := kernel-bin + SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) endef ifeq ($(SUBTARGET),generic) -define Device/tl-wdr4900-v1 +define Device/tplink_tl-wdr4900-v1 DEVICE_VENDOR := TP-Link DEVICE_MODEL := TL-WDR4900 DEVICE_VARIANT := v1 @@ -59,33 +60,32 @@ define Device/tl-wdr4900-v1 KERNEL := kernel-bin | uImage none KERNEL_ENTRY := 0x1000000 KERNEL_LOADADDR := 0x1000000 - SUPPORTED_DEVICES:=tl-wdr4900-v1 tplink,tl-wdr4900-v1 + SUPPORTED_DEVICES += tl-wdr4900-v1 ARTIFACTS := fdt.bin ARTIFACT/fdt.bin := append-dtb IMAGES := fdt.bin factory.bin sysupgrade.bin IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade | append-metadata IMAGE/factory.bin := append-rootfs | mktplinkfw factory endef -TARGET_DEVICES += tl-wdr4900-v1 +TARGET_DEVICES += tplink_tl-wdr4900-v1 -define Device/red-15w-rev1 +define Device/sophos_red-15w-rev1 DEVICE_VENDOR := Sophos DEVICE_MODEL := RED 15w DEVICE_VARIANT := Rev.1 # Original firmware uses a dedicated DTB-partition. # The bootloader however supports FIT-images. KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb - SUPPORTED_DEVICES := sophos,red-15w-rev1 IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef -TARGET_DEVICES += red-15w-rev1 +TARGET_DEVICES += sophos_red-15w-rev1 endif ifeq ($(SUBTARGET),p1020) -define Device/hiveap-330 +define Device/aerohive_hiveap-330 DEVICE_VENDOR := Aerohive DEVICE_MODEL := HiveAP-330 DEVICE_PACKAGES := kmod-tpm-i2c-atmel @@ -93,7 +93,6 @@ define Device/hiveap-330 KERNEL := kernel-bin | gzip | uImage gzip KERNEL_SIZE := 8m KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs | uImage none - SUPPORTED_DEVICES := aerohive,hiveap-330 IMAGES := fdt.bin sysupgrade.bin IMAGE/fdt.bin := append-dtb IMAGE/sysupgrade.bin := append-dtb | pad-to 256k | check-size 256k | \ @@ -101,9 +100,9 @@ define Device/hiveap-330 append-rootfs | pad-rootfs $$(BLOCKSIZE) | pad-to 41216k | check-size 41216k | \ append-kernel | append-metadata endef -TARGET_DEVICES += hiveap-330 +TARGET_DEVICES += aerohive_hiveap-330 -define Device/panda +define Device/ocedo_panda DEVICE_VENDOR := OCEDO DEVICE_MODEL := Panda DEVICE_PACKAGES := kmod-rtc-ds1307 uboot-envtools @@ -111,18 +110,17 @@ define Device/panda PAGESIZE := 2048 SUBPAGESIZE := 512 BLOCKSIZE := 128k - SUPPORTED_DEVICES := ocedo,panda IMAGES := fdt.bin sysupgrade.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/fdt.bin := append-dtb endef -TARGET_DEVICES += panda +TARGET_DEVICES += ocedo_panda endif ifeq ($(SUBTARGET),p2020) -define Device/p2020rdb +define Device/freescale_p2020rdb DEVICE_VENDOR := Freescale DEVICE_MODEL := P2020RDB DEVICE_DTS_DIR := $(DTS_DIR)/fsl @@ -136,7 +134,7 @@ define Device/p2020rdb IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ pad-rootfs $$(BLOCKSIZE) | append-metadata endef -TARGET_DEVICES += p2020rdb +TARGET_DEVICES += freescale_p2020rdb endif diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index f8b8491326..29ffae80ff 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -120,8 +120,8 @@ static const uint8_t md5_salt[16] = { static struct device_info boards[] = { /** Firmware layout for the CPE210/220 V1 */ { - .id = "CPE210", - .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", + .id = "CPE210", + .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", .support_list = "SupportList:\r\n" "CPE210(TP-LINK|UN|N300-2):1.0\r\n" @@ -233,8 +233,8 @@ static struct device_info boards[] = { /** Firmware layout for the CPE220 V2 */ { - .id = "CPE220V2", - .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", + .id = "CPE220V2", + .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", .support_list = "SupportList:\r\n" "CPE220(TP-LINK|EU|N300-2|00000000):2.0\r\n" @@ -314,8 +314,8 @@ static struct device_info boards[] = { /** Firmware layout for the CPE510/520 V1 */ { - .id = "CPE510", - .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", + .id = "CPE510", + .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", .support_list = "SupportList:\r\n" "CPE510(TP-LINK|UN|N300-5):1.0\r\n" @@ -475,8 +475,8 @@ static struct device_info boards[] = { }, { - .id = "WBS210", - .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", + .id = "WBS210", + .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", .support_list = "SupportList:\r\n" "WBS210(TP-LINK|UN|N300-2):1.20\r\n" @@ -507,8 +507,8 @@ static struct device_info boards[] = { }, { - .id = "WBS210V2", - .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", + .id = "WBS210V2", + .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", .support_list = "SupportList:\r\n" "WBS210(TP-LINK|UN|N300-2|00000000):2.0\r\n" @@ -539,8 +539,8 @@ static struct device_info boards[] = { }, { - .id = "WBS510", - .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", + .id = "WBS510", + .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", .support_list = "SupportList:\r\n" "WBS510(TP-LINK|UN|N300-5):1.20\r\n" @@ -572,8 +572,8 @@ static struct device_info boards[] = { }, { - .id = "WBS510V2", - .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", + .id = "WBS510V2", + .vendor = "CPE510(TP-LINK|UN|N300-5):1.0\r\n", .support_list = "SupportList:\r\n" "WBS510(TP-LINK|UN|N300-5|00000000):2.0\r\n" @@ -606,7 +606,7 @@ static struct device_info boards[] = { /** Firmware layout for the C2600 */ { - .id = "C2600", + .id = "C2600", .vendor = "", .support_list = "SupportList:\r\n" @@ -654,7 +654,7 @@ static struct device_info boards[] = { /** Firmware layout for the A7-V5 */ { - .id = "ARCHER-A7-V5", + .id = "ARCHER-A7-V5", .support_list = "SupportList:\n" "{product_name:Archer A7,product_ver:5.0.0,special_id:45550000}\n" @@ -694,7 +694,7 @@ static struct device_info boards[] = { /** Firmware layout for the C2v3 */ { - .id = "ARCHER-C2-V3", + .id = "ARCHER-C2-V3", .support_list = "SupportList:\n" "{product_name:ArcherC2,product_ver:3.0.0,special_id:00000000}\n" @@ -732,7 +732,7 @@ static struct device_info boards[] = { /** Firmware layout for the C25v1 */ { - .id = "ARCHER-C25-V1", + .id = "ARCHER-C25-V1", .support_list = "SupportList:\n" "{product_name:ArcherC25,product_ver:1.0.0,special_id:00000000}\n" @@ -770,8 +770,8 @@ static struct device_info boards[] = { /** Firmware layout for the C58v1 */ { - .id = "ARCHER-C58-V1", - .vendor = "", + .id = "ARCHER-C58-V1", + .vendor = "", .support_list = "SupportList:\r\n" "{product_name:Archer C58,product_ver:1.0.0,special_id:00000000}\r\n" @@ -804,8 +804,8 @@ static struct device_info boards[] = { /** Firmware layout for the C59v1 */ { - .id = "ARCHER-C59-V1", - .vendor = "", + .id = "ARCHER-C59-V1", + .vendor = "", .support_list = "SupportList:\r\n" "{product_name:Archer C59,product_ver:1.0.0,special_id:00000000}\r\n" @@ -843,8 +843,8 @@ static struct device_info boards[] = { /** Firmware layout for the C59v2 */ { - .id = "ARCHER-C59-V2", - .vendor = "", + .id = "ARCHER-C59-V2", + .vendor = "", .support_list = "SupportList:\r\n" "{product_name:Archer C59,product_ver:2.0.0,special_id:00000000}\r\n" @@ -881,10 +881,10 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "file-system", }, - /** Firmware layout for the C6v2 */ + /** Firmware layout for the Archer C6 v2 (EU/RU/JP) */ { - .id = "ARCHER-C6-V2", - .vendor = "", + .id = "ARCHER-C6-V2", + .vendor = "", .support_list = "SupportList:\r\n" "{product_name:Archer C6,product_ver:2.0.0,special_id:45550000}\r\n" @@ -916,11 +916,45 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "file-system", }, + /** Firmware layout for the Archer C6 v2 (US) and A6 v2 (US/TW) */ + { + .id = "ARCHER-C6-V2-US", + .vendor = "", + .support_list = + "SupportList:\n" + "{product_name:Archer A6,product_ver:2.0.0,special_id:55530000}\n" + "{product_name:Archer A6,product_ver:2.0.0,special_id:54570000}\n" + "{product_name:Archer C6,product_ver:2.0.0,special_id:55530000}\n", + .support_trail = '\x00', + .soft_ver = "soft_ver:1.1.1\n", + + .partitions = { + {"factory-boot", 0x00000, 0x20000}, + {"default-mac", 0x20000, 0x00200}, + {"pin", 0x20200, 0x00100}, + {"product-info", 0x20300, 0x00200}, + {"device-id", 0x20500, 0x0fb00}, + {"fs-uboot", 0x30000, 0x20000}, + {"firmware", 0x50000, 0xf89400}, + {"soft-version", 0xfd9400, 0x00100}, + {"extra-para", 0xfd9500, 0x00100}, + {"support-list", 0xfd9600, 0x00200}, + {"profile", 0xfd9800, 0x03000}, + {"default-config", 0xfdc800, 0x03000}, + {"partition-table", 0xfdf800, 0x00800}, + {"user-config", 0xfe0000, 0x0c000}, + {"certificate", 0xfec000, 0x04000}, + {"radio", 0xff0000, 0x10000}, + {NULL, 0, 0} + }, + .first_sysupgrade_partition = "os-image", + .last_sysupgrade_partition = "file-system", + }, /** Firmware layout for the C60v1 */ { - .id = "ARCHER-C60-V1", - .vendor = "", + .id = "ARCHER-C60-V1", + .vendor = "", .support_list = "SupportList:\r\n" "{product_name:Archer C60,product_ver:1.0.0,special_id:00000000}\r\n" @@ -953,8 +987,8 @@ static struct device_info boards[] = { /** Firmware layout for the C60v2 */ { - .id = "ARCHER-C60-V2", - .vendor = "", + .id = "ARCHER-C60-V2", + .vendor = "", .support_list = "SupportList:\r\n" "{product_name:Archer C60,product_ver:2.0.0,special_id:42520000}\r\n" @@ -989,7 +1023,7 @@ static struct device_info boards[] = { /** Firmware layout for the C5 */ { - .id = "ARCHER-C5-V2", + .id = "ARCHER-C5-V2", .vendor = "", .support_list = "SupportList:\r\n" @@ -1024,7 +1058,7 @@ static struct device_info boards[] = { /** Firmware layout for the C7 */ { - .id = "ARCHER-C7-V4", + .id = "ARCHER-C7-V4", .support_list = "SupportList:\n" "{product_name:Archer C7,product_ver:4.0.0,special_id:00000000}\n" @@ -1070,7 +1104,7 @@ static struct device_info boards[] = { /** Firmware layout for the C7 v5*/ { - .id = "ARCHER-C7-V5", + .id = "ARCHER-C7-V5", .support_list = "SupportList:\n" "{product_name:Archer C7,product_ver:5.0.0,special_id:00000000}\n" @@ -1118,7 +1152,7 @@ static struct device_info boards[] = { /** Firmware layout for the C9 */ { - .id = "ARCHERC9", + .id = "ARCHERC9", .vendor = "", .support_list = "SupportList:\n" @@ -1405,7 +1439,7 @@ static struct device_info boards[] = { /** Firmware layout for the RE350 v1 */ { - .id = "RE350-V1", + .id = "RE350-V1", .vendor = "", .support_list = "SupportList:\n" @@ -1442,7 +1476,7 @@ static struct device_info boards[] = { /** Firmware layout for the RE350K v1 */ { - .id = "RE350K-V1", + .id = "RE350K-V1", .vendor = "", .support_list = "SupportList:\n" @@ -1474,7 +1508,7 @@ static struct device_info boards[] = { /** Firmware layout for the RE355 */ { - .id = "RE355", + .id = "RE355", .vendor = "", .support_list = "SupportList:\r\n" @@ -1512,7 +1546,7 @@ static struct device_info boards[] = { /** Firmware layout for the RE450 */ { - .id = "RE450", + .id = "RE450", .vendor = "", .support_list = "SupportList:\r\n" @@ -1550,7 +1584,7 @@ static struct device_info boards[] = { /** Firmware layout for the RE450 v2 */ { - .id = "RE450-V2", + .id = "RE450-V2", .vendor = "", .support_list = "SupportList:\r\n" @@ -1590,7 +1624,7 @@ static struct device_info boards[] = { /** Firmware layout for the RE650 */ { - .id = "RE650-V1", + .id = "RE650-V1", .vendor = "", .support_list = "SupportList:\r\n" @@ -1664,13 +1698,13 @@ static void set_source_date_epoch() { char *env = getenv("SOURCE_DATE_EPOCH"); char *endptr = env; errno = 0; - if (env && *env) { + if (env && *env) { source_date_epoch = strtoull(env, &endptr, 10); if (errno || (endptr && *endptr != '\0')) { fprintf(stderr, "Invalid SOURCE_DATE_EPOCH"); exit(1); } - } + } } /** Generates the partition-table partition */ @@ -2069,6 +2103,9 @@ static void build_image(const char *output, } else if (strcasecmp(info->id, "ARCHER-C6-V2") == 0) { const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00}; parts[5] = put_data("extra-para", mdat, 11); + } else if (strcasecmp(info->id, "ARCHER-C6-V2-US") == 0) { + const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00}; + parts[5] = put_data("extra-para", mdat, 11); } size_t len;