aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/patches-4.19/0019-ARM-dts-gemini-Indent-DIR-685-partition-table.patch
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-03-11 19:16:43 +0100
committerChristian Lamparter <chunkeey@gmail.com>2019-03-13 16:25:36 +0100
commitac5f431ad13ad167f4a5f0814dfa69ab0438ea1a (patch)
treec2a1c480d028ac441ecc14d43b082299ca9f8dfb /target/linux/gemini/patches-4.19/0019-ARM-dts-gemini-Indent-DIR-685-partition-table.patch
parentb907097291af843f714139999c32107463b2ef4a (diff)
downloadupstream-ac5f431ad13ad167f4a5f0814dfa69ab0438ea1a.tar.gz
upstream-ac5f431ad13ad167f4a5f0814dfa69ab0438ea1a.tar.bz2
upstream-ac5f431ad13ad167f4a5f0814dfa69ab0438ea1a.zip
gemini: Generate padded kernel+rootfs images for DIR-685
We currently generate a kernel that boots from the harddrive in the DIR-685. That's not how we usually do things, so let's augment it to boot from flash and mount the rootfs using squashfs and JFFS2 like everyone else. Partition splitting only work when the partitions are inside of a "partitions" node which is why we have a patch like this (submitted upstream). Another patch drops the rootfs arguments and renames the firmware partition while adding the compatible "wrg" to it so the WRGG parser will kick in. Factory image was tested by bravely reflashing the DIR-685 from stock firmware using the web UI and the serial console boot loader. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'target/linux/gemini/patches-4.19/0019-ARM-dts-gemini-Indent-DIR-685-partition-table.patch')
-rw-r--r--target/linux/gemini/patches-4.19/0019-ARM-dts-gemini-Indent-DIR-685-partition-table.patch110
1 files changed, 110 insertions, 0 deletions
diff --git a/target/linux/gemini/patches-4.19/0019-ARM-dts-gemini-Indent-DIR-685-partition-table.patch b/target/linux/gemini/patches-4.19/0019-ARM-dts-gemini-Indent-DIR-685-partition-table.patch
new file mode 100644
index 0000000000..b121ca174e
--- /dev/null
+++ b/target/linux/gemini/patches-4.19/0019-ARM-dts-gemini-Indent-DIR-685-partition-table.patch
@@ -0,0 +1,110 @@
+From 4a228ecf553e879bae384e634bb6413438e81a0e Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij@linaro.org>
+Date: Mon, 11 Mar 2019 15:43:05 +0100
+Subject: [PATCH 1/2] ARM: dts: gemini: Indent DIR-685 partition table
+
+It is discouraged to have OF partitions as subnodes directly
+under the device, create a "partitions" subnode and put the
+partitions inside it.
+
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+---
+ arch/arm/boot/dts/gemini-dlink-dir-685.dts | 82 ++++++++++++----------
+ 1 file changed, 44 insertions(+), 38 deletions(-)
+
+diff --git a/arch/arm/boot/dts/gemini-dlink-dir-685.dts b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
+index 9b2824816ddc..50ff65d95f26 100644
+--- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
++++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
+@@ -267,44 +267,50 @@
+ /* 32MB of flash */
+ reg = <0x30000000 0x02000000>;
+
+- /*
+- * This "RedBoot" is the Storlink derivative.
+- */
+- partition@0 {
+- label = "RedBoot";
+- reg = <0x00000000 0x00040000>;
+- read-only;
+- };
+- /*
+- * This firmware image contains the kernel catenated
+- * with the squashfs root filesystem. For some reason
+- * this is called "upgrade" on the vendor system.
+- */
+- partition@40000 {
+- label = "upgrade";
+- reg = <0x00040000 0x01f40000>;
+- read-only;
+- };
+- /* RGDB, Residental Gateway Database? */
+- partition@1f80000 {
+- label = "rgdb";
+- reg = <0x01f80000 0x00040000>;
+- read-only;
+- };
+- /*
+- * This partition contains MAC addresses for WAN,
+- * WLAN and LAN, and the country code (for wireless
+- * I guess).
+- */
+- partition@1fc0000 {
+- label = "nvram";
+- reg = <0x01fc0000 0x00020000>;
+- read-only;
+- };
+- partition@1fe0000 {
+- label = "LangPack";
+- reg = <0x01fe0000 0x00020000>;
+- read-only;
++ partitions {
++ compatible = "fixed-partitions";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ /*
++ * This "RedBoot" is the Storlink derivative.
++ */
++ partition@0 {
++ label = "RedBoot";
++ reg = <0x00000000 0x00040000>;
++ read-only;
++ };
++ /*
++ * This firmware image contains the kernel catenated
++ * with the squashfs root filesystem. For some reason
++ * this is called "upgrade" on the vendor system.
++ */
++ partition@40000 {
++ label = "upgrade";
++ reg = <0x00040000 0x01f40000>;
++ read-only;
++ };
++ /* RGDB, Residental Gateway Database? */
++ partition@1f80000 {
++ label = "rgdb";
++ reg = <0x01f80000 0x00040000>;
++ read-only;
++ };
++ /*
++ * This partition contains MAC addresses for WAN,
++ * WLAN and LAN, and the country code (for wireless
++ * I guess).
++ */
++ partition@1fc0000 {
++ label = "nvram";
++ reg = <0x01fc0000 0x00020000>;
++ read-only;
++ };
++ partition@1fe0000 {
++ label = "LangPack";
++ reg = <0x01fe0000 0x00020000>;
++ read-only;
++ };
+ };
+ };
+
+--
+2.20.1
+