[OpenWrt-Devel] [PATCH v2 1/4] ipq40xx: rt-ac58u: replace ubi auto load hack

Christian Lamparter chunkeey at gmail.com
Mon Oct 22 17:47:53 EDT 2018


This patch replaces the custom autoload quirk of the
RT-AC58U with a bootargs-append overwrite.

The vendor's u-boot doesn't leave the bootargs / cmdline alone,
so the it can't be overwritten in any other way right now...
And of course, this will be a lot of fun to deal with once
the device switches to the new spi-nand subsystem.

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 .../arm/boot/dts/qcom-ipq4018-rt-ac58u.dts    |  4 +++
 ...dd-quirk-to-autoload-ubi-on-rt-ac58u.patch | 29 -------------------
 2 files changed, 4 insertions(+), 29 deletions(-)
 delete mode 100644 target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch

diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts
index 0b3e4f0e65..4d546bf40f 100644
--- a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts
+++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts
@@ -35,6 +35,10 @@
 		led-upgrade = &power;
 	};
 
+	chosen {
+		bootargs-append = " ubi.mtd=UBI_DEV";
+	};
+
 	soc {
 		mdio at 90000 {
 			status = "okay";
diff --git a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
deleted file mode 100644
index 6a83d79d8c..0000000000
--- a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From b8f3a7ccbeca5bdbd1b6210b94b38d3fef2dd0bd Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey at googlemail.com>
-Date: Thu, 19 Jan 2017 01:57:22 +0100
-Subject: [PATCH 16/38] mtd: ubi: add auto_attach HACK for the ASUS RT-AC58U
-
-This patch adds a hack that allows UBI's autoattach feature
-to work with the custom ASUS UBI_DEV partition name.
-
-This is necessary because the vendor's u-boot doesn't leave
-the bootargs / cmdline alone, so the it can't be overwritten
-easily otherwise.
-
-Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
----
- drivers/mtd/ubi/build.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/drivers/mtd/ubi/build.c
-+++ b/drivers/mtd/ubi/build.c
-@@ -1187,6 +1187,9 @@ static void __init ubi_auto_attach(void)
- 	mtd = open_mtd_device("ubi");
- 	if (IS_ERR(mtd))
- 		mtd = open_mtd_device("data");
-+	/* Hack for the Asus RT-AC58U */
-+	if (IS_ERR(mtd))
-+		mtd = open_mtd_device("UBI_DEV");
- 
- 	if (IS_ERR(mtd))
- 		return;
-- 
2.19.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list