0004-Add-GfA-Default-Environment.patch 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
  2. index cd9c567..e75e711 100644
  3. --- a/tools/env/fw_env.h
  4. +++ b/tools/env/fw_env.h
  5. @@ -35,16 +35,60 @@
  6. #endif
  7. #ifndef CONFIG_BOOTDELAY
  8. -#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
  9. +#define CONFIG_BOOTDELAY 1 /* autoboot after 5 seconds */
  10. #endif
  11. -#ifndef CONFIG_BOOTCOMMAND
  12. +/*#ifndef CONFIG_BOOTCOMMAND
  13. #define CONFIG_BOOTCOMMAND \
  14. "bootp; " \
  15. "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} " \
  16. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
  17. "bootm"
  18. #endif
  19. +*/
  20. +
  21. +#ifndef CONFIG_EXTRA_ENV_SETTINGS
  22. +#define CONFIG_EXTRA_ENV_SETTINGS \
  23. + "ramboot=fatload mmc 0 0x80200000 uImage; " \
  24. + "fatload mmc 0 0x80F00000 Display001.dtb; " \
  25. + "fdt addr 0x80F00000; " \
  26. + "fatload mmc 0 0x81000000 initrd.gz; " \
  27. + "setenv initrdsize 0x${filesize}; " \
  28. + "setenv bootargs console=ttyO0,115200 initrd=0x81000000,${initrdsize} " \
  29. + "root=/dev/ram0 rw init=/sbin/init debug initcall_debug earlyprintk; " \
  30. + "bootm 0x80200000 - 0x80F00000\0" \
  31. + "sdboot=fatload mmc 0 0x80200000 uImage; " \
  32. + "fatload mmc 0 0x80F00000 Display001.dtb; " \
  33. + "fdt addr 0x80F00000; " \
  34. + "setenv bootargs console=ttyO0,115200 " \
  35. + "root=/dev/mmcblk0p2 rw rootwait vram=50M cma=50M; " \
  36. + "bootm 0x80200000 - 0x80F00000\0" \
  37. + "emmcboot=fatload mmc 1 0x80200000 uImage; " \
  38. + "fatload mmc 1 0x80F00000 Display001.dtb; " \
  39. + "fdt addr 0x80F00000; " \
  40. + "setenv bootargs console=ttyO0,115200 " \
  41. + "root=/dev/mmcblk1p2 rw rootwait vram=50M cma=50M; " \
  42. + "bootm 0x80200000 - 0x80F00000\0" \
  43. + "bootcmd=mw.l 0x80020000 0x0040033c; " \
  44. + "if cmp 0x80020000 0x44e10040 1; " \
  45. + "then " \
  46. + "echo ---emmc--; " \
  47. + "mmc rescan; " \
  48. + "if fatload mmc 0:1 0x80200000 MLO; then " \
  49. + "run sdboot; " \
  50. + "else " \
  51. + "run emmcboot; " \
  52. + "fi; " \
  53. + "else echo --sd--; " \
  54. + "mmc rescan; " \
  55. + "if fatload mmc 0:1 0x80200000 MLO; then " \
  56. + "run sdboot; " \
  57. + "else " \
  58. + "run emmcboot; " \
  59. + "fi; " \
  60. + "fi;\0"
  61. +#endif
  62. +
  63. struct env_opts {
  64. #ifdef CONFIG_FILE