[RFC PATCH] Add TL-WR1043N v5

Adrian Schmutzler freifunk at adrianschmutzler.de
Sa Okt 14 16:22:29 CEST 2017


This is based on the LEDE pull request as on 2017-10-14.

UNTESTED! Just if someone wants to play around with it.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 bsp/ar71xx/.config                                 |   2 +
 bsp/board_ar71xx.bsp                               |   1 +
 .../0010-ar71xx-add-support-for-TL-WR1043Nv5.patch | 384 +++++++++++++++++++++
 .../fff/fff-network/ar71xx/network.tl-wr1043n-v5   |  18 +
 4 files changed, 405 insertions(+)
 create mode 100644 build_patches/openwrt/0010-ar71xx-add-support-for-TL-WR1043Nv5.patch
 create mode 100644 src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5

diff --git a/bsp/ar71xx/.config b/bsp/ar71xx/.config
index 8ecf51a..09d00d3 100644
--- a/bsp/ar71xx/.config
+++ b/bsp/ar71xx/.config
@@ -40,6 +40,8 @@ CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr1043nd-v3=y
 CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_tl-wr1043nd-v3=""
 CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr1043nd-v4=y
 CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_tl-wr1043nd-v4=""
+CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr1043n-v5=y
+CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_tl-wr1043n-v5=""
 CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr740n-v4=y
 CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_tl-wr740n-v4=""
 CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr741nd-v2=y
diff --git a/bsp/board_ar71xx.bsp b/bsp/board_ar71xx.bsp
index 5fb24c0..a0b32a3 100644
--- a/bsp/board_ar71xx.bsp
+++ b/bsp/board_ar71xx.bsp
@@ -19,6 +19,7 @@ images=("lede-ar71xx-generic-cpe210-220-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-tl-wr1043nd-v2-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-tl-wr1043nd-v3-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-tl-wr1043nd-v4-squashfs-sysupgrade.bin"
+        "lede-ar71xx-generic-tl-wr1043n-v5-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-tl-wa860re-v1-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-tl-wa850re-v1-squashfs-sysupgrade.bin"
 #        "lede-ar71xx-generic-tl-wa850re-v2-squashfs-sysupgrade.bin"
diff --git a/build_patches/openwrt/0010-ar71xx-add-support-for-TL-WR1043Nv5.patch b/build_patches/openwrt/0010-ar71xx-add-support-for-TL-WR1043Nv5.patch
new file mode 100644
index 0000000..d84d6f1
--- /dev/null
+++ b/build_patches/openwrt/0010-ar71xx-add-support-for-TL-WR1043Nv5.patch
@@ -0,0 +1,384 @@
+From 81684a00487b0ed5f7315f5678a0ea244e5c3d57 Mon Sep 17 00:00:00 2001
+From: majik-sheff <tim at tfthorpe.net>
+Date: Mon, 25 Sep 2017 04:38:49 -0500
+Subject: [PATCH] ar71xx: add support for TL-WR1043Nv5
+
+TP-Link WR-1043N v5 appears to be identical to
+the WR-1043NDv4, except that the USB port has
+been removed and there is no longer a removeable
+antenna option.
+
+The software is more in line with the Archer series in
+that is uses a nested bootloader scheme.
+
+Signed-off-by: Tim Thorpe <tim at tfthorpe.net>
+Signed-off-by: Ludwig Thomeczek <ledesrc at wxorx.net>
+[Rebased on 8ad1b09]
+Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
+---
+ target/linux/ar71xx/base-files/etc/board.d/01_leds | 10 ++-
+ .../linux/ar71xx/base-files/etc/board.d/02_network |  2 +
+ target/linux/ar71xx/base-files/etc/diag.sh         |  1 +
+ target/linux/ar71xx/base-files/lib/ar71xx.sh       |  3 +
+ .../ar71xx/base-files/lib/upgrade/platform.sh      |  1 +
+ target/linux/ar71xx/config-4.4                     |  1 +
+ .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   | 10 +++
+ .../files/arch/mips/ath79/mach-tl-wr1043nd-v4.c    | 87 ++++++++++++++++++++++
+ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |  1 +
+ target/linux/ar71xx/image/tp-link.mk               | 17 ++++-
+ target/linux/ar71xx/mikrotik/config-default        |  1 +
+ target/linux/ar71xx/nand/config-default            |  1 +
+ tools/firmware-utils/src/tplink-safeloader.c       | 39 +++++++++-
+ 13 files changed, 170 insertions(+), 4 deletions(-)
+
+diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
+index b98f58e..ad71f18 100755
+--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
++++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
+@@ -667,14 +667,20 @@ tl-wr1043nd-v2)
+ 	ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
+ 	ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
+ 	;;
+-tl-wr1043nd-v4)
+-	ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
++tl-wr1043nd-v4|\
++tl-wr1043n-v5)
+ 	ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
+ 	ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
+ 	ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
+ 	ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
+ 	ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
+ 	ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
++
++	case "$board" in
++	tl-wr1043nd-v4)
++		ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
++		;;
++	esac
+ 	;;
+ tl-wr2543n)
+ 	ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
+diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
+index d5b6fba..630427e 100755
+--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
++++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
+@@ -236,6 +236,7 @@ ar71xx_setup_interfaces()
+ 	dir-835-a1|\
+ 	esr900|\
+ 	mynet-n750|\
++	tl-wr1043n-v5|\
+ 	sr3200|\
+ 	wndr3700v4|\
+ 	wndr4300)
+@@ -482,6 +483,7 @@ ar71xx_setup_macs()
+ 		lan_mac=$(mtd_get_mac_binary caldata 0)
+ 		wan_mac=$(mtd_get_mac_binary caldata 6)
+ 		;;
++	tl-wr1043n-v5|\
+ 	tl-wr1043nd-v4)
+ 		lan_mac=$(mtd_get_mac_binary product-info 8)
+ 		wan_mac=$(macaddr_add "$lan_mac" 1)
+diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
+index f2709d7..7932098 100644
+--- a/target/linux/ar71xx/base-files/etc/diag.sh
++++ b/target/linux/ar71xx/base-files/etc/diag.sh
+@@ -363,6 +363,7 @@ get_status_led() {
+ 	tl-wr1043nd|\
+ 	tl-wr1043nd-v2|\
+ 	tl-wr1043nd-v4|\
++	tl-wr1043n-v5|\
+ 	tl-wr741nd|\
+ 	tl-wr741nd-v4|\
+ 	tl-wa801nd-v3|\
+diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
+index b793223..43c62f1 100755
+--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
++++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
+@@ -944,6 +944,9 @@ ar71xx_board_detect() {
+ 	*"TL-WR1043ND v4")
+ 		name="tl-wr1043nd-v4"
+ 		;;
++	*"TL-WR1043N v5")
++		name="tl-wr1043n-v5"
++		;;
+ 	*TL-WR2543N*)
+ 		name="tl-wr2543n"
+ 		;;
+diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+index cac9409..aa98303 100755
+--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
++++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+@@ -261,6 +261,7 @@ platform_check_image() {
+ 	tew-712br|\
+ 	tew-732br|\
+ 	tew-823dru|\
++	tl-wr1043n-v5|\
+ 	unifi-outdoor|\
+ 	unifiac-lite|\
+ 	unifiac-pro|\
+diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
+index 3fdc9a0..3e52d9c 100644
+--- a/target/linux/ar71xx/config-4.4
++++ b/target/linux/ar71xx/config-4.4
+@@ -182,6 +182,7 @@ CONFIG_ATH79_MACH_TL_WR1041N_V2=y
+ CONFIG_ATH79_MACH_TL_WR1043ND=y
+ CONFIG_ATH79_MACH_TL_WR1043ND_V2=y
+ CONFIG_ATH79_MACH_TL_WR1043ND_V4=y
++CONFIG_ATH79_MACH_TL_WR1043N_V5=y
+ CONFIG_ATH79_MACH_TL_WR2543N=y
+ CONFIG_ATH79_MACH_TL_WR703N=y
+ CONFIG_ATH79_MACH_TL_WR720N_V3=y
+diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+index a48db65..fdcc4ae 100644
+--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
++++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+@@ -1605,6 +1605,16 @@ config ATH79_MACH_TL_WR1043ND_V4
+ 	select ATH79_DEV_USB
+ 	select ATH79_DEV_WMAC
+ 
++config ATH79_MACH_TL_WR1043N_V5
++	bool "TP-LINK TL-WR1043N v5 support"
++	select SOC_QCA956X
++	select ATH79_DEV_GPIO_BUTTONS
++	select ATH79_DEV_LEDS_GPIO
++	select ATH79_DEV_SPI
++	select ATH79_DEV_WMAC
++	select ATH79_DEV_ETH
++	select ATH79_DEV_M25P80
++
+ config ATH79_MACH_TL_WR2543N
+ 	bool "TP-LINK TL-WR2543N/ND support"
+ 	select SOC_AR724X
+diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
+index b1539c5..fb8afdc 100644
+--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
++++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
+@@ -5,6 +5,7 @@
+  *  Copyright (C) 2016 Matthias Schiffer <mschiffer at universe-factory.net>
+  *  Copyright (C) 2016 Andreas Ziegler <github at andreas-ziegler.de>
+  *  Copyright (C) 2016 Ludwig Thomeczek <ledesrc at wxorx.net>
++ *  Copyright (c) 2017 Tim Thorpe	<tim at tfthorpe.net>
+  *
+  *  Derived from: mach-dir-869-a1.c
+  *
+@@ -62,6 +63,11 @@
+ #define TL_WR1043_V4_EEPROM_ADDR		0x1fff0000
+ #define TL_WR1043_V4_WMAC_CALDATA_OFFSET	0x1000
+ 
++#define TL_WR1043N_V5_MAC0_OFFSET		0
++#define TL_WR1043N_V5_MAC1_OFFSET		6
++
++#define TL_WR1043N_V5_MAC_LOCATION		0x1ff00008
++
+ static struct gpio_led tl_wr1043nd_v4_leds_gpio[] __initdata = {
+ 	{
+ 		.name		= "tp-link:green:wps",
+@@ -188,3 +194,84 @@ static void __init tl_wr1043nd_v4_setup(void)
+ 
+ MIPS_MACHINE(ATH79_MACH_TL_WR1043ND_V4, "TL-WR1043ND-v4",
+ 	     "TP-LINK TL-WR1043ND v4", tl_wr1043nd_v4_setup);
++
++static struct gpio_led tl_wr1043n_v5_leds_gpio[] __initdata = {
++	{
++		.name		= "tp-link:green:wps",
++		.gpio		= TL_WR1043_V4_GPIO_LED_WPS,
++		.active_low	= 1,
++	},
++	{
++		.name		= "tp-link:green:system",
++		.gpio		= TL_WR1043_V4_GPIO_LED_SYSTEM,
++		.active_low	= 1,
++	},
++	{
++		.name		= "tp-link:green:wlan",
++		.gpio		= TL_WR1043_V4_GPIO_LED_WLAN,
++		.active_low	= 1,
++	},
++	{
++		.name		= "tp-link:green:wan",
++		.gpio		= TL_WR1043_V4_GPIO_LED_WAN,
++		.active_low	= 1,
++	},
++	{
++		.name		= "tp-link:green:lan1",
++		.gpio		= TL_WR1043_V4_GPIO_LED_LAN1,
++		.active_low	= 1,
++	},
++	{
++		.name		= "tp-link:green:lan2",
++		.gpio		= TL_WR1043_V4_GPIO_LED_LAN2,
++		.active_low	= 1,
++	},
++	{
++		.name		= "tp-link:green:lan3",
++		.gpio		= TL_WR1043_V4_GPIO_LED_LAN3,
++		.active_low	= 1,
++	},
++	{
++		.name		= "tp-link:green:lan4",
++		.gpio		= TL_WR1043_V4_GPIO_LED_LAN4,
++		.active_low	= 1,
++	},
++};
++
++
++/* The 1043Nv5 is identical to the 1043NDv4, only missing the usb and small firmware layout changes  */
++static void __init tl_wr1043nv5_setup(void)
++{
++	u8 *art = (u8 *) KSEG1ADDR(TL_WR1043_V4_EEPROM_ADDR);
++	u8 *mac = (u8 *) KSEG1ADDR(TL_WR1043N_V5_MAC_LOCATION);
++
++
++	ath79_register_m25p80(NULL);
++
++	ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr1043n_v5_leds_gpio),
++	                                tl_wr1043n_v5_leds_gpio);
++	ath79_register_gpio_keys_polled(-1, TL_WR1043_V4_KEYS_POLL_INTERVAL,
++	                                ARRAY_SIZE(tl_wr1043nd_v4_gpio_keys),
++	                                tl_wr1043nd_v4_gpio_keys);
++
++  platform_device_register(&ath79_mdio0_device);
++
++	mdiobus_register_board_info(tl_wr1043nd_v4_mdio0_info,
++	                            ARRAY_SIZE(tl_wr1043nd_v4_mdio0_info));
++
++	ath79_register_wmac(art + TL_WR1043_V4_WMAC_CALDATA_OFFSET, mac);
++//	ath79_register_pci();
++
++	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
++
++	/* GMAC0 is connected to an AR8337 switch */
++	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
++	ath79_eth0_data.speed = SPEED_1000;
++	ath79_eth0_data.duplex = DUPLEX_FULL;
++	ath79_eth0_data.phy_mask = BIT(0);
++	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
++	ath79_register_eth(0);
++}
++
++MIPS_MACHINE(ATH79_MACH_TL_WR1043N_V5, "TL-WR1043N-v5", "TP-LINK TL-WR1043N v5",
++	     tl_wr1043nv5_setup);
+diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+index 61d2225..c8ba8ea 100644
+--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
++++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+@@ -218,6 +218,7 @@ enum ath79_mach_type {
+ 	ATH79_MACH_TL_WR1043ND,			/* TP-LINK TL-WR1043ND */
+ 	ATH79_MACH_TL_WR1043ND_V2,		/* TP-LINK TL-WR1043ND v2 */
+ 	ATH79_MACH_TL_WR1043ND_V4,		/* TP-LINK TL-WR1043ND v4 */
++	ATH79_MACH_TL_WR1043N_V5,		/* TP-LINK TL-WR1043N v5 */
+ 	ATH79_MACH_TL_WR2543N,			/* TP-LINK TL-WR2543N/ND */
+ 	ATH79_MACH_TL_WR703N,			/* TP-LINK TL-WR703N */
+ 	ATH79_MACH_TL_WR710N,			/* TP-LINK TL-WR710N */
+diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
+index 3b908ac..d9cce9c 100644
+--- a/target/linux/ar71xx/image/tp-link.mk
++++ b/target/linux/ar71xx/image/tp-link.mk
+@@ -858,7 +858,22 @@ define Device/tl-wr1043nd-v4
+     IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
+     IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
+ endef
+-TARGET_DEVICES += tl-wr1043nd-v1 tl-wr1043nd-v2 tl-wr1043nd-v3 tl-wr1043nd-v4
++define Device/tl-wr1043n-v5
++  $(Device/tplink)
++  DEVICE_TITLE := TP-LINK TL-WR1043N v5
++  BOARDNAME := TL-WR1043N-v5
++  DEVICE_PROFILE := TLWR1043
++  TPLINK_HWID :=  0x10430005
++  MTDPARTS := spi0.0:128k(factory-uboot)ro,128k(u-boot)ro,1536k(kernel),13568k(rootfs),128k(product-info)ro,640k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(ART)ro,15104k at 0x40000(firmware)
++  IMAGE_SIZE := 15104k
++  TPLINK_BOARD_ID := TLWR1043NV5
++  KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
++  IMAGES := sysupgrade.bin factory.bin
++  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
++	append-metadata | check-size $$$$(IMAGE_SIZE)
++  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
++endef
++TARGET_DEVICES += tl-wr1043nd-v1 tl-wr1043nd-v2 tl-wr1043nd-v3 tl-wr1043nd-v4 tl-wr1043n-v5
+ 
+ define Device/tl-wr2543-v1
+     $(Device/tplink-8mlzma)
+diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default
+index 6375b7f..da09396 100644
+--- a/target/linux/ar71xx/mikrotik/config-default
++++ b/target/linux/ar71xx/mikrotik/config-default
+@@ -147,6 +147,7 @@ CONFIG_ATH79_MACH_RBSXTLITE=y
+ # CONFIG_ATH79_MACH_TL_WR1043ND is not set
+ # CONFIG_ATH79_MACH_TL_WR1043ND_V2 is not set
+ # CONFIG_ATH79_MACH_TL_WR1043ND_V4 is not set
++# CONFIG_ATH79_MACH_TL_WR1043N_V5 is not set
+ # CONFIG_ATH79_MACH_TL_WR2543N is not set
+ # CONFIG_ATH79_MACH_TL_WR703N is not set
+ # CONFIG_ATH79_MACH_TL_WR720N_V3 is not set
+diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default
+index 8c67867..fa271ca 100644
+--- a/target/linux/ar71xx/nand/config-default
++++ b/target/linux/ar71xx/nand/config-default
+@@ -55,6 +55,7 @@
+ # CONFIG_ATH79_MACH_TL_WR1041N_V2 is not set
+ # CONFIG_ATH79_MACH_TL_WR1043ND is not set
+ # CONFIG_ATH79_MACH_TL_WR1043ND_V4 is not set
++# CONFIG_ATH79_MACH_TL_WR1043N_V5 is not set
+ # CONFIG_ATH79_MACH_TL_WR2543N is not set
+ # CONFIG_ATH79_MACH_TL_WR703N is not set
+ # CONFIG_ATH79_MACH_TL_WR720N_V3 is not set
+diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
+index 82a5fe5..a53e248 100644
+--- a/tools/firmware-utils/src/tplink-safeloader.c
++++ b/tools/firmware-utils/src/tplink-safeloader.c
+@@ -521,6 +521,42 @@ static struct device_info boards[] = {
+ 		.last_sysupgrade_partition = "file-system"
+ 	},
+ 
++	/** Firmware layout for the TL-WR1043 v5 */
++	{
++		.id     = "TLWR1043NV5",
++		.vendor = "",
++		.support_list =
++			"SupportList:\n"
++			"{product_name:TL-WR1043N,product_ver:5.0.0,special_id:45550000}\n"
++			"{product_name:TL-WR1043N,product_ver:5.0.0,special_id:55530000}\n",
++		.support_trail = '\x00',
++		.soft_ver = "soft_ver:1.0.0\n",
++		.partitions = {
++			{"factory-boot", 0x00000, 0x20000},
++			{"fs-uboot", 0x20000, 0x20000},
++			{"os-image", 0x40000, 0x180000},
++			{"file-system", 0x1c0000, 0xd40000},
++			{"default-mac", 0xf00000, 0x00200},
++			{"pin", 0xf00200, 0x00200},
++			{"device-id", 0xf00400, 0x00100},
++			{"product-info", 0xf00500, 0x0fb00},
++			{"soft-version", 0xf10000, 0x01000},
++			{"extra-para", 0xf11000, 0x01000},
++			{"support-list", 0xf12000, 0x0a000},
++			{"profile", 0xf1c000, 0x04000},
++			{"default-config", 0xf20000, 0x10000},
++			{"user-config", 0xf30000, 0x40000},
++			{"qos-db", 0xf70000, 0x40000},
++			{"certificate", 0xfb0000, 0x10000},
++			{"partition-table", 0xfc0000, 0x10000},
++			{"log", 0xfd0000, 0x20000},
++			{"radio", 0xff0000, 0x10000},
++			{NULL, 0, 0}
++		},
++		.first_sysupgrade_partition = "os-image",
++		.last_sysupgrade_partition = "file-system"
++	},
++
+ 	/** Firmware layout for the RE450 */
+ 	{
+ 		.id = "RE450",
+@@ -931,7 +967,8 @@ static void build_image(const char *output,
+ 	parts[3] = read_file("os-image", kernel_image, false);
+ 	parts[4] = read_file("file-system", rootfs_image, add_jffs2_eof);
+ 
+-	if (strcasecmp(info->id, "ARCHER-C25-V1") == 0) {
++	/* Some devices need the extra-para partition to accept the firmware */
++	if (strcasecmp(info->id, "ARCHER-C25-V1") == 0 || strcasecmp(info->id, "TLWR1043NV5") == 0) {
+ 		const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00};
+ 		parts[5] = put_data("extra-para", mdat, 11);
+ 	}
+-- 
+2.7.4
+
diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5
new file mode 100644
index 0000000..4ffb7b2
--- /dev/null
+++ b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5
@@ -0,0 +1,18 @@
+PORTORDER="5 4 3 2 1"
+
+WANDEV=eth0
+SWITCHDEV=eth0
+CLIENT_PORTS="1 2 0t"
+WAN_PORTS="5 0t"
+BATMAN_PORTS="3 4 0t"
+
+. /lib/functions/system.sh
+. /lib/functions/uci-defaults.sh
+. /lib/ar71xx.sh
+
+# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from
+# https://github.com/lede-project/source/pull/613/files#diff-abd6f42f54204372151e73eac0556db1
+
+NEWMAC=$(mtd_get_mac_binary config 0x1017c)
+ETHMESHMAC=1
+ROUTERMAC=eth0
-- 
2.7.4



Mehr Informationen über die Mailingliste franken-dev