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