0001-clearfog-enable-distro-boot-code.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. diff -Nur u-boot-2016.11.orig/include/configs/clearfog.h u-boot-2016.11/include/configs/clearfog.h
  2. --- u-boot-2016.11.orig/include/configs/clearfog.h 2016-11-14 17:27:11.000000000 +0100
  3. +++ u-boot-2016.11/include/configs/clearfog.h 2016-12-10 14:47:41.924944284 +0100
  4. @@ -87,11 +87,6 @@
  5. #define CONFIG_SYS_ALT_MEMTEST
  6. -/* Keep device tree and initrd in lower memory so the kernel can access them */
  7. -#define CONFIG_EXTRA_ENV_SETTINGS \
  8. - "fdt_high=0x10000000\0" \
  9. - "initrd_high=0x10000000\0"
  10. -
  11. /* SPL */
  12. /*
  13. * Select the boot device here
  14. @@ -139,6 +134,40 @@
  15. #endif
  16. #endif
  17. +#ifndef CONFIG_SPL_BUILD
  18. +/*
  19. + * Add standard bootenv from distro boot code:
  20. + * Keep device tree and initrd in lower memory so the kernel can access them
  21. + * Set default load addresses:
  22. + * - 63MB space for kernel
  23. + * - 1MB space for fdt
  24. + * - 1MB space for extlinux file, or boot script
  25. + * - remainder for ramdisk
  26. + * Set name of fdt file */
  27. +#define CONFIG_EXTRA_ENV_SETTINGS \
  28. + "kernel_addr_r=0x02000000\0" \
  29. + "fdt_addr_r=0x05c14dc0\0" \
  30. + "pxefile_addr_r=0x05d09000\0" \
  31. + "scriptaddr=0x05d09000\0" \
  32. + "ramdisk_addr_r=0x05dfd240\0" \
  33. + "fdtfile=armada-388-clearfog.dtb\0" \
  34. + BOOTENV
  35. +
  36. +/* include distro boot code defaults */
  37. +#include <config_distro_defaults.h>
  38. +
  39. +/*
  40. + * specify boot order
  41. + * sdcard or emmc
  42. + * sata, usb and network are not supported yet
  43. + */
  44. +#define BOOT_TARGET_DEVICES(func) \
  45. + func(MMC, mmc, 0)
  46. +
  47. +/* include the actual distro boot code */
  48. +#include <config_distro_bootcmd.h>
  49. +#endif
  50. +
  51. /*
  52. * mv-common.h should be defined after CMD configs since it used them
  53. * to enable certain macros
  54. diff -Nur u-boot-2016.11.orig/Kconfig u-boot-2016.11/Kconfig
  55. --- u-boot-2016.11.orig/Kconfig 2016-11-14 17:27:11.000000000 +0100
  56. +++ u-boot-2016.11/Kconfig 2016-12-10 14:48:38.293185358 +0100
  57. @@ -56,6 +56,7 @@
  58. config DISTRO_DEFAULTS
  59. bool "Select defaults suitable for booting general purpose Linux distributions"
  60. default y if ARCH_SUNXI
  61. + default y if TARGET_CLEARFOG
  62. default n
  63. select CMD_BOOTZ if ARM && !ARM64
  64. select CMD_BOOTI if ARM64