400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch 955 B

1234567891011121314151617181920212223242526272829
  1. From b8f3a7ccbeca5bdbd1b6210b94b38d3fef2dd0bd Mon Sep 17 00:00:00 2001
  2. From: Christian Lamparter <[email protected]>
  3. Date: Thu, 19 Jan 2017 01:57:22 +0100
  4. Subject: [PATCH 16/38] mtd: ubi: add auto_attach HACK for the ASUS RT-AC58U
  5. This patch adds a hack that allows UBI's autoattach feature
  6. to work with the custom ASUS UBI_DEV partition name.
  7. This is necessary because the vendor's u-boot doesn't leave
  8. the bootargs / cmdline alone, so the it can't be overwritten
  9. easily otherwise.
  10. Signed-off-by: Christian Lamparter <[email protected]>
  11. ---
  12. drivers/mtd/ubi/build.c | 3 +++
  13. 1 file changed, 3 insertions(+)
  14. --- a/drivers/mtd/ubi/build.c
  15. +++ b/drivers/mtd/ubi/build.c
  16. @@ -1187,6 +1187,9 @@ static void __init ubi_auto_attach(void)
  17. mtd = open_mtd_device("ubi");
  18. if (IS_ERR(mtd))
  19. mtd = open_mtd_device("data");
  20. + /* Hack for the Asus RT-AC58U */
  21. + if (IS_ERR(mtd))
  22. + mtd = open_mtd_device("UBI_DEV");
  23. if (IS_ERR(mtd))
  24. return;