0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From d1b42455f62baefe7fb782d0d7100715b0fdb41f Mon Sep 17 00:00:00 2001
  2. From: Yangbo Lu <[email protected]>
  3. Date: Fri, 19 Jan 2018 10:16:57 +0800
  4. Subject: [PATCH] armv8: ls1043a: add LEDE boot support in environment
  5. Signed-off-by: Yangbo Lu <[email protected]>
  6. ---
  7. include/configs/ls1043a_common.h | 20 +++++++++++++++++++-
  8. 1 files changed, 19 insertions(+), 1 deletions(-)
  9. diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
  10. index c437ce5..48ecff5 100644
  11. --- a/include/configs/ls1043a_common.h
  12. +++ b/include/configs/ls1043a_common.h
  13. @@ -341,7 +341,19 @@
  14. "env exists secureboot && mmc read $kernelheader_addr_r " \
  15. "$kernelhdr_addr_sd $kernelhdr_size_sd " \
  16. " && esbc_validate ${kernelheader_addr_r};" \
  17. - " bootm $load_addr#$board\0"
  18. + " bootm $load_addr#$board\0" \
  19. + "lede_setenv=setenv loadaddr 82000000 && " \
  20. + "setenv fdtaddr 8f000000 && " \
  21. + "setenv bootargs root=/dev/mtdblock8 " \
  22. + "rootfstype=squashfs,jffs2 noinitrd " \
  23. + "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
  24. + "mtdparts=60000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \
  25. + "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
  26. + "16M(kernel),32M(rootfs),64M(otherbank)\0" \
  27. + "lede_run=cp.b 60f00000 $fdtaddr 100000 && " \
  28. + "cp.b 61000000 $loadaddr 1000000 && " \
  29. + "bootm $loadaddr - $fdtaddr\0" \
  30. + "lede_boot=run lede_setenv;run lede_run\0"
  31. #undef CONFIG_BOOTCOMMAND
  32. @@ -356,6 +368,12 @@
  33. "env exists secureboot && esbc_halt;"
  34. #endif
  35. +#undef CONFIG_BOOTCOMMAND
  36. +#define CONFIG_BOOTCOMMAND "run lede_boot"
  37. +
  38. +#undef CONFIG_BOOTDELAY
  39. +#define CONFIG_BOOTDELAY 3
  40. +
  41. #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \
  42. "earlycon=uart8250,mmio,0x21c0500 " \
  43. MTDPARTS_DEFAULT
  44. --
  45. 1.7.1