[PATCH] ramips: add support for Notion R281 (mtd5)

Ian Pangilinan ian.pangilinan at upd.edu.ph
Tue Jul 26 03:10:32 PDT 2022


> On 2022-07-25 16:35, Bjørn Mork wrote:
> Ian Pangilinan <ian.pangilinan at upd.edu.ph> writes:
> 
>> Yes I have tried to strings /dev/mtd0, but I didn't see anything that
>> could give hint. Maybe I missed it, so here it is. Another set of eyes
>> is better than one. https://pastebin.com/uDcUyvNc
> 
> I can't see anything interesting there either.  You're probably right -
> this is hardcoded in the installed (ISP-specific?) U-Boot build. Ugly.
> 
> Only thing of interest I can see is the default
> 
>  'bootargs=console=ttyS1,57600n8 root=/dev/mtdblock5'
> 
> along with a static 'mtdblock6' string elsewhere.  But that only
> supports the assumption that this is a calculated value based on a
> decision already made by U-Boot.
> 
> 
> Bjørn
> 
> Email secured by UP Diliman Webmail

Looks like your observations regarding the bootargs and the static 
mtdblock6 were hints, and with the help of a colleague of mine we found 
out how to switch partitions. ;) It really is an ugly hack, the 
bootloader looks at the value of 'root' in 'bootargs'. If 
root=/dev/mtdblock5, then it loads the kernel at 0xbc140000. If 
root=/dev/mtdblock6, then it loads the kernel at 0xbe800000.

Now I can simply this patch and use the layout where kernel is loaded at 
0xbc140000, and note how to switch to this if not yet set like mine.

-ianp



More information about the openwrt-devel mailing list