BCM53xx on D-Link DIR-890L - 2MB max problem

Arınç ÜNAL arinc.unal at arinc9.com
Sun Jan 15 12:30:05 PST 2023


On 15.01.2023 23:13, Linus Walleij wrote:
> On Sun, Jan 15, 2023 at 9:02 PM Arınç ÜNAL <arinc.unal at arinc9.com> wrote:
>> 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?
> 
> There are 2 flash chips in the device one NOR flash for the CFE and NVRAM,
> and one NAND flash for all other firmware.

Got it.

> 
>> You didn't overwrite CFE when you booted U-Boot?
>> I was asking how did you write U-Boot to flash if it
>> wasn't clear.
> 
> No, I let CFE boot U-boot instead of the kernel.

Oh nice. Did you have to disable some initialisation stuff like 
SKIP_LOWLEVEL_INIT_ONLY as pointed out on this post?

https://lunarius.fe80.eu/blog/openwrt-u-boot-boot-u-boot.html

I tried booting U-Boot via U-Boot on my MT7621 MIPS board but there's 
nothing about initalisation to disable for MIPS. It just hangs when I 
try to boot the uImage with bootm.

> 
> Flashing is done with the manufacturing method: holding in RESET
> and powering on, then a rescue mode web server flash tool appears
> (super convenient).
> 
>> 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.
> 
> No need for me, I just leave CFE as it is. Maybe a but clunky but
> it works...

Alright, U-Boot is the way to go I suppose.

> 
>>>> 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?
> 
> TFTPBOOT actually works with CFE!
> ifconfig -addr=192.168.1.35 eth0
> boot -raw -addr=0x01097000 -max=0x2000000 -tftp 192.168.1.2:zImage
> 
> ...so I managed to develop and test the kernel with this. Device tree
> is complete and all.
> 
> But now I want something that is convenient and easy for OpenWrt
> users without UART etc to use. So I need to fix installation into
> NAND.

Hmm, is your plan to boot U-Boot from CFE then boot the kernel, and ship 
this all as an OpenWrt image?

Cheers.
Arınç



More information about the openwrt-devel mailing list