[LEDE-DEV] [PATCH v2] ramips: add support for GL-inet GL-MT300N-V2
Daniel Golle
daniel at makrotopia.org
Sat May 13 03:29:49 PDT 2017
On Fri, May 12, 2017 at 05:51:18PM -0500, L. D. Pinney wrote:
> 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...
I generally agree with that philosophy, however, in this case there are
hardly any options other shooting yourself into the foot.
The ramips-version of U-Boot doesn't really allow for any fancy things
to be done with it -- and people who really want to risk ending up
with a device which no longer boots and is only recoverable via serial
console can as well change the device-tree to have unprotected access
to the flash.
Also note that most (if not nearly all) other ramips target got the
u-boot-env partition set to be read-only for that reason.
> >>> 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.
Yes, please use the whole flash chip and don't leave behind unused
areas.
More information about the Lede-dev
mailing list