0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 8d6efca7eb2de012b98493206c87f31ee9b9e967 Mon Sep 17 00:00:00 2001
  2. From: Yangbo Lu <[email protected]>
  3. Date: Thu, 28 Sep 2017 11:25:58 +0800
  4. Subject: [PATCH 3/3] armv8: ls1012ardb: add LEDE boot support in environment
  5. Signed-off-by: Yangbo Lu <[email protected]>
  6. ---
  7. include/configs/ls1012ardb.h | 21 ++++++++++++++++++++-
  8. 1 file changed, 20 insertions(+), 1 deletion(-)
  9. diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h
  10. index 5fe3218..242cdf0 100644
  11. --- a/include/configs/ls1012ardb.h
  12. +++ b/include/configs/ls1012ardb.h
  13. @@ -127,13 +127,32 @@
  14. "$kernel_addr $kernel_size; env exists secureboot " \
  15. "&& sf read $kernelheader_addr_r $kernelheader_addr " \
  16. "$kernelheader_size && 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 ubi.mtd=8 root=ubi0:rootfs rw " \
  22. + "rootfstype=ubifs noinitrd " \
  23. + "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
  24. + "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
  25. + "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
  26. + "16M(kernel),32M(ubifs)\0" \
  27. + "lede_run=pfe stop && sf probe 0:0 && " \
  28. + "sf read $fdtaddr f00000 100000 && " \
  29. + "sf read $loadaddr 1000000 1000000 && " \
  30. + "bootm $loadaddr - $fdtaddr\0" \
  31. + "lede_boot=run lede_setenv;run lede_run\0"
  32. #undef CONFIG_BOOTCOMMAND
  33. #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
  34. #define CONFIG_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \
  35. "env exists secureboot && esbc_halt;"
  36. #endif
  37. +#undef CONFIG_BOOTCOMMAND
  38. +#define CONFIG_BOOTCOMMAND "run lede_boot"
  39. +
  40. +#undef CONFIG_BOOTDELAY
  41. +#define CONFIG_BOOTDELAY 3
  42. +
  43. #include <asm/fsl_secure_boot.h>
  44. --
  45. 2.7.4