diff mbox

[OpenWrt-Devel,3/7] ar71xx/image: migrate tl-wdr6500-v2 to new image build steps

Message ID 5634CE2B.80309@openwrt.org
State Accepted
Delegated to: Felix Fietkau
Headers show

Commit Message

Felix Fietkau Oct. 31, 2015, 2:20 p.m. UTC
On 2015-10-31 15:02, Weijie Gao wrote:
> HI,
> 
> I have this router and I submitted this router's mach.
> 
> Have you noticed that the TPLINK-64K generates a U-Boot image for the
> kernel at first?
> The normal routine does not do that.
> 
> So this firmware has two headers, first the tp-link header then the
> u-boot header.
> 
> If the u-boot header disappear, the bootloader won't boot the firmware.
Does this fix the issue?
---

Comments

Weijie Gao Oct. 31, 2015, 2:33 p.m. UTC | #1
I'll have a try.
But there's another issue.

The firmware uses a version 2 magic, specified by "-m 2" cmdline passed to
mktplinkfw.
Directly call mktplinkfw-initramfs or mktplinkfw will create a version 1
firmware.

2015-10-31 22:20 GMT+08:00 Felix Fietkau <nbd@openwrt.org>:

> On 2015-10-31 15:02, Weijie Gao wrote:
> > HI,
> >
> > I have this router and I submitted this router's mach.
> >
> > Have you noticed that the TPLINK-64K generates a U-Boot image for the
> > kernel at first?
> > The normal routine does not do that.
> >
> > So this firmware has two headers, first the tp-link header then the
> > u-boot header.
> >
> > If the u-boot header disappear, the bootloader won't boot the firmware.
> Does this fix the issue?
> ---
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -334,6 +334,8 @@ TARGET_DEVICES += tl-wdr3500-v1 tl-wdr3600-v1
> tl-wdr4300-v1 tl-wdr4300-v1-il tl-
>
>  define Device/tl-wdr6500-v2
>  $(Device/tplink-8mlzma)
> +  KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma
> +  KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma |
> mktplinkfw-initramfs
>    BOARDNAME = TL-WDR6500-v2
>    DEVICE_PROFILE = TLWDR6500V2
>    TPLINK_HWID := 0x65000002
>
Felix Fietkau Oct. 31, 2015, 3:30 p.m. UTC | #2
On 2015-10-31 15:33, Weijie Gao wrote:
> I'll have a try.
> But there's another issue.
> 
> The firmware uses a version 2 magic, specified by "-m 2" cmdline passed
> to mktplinkfw.
> Directly call mktplinkfw-initramfs or mktplinkfw will create a version 1
> firmware.
The templates check TPLINK_HEADER_VERSION, so it will create version 2
firmware.

- Felix
Weijie Gao Nov. 1, 2015, 11:17 a.m. UTC | #3
2015-10-31 22:20 GMT+08:00 Felix Fietkau <nbd@openwrt.org>:

> On 2015-10-31 15:02, Weijie Gao wrote:
> > HI,
> >
> > I have this router and I submitted this router's mach.
> >
> > Have you noticed that the TPLINK-64K generates a U-Boot image for the
> > kernel at first?
> > The normal routine does not do that.
> >
> > So this firmware has two headers, first the tp-link header then the
> > u-boot header.
> >
> > If the u-boot header disappear, the bootloader won't boot the firmware.
> Does this fix the issue?
> ---
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -334,6 +334,8 @@ TARGET_DEVICES += tl-wdr3500-v1 tl-wdr3600-v1
> tl-wdr4300-v1 tl-wdr4300-v1-il tl-
>
>  define Device/tl-wdr6500-v2
>  $(Device/tplink-8mlzma)
> +  KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma
> +  KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma |
> mktplinkfw-initramfs
>    BOARDNAME = TL-WDR6500-v2
>    DEVICE_PROFILE = TLWDR6500V2
>    TPLINK_HWID := 0x65000002
>

I‘ve tested and it does fix the issue.
diff mbox

Patch

--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -334,6 +334,8 @@  TARGET_DEVICES += tl-wdr3500-v1 tl-wdr3600-v1 tl-wdr4300-v1 tl-wdr4300-v1-il tl-
 
 define Device/tl-wdr6500-v2
 $(Device/tplink-8mlzma)
+  KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma
+  KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma | mktplinkfw-initramfs
   BOARDNAME = TL-WDR6500-v2
   DEVICE_PROFILE = TLWDR6500V2
   TPLINK_HWID := 0x65000002