Re: [OpenWrt-Devel] Trunk tl wdr4900 v1 boot fails on bootloader CRC check

2019-03-10 Thread Alberto Bursi


On 10/03/19 22:33, Sami Olmari wrote:


On Sun, Mar 10, 2019 at 4:20 PM Alberto Bursi 
mailto:bobafetthotm...@gmail.com>> wrote:



On 10/03/19 21:32, Sami Olmari via openwrt-devel wrote:
> Okay it wasn't
>

https://github.com/openwrt/openwrt/commit/576c69938bb38c7edfa23f220eb30cb5c1d0a726

> nor the immediately next one
>

https://github.com/openwrt/openwrt/commit/0fbd3d23aadee0d95beef4f077a866dae7f4841a

> so it's still unclear what commit really breaks this... but I'll
try
> to keep looking.. :)
>
> --
>  Sami Olmari
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org

> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


The issue isn't a specific commit.

The issue is the kernel is too big.

The bootloader of this device only reads 0x29F000 bytes in hex or

2748416 bytes, around 2.6Mb in decimal.


In the Github PR (1) they see they can only work around this by

making an u-boot bootloader that can be loaded instead of the kernel.

Then this u-boot will load the kernel with no limitations.


-Alberto


[1] https://github.com/openwrt/openwrt/pull/1773



Shouldn't this alleviate that? 
https://github.com/openwrt/openwrt/commit/576c69938bb38c7edfa23f220eb30cb5c1d0a726


"
Currently, the image creation process for the TP-Link tl-wdr4900-v1
needs a fixed sized kernel and places the rootfs partition at a
fixed offset. With the upcoming move to 4.19 the kernel will no
longer fit into the existing allocated space for the kernel
partition.

This patch converts the device to utilize the established
tplink,firmware mtdsplitter, which can deal with a dynamic
kernel/rootfs size.

"

Not that I really know too good, I'm still just eager user more than 
developer... Anyway, All I can then hope a fix is introduced... I am more than 
willing to alpha/betatest :)

--
  Sami Olmari



No it does not. That patch solves kernel size issue for OpenWrt, but not 
for bootloader.


The bootloader will still only read 2.6MB from flash, where the kernel 
partition was in stock firmware.


If the kernel is bigger than that, it will not be all read and will fail.

This is why they want to make a second u-boot bootloader,

so the main bootloader will load and execute the second bootloader

that will then load and execute the kernel. Other devices in OpenWrt do 
this, it's not a new thing.


Follow the Github PR thread and see if they can fix this.

-Alberto

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Trunk tl wdr4900 v1 boot fails on bootloader CRC check

2019-03-10 Thread Sami Olmari via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
On Sun, Mar 10, 2019 at 4:20 PM Alberto Bursi 
wrote:

>
> On 10/03/19 21:32, Sami Olmari via openwrt-devel wrote:
> > Okay it wasn't
> >
> https://github.com/openwrt/openwrt/commit/576c69938bb38c7edfa23f220eb30cb5c1d0a726
> > nor the immediately next one
> >
> https://github.com/openwrt/openwrt/commit/0fbd3d23aadee0d95beef4f077a866dae7f4841a
> > so it's still unclear what commit really breaks this... but I'll try
> > to keep looking.. :)
> >
> > --
> >  Sami Olmari
> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
>
> The issue isn't a specific commit.
>
> The issue is the kernel is too big.
>
> The bootloader of this device only reads 0x29F000 bytes in hex or
>
> 2748416 bytes, around 2.6Mb in decimal.
>
>
> In the Github PR (1) they see they can only work around this by
>
> making an u-boot bootloader that can be loaded instead of the kernel.
>
> Then this u-boot will load the kernel with no limitations.
>
>
> -Alberto
>
>
> [1] https://github.com/openwrt/openwrt/pull/1773
>



Shouldn't this alleviate that?
https://github.com/openwrt/openwrt/commit/576c69938bb38c7edfa23f220eb30cb5c1d0a726

"

Currently, the image creation process for the TP-Link tl-wdr4900-v1
needs a fixed sized kernel and places the rootfs partition at a
fixed offset. With the upcoming move to 4.19 the kernel will no
longer fit into the existing allocated space for the kernel
partition.

This patch converts the device to utilize the established
tplink,firmware mtdsplitter, which can deal with a dynamic
kernel/rootfs size.

"

Not that I really know too good, I'm still just eager user more than
developer... Anyway, All I can then hope a fix is introduced... I am
more than willing to alpha/betatest :)

-- 

 Sami Olmari
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Trunk tl wdr4900 v1 boot fails on bootloader CRC check

2019-03-10 Thread Alberto Bursi



On 10/03/19 21:32, Sami Olmari via openwrt-devel wrote:
Okay it wasn't 
https://github.com/openwrt/openwrt/commit/576c69938bb38c7edfa23f220eb30cb5c1d0a726 
nor the immediately next one 
https://github.com/openwrt/openwrt/commit/0fbd3d23aadee0d95beef4f077a866dae7f4841a 
so it's still unclear what commit really breaks this... but I'll try 
to keep looking.. :)


--
 Sami Olmari
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



The issue isn't a specific commit.

The issue is the kernel is too big.

The bootloader of this device only reads 0x29F000 bytes in hex or

2748416 bytes, around 2.6Mb in decimal.


In the Github PR (1) they see they can only work around this by

making an u-boot bootloader that can be loaded instead of the kernel.

Then this u-boot will load the kernel with no limitations.


-Alberto


[1] https://github.com/openwrt/openwrt/pull/1773


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Trunk tl wdr4900 v1 boot fails on bootloader CRC check

2019-03-10 Thread Sami Olmari via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Okay it wasn't
https://github.com/openwrt/openwrt/commit/576c69938bb38c7edfa23f220eb30cb5c1d0a726
nor the immediately next one
https://github.com/openwrt/openwrt/commit/0fbd3d23aadee0d95beef4f077a866dae7f4841a
so it's still unclear what commit really breaks this... but I'll try to
keep looking.. :)

-- 
 Sami Olmari

On Sun, Mar 10, 2019 at 2:07 PM Sami Olmari via openwrt-devel <
openwrt-devel@lists.openwrt.org> wrote:

> The sender domain has a DMARC Reject/Quarantine policy which disallows
> sending mailing list messages using the original "From" header.
>
> To mitigate this problem, the original message has been wrapped
> automatically by the mailing list software.
>
>
> -- Forwarded message --
> From: Sami Olmari 
> To: openwrt-devel ,
> paweldembi...@gmail.com, chunk...@gmail.com
> Cc:
> Bcc:
> Date: Sun, 10 Mar 2019 14:06:24 +0200
> Subject: Trunk tl wdr4900 v1 boot fails on bootloader CRC check
> So, current trunk for tp-link WDR4900 v1 fails to boot properly. It fails
> bootloader CRC check.
>
> Serial log:
>
> ## Booting kernel from Legacy Image at 0200 ...
>Image Name:   Linux-4.14.105
>Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>Data Size:2908775 Bytes = 2.8 MiB
>Load Address: 0100
>Entry Point:  01000588
>Verifying Checksum ... Bad Data CRC
> ERROR: can't get kernel image!
>
> This happends on snapshot downloadable from openwrt site as well as latest
> as of now buildroot trunk image. Also no matte do one upload an sysupgrade
> for updating workin openwrt image or throw in factory image with
> serial+tftp recovery, endresult is same.
>
> I'm trying to narrow down at what commit exactly this got broken, but this
> will take some time... My initial suspect would be around commit
> 576c69938bb38c7edfa23f220eb30cb5c1d0a726 but I might be wrong...
>
> Anyway I wanted to report this ASAP as it will brick any WDR4900 v1 out
> there still existing :)
>
> --
>  Sami Olmari
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Trunk tl wdr4900 v1 boot fails on bootloader CRC check

2019-03-10 Thread Christian Lamparter
On Sunday, March 10, 2019 1:06:24 PM CET Sami Olmari wrote:
> So, current trunk for tp-link WDR4900 v1 fails to boot properly. It fails
> bootloader CRC check.
> 
> Serial log:
> 
> ## Booting kernel from Legacy Image at 0200 ...
>Image Name:   Linux-4.14.105
>Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>Data Size:2908775 Bytes = 2.8 MiB
>Load Address: 0100
>Entry Point:  01000588
>Verifying Checksum ... Bad Data CRC
> ERROR: can't get kernel image!
> 
> This happends on snapshot downloadable from openwrt site as well as latest
> as of now buildroot trunk image. Also no matte do one upload an sysupgrade
> for updating workin openwrt image or throw in factory image with
> serial+tftp recovery, endresult is same.
> 
> I'm trying to narrow down at what commit exactly this got broken, but this
> will take some time... My initial suspect would be around commit
> 576c69938bb38c7edfa23f220eb30cb5c1d0a726 but I might be wrong...
> 
> Anyway I wanted to report this ASAP as it will brick any WDR4900 v1 out
> there still existing :)
> 

Pawel Dembicki has already started a PR about this some time ago.

|Boot command read only 0x29F000 data from flash.
|Bigger images causes crc error. It can't be changed.

And there's a round-about way of making it work too.
https://github.com/openwrt/openwrt/pull/1773#issuecomment-461082045

However, It's not like you can just come up with something unless
you want to invest your own time to hunt down a viable fix.

Regards,
Christian



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel