forked from freifunk-franken/firmware
Add TL-WR1043N v5
This is based on the LEDE pull request as on 2017-10-17. Tested successfully on device (including flashing factory image, no TFTP). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Tim Niemeyer <tim@tn-x.org>
This commit is contained in:
parent
063baa5edd
commit
915c6f063e
|
@ -38,6 +38,8 @@ CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr1043nd-v3=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_tl-wr1043nd-v3=""
|
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_tl-wr1043nd-v3=""
|
||||||
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr1043nd-v4=y
|
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr1043nd-v4=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_tl-wr1043nd-v4=""
|
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_ar71xx_generic_DEVICE_tl-wr740n-v4=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_tl-wr740n-v4=""
|
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_tl-wr740n-v4=""
|
||||||
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr741nd-v2=y
|
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_tl-wr741nd-v2=y
|
||||||
|
|
|
@ -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-v2-squashfs-sysupgrade.bin"
|
||||||
"lede-ar71xx-generic-tl-wr1043nd-v3-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-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-wa860re-v1-squashfs-sysupgrade.bin"
|
||||||
"lede-ar71xx-generic-tl-wa850re-v1-squashfs-sysupgrade.bin"
|
"lede-ar71xx-generic-tl-wa850re-v1-squashfs-sysupgrade.bin"
|
||||||
"lede-ar71xx-generic-tl-wa901nd-v2-squashfs-sysupgrade.bin"
|
"lede-ar71xx-generic-tl-wa901nd-v2-squashfs-sysupgrade.bin"
|
||||||
|
|
|
@ -0,0 +1,264 @@
|
||||||
|
From b3cb0e75884222e141a40443c25d20deedf7a552 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Piotr Dymacz <pepe2k@gmail.com>
|
||||||
|
Date: Thu, 6 Jul 2017 16:34:47 +0200
|
||||||
|
Subject: [PATCH] firmware-utils: mktplinkfw: rework combined image option
|
||||||
|
|
||||||
|
We use combined option in "mktplinkfw" tool for generating initramfs
|
||||||
|
kernel images and header for kernel inside "safeloader" image type (in
|
||||||
|
fact, only for TL-WR1043ND v4 at this moment).
|
||||||
|
|
||||||
|
There is also "mktplinkfw-kernel" tool, a stripped-down version, used
|
||||||
|
only for generating "simple" header, for safeloader image types.
|
||||||
|
|
||||||
|
This changes how "mktplinkfw" handles combined images (which then will
|
||||||
|
allow us to drop the stripped-down version of the tool):
|
||||||
|
|
||||||
|
- drop "ignore size" command line option (it was used only for combined
|
||||||
|
images anyway)
|
||||||
|
- don't require "flash layout id" for combined images (we don't need and
|
||||||
|
shouldn't limit size of the initramfs kernel and for kernels inside
|
||||||
|
safeloader images, the "tplink-safeloader" tool does the size check)
|
||||||
|
- require kernel address and entry point in command line parameters for
|
||||||
|
combined images (consequence of previous point)
|
||||||
|
- don't include md5 sum and firmware length values in header (they are
|
||||||
|
needed only for update from vendor GUI and are ingored in case of
|
||||||
|
initramfs and "tplink-safeloader" images)
|
||||||
|
- drop "fake" flash layout for TL-WR1043ND v4 as it's no longer needed
|
||||||
|
|
||||||
|
Also, adjust "mktplinkfw-combined" command in ar71xx/image/tp-link.mk to
|
||||||
|
match introduced changes in "mktplinkfw" tool.
|
||||||
|
|
||||||
|
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
|
||||||
|
[Rebased on 8ad1b09]
|
||||||
|
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
||||||
|
---
|
||||||
|
target/linux/ar71xx/image/tp-link.mk | 7 ++-
|
||||||
|
tools/firmware-utils/src/mktplinkfw.c | 99 +++++++++++++++--------------------
|
||||||
|
2 files changed, 44 insertions(+), 62 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
|
||||||
|
index 32d16f9..2557858 100644
|
||||||
|
--- a/target/linux/ar71xx/image/tp-link.mk
|
||||||
|
+++ b/target/linux/ar71xx/image/tp-link.mk
|
||||||
|
@@ -26,11 +26,11 @@ endef
|
||||||
|
# -c combined image
|
||||||
|
define Build/mktplinkfw-combined
|
||||||
|
$(STAGING_DIR_HOST)/bin/mktplinkfw \
|
||||||
|
- -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $(1) \
|
||||||
|
- -m $(TPLINK_HEADER_VERSION) \
|
||||||
|
+ -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -N OpenWrt -V $(REVISION) $(1) \
|
||||||
|
+ -L $(KERNEL_LOADADDR) -m $(TPLINK_HEADER_VERSION) \
|
||||||
|
+ -E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||||
|
-k $@ \
|
||||||
|
-o $@.new \
|
||||||
|
- -s -S \
|
||||||
|
-c
|
||||||
|
@mv $@.new $@
|
||||||
|
endef
|
||||||
|
@@ -849,7 +849,6 @@ define Device/tl-wr1043nd-v4
|
||||||
|
BOARDNAME := TL-WR1043ND-v4
|
||||||
|
DEVICE_PROFILE := TLWR1043
|
||||||
|
TPLINK_HWID := 0x10430004
|
||||||
|
- TPLINK_FLASHLAYOUT := 16Msafeloader
|
||||||
|
MTDPARTS := spi0.0:128k(u-boot)ro,1536k(kernel),14016k(rootfs),128k(product-info)ro,320k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(ART)ro,15552k@0x20000(firmware)
|
||||||
|
IMAGE_SIZE := 15552k
|
||||||
|
TPLINK_BOARD_NAME := TLWR1043NDV4
|
||||||
|
diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c
|
||||||
|
index fbf8960..3cfe5f7 100644
|
||||||
|
--- a/tools/firmware-utils/src/mktplinkfw.c
|
||||||
|
+++ b/tools/firmware-utils/src/mktplinkfw.c
|
||||||
|
@@ -115,7 +115,6 @@ static uint32_t rootfs_align;
|
||||||
|
static struct file_info boot_info;
|
||||||
|
static int combined;
|
||||||
|
static int strip_padding;
|
||||||
|
-static int ignore_size;
|
||||||
|
static int add_jffs2_eof;
|
||||||
|
static unsigned char jffs2_eof_mark[4] = {0xde, 0xad, 0xc0, 0xde};
|
||||||
|
static uint32_t fw_max_len;
|
||||||
|
@@ -178,20 +177,6 @@ static struct flash_layout layouts[] = {
|
||||||
|
.kernel_ep = 0xc0000000,
|
||||||
|
.rootfs_ofs = 0x2a0000,
|
||||||
|
}, {
|
||||||
|
- /*
|
||||||
|
- Some devices (e.g. TL-WR1043 v4) use a mktplinkfw kernel image
|
||||||
|
- embedded in a tplink-safeloader image as os-image partition.
|
||||||
|
-
|
||||||
|
- We use a 1.5MB partition for the compressed kernel, which should
|
||||||
|
- be sufficient, but not too wasteful (the flash of the TL-WR1043 v4
|
||||||
|
- has 16MB in total).
|
||||||
|
- */
|
||||||
|
- .id = "16Msafeloader",
|
||||||
|
- .fw_max_len = 0x180000,
|
||||||
|
- .kernel_la = 0x80060000,
|
||||||
|
- .kernel_ep = 0x80060000,
|
||||||
|
- .rootfs_ofs = 0,
|
||||||
|
- }, {
|
||||||
|
/* terminating entry */
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@@ -268,7 +253,6 @@ static void usage(int status)
|
||||||
|
" -R <offset> overwrite rootfs offset with <offset> (hexval prefixed with 0x)\n"
|
||||||
|
" -o <file> write output to the file <file>\n"
|
||||||
|
" -s strip padding from the end of the image\n"
|
||||||
|
-" -S ignore firmware size limit (only for combined images)\n"
|
||||||
|
" -j add jffs2 end-of-filesystem markers\n"
|
||||||
|
" -N <vendor> set image vendor to <vendor>\n"
|
||||||
|
" -V <version> set image version to <version>\n"
|
||||||
|
@@ -358,7 +342,7 @@ static int check_options(void)
|
||||||
|
}
|
||||||
|
hw_id = strtoul(opt_hw_id, NULL, 0);
|
||||||
|
|
||||||
|
- if (layout_id == NULL) {
|
||||||
|
+ if (!combined && layout_id == NULL) {
|
||||||
|
ERR("flash layout is not specified");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
@@ -376,26 +360,31 @@ static int check_options(void)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- layout = find_layout(layout_id);
|
||||||
|
- if (layout == NULL) {
|
||||||
|
- ERR("unknown flash layout \"%s\"", layout_id);
|
||||||
|
- return -1;
|
||||||
|
- }
|
||||||
|
+ if (combined) {
|
||||||
|
+ if (!kernel_la || !kernel_ep) {
|
||||||
|
+ ERR("kernel loading address and entry point must be specified for combined image");
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ layout = find_layout(layout_id);
|
||||||
|
+ if (layout == NULL) {
|
||||||
|
+ ERR("unknown flash layout \"%s\"", layout_id);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (!kernel_la)
|
||||||
|
- kernel_la = layout->kernel_la;
|
||||||
|
- if (!kernel_ep)
|
||||||
|
- kernel_ep = layout->kernel_ep;
|
||||||
|
- if (!rootfs_ofs)
|
||||||
|
- rootfs_ofs = layout->rootfs_ofs;
|
||||||
|
+ if (!kernel_la)
|
||||||
|
+ kernel_la = layout->kernel_la;
|
||||||
|
+ if (!kernel_ep)
|
||||||
|
+ kernel_ep = layout->kernel_ep;
|
||||||
|
+ if (!rootfs_ofs)
|
||||||
|
+ rootfs_ofs = layout->rootfs_ofs;
|
||||||
|
|
||||||
|
- if (reserved_space > layout->fw_max_len) {
|
||||||
|
- ERR("reserved space is not valid");
|
||||||
|
- return -1;
|
||||||
|
+ if (reserved_space > layout->fw_max_len) {
|
||||||
|
+ ERR("reserved space is not valid");
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
- fw_max_len = layout->fw_max_len - reserved_space;
|
||||||
|
-
|
||||||
|
if (kernel_info.file_name == NULL) {
|
||||||
|
ERR("no kernel image specified");
|
||||||
|
return -1;
|
||||||
|
@@ -407,18 +396,9 @@ static int check_options(void)
|
||||||
|
|
||||||
|
kernel_len = kernel_info.file_size;
|
||||||
|
|
||||||
|
- if (combined) {
|
||||||
|
- exceed_bytes = kernel_info.file_size - (fw_max_len - sizeof(struct fw_header));
|
||||||
|
- if (exceed_bytes > 0) {
|
||||||
|
- if (!ignore_size) {
|
||||||
|
- ERR("kernel image is too big by %i bytes", exceed_bytes);
|
||||||
|
- return -1;
|
||||||
|
- }
|
||||||
|
- layout->fw_max_len = sizeof(struct fw_header) +
|
||||||
|
- kernel_info.file_size +
|
||||||
|
- reserved_space;
|
||||||
|
- }
|
||||||
|
- } else {
|
||||||
|
+ if (!combined) {
|
||||||
|
+ fw_max_len = layout->fw_max_len - reserved_space;
|
||||||
|
+
|
||||||
|
if (rootfs_info.file_name == NULL) {
|
||||||
|
ERR("no rootfs image specified");
|
||||||
|
return -1;
|
||||||
|
@@ -490,17 +470,18 @@ static void fill_header(char *buf, int len)
|
||||||
|
hdr->hw_id = htonl(hw_id);
|
||||||
|
hdr->hw_rev = htonl(hw_rev);
|
||||||
|
|
||||||
|
- if (boot_info.file_size == 0)
|
||||||
|
- memcpy(hdr->md5sum1, md5salt_normal, sizeof(hdr->md5sum1));
|
||||||
|
- else
|
||||||
|
- memcpy(hdr->md5sum1, md5salt_boot, sizeof(hdr->md5sum1));
|
||||||
|
-
|
||||||
|
hdr->kernel_la = htonl(kernel_la);
|
||||||
|
hdr->kernel_ep = htonl(kernel_ep);
|
||||||
|
- hdr->fw_length = htonl(layout->fw_max_len);
|
||||||
|
hdr->kernel_ofs = htonl(sizeof(struct fw_header));
|
||||||
|
hdr->kernel_len = htonl(kernel_len);
|
||||||
|
+
|
||||||
|
if (!combined) {
|
||||||
|
+ if (boot_info.file_size == 0)
|
||||||
|
+ memcpy(hdr->md5sum1, md5salt_normal, sizeof(hdr->md5sum1));
|
||||||
|
+ else
|
||||||
|
+ memcpy(hdr->md5sum1, md5salt_boot, sizeof(hdr->md5sum1));
|
||||||
|
+
|
||||||
|
+ hdr->fw_length = htonl(layout->fw_max_len);
|
||||||
|
hdr->rootfs_ofs = htonl(rootfs_ofs);
|
||||||
|
hdr->rootfs_len = htonl(rootfs_info.file_size);
|
||||||
|
}
|
||||||
|
@@ -521,7 +502,8 @@ static void fill_header(char *buf, int len)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
- get_md5(buf, len, hdr->md5sum1);
|
||||||
|
+ if (!combined)
|
||||||
|
+ get_md5(buf, len, hdr->md5sum1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int pad_jffs2(char *buf, int currlen)
|
||||||
|
@@ -598,7 +580,12 @@ static int build_fw(void)
|
||||||
|
int ret = EXIT_FAILURE;
|
||||||
|
int writelen = 0;
|
||||||
|
|
||||||
|
- buflen = layout->fw_max_len;
|
||||||
|
+ writelen = sizeof(struct fw_header) + kernel_len;
|
||||||
|
+
|
||||||
|
+ if (combined)
|
||||||
|
+ buflen = writelen;
|
||||||
|
+ else
|
||||||
|
+ buflen = layout->fw_max_len;
|
||||||
|
|
||||||
|
buf = malloc(buflen);
|
||||||
|
if (!buf) {
|
||||||
|
@@ -612,7 +599,6 @@ static int build_fw(void)
|
||||||
|
if (ret)
|
||||||
|
goto out_free_buf;
|
||||||
|
|
||||||
|
- writelen = sizeof(struct fw_header) + kernel_len;
|
||||||
|
|
||||||
|
if (!combined) {
|
||||||
|
if (rootfs_align)
|
||||||
|
@@ -805,7 +791,7 @@ int main(int argc, char *argv[])
|
||||||
|
while ( 1 ) {
|
||||||
|
int c;
|
||||||
|
|
||||||
|
- c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:C:ci:k:r:R:o:xX:hsSjv:");
|
||||||
|
+ c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:C:ci:k:r:R:o:xX:ehsjv:");
|
||||||
|
if (c == -1)
|
||||||
|
break;
|
||||||
|
|
||||||
|
@@ -861,9 +847,6 @@ int main(int argc, char *argv[])
|
||||||
|
case 's':
|
||||||
|
strip_padding = 1;
|
||||||
|
break;
|
||||||
|
- case 'S':
|
||||||
|
- ignore_size = 1;
|
||||||
|
- break;
|
||||||
|
case 'i':
|
||||||
|
inspect_info.file_name = optarg;
|
||||||
|
break;
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
From f08f754993d5e9a1952400528ce5405910d1d1a4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Piotr Dymacz <pepe2k@gmail.com>
|
||||||
|
Date: Thu, 6 Jul 2017 18:10:22 +0200
|
||||||
|
Subject: [PATCH] build: move mktplinkfw-combined command to image-commands.mk
|
||||||
|
|
||||||
|
We will need "mktplinkfw-combined" command also in the "ramips" target
|
||||||
|
for new MediaTek based TP-Link devices, with "safeloader" image type.
|
||||||
|
|
||||||
|
Also, rename the command to "tplink-v1-header", use "VERSION_DIST"
|
||||||
|
variable instead of "OpenWrt" and allow passing additional parameters.
|
||||||
|
|
||||||
|
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
|
||||||
|
[Rebased on 8ad1b09]
|
||||||
|
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
||||||
|
---
|
||||||
|
include/image-commands.mk | 9 +++++++++
|
||||||
|
target/linux/ar71xx/image/tp-link.mk | 22 ++++------------------
|
||||||
|
2 files changed, 13 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/image-commands.mk b/include/image-commands.mk
|
||||||
|
index 04fa853..9e56ab8 100644
|
||||||
|
--- a/include/image-commands.mk
|
||||||
|
+++ b/include/image-commands.mk
|
||||||
|
@@ -165,6 +165,15 @@ define Build/combined-image
|
||||||
|
@mv $@.new $@
|
||||||
|
endef
|
||||||
|
|
||||||
|
+define Build/tplink-v1-header
|
||||||
|
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
|
||||||
|
+ -c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
|
||||||
|
+ -E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||||
|
+ -m $(TPLINK_HEADER_VERSION) -N "$(VERSION_DIST)" -V $(REVISION) \
|
||||||
|
+ -k $@ -o $@.new $(1)
|
||||||
|
+ @mv $@.new $@
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
define Build/sysupgrade-tar
|
||||||
|
sh $(TOPDIR)/scripts/sysupgrade-tar.sh \
|
||||||
|
--board $(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)) \
|
||||||
|
diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
|
||||||
|
index 2557858..685b09e 100644
|
||||||
|
--- a/target/linux/ar71xx/image/tp-link.mk
|
||||||
|
+++ b/target/linux/ar71xx/image/tp-link.mk
|
||||||
|
@@ -21,20 +21,6 @@ define Build/mktplinkfw
|
||||||
|
$(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
|
||||||
|
endef
|
||||||
|
|
||||||
|
-# mktplinkfw-combined
|
||||||
|
-#
|
||||||
|
-# -c combined image
|
||||||
|
-define Build/mktplinkfw-combined
|
||||||
|
- $(STAGING_DIR_HOST)/bin/mktplinkfw \
|
||||||
|
- -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -N OpenWrt -V $(REVISION) $(1) \
|
||||||
|
- -L $(KERNEL_LOADADDR) -m $(TPLINK_HEADER_VERSION) \
|
||||||
|
- -E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||||
|
- -k $@ \
|
||||||
|
- -o $@.new \
|
||||||
|
- -c
|
||||||
|
- @mv $@.new $@
|
||||||
|
-endef
|
||||||
|
-
|
||||||
|
# add RE450 and similar header to the kernel image
|
||||||
|
define Build/mktplinkfw-kernel
|
||||||
|
$(STAGING_DIR_HOST)/bin/mktplinkfw-kernel \
|
||||||
|
@@ -58,7 +44,7 @@ define Device/tplink
|
||||||
|
TPLINK_HEADER_VERSION := 1
|
||||||
|
LOADER_TYPE := gz
|
||||||
|
KERNEL := kernel-bin | patch-cmdline | lzma
|
||||||
|
- KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | mktplinkfw-combined
|
||||||
|
+ KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | tplink-v1-header
|
||||||
|
IMAGES := sysupgrade.bin factory.bin
|
||||||
|
IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade
|
||||||
|
IMAGE/factory.bin := append-rootfs | mktplinkfw factory
|
||||||
|
@@ -70,7 +56,7 @@ $(Device/tplink)
|
||||||
|
COMPILE := loader-$(1).gz
|
||||||
|
COMPILE/loader-$(1).gz := loader-okli-compile
|
||||||
|
KERNEL := copy-file $(KDIR)/vmlinux.bin.lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1)
|
||||||
|
- KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | mktplinkfw-combined
|
||||||
|
+ KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | tplink-v1-header
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Device/tplink-4m
|
||||||
|
@@ -249,7 +235,7 @@ $(Device/tplink-8mlzma)
|
||||||
|
DEVICE_TITLE := TP-LINK TL-WDR6500v2
|
||||||
|
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
|
||||||
|
KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma
|
||||||
|
- KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma | mktplinkfw-combined
|
||||||
|
+ KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma | tplink-v1-header
|
||||||
|
BOARDNAME = TL-WDR6500-v2
|
||||||
|
DEVICE_PROFILE = TLWDR6500V2
|
||||||
|
TPLINK_HWID := 0x65000002
|
||||||
|
@@ -852,7 +838,7 @@ define Device/tl-wr1043nd-v4
|
||||||
|
MTDPARTS := spi0.0:128k(u-boot)ro,1536k(kernel),14016k(rootfs),128k(product-info)ro,320k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(ART)ro,15552k@0x20000(firmware)
|
||||||
|
IMAGE_SIZE := 15552k
|
||||||
|
TPLINK_BOARD_NAME := TLWR1043NDV4
|
||||||
|
- KERNEL := kernel-bin | patch-cmdline | lzma | mktplinkfw-combined
|
||||||
|
+ KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
|
||||||
|
IMAGES := sysupgrade.bin factory.bin
|
||||||
|
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
|
||||||
|
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
|
@ -0,0 +1,697 @@
|
||||||
|
From 857e26a395a446da7b6bb3a1056ef3fb8d85cf65 Mon Sep 17 00:00:00 2001
|
||||||
|
From: majik-sheff <tim@tfthorpe.net>
|
||||||
|
Date: Mon, 25 Sep 2017 04:38:49 -0500
|
||||||
|
Subject: [PATCH] ar71xx: add support for TL-WR1043N v5.0
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
The hardware of the TP-Link WR-1043N v5 appears
|
||||||
|
to be to almost 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. The factory
|
||||||
|
image should install from the stock interface.
|
||||||
|
|
||||||
|
Set your Ethernet adapter to 192.168.0.10. Enable your TFTP
|
||||||
|
server with the firmware image in the root named fw.bin
|
||||||
|
(can be any name, just change the tftp command that comes later)
|
||||||
|
When the router starts its boot process,
|
||||||
|
press “enter” to interrupt auto boot.
|
||||||
|
|
||||||
|
Enter the following commands:
|
||||||
|
tftp 0x80060000 fw.bin
|
||||||
|
erase 0x9f040000 +${filesize}
|
||||||
|
cp.b 0x80060000 0x9f040000 ${filesize}
|
||||||
|
reset
|
||||||
|
|
||||||
|
Signed-off-by: Tim Thorpe <tim@tfthorpe.net>
|
||||||
|
[Rebased on 8ad1b09, Fixed TPLINK_BOARD_NAME]
|
||||||
|
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
||||||
|
---
|
||||||
|
target/linux/ar71xx/base-files/etc/board.d/01_leds | 10 +-
|
||||||
|
.../linux/ar71xx/base-files/etc/board.d/02_network | 4 +
|
||||||
|
target/linux/ar71xx/base-files/etc/diag.sh | 1 +
|
||||||
|
.../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 24 ++
|
||||||
|
target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +
|
||||||
|
.../ar71xx/base-files/lib/upgrade/platform.sh | 2 +
|
||||||
|
target/linux/ar71xx/config-4.4 | 1 +
|
||||||
|
.../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 +
|
||||||
|
.../files/arch/mips/ath79/mach-tl-wr1043nd-v4.c | 316 +++++++++++++--------
|
||||||
|
.../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 ++-
|
||||||
|
14 files changed, 310 insertions(+), 120 deletions(-)
|
||||||
|
create mode 100644 target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
|
||||||
|
|
||||||
|
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 e1efb56..5f58701 100755
|
||||||
|
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
|
||||||
|
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
|
||||||
|
@@ -666,14 +666,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 24ead87..e7a1702 100755
|
||||||
|
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
|
||||||
|
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
|
||||||
|
@@ -235,6 +235,7 @@ ar71xx_setup_interfaces()
|
||||||
|
dir-835-a1|\
|
||||||
|
esr900|\
|
||||||
|
mynet-n750|\
|
||||||
|
+ tl-wr1043n-v5|\
|
||||||
|
sr3200|\
|
||||||
|
wndr3700v4|\
|
||||||
|
wndr4300)
|
||||||
|
@@ -485,6 +486,9 @@ ar71xx_setup_macs()
|
||||||
|
lan_mac=$(mtd_get_mac_binary product-info 8)
|
||||||
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
|
;;
|
||||||
|
+ tl-wr1043n-v5)
|
||||||
|
+ wan_mac=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1)
|
||||||
|
+ ;;
|
||||||
|
esr900)
|
||||||
|
wan_mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")
|
||||||
|
;;
|
||||||
|
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||||
|
index 38cc5d7..ec0c720 100644
|
||||||
|
--- a/target/linux/ar71xx/base-files/etc/diag.sh
|
||||||
|
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||||
|
@@ -362,6 +362,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/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..4b0922f
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
|
||||||
|
@@ -0,0 +1,24 @@
|
||||||
|
+#!/bin/ash
|
||||||
|
+
|
||||||
|
+[ "$ACTION" == "add" ] || exit 0
|
||||||
|
+
|
||||||
|
+PHYNBR=${DEVPATH##*/phy}
|
||||||
|
+
|
||||||
|
+[ -n $PHYNBR ] || exit 0
|
||||||
|
+
|
||||||
|
+. /lib/functions.sh
|
||||||
|
+. /lib/functions/system.sh
|
||||||
|
+
|
||||||
|
+board=$(board_name)
|
||||||
|
+
|
||||||
|
+case "$board" in
|
||||||
|
+ archer-c58-v1)
|
||||||
|
+ echo $(macaddr_add $(mtd_get_mac_binary mac 8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
|
||||||
|
+ ;;
|
||||||
|
+ tl-wr1043n-v5)
|
||||||
|
+ echo $(macaddr_add $(mtd_get_mac_binary product-info 8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
|
||||||
|
+ ;;
|
||||||
|
+ *)
|
||||||
|
+ ;;
|
||||||
|
+esac
|
||||||
|
+
|
||||||
|
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||||
|
index 46711af..de6042b 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 e65f6e2..ec8e989 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|\
|
||||||
|
@@ -291,6 +292,7 @@ platform_check_image() {
|
||||||
|
;;
|
||||||
|
alfa-ap96|\
|
||||||
|
alfa-nx|\
|
||||||
|
+ tl-wr1043n-v5|\
|
||||||
|
ap121-mini|\
|
||||||
|
ap121|\
|
||||||
|
ap135-020|\
|
||||||
|
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
|
||||||
|
index 0187775..4cf0c6f 100644
|
||||||
|
--- a/target/linux/ar71xx/config-4.4
|
||||||
|
+++ b/target/linux/ar71xx/config-4.4
|
||||||
|
@@ -181,6 +181,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 4112fd3..94f25ee 100644
|
||||||
|
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
|
||||||
|
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
|
||||||
|
@@ -1596,6 +1596,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..53a82d2 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@universe-factory.net>
|
||||||
|
* Copyright (C) 2016 Andreas Ziegler <github@andreas-ziegler.de>
|
||||||
|
* Copyright (C) 2016 Ludwig Thomeczek <ledesrc@wxorx.net>
|
||||||
|
+ * Copyright (c) 2017 Tim Thorpe <tim@tfthorpe.net>
|
||||||
|
*
|
||||||
|
* Derived from: mach-dir-869-a1.c
|
||||||
|
*
|
||||||
|
@@ -38,153 +39,236 @@
|
||||||
|
#include "machtypes.h"
|
||||||
|
#include "nvram.h"
|
||||||
|
|
||||||
|
-#define TL_WR1043_V4_GPIO_BTN_RESET 2
|
||||||
|
-#define TL_WR1043_V4_GPIO_BTN_RFKILL 5
|
||||||
|
+#define TL_WR1043_V4_GPIO_BTN_RESET 2
|
||||||
|
+#define TL_WR1043_V4_GPIO_BTN_RFKILL 5
|
||||||
|
|
||||||
|
-#define TL_WR1043_V4_GPIO_LED_WLAN 19
|
||||||
|
-#define TL_WR1043_V4_GPIO_LED_USB 7
|
||||||
|
-#define TL_WR1043_V4_GPIO_LED_WPS 1
|
||||||
|
-#define TL_WR1043_V4_GPIO_LED_SYSTEM 6
|
||||||
|
+#define TL_WR1043_V4_GPIO_LED_WLAN 19
|
||||||
|
+#define TL_WR1043_V4_GPIO_LED_USB 7
|
||||||
|
+#define TL_WR1043_V4_GPIO_LED_WPS 1
|
||||||
|
+#define TL_WR1043_V4_GPIO_LED_SYSTEM 6
|
||||||
|
|
||||||
|
-#define TL_WR1043_V4_GPIO_USB_POWER 8
|
||||||
|
+#define TL_WR1043_V4_GPIO_USB_POWER 8
|
||||||
|
|
||||||
|
-#define TL_WR1043_V4_GPIO_LED_WAN 15
|
||||||
|
-#define TL_WR1043_V4_GPIO_LED_LAN1 9
|
||||||
|
-#define TL_WR1043_V4_GPIO_LED_LAN2 14
|
||||||
|
-#define TL_WR1043_V4_GPIO_LED_LAN3 21
|
||||||
|
-#define TL_WR1043_V4_GPIO_LED_LAN4 20
|
||||||
|
+#define TL_WR1043_V4_GPIO_LED_WAN 15
|
||||||
|
+#define TL_WR1043_V5_GPIO_LED_WAN_ORANGE 16
|
||||||
|
+#define TL_WR1043_V4_GPIO_LED_LAN1 9
|
||||||
|
+#define TL_WR1043_V4_GPIO_LED_LAN2 14
|
||||||
|
+#define TL_WR1043_V4_GPIO_LED_LAN3 21
|
||||||
|
+#define TL_WR1043_V4_GPIO_LED_LAN4 20
|
||||||
|
|
||||||
|
-#define TL_WR1043_V4_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||||
|
-#define TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR1043_V4_KEYS_POLL_INTERVAL)
|
||||||
|
+#define TL_WR1043_V4_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||||
|
+#define TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR1043_V4_KEYS_POLL_INTERVAL)
|
||||||
|
|
||||||
|
-#define TL_WR1043_V4_MAC_LOCATION 0x1ff50008
|
||||||
|
-
|
||||||
|
-#define TL_WR1043_V4_EEPROM_ADDR 0x1fff0000
|
||||||
|
-#define TL_WR1043_V4_WMAC_CALDATA_OFFSET 0x1000
|
||||||
|
+#define TL_WR1043_V4_MAC_LOCATION 0x1ff50008
|
||||||
|
+#define TL_WR1043_V4_EEPROM_ADDR 0x1fff0000
|
||||||
|
+#define TL_WR1043_V4_WMAC_CALDATA_OFFSET 0x1000
|
||||||
|
+#define TL_WR1043_V5_MAC_LOCATION 0x1ff00008
|
||||||
|
+#define TL_WR1043_V5_DEF_PIN_LOCATION 0x1ff00208
|
||||||
|
+#define TL_WR1043_V5_TPLINK_XML_LOCATION 0x1ff1c008
|
||||||
|
|
||||||
|
static struct gpio_led tl_wr1043nd_v4_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:usb",
|
||||||
|
- .gpio = TL_WR1043_V4_GPIO_LED_USB,
|
||||||
|
- .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,
|
||||||
|
- },
|
||||||
|
+ {
|
||||||
|
+ .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:usb",
|
||||||
|
+ .gpio = TL_WR1043_V4_GPIO_LED_USB,
|
||||||
|
+ .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,
|
||||||
|
+ },
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct gpio_keys_button tl_wr1043nd_v4_gpio_keys[] __initdata = {
|
||||||
|
- {
|
||||||
|
- .desc = "Reset button",
|
||||||
|
- .type = EV_KEY,
|
||||||
|
- .code = KEY_RESTART,
|
||||||
|
- .debounce_interval = TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL,
|
||||||
|
- .gpio = TL_WR1043_V4_GPIO_BTN_RESET,
|
||||||
|
- .active_low = 1,
|
||||||
|
- },
|
||||||
|
- {
|
||||||
|
- .desc = "RFKILL button",
|
||||||
|
- .type = EV_KEY,
|
||||||
|
- .code = KEY_RFKILL,
|
||||||
|
- .debounce_interval = TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL,
|
||||||
|
- .gpio = TL_WR1043_V4_GPIO_BTN_RFKILL,
|
||||||
|
- .active_low = 1,
|
||||||
|
- },
|
||||||
|
+ {
|
||||||
|
+ .desc = "Reset button",
|
||||||
|
+ .type = EV_KEY,
|
||||||
|
+ .code = KEY_RESTART,
|
||||||
|
+ .debounce_interval = TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL,
|
||||||
|
+ .gpio = TL_WR1043_V4_GPIO_BTN_RESET,
|
||||||
|
+ .active_low = 1,
|
||||||
|
+ },
|
||||||
|
+ {
|
||||||
|
+ .desc = "RFKILL button",
|
||||||
|
+ .type = EV_KEY,
|
||||||
|
+ .code = KEY_RFKILL,
|
||||||
|
+ .debounce_interval = TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL,
|
||||||
|
+ .gpio = TL_WR1043_V4_GPIO_BTN_RFKILL,
|
||||||
|
+ .active_low = 1,
|
||||||
|
+ },
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct ar8327_pad_cfg tl_wr1043nd_v4_ar8327_pad0_cfg = {
|
||||||
|
- .mode = AR8327_PAD_MAC_SGMII,
|
||||||
|
- .sgmii_delay_en = true,
|
||||||
|
+ .mode = AR8327_PAD_MAC_SGMII,
|
||||||
|
+ .sgmii_delay_en = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct ar8327_platform_data tl_wr1043nd_v4_ar8327_data = {
|
||||||
|
- .pad0_cfg = &tl_wr1043nd_v4_ar8327_pad0_cfg,
|
||||||
|
- .port0_cfg = {
|
||||||
|
- .force_link = 1,
|
||||||
|
- .speed = AR8327_PORT_SPEED_1000,
|
||||||
|
- .duplex = 1,
|
||||||
|
- .txpause = 1,
|
||||||
|
- .rxpause = 1,
|
||||||
|
- },
|
||||||
|
+ .pad0_cfg = &tl_wr1043nd_v4_ar8327_pad0_cfg,
|
||||||
|
+ .port0_cfg = {
|
||||||
|
+ .force_link = 1,
|
||||||
|
+ .speed = AR8327_PORT_SPEED_1000,
|
||||||
|
+ .duplex = 1,
|
||||||
|
+ .txpause = 1,
|
||||||
|
+ .rxpause = 1,
|
||||||
|
+ },
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct mdio_board_info tl_wr1043nd_v4_mdio0_info[] = {
|
||||||
|
- {
|
||||||
|
- .bus_id = "ag71xx-mdio.0",
|
||||||
|
- .phy_addr = 0,
|
||||||
|
- .platform_data = &tl_wr1043nd_v4_ar8327_data,
|
||||||
|
- },
|
||||||
|
+ {
|
||||||
|
+ .bus_id = "ag71xx-mdio.0",
|
||||||
|
+ .phy_addr = 0,
|
||||||
|
+ .platform_data = &tl_wr1043nd_v4_ar8327_data,
|
||||||
|
+ },
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init tl_wr1043nd_v4_setup(void)
|
||||||
|
{
|
||||||
|
- u8 *mac = (u8 *) KSEG1ADDR(TL_WR1043_V4_MAC_LOCATION);
|
||||||
|
- u8 *eeprom = (u8 *) KSEG1ADDR(TL_WR1043_V4_EEPROM_ADDR);
|
||||||
|
+ u8 *mac = (u8 *) KSEG1ADDR(TL_WR1043_V4_MAC_LOCATION);
|
||||||
|
+ u8 *eeprom = (u8 *) KSEG1ADDR(TL_WR1043_V4_EEPROM_ADDR);
|
||||||
|
|
||||||
|
- ath79_register_m25p80(NULL);
|
||||||
|
+ ath79_register_m25p80(NULL);
|
||||||
|
|
||||||
|
- ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
|
||||||
|
- ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
|
||||||
|
- ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
|
||||||
|
- ath79_eth0_data.phy_mask = BIT(0);
|
||||||
|
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
|
||||||
|
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
|
||||||
|
+ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
|
||||||
|
+ ath79_eth0_data.phy_mask = BIT(0);
|
||||||
|
|
||||||
|
- mdiobus_register_board_info(tl_wr1043nd_v4_mdio0_info,
|
||||||
|
- ARRAY_SIZE(tl_wr1043nd_v4_mdio0_info));
|
||||||
|
+ mdiobus_register_board_info(tl_wr1043nd_v4_mdio0_info,
|
||||||
|
+ ARRAY_SIZE(tl_wr1043nd_v4_mdio0_info));
|
||||||
|
|
||||||
|
- ath79_register_usb();
|
||||||
|
- ath79_register_mdio(0, 0);
|
||||||
|
- ath79_register_eth(0);
|
||||||
|
+ ath79_register_usb();
|
||||||
|
+ ath79_register_mdio(0, 0);
|
||||||
|
+ ath79_register_eth(0);
|
||||||
|
|
||||||
|
- ath79_register_wmac(eeprom + TL_WR1043_V4_WMAC_CALDATA_OFFSET, mac);
|
||||||
|
+ ath79_register_wmac(eeprom + TL_WR1043_V4_WMAC_CALDATA_OFFSET, mac);
|
||||||
|
|
||||||
|
- ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr1043nd_v4_leds_gpio),
|
||||||
|
- tl_wr1043nd_v4_leds_gpio);
|
||||||
|
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr1043nd_v4_leds_gpio),
|
||||||
|
+ tl_wr1043nd_v4_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);
|
||||||
|
+ ath79_register_gpio_keys_polled(-1, TL_WR1043_V4_KEYS_POLL_INTERVAL,
|
||||||
|
+ ARRAY_SIZE(tl_wr1043nd_v4_gpio_keys),
|
||||||
|
+ tl_wr1043nd_v4_gpio_keys);
|
||||||
|
|
||||||
|
- gpio_request_one(TL_WR1043_V4_GPIO_USB_POWER,
|
||||||
|
- GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
||||||
|
- "USB power");
|
||||||
|
+ gpio_request_one(TL_WR1043_V4_GPIO_USB_POWER,
|
||||||
|
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
||||||
|
+ "USB power");
|
||||||
|
}
|
||||||
|
|
||||||
|
MIPS_MACHINE(ATH79_MACH_TL_WR1043ND_V4, "TL-WR1043ND-v4",
|
||||||
|
- "TP-LINK TL-WR1043ND v4", tl_wr1043nd_v4_setup);
|
||||||
|
+ "TP-LINK TL-WR1043ND v4", tl_wr1043nd_v4_setup);
|
||||||
|
+
|
||||||
|
+static struct gpio_led tl_wr1043n_v5_leds_gpio[] __initdata = {
|
||||||
|
+ {
|
||||||
|
+ .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:orange:wan",
|
||||||
|
+ .gpio = TL_WR1043_V5_GPIO_LED_WAN_ORANGE,
|
||||||
|
+ .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,
|
||||||
|
+ },
|
||||||
|
+ {
|
||||||
|
+ .name = "tp-link:green:wps",
|
||||||
|
+ .gpio = TL_WR1043_V4_GPIO_LED_WPS,
|
||||||
|
+ .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 *mac = (u8 *) KSEG1ADDR(TL_WR1043_V5_MAC_LOCATION);
|
||||||
|
+ u8 *eeprom = (u8 *) KSEG1ADDR(TL_WR1043_V4_EEPROM_ADDR);
|
||||||
|
+
|
||||||
|
+ ath79_register_m25p80(NULL);
|
||||||
|
+
|
||||||
|
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
|
||||||
|
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
|
||||||
|
+ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
|
||||||
|
+ ath79_eth0_data.phy_mask = BIT(0);
|
||||||
|
+
|
||||||
|
+ mdiobus_register_board_info(tl_wr1043nd_v4_mdio0_info,
|
||||||
|
+ ARRAY_SIZE(tl_wr1043nd_v4_mdio0_info));
|
||||||
|
+
|
||||||
|
+ ath79_register_mdio(0, 0);
|
||||||
|
+ ath79_register_eth(0);
|
||||||
|
+
|
||||||
|
+ ath79_register_wmac(eeprom + TL_WR1043_V4_WMAC_CALDATA_OFFSET, mac);
|
||||||
|
+
|
||||||
|
+ 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);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+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 8864e0d..11fc236 100644
|
||||||
|
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
|
||||||
|
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
|
||||||
|
@@ -217,6 +217,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 685b09e..61ebb09 100644
|
||||||
|
--- a/target/linux/ar71xx/image/tp-link.mk
|
||||||
|
+++ b/target/linux/ar71xx/image/tp-link.mk
|
||||||
|
@@ -843,7 +843,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@0x40000(firmware)
|
||||||
|
+ IMAGE_SIZE := 15104k
|
||||||
|
+ TPLINK_BOARD_NAME := 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 376835a..878f7e8 100644
|
||||||
|
--- a/target/linux/ar71xx/mikrotik/config-default
|
||||||
|
+++ b/target/linux/ar71xx/mikrotik/config-default
|
||||||
|
@@ -146,6 +146,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 62be218..0ccbb4c 100644
|
||||||
|
--- a/target/linux/ar71xx/nand/config-default
|
||||||
|
+++ b/target/linux/ar71xx/nand/config-default
|
||||||
|
@@ -54,6 +54,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 2468426..72263a4 100644
|
||||||
|
--- a/tools/firmware-utils/src/tplink-safeloader.c
|
||||||
|
+++ b/tools/firmware-utils/src/tplink-safeloader.c
|
||||||
|
@@ -478,6 +478,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",
|
||||||
|
@@ -888,7 +924,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
|
||||||
|
|
|
@ -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=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1)
|
||||||
|
ETHMESHMAC=1
|
||||||
|
ROUTERMAC=eth0
|
Loading…
Reference in New Issue