-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy path0001-ls1021atwr-fixes.patch
109 lines (101 loc) · 3.07 KB
/
0001-ls1021atwr-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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
From d36d1c7b926f123553ad877e5384eba91fa40196 Mon Sep 17 00:00:00 2001
From: Robert Nelson <[email protected]>
Date: Fri, 9 Jun 2017 14:51:43 -0500
Subject: [PATCH] ls1021atwr fixes
Signed-off-by: Robert Nelson <[email protected]>
---
configs/ls1021atwr_sdcard_qspi_defconfig | 4 +++
include/configs/ls1021atwr.h | 43 +++++++++++++++++++++++++++-----
2 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/configs/ls1021atwr_sdcard_qspi_defconfig b/configs/ls1021atwr_sdcard_qspi_defconfig
index 5ccfc96e9d..2618a58b99 100644
--- a/configs/ls1021atwr_sdcard_qspi_defconfig
+++ b/configs/ls1021atwr_sdcard_qspi_defconfig
@@ -6,6 +6,7 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_WATCHDOG_SUPPORT=y
CONFIG_VIDEO=y
+CONFIG_DISTRO_DEFAULTS=y
CONFIG_DEFAULT_DEVICE_TREE="ls1021a-twr-duart"
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
@@ -39,7 +40,10 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_BMP=y
CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_OF_CONTROL=y
CONFIG_DM=y
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 067ef4df93..91bfc22755 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -7,6 +7,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <config_distro_defaults.h>
+
#define CONFIG_ARMV7_PSCI_1_0
#define CONFIG_ARMV7_SECURE_BASE OCRAM_BASE_S_ADDR
@@ -135,6 +137,10 @@
#define CONFIG_SYS_TEXT_BASE 0x40100000
#endif
+#ifndef CONFIG_LOADADDR
+#define CONFIG_LOADADDR 0x82000000
+#endif
+
#ifndef CONFIG_SYS_TEXT_BASE
#define CONFIG_SYS_TEXT_BASE 0x60100000
#endif
@@ -370,16 +376,41 @@
#ifdef CONFIG_LPUART
#define CONFIG_EXTRA_ENV_SETTINGS \
- "bootargs=root=/dev/ram0 rw console=ttyLP0,115200\0" \
- "initrd_high=0xffffffff\0" \
- "fdt_high=0xffffffff\0"
+ "console=ttyLP0,115200\0" \
+ "ftdfile=ls1021a-twr.dtb\0" \
+ "initrd_high=0xffffffff\0" \
+ "fdt_high=0xffffffff\0" \
+ "fdt_addr_r=0x8f000000\0" \
+ "fdt_addr=0x8f000000\0" \
+ "findfdt=setenv fdtfile ls1021a-twr.dtb; \0" \
+ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+ "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+ "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
+ BOOTENV
#else
#define CONFIG_EXTRA_ENV_SETTINGS \
- "bootargs=root=/dev/ram0 rw console=ttyS0,115200\0" \
- "initrd_high=0xffffffff\0" \
- "fdt_high=0xffffffff\0"
+ "console=ttyS0,115200\0" \
+ "ftdfile=ls1021a-twr.dtb\0" \
+ "initrd_high=0xffffffff\0" \
+ "fdt_high=0xffffffff\0" \
+ "fdt_addr_r=0x8f000000\0" \
+ "fdt_addr=0x8f000000\0" \
+ "findfdt=setenv fdtfile ls1021a-twr.dtb; \0" \
+ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+ "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+ "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
+ BOOTENV
#endif
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0)
+
+#define CONFIG_BOOTCOMMAND \
+ "run findfdt; " \
+ "run distro_bootcmd"
+
+#include <config_distro_bootcmd.h>
+
/*
* Miscellaneous configurable options
*/
--
2.11.0