BCM53xx on D-Link DIR-890L - 2MB max problem
arinc.unal at arinc9.com
Sun Jan 15 12:02:11 PST 2023
On 15.01.2023 17:54, Linus Walleij wrote:
> On Fri, Jan 13, 2023 at 11:11 PM Arınç ÜNAL <arinc.unal at arinc9.com> wrote:
>> Side question, did you risk writing your test builds to the flash or
>> have you already got the flash in an easily reprogrammable set up?
> This device has the boot prom in NOR so firmware is only flashed
> to the NAND flash, no risk of overwriting the boot loader.
Sorry, I don't follow. What's a boot prom? You didn't overwrite CFE when
you booted U-Boot? I was asking how did you write U-Boot to flash if it
>> I tried letting U-Boot's lzmadec decompress the kernel image.
>> Decompressing fails when the kernel size reaches a certain point.
> Hm haven't tried that, I used a zImage and I added u-boot
> CMD_BOOTZ to U-boot so it can start it directly without any
> external compression or funny uImage stuff.
I've just spotted SYS_BOOTM_LEN in the same menu as CMD_BOOTZ:
This is the maximum size of the buffer that is used to decompress the OS
image in to, if passing a compressed image to bootm/booti/bootz.
This is set to 0x2000000 (32 MiB) on the U-Boot I was testing the
compressed kernel images on. The lzma compressed image at 19134142 bytes
(~18.2477 MiB) must've exceeded 32 MiB when decompressed.
Maybe there's an option like this for CFE. I don't know if you're able
to compile a custom CFE and boot it somehow.
>> Since the image is compressed in the end, I can't exactly add bytes and
>> predict what the size of the compressed file will be. So after a lot of
>> compiling and trying on the board, this is the closest I got.
>> LZMA compressed kernel size in bytes which U-Boot’s lzmadec can decompress:
>> LZMA compressed kernel size in bytes which U-Boot’s lzmadec fails to
>> I was wondering if there's a limit the bootloader sets for the lzma
>> decompressor. I assume it's 2 MiB for CFE.
> Hm. I guess this could be a limitation in some implementations
> of the algorithm simply...
Even if there is, I don't think I've hit it yet.
>> Did you try booting a kernel on this Northstar SoC with U-Boot?
> Haven't gotten there yet, I need to implement SEAMA support
> (the D-Link preferred NAND image format) first, because it
> totally scrambles the stuff written to flash.
I guess tftpboot is out of question, no network support yet?
More information about the openwrt-devel