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