0005-armv8-ls2088ardb-add-LEDE-boot-support-in-environmen.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 20f270670d1d5e14f3fd128f359535300a955ac8 Mon Sep 17 00:00:00 2001
  2. From: Yangbo Lu <[email protected]>
  3. Date: Mon, 16 Oct 2017 12:37:05 +0800
  4. Subject: [PATCH] armv8: ls2088ardb: add LEDE boot support in environment
  5. Signed-off-by: Yangbo Lu <[email protected]>
  6. ---
  7. include/configs/ls2080ardb.h | 23 ++++++++++++++++++++++-
  8. 1 file changed, 22 insertions(+), 1 deletion(-)
  9. diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
  10. index 8a34990..8ae3944 100644
  11. --- a/include/configs/ls2080ardb.h
  12. +++ b/include/configs/ls2080ardb.h
  13. @@ -432,7 +432,19 @@ unsigned long get_board_sys_clk(void);
  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/mtdblock9 " \
  22. + "rootfstype=squashfs,jffs2 noinitrd " \
  23. + "earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 " \
  24. + "mtdparts=580000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \
  25. + "6M(reserved-1),3M(mc),1M(dpl),1M(dpc),1M(dtb)," \
  26. + "16M(kernel),32M(rootfs),64M(otherbank)\0" \
  27. + "lede_run=cp.b 580f00000 $fdtaddr 100000 && " \
  28. + "cp.b 581000000 $loadaddr 1000000 && " \
  29. + "bootm $loadaddr - $fdtaddr\0" \
  30. + "lede_boot=run lede_setenv;run lede_run\0"
  31. #undef CONFIG_BOOTCOMMAND
  32. #ifdef CONFIG_QSPI_BOOT
  33. @@ -463,6 +475,15 @@ unsigned long get_board_sys_clk(void);
  34. "env exists secureboot && esbc_halt;"
  35. #endif
  36. +#undef CONFIG_BOOTCOMMAND
  37. +#define CONFIG_BOOTCOMMAND \
  38. + "fsl_mc start mc 0x580a00000 0x580e00000;" \
  39. + "fsl_mc apply dpl 0x580d00000;" \
  40. + "run lede_boot;"
  41. +
  42. +#undef CONFIG_BOOTDELAY
  43. +#define CONFIG_BOOTDELAY 3
  44. +
  45. #undef CONFIG_BOOTARGS
  46. #define CONFIG_BOOTARGS "console=ttyS1,115200 root=/dev/ram0 " \
  47. "earlycon=uart8250,mmio,0x21c0600 " \
  48. --
  49. 2.7.4