[LEDE-DEV] [PATCH v2] ramips: add support for GL-inet GL-MT300N-V2

L. D. Pinney ldpinney at gmail.com
Fri May 12 15:51:18 PDT 2017


On Fri, May 12, 2017 at 5:29 PM, Mathias Kresin <dev at kresin.me> wrote:
> 12.05.2017 03:37, kyson lok:
>>
>> On Fri, May 12, 2017 at 6:18 AM, L. D. Pinney <ldpinney at gmail.com> wrote:
>>>>
>>>> +&spi0 {
>>>> +       status = "okay";
>>>> +
>>>> +       m25p80 at 0 {
>>>> +               #address-cells = <1>;
>>>> +               #size-cells = <1>;
>>>> +               compatible = "jedec,spi-nor";
>>>> +               reg = <0>;
>>>> +               spi-max-frequency = <10000000>;
>>>> +               m25p,chunked-io = <32>;
>>>> +
>>>> +               partition at 0 {
>>>> +                       label = "u-boot";
>>>> +                       reg = <0x0 0x30000>;
>>>> +                       read-only;
>>>> +               };
>>>> +
>>>> +               partition at 30000 {
>>>> +                       label = "u-boot-env";
>>>> +                       reg = <0x30000 0x10000>;
>>>> +                       read-only;
>>>
>>>
>>> Is there a reason that users can not or should not write to the
>>> uboot-env partition?
>
>
> Yes, to prevent the user to shout them self into the foot. If it ain't broke
> don't fix it.

"Unix was not designed to stop you from doing stupid things, because
that would also stop you from doing clever things."
 Doug Gwyn

In this case using the uboot-envtools package...

>
>>>
>>>                partition at 30000 {
>>>                       label = "u-boot-env";
>>>                       reg = <0x30000 0x10000>;
>>>                       read-only;     <---- remove this line IF it is
>>> OK for user to write here.
>>
>>
>> I don't think user can write to uboot-env, other vendor does not.
>>
>>>
>>>> +               };
>>>> +
>>>> +               factory: partition at 40000 {
>>>> +                       label = "factory";
>>>> +                       reg = <0x40000 0x10000>;
>>>> +                       read-only;
>>>> +               };
>>>> +
>>>> +               partition at 50000 {
>>>> +                       label = "firmware";
>>>> +                       reg = <0x50000 0xf00000>;
>>>
>>>
>>> Is this correct? other mt76x8 devices with 16MB SPI Flash use :
>>>
>>> partition at 50000 {
>>> label = "firmware";
>>> reg = <0x50000 0xfb0000>;
>>>
>>
>> I think it doesn't matter. I only use 15MB for firmware.
>
>
> But why don't you use all available flash space? As far as I can see, there
> isn't anything in the last 704 KB of the flash. If possible expand the
> firmware partition to use all of the remaining flash space.
>
> Please update the IMAGE_SIZE in the build code to the value set here.
>
> Mathias



More information about the Lede-dev mailing list