oxnas: add missing NAND partitions
authorDaniel Golle <daniel@makrotopia.org>
Mon, 25 Feb 2019 11:02:15 +0000 (12:02 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 28 Feb 2019 12:03:26 +0000 (13:03 +0100)
add kernel and other missing NAND flash partitions to allow booting
using stock loader instead of the 2nd-stage bootloader.
This will ease installation from stock firmware on pogoplugs as well
as stg212 aka. medion nas.

Existing users of OpenWrt on those boards will have to boot initramfs
generated after this commit and subsequently flash first the ubinized
image, then again run initramfs to flash sysupgrade.tar image, and
then restore bootcmd in U-Boot environment back to the original setting
('nboot 60500000 0 440000' or something like that) instead of jumping
into the now no longer used 2nd-stage loader.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/oxnas/files/arch/arm/boot/dts/ox820-cloudengines-pogoplug-pro.dts
target/linux/oxnas/files/arch/arm/boot/dts/ox820-mitrastar-stg212.dts
target/linux/oxnas/patches-4.14/020-nand-partitions-on-pogoplug-v3.patch [new file with mode: 0644]

index 2872d40e3d4995aed45a2da2a9fd3364ced936b3..029e1aa17d71980023ff57073d691efee5caf5f3 100644 (file)
                nand-ecc-algo = "hamming";
 
                partition@0 {
                nand-ecc-algo = "hamming";
 
                partition@0 {
-                       label = "boot";
-                       reg = <0x00000000 0x00e00000>;
+                       label = "stage1";
+                       reg = <0x00000000 0x00040000>;
                        read-only;
                };
 
                        read-only;
                };
 
+               partition@40000 {
+                       label = "uboot";
+                       reg = <0x00040000 0x00380000>;
+                       read-only;
+               };
+
+               partition@3c0000 {
+                       label = "uboot_env";
+                       reg = <0x003c0000 0x00080000>;
+               };
+
+               partition@440000 {
+                       label = "kernel";
+                       reg = <0x00440000 0x009c0000>;
+               };
+
                partition@e00000 {
                        label = "ubi";
                        reg = <0x00e00000 0x07200000>;
                partition@e00000 {
                        label = "ubi";
                        reg = <0x00e00000 0x07200000>;
index 5fd2617f2f17905591b2de5951bcbc5700d7930c..a2657428968d9f25cb9946777d308042a69bf414 100644 (file)
                nand-ecc-algo = "hamming";
 
                partition@0 {
                nand-ecc-algo = "hamming";
 
                partition@0 {
-                       label = "boot";
-                       reg = <0x00000000 0x00e00000>;
+                       label = "stage1";
+                       reg = <0x00000000 0x00040000>;
                        read-only;
                };
 
                        read-only;
                };
 
+               partition@40000 {
+                       label = "uboot";
+                       reg = <0x00040000 0x00380000>;
+                       read-only;
+               };
+
+               partition@3c0000 {
+                       label = "uboot_env";
+                       reg = <0x003c0000 0x00080000>;
+               };
+
+               partition@440000 {
+                       label = "kernel";
+                       reg = <0x00440000 0x009c0000>;
+               };
+
                partition@e00000 {
                        label = "ubi";
                        reg = <0x00e00000 0x07200000>;
                partition@e00000 {
                        label = "ubi";
                        reg = <0x00e00000 0x07200000>;
diff --git a/target/linux/oxnas/patches-4.14/020-nand-partitions-on-pogoplug-v3.patch b/target/linux/oxnas/patches-4.14/020-nand-partitions-on-pogoplug-v3.patch
new file mode 100644 (file)
index 0000000..a809845
--- /dev/null
@@ -0,0 +1,32 @@
+--- a/arch/arm/boot/dts/ox820-cloudengines-pogoplug-series-3.dts
++++ b/arch/arm/boot/dts/ox820-cloudengines-pogoplug-series-3.dts
+@@ -74,11 +74,27 @@
+               nand-ecc-algo = "hamming";
+               partition@0 {
+-                      label = "boot";
+-                      reg = <0x00000000 0x00e00000>;
++                      label = "stage1";
++                      reg = <0x00000000 0x00040000>;
+                       read-only;
+               };
++              partition@40000 {
++                      label = "uboot";
++                      reg = <0x00040000 0x00380000>;
++                      read-only;
++              };
++
++              partition@3c0000 {
++                      label = "uboot_env";
++                      reg = <0x003c0000 0x00080000>;
++              };
++
++              partition@440000 {
++                      label = "kernel";
++                      reg = <0x00440000 0x009c0000>;
++              };
++
+               partition@e00000 {
+                       label = "ubi";
+                       reg = <0x00e00000 0x07200000>;