0006-armv8-ls1012afrdm-add-LEDE-boot-support-in-environme.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From a5e454a3bb33a456655f08592606e4df34e40110 Mon Sep 17 00:00:00 2001
  2. From: Yangbo Lu <[email protected]>
  3. Date: Tue, 24 Oct 2017 17:48:08 +0800
  4. Subject: [PATCH] armv8: ls1012afrdm: add LEDE boot support in environment
  5. Signed-off-by: Yangbo Lu <[email protected]>
  6. ---
  7. include/configs/ls1012afrdm.h | 19 +++++++++++++++++++
  8. 1 file changed, 19 insertions(+)
  9. diff --git a/include/configs/ls1012afrdm.h b/include/configs/ls1012afrdm.h
  10. index a3f8824d27..36dff19bdd 100644
  11. --- a/include/configs/ls1012afrdm.h
  12. +++ b/include/configs/ls1012afrdm.h
  13. @@ -73,12 +73,31 @@
  14. "qspi_bootcmd=echo Trying load from qspi..;" \
  15. "sf probe && sf read $load_addr " \
  16. "$kernel_addr $kernel_size && bootm $load_addr#$board\0" \
  17. + "lede_setenv=setenv loadaddr 82000000 && " \
  18. + "setenv fdtaddr 8f000000 && " \
  19. + "setenv bootargs ubi.mtd=8 root=ubi0:rootfs rw " \
  20. + "rootfstype=ubifs noinitrd " \
  21. + "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
  22. + "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
  23. + "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
  24. + "16M(kernel),32M(ubifs)\0" \
  25. + "lede_run=pfe stop && sf probe 0:0 && " \
  26. + "sf read $fdtaddr f00000 100000 && " \
  27. + "sf read $loadaddr 1000000 1000000 && " \
  28. + "bootm $loadaddr - $fdtaddr\0" \
  29. + "lede_boot=run lede_setenv;run lede_run\0"
  30. #undef CONFIG_BOOTCOMMAND
  31. #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
  32. #define CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd"
  33. #endif
  34. +#undef CONFIG_BOOTCOMMAND
  35. +#define CONFIG_BOOTCOMMAND "run lede_boot"
  36. +
  37. +#undef CONFIG_BOOTDELAY
  38. +#define CONFIG_BOOTDELAY 3
  39. +
  40. /*
  41. * USB
  42. */
  43. --
  44. 2.14.1