forked from canonical/pi-gadget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuboot.patch
36 lines (32 loc) · 1.02 KB
/
uboot.patch
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
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 5caf90a..2dd2c41 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -105,7 +105,7 @@
sizeof(CONFIG_SYS_PROMPT) + 16)
/* Environment */
-#define CONFIG_ENV_SIZE SZ_16K
+#define CONFIG_ENV_SIZE SZ_128K
#define CONFIG_ENV_IS_IN_FAT
#define FAT_ENV_INTERFACE "mmc"
#define FAT_ENV_DEVICE_AND_PART "0:1"
@@ -113,7 +113,13 @@
#define CONFIG_FAT_WRITE
#define CONFIG_ENV_VARS_UBOOT_CONFIG
#define CONFIG_SYS_LOAD_ADDR 0x1000000
-#define CONFIG_PREBOOT "usb start"
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+
+/* Load environment from USB if no SD card */
+#define CONFIG_PREBOOT "usb start; if test ! \"mmc dev 0\"; then " \
+ "fatload usb 0:1 0x3000000 "FAT_ENV_FILE"; " \
+ "env import -b 0x3000000; " \
+ "fi;"
/* Shell */
#define CONFIG_SYS_MAXARGS 16
@@ -123,6 +129,7 @@
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_CMDLINE_TAG
#define CONFIG_INITRD_TAG
+#define CONFIG_SUPPORT_RAW_INITRD
#include <config_distro_defaults.h>