003-boot_script.patch 963 B

1234567891011121314151617181920212223242526272829303132
  1. --- a/include/configs/clearfog.h
  2. +++ b/include/configs/clearfog.h
  3. @@ -107,7 +107,18 @@
  4. /* Keep device tree and initrd in lower memory so the kernel can access them */
  5. #define CONFIG_EXTRA_ENV_SETTINGS \
  6. "fdt_high=0x10000000\0" \
  7. - "initrd_high=0x10000000\0"
  8. + "initrd_high=0x10000000\0" \
  9. + "script=boot.scr\0" \
  10. + "loadaddr=0x01000000\0" \
  11. + "mmcdev=0\0" \
  12. + "mmcpart=1\0" \
  13. + "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  14. + "bootscript=echo Running bootscript from mmc ...; source ${loadaddr}\0"
  15. +
  16. +#define CONFIG_BOOTCOMMAND \
  17. + "if run loadbootscript; then " \
  18. + "run bootscript; " \
  19. + "fi"
  20. /* SPL */
  21. /*
  22. --- a/configs/clearfog_defconfig
  23. +++ b/configs/clearfog_defconfig
  24. @@ -3,6 +3,7 @@ CONFIG_ARCH_MVEBU=y
  25. CONFIG_SYS_MALLOC_F_LEN=0x2000
  26. CONFIG_TARGET_CLEARFOG=y
  27. CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog"
  28. +CONFIG_HUSH_PARSER=y
  29. CONFIG_SPL=y
  30. # CONFIG_CMD_IMLS is not set
  31. # CONFIG_CMD_FLASH is not set