Re: [PATCH v2] ARM: dts: imx6qdl-nitrogen6x: Add SPI NOR partitions
On Mon, Nov 27, 2017 at 8:17 AM, Gary Bisson wrote: > Hi Otavio, > > On Sat, Nov 25, 2017 at 07:55:53AM -0200, Otavio Salvador wrote: >> On Fri, Nov 24, 2017 at 3:00 PM, Otavio Salvador >> wrote: >> > This adds the partitions definition for the SPI NOR to provide >> > backward compatibility with the documented[1] layout used with >> > Boundary Devices BSP. >> > >> > 1. https://boundarydevices.com/boot-flash-access-linux/ >> > >> > It exports to Linux: >> > >> > mtd0: bootloader >> > mtd1: env >> > mtd2: splash >> > >> > Signed-off-by: Otavio Salvador >> >> After thinking a bit about Fabio's recommendation to use 'read-only' >> to protect the partitions, I think it'd be better to use 'lock' so it >> is still possible to write them on Linux but it requires a unlock >> prior changing it. >> >> In my case, I am interested in being capable of upgrading the >> bootloader from Linux. >> >> What people think? > > Agreed, I would rather have the lock option, especially for the splash > and environment. I will prepare a new patch using the lock option on the three partitions so we allow the user to change them but knowing it may break the system. -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
Re: [PATCH v2] ARM: dts: imx6qdl-nitrogen6x: Add SPI NOR partitions
Hi Otavio, On Sat, Nov 25, 2017 at 07:55:53AM -0200, Otavio Salvador wrote: > On Fri, Nov 24, 2017 at 3:00 PM, Otavio Salvador > wrote: > > This adds the partitions definition for the SPI NOR to provide > > backward compatibility with the documented[1] layout used with > > Boundary Devices BSP. > > > > 1. https://boundarydevices.com/boot-flash-access-linux/ > > > > It exports to Linux: > > > > mtd0: bootloader > > mtd1: env > > mtd2: splash > > > > Signed-off-by: Otavio Salvador > > After thinking a bit about Fabio's recommendation to use 'read-only' > to protect the partitions, I think it'd be better to use 'lock' so it > is still possible to write them on Linux but it requires a unlock > prior changing it. > > In my case, I am interested in being capable of upgrading the > bootloader from Linux. > > What people think? Agreed, I would rather have the lock option, especially for the splash and environment. Regards, Gary
Re: [PATCH v2] ARM: dts: imx6qdl-nitrogen6x: Add SPI NOR partitions
On Fri, Nov 24, 2017 at 3:00 PM, Otavio Salvador wrote: > This adds the partitions definition for the SPI NOR to provide > backward compatibility with the documented[1] layout used with > Boundary Devices BSP. > > 1. https://boundarydevices.com/boot-flash-access-linux/ > > It exports to Linux: > > mtd0: bootloader > mtd1: env > mtd2: splash > > Signed-off-by: Otavio Salvador After thinking a bit about Fabio's recommendation to use 'read-only' to protect the partitions, I think it'd be better to use 'lock' so it is still possible to write them on Linux but it requires a unlock prior changing it. In my case, I am interested in being capable of upgrading the bootloader from Linux. What people think? -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
[PATCH v2] ARM: dts: imx6qdl-nitrogen6x: Add SPI NOR partitions
This adds the partitions definition for the SPI NOR to provide backward compatibility with the documented[1] layout used with Boundary Devices BSP. 1. https://boundarydevices.com/boot-flash-access-linux/ It exports to Linux: mtd0: bootloader mtd1: env mtd2: splash Signed-off-by: Otavio Salvador --- Changes in v2: - rework labels (Fabio Estevam) - add read-only flags (Fabio Estevam) arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi index 4bdf29169d2a..28545412577a 100644 --- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi @@ -276,6 +276,26 @@ compatible = "sst,sst25vf016b", "jedec,spi-nor"; spi-max-frequency = <2000>; reg = <0>; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x0 0xc>; + read-only; + }; + + partition@c { + label = "env"; + reg = <0xc 0x2000>; + read-only; + }; + + partition@c2000 { + label = "splash"; + reg = <0xc2000 0x13e000>; + read-only; + }; }; }; -- 2.15.0