0007-ARM-dts-Fix-up-the-D-Link-DIR-685-MTD-partition-info.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. From 0f6c4817471faf572b5273cdf90160790b0c3b29 Mon Sep 17 00:00:00 2001
  2. From: Linus Walleij <[email protected]>
  3. Date: Thu, 17 May 2018 17:00:10 +0200
  4. Subject: [PATCH 07/18] ARM: dts: Fix up the D-Link DIR-685 MTD partition info
  5. The vendor firmware was analyzed to get the right idea about
  6. this flash layout. /proc/mtd contains:
  7. dev: size erasesize name
  8. mtd0: 01e7ff40 00020000 "rootfs"
  9. mtd1: 01f40000 00020000 "upgrade"
  10. mtd2: 00040000 00020000 "rgdb"
  11. mtd3: 00020000 00020000 "nvram"
  12. mtd4: 00040000 00020000 "RedBoot"
  13. mtd5: 00020000 00020000 "LangPack"
  14. mtd6: 02000000 00020000 "flash"
  15. Here "flash" is obviously the whole device and we know "rootfs"
  16. is a bogus hack to point to a squashfs rootfs inside of the main
  17. "upgrade partition". We know "RedBoot" is the first 0x40000 of
  18. the flash and the "upgrade" partition follows from 0x40000 to
  19. 0x1f8000. So we have mtd0, 1, 4 and 6 covered.
  20. Remains:
  21. mtd2: 00040000 00020000 "rgdb"
  22. mtd3: 00020000 00020000 "nvram"
  23. mtd5: 00020000 00020000 "LangPack"
  24. Inspecting the flash at 0x1f8000 and 0x1fa000 reveals each of
  25. these starting with "RGCFG1" so we assume 0x1f8000-1fbfff is
  26. "rgdb" of 0x40000.
  27. Signed-off-by: Linus Walleij <[email protected]>
  28. ---
  29. arch/arm/boot/dts/gemini-dlink-dir-685.dts | 16 ++++++----------
  30. 1 file changed, 6 insertions(+), 10 deletions(-)
  31. diff --git a/arch/arm/boot/dts/gemini-dlink-dir-685.dts b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
  32. index 6f258b50eb44..502a361d1fe9 100644
  33. --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
  34. +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
  35. @@ -274,20 +274,16 @@
  36. read-only;
  37. };
  38. /*
  39. - * Between the boot loader and the rootfs is the kernel
  40. - * in a custom Storlink format flashed from the boot
  41. - * menu. The rootfs is in squashfs format.
  42. + * This firmware image contains the kernel catenated
  43. + * with the squashfs root filesystem. For some reason
  44. + * this is called "upgrade" on the vendor system.
  45. */
  46. - partition@1800c0 {
  47. - label = "rootfs";
  48. - reg = <0x001800c0 0x01dbff40>;
  49. - read-only;
  50. - };
  51. - partition@1f40000 {
  52. + partition@40000 {
  53. label = "upgrade";
  54. - reg = <0x01f40000 0x00040000>;
  55. + reg = <0x00040000 0x01f40000>;
  56. read-only;
  57. };
  58. + /* RGDB, Residental Gateway Database? */
  59. partition@1f80000 {
  60. label = "rgdb";
  61. reg = <0x01f80000 0x00040000>;
  62. --
  63. 2.19.2