0086-firmware-utils-add-support-for-TL-WR1043ND-v4-to-mktplinkfw.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Sat, 10 Dec 2016 20:45:50 +0100
  3. Subject: firmware-utils: add support for TL-WR1043ND v4 to mktplinkfw
  4. The TL-WR1043ND v4 uses a kernel image with a mktplinkfw header inside the
  5. os-image partition of a tplink-safeloader image.
  6. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  7. Backport of LEDE 51740990cd1d5375a566454e692b479986cba958
  8. diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c
  9. index 34e6546a2d7db72748146ef233830c2e8de9ce97..fbf89609c22dd0fb50c4c8656141c8a8b9c29817 100644
  10. --- a/tools/firmware-utils/src/mktplinkfw.c
  11. +++ b/tools/firmware-utils/src/mktplinkfw.c
  12. @@ -178,6 +178,20 @@ static struct flash_layout layouts[] = {
  13. .kernel_ep = 0xc0000000,
  14. .rootfs_ofs = 0x2a0000,
  15. }, {
  16. + /*
  17. + Some devices (e.g. TL-WR1043 v4) use a mktplinkfw kernel image
  18. + embedded in a tplink-safeloader image as os-image partition.
  19. +
  20. + We use a 1.5MB partition for the compressed kernel, which should
  21. + be sufficient, but not too wasteful (the flash of the TL-WR1043 v4
  22. + has 16MB in total).
  23. + */
  24. + .id = "16Msafeloader",
  25. + .fw_max_len = 0x180000,
  26. + .kernel_la = 0x80060000,
  27. + .kernel_ep = 0x80060000,
  28. + .rootfs_ofs = 0,
  29. + }, {
  30. /* terminating entry */
  31. }
  32. };