0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From dc0e8734ea1c679738377d13bdd9bf3fa644e6b3 Mon Sep 17 00:00:00 2001
  2. From: Yangbo Lu <[email protected]>
  3. Date: Fri, 22 Sep 2017 11:36:43 +0800
  4. Subject: [PATCH 2/3] armv8: ls1046ardb: add LEDE boot support in environment
  5. Signed-off-by: Yangbo Lu <[email protected]>
  6. ---
  7. include/configs/ls1046a_common.h | 15 ++++++++++++++-
  8. include/configs/ls1046ardb.h | 6 ++++++
  9. 2 files changed, 20 insertions(+), 1 deletion(-)
  10. diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
  11. index 4fc2f94..53bd41b 100644
  12. --- a/include/configs/ls1046a_common.h
  13. +++ b/include/configs/ls1046a_common.h
  14. @@ -276,7 +276,20 @@
  15. "sd_bootcmd=echo Trying load from SD ..;" \
  16. "mmcinfo; mmc read $load_addr " \
  17. "$kernel_addr_sd $kernel_size_sd ;" \
  18. - " bootm $load_addr#$board\0"
  19. + " bootm $load_addr#$board\0" \
  20. + "lede_setenv=setenv loadaddr 82000000 && " \
  21. + "setenv fdtaddr 8f000000 && " \
  22. + "setenv bootargs root=/dev/mtdblock9 " \
  23. + "rootfstype=ext4 noinitrd " \
  24. + "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
  25. + "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
  26. + "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
  27. + "16M(kernel),22M(ext4rfs),10M(user)\0" \
  28. + "lede_run=sf probe 0:0 && " \
  29. + "sf read $fdtaddr f00000 100000 && " \
  30. + "sf read $loadaddr 1000000 1000000 && " \
  31. + "bootm $loadaddr - $fdtaddr\0" \
  32. + "lede_boot=run lede_setenv;run lede_run\0"
  33. #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \
  34. diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
  35. index f8c15a6..c3b50b1 100644
  36. --- a/include/configs/ls1046ardb.h
  37. +++ b/include/configs/ls1046ardb.h
  38. @@ -251,6 +251,12 @@
  39. "env exists secureboot && esbc_halt;"
  40. #endif
  41. +#undef CONFIG_BOOTCOMMAND
  42. +#define CONFIG_BOOTCOMMAND "run lede_boot"
  43. +
  44. +#undef CONFIG_BOOTDELAY
  45. +#define CONFIG_BOOTDELAY 3
  46. +
  47. #define MTDPARTS_DEFAULT "mtdparts=1550000.quadspi:1m(rcw)," \
  48. "15m(u-boot),48m(kernel.itb);" \
  49. "7e800000.flash:16m(nand_uboot)," \
  50. --
  51. 2.7.4