-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy path0001-sama5d2_xplained-fixes.patch
71 lines (66 loc) · 2.37 KB
/
0001-sama5d2_xplained-fixes.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
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
68
69
70
From 34264e74657d148c8de78c9a5ce9100087750a2a Mon Sep 17 00:00:00 2001
From: Robert Nelson <[email protected]>
Date: Tue, 23 May 2017 11:54:20 -0500
Subject: [PATCH] sama5d2_xplained fixes
Signed-off-by: Robert Nelson <[email protected]>
---
arch/arm/mach-at91/spl.c | 2 +-
configs/sama5d2_xplained_mmc_defconfig | 5 +++++
include/configs/sama5d2_xplained.h | 8 +++-----
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c
index e113336b7b..7f128b50a7 100644
--- a/arch/arm/mach-at91/spl.c
+++ b/arch/arm/mach-at91/spl.c
@@ -40,7 +40,7 @@ u32 spl_boot_device(void)
#if defined(CONFIG_SYS_USE_MMC)
if (dev == ATMEL_SAMA5_BOOT_FROM_MCI) {
#if defined(CONFIG_SPL_OF_CONTROL)
- return BOOT_DEVICE_MMC1;
+ return BOOT_DEVICE_MMC2;
#else
if (off == 0)
return BOOT_DEVICE_MMC1;
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index f064a43c6b..272263085c 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -18,12 +18,17 @@ CONFIG_BOOTDELAY=3
CONFIG_SPL=y
CONFIG_SPL_SEPARATE_BSS=y
CONFIG_HUSH_PARSER=y
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
+CONFIG_AUTOBOOT_DELAY_STR="d"
+CONFIG_AUTOBOOT_STOP_STR=" "
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
CONFIG_CMD_SF=y
CONFIG_CMD_I2C=y
CONFIG_CMD_USB=y
diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h
index 42fb1e11d0..6643627f67 100644
--- a/include/configs/sama5d2_xplained.h
+++ b/include/configs/sama5d2_xplained.h
@@ -61,13 +61,11 @@
#undef CONFIG_BOOTCOMMAND
#define FAT_ENV_DEVICE_AND_PART "1"
-#define CONFIG_BOOTCOMMAND "fatload mmc 1:1 0x21000000 at91-sama5d2_xplained.dtb; " \
+#define CONFIG_BOOTCOMMAND "part uuid mmc 1:2 partuuid; " \
+ "setenv bootargs console=ttyS0,115200 root=PARTUUID=${partuuid} ro rootwait; " \
+ "fatload mmc 1:1 0x21000000 /dtbs/at91-sama5d2_xplained.dtb; " \
"fatload mmc 1:1 0x22000000 zImage; " \
"bootz 0x22000000 - 0x21000000"
-#undef CONFIG_BOOTARGS
-#define CONFIG_BOOTARGS \
- "console=ttyS0,115200 earlyprintk root=/dev/mmcblk1p2 rw rootwait"
-
#endif
/* SPL */
--
2.11.0