Skip to contentSkip to conversation

condfigs: ls1046aqds: support distro boot

PATCH New Biwen Li 2 participants 3 messages Mar 18, 2020 – Apr 17, 2020

lore
Share & tools
lore

Biwen Li

author
#0 lore raw

PATCH 1/1 condfigs: ls1046aqds: support distro boot

Add support of distro boot for ls1046aqds

---
 include/configs/ls1046a_common.h |  8 +++++++-
 include/configs/ls1046aqds.h     | 20 +++++++++-----------
 2 files changed, 16 insertions(+), 12 deletions(-)
include/configs/ls1046a_common.h +7 -1
index 07570187f5..111bc9a7b9 100644
@@ -227,7 +227,7 @@
 	"fdt_high=0xffffffffffffffff\0"		\
 	"initrd_high=0xffffffffffffffff\0"	\
 	"fdt_addr=0x64f00000\0"                 \
-	"kernel_addr=0x65000000\0"              \
+	"kernel_addr=0x61000000\0"              \
 	"scriptaddr=0x80000000\0"               \
 	"scripthdraddr=0x80080000\0"		\
 	"fdtheader_addr_r=0x80100000\0"         \
@@ -274,6 +274,12 @@
 		"&& sf read $kernelheader_addr_r $kernelheader_start "	\
 		"$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \
 		"bootm $load_addr#$board\0"		\
+	"nor_bootcmd=echo Trying load from nor..;"	\
+		"cp.b $kernel_addr $load_addr "		\
+		"$kernel_size; env exists secureboot "	\
+		"&& cp.b $kernelheader_addr $kernelheader_addr_r "	\
+		"$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \
+		"bootm $load_addr#$board\0"	\
 	"sd_bootcmd=echo Trying load from SD ..;"	\
 		"mmcinfo; mmc read $load_addr "		\
 		"$kernel_addr_sd $kernel_size_sd && "	\
include/configs/ls1046aqds.h +9 -11
index eea738e602..d5d96c4ed5 100644
@@ -457,19 +457,17 @@ unsigned long get_board_ddr_clk(void);
 
 #undef CONFIG_BOOTCOMMAND
 #ifdef CONFIG_TFABOOT
-#define QSPI_NOR_BOOTCOMMAND		"sf probe && sf read $kernel_load "    \
-					"e0000 f00000 && bootm $kernel_load"
-#define IFC_NOR_BOOTCOMMAND		"cp.b $kernel_start $kernel_load "     \
-					"$kernel_size && bootm $kernel_load"
-#define SD_BOOTCOMMAND		"mmc info; mmc read $kernel_load"     \
-					"$kernel_addr_sd $kernel_size_sd && bootm $kernel_load"
+#define IFC_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd; "	\
+			   "env exists secureboot && esbc_halt;;"
+#define SD_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; "	\
+			   "env exists secureboot && esbc_halt;;"
 #else
-#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
-#define CONFIG_BOOTCOMMAND		"sf probe && sf read $kernel_load "    \
-					"e0000 f00000 && bootm $kernel_load"
+#if defined(CONFIG_SD_BOOT)
+#define CONFIG_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; "	\
+			   "env exists secureboot && esbc_halt;;"
 #else
-#define CONFIG_BOOTCOMMAND		"cp.b $kernel_start $kernel_load "     \
-					"$kernel_size && bootm $kernel_load"
+#define CONFIG_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd; "	\
+			   "env exists secureboot && esbc_halt;;"
 #endif
 #endif
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 condfigs: ls1046aqds: support distro boot

Quoted 12 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Biwen Li
Sent: Wednesday, March 18, 2020 5:39 PM
To: Jagdish Gediya <[email protected]>; Priyanka Jain <[email protected]>; Andy Tang <[email protected]>; Shengzhou Liu <[email protected]>
Cc: Alison Wang <[email protected]>; u-boot at lists.denx.de; Jiafei Pan <[email protected]>; Biwen Li <[email protected]>
Subject: [PATCH] condfigs: ls1046aqds: support distro boot

Typo mistake : configs

Quoted 43 lines

Add support of distro boot for ls1046aqds

---
include/configs/ls1046a_common.h | 8 +++++++-
include/configs/ls1046aqds.h | 20 +++++++++-----------

2 files changed, 16 insertions(+), 12 deletions(-)
include/configs/ls1046a_common.h +7 -1
index 07570187f5..111bc9a7b9 100644
@@ -227,7 +227,7 @@
 	"fdt_high=0xffffffffffffffff\0"		\
 	"initrd_high=0xffffffffffffffff\0"	\
 	"fdt_addr=0x64f00000\0"                 \
-	"kernel_addr=0x65000000\0"              \
+	"kernel_addr=0x61000000\0"              \
 	"scriptaddr=0x80000000\0"               \
 	"scripthdraddr=0x80080000\0"		\
 	"fdtheader_addr_r=0x80100000\0"         \
@@ -274,6 +274,12 @@
 		"&& sf read $kernelheader_addr_r $kernelheader_start "
 	\
 		"$kernelheader_size && esbc_validate
 ${kernelheader_addr_r}; " \
 		"bootm $load_addr#$board\0"		\
+	"nor_bootcmd=echo Trying load from nor..;"	\
+		"cp.b $kernel_addr $load_addr "		\
+		"$kernel_size; env exists secureboot "	\
+		"&& cp.b $kernelheader_addr $kernelheader_addr_r "	\
+		"$kernelheader_size && esbc_validate
 ${kernelheader_addr_r}; " \
+		"bootm $load_addr#$board\0"	\
	"sd_bootcmd=echo Trying load from SD ..;"	\
		"mmcinfo; mmc read $load_addr "		\
		"$kernel_addr_sd $kernel_size_sd && "	\
include/configs/ls1046aqds.h index renamed from include/configs/ls1046aqds.h +0 -0

eea738e602..d5d96c4ed5 100644

include/configs/ls1046aqds.h unsigned long get_board_ddr_clk(void); · line 460

Quoted 4 lines
include/configs/ls1046aqds.h +0 -1
@@ -457,19 +457,17 @@ unsigned long get_board_ddr_clk(void);
 
 #undef CONFIG_BOOTCOMMAND
 #ifdef CONFIG_TFABOOT
-#define QSPI_NOR_BOOTCOMMAND		"sf probe && sf read

I don't see updated definition of QSPI_NOR_BOOTCOMMAND?

Quoted 38 lines
include/configs/ls1046aqds.h +0 -1
 $kernel_load "    \
-					"e0000 f00000 && bootm

$kernel_load"
-#define IFC_NOR_BOOTCOMMAND "cp.b $kernel_start
$kernel_load " \

include/configs/ls1046aqds.h +0 -1
-					"$kernel_size && bootm

$kernel_load"
-#define SD_BOOTCOMMAND "mmc info; mmc read $kernel_load"
\

include/configs/ls1046aqds.h +0 -1
-					"$kernel_addr_sd $kernel_size_sd &&

bootm $kernel_load"
+#define IFC_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd;
" \

include/configs/ls1046aqds.h +2 -0
+			   "env exists secureboot && esbc_halt;;"
+#define SD_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; "
	\
include/configs/ls1046aqds.h +1 -0
+			   "env exists secureboot && esbc_halt;;"

#else

include/configs/ls1046aqds.h +0 -2
-#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
-#define CONFIG_BOOTCOMMAND		"sf probe && sf read

$kernel_load " \

include/configs/ls1046aqds.h +0 -1
-					"e0000 f00000 && bootm

$kernel_load"

include/configs/ls1046aqds.h +2 -0
+#if defined(CONFIG_SD_BOOT)
+#define CONFIG_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; "
	\
include/configs/ls1046aqds.h +1 -0
+			   "env exists secureboot && esbc_halt;;"

#else
-#define CONFIG_BOOTCOMMAND "cp.b $kernel_start
$kernel_load " \

include/configs/ls1046aqds.h +0 -1
-					"$kernel_size && bootm

$kernel_load"
+#define CONFIG_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd; "

	\
include/configs/ls1046aqds.h +1 -0
+			   "env exists secureboot && esbc_halt;;"

#endif
#endif

Quoted 2 lines

--
2.17.1

Priyanka

author
#2 lore raw

PATCH 1/1 condfigs: ls1046aqds: support distro boot

Quoted 6 lines
Quoted 4 lines

Cc: Alison Wang <[email protected]>; u-boot at lists.denx.de; Jiafei Pan <[email protected]>; Biwen Li <[email protected]>
Subject: [PATCH] condfigs: ls1046aqds: support distro boot

Typo mistake : configs

I will correct it in v2.

Quoted 44 lines
Quoted 44 lines

Add support of distro boot for ls1046aqds

---
include/configs/ls1046a_common.h | 8 +++++++-
include/configs/ls1046aqds.h | 20 +++++++++-----------

2 files changed, 16 insertions(+), 12 deletions(-)
include/configs/ls1046a_common.h +7 -1
index 07570187f5..111bc9a7b9 100644
@@ -227,7 +227,7 @@
 	"fdt_high=0xffffffffffffffff\0"		\
 	"initrd_high=0xffffffffffffffff\0"	\
 	"fdt_addr=0x64f00000\0"                 \
-	"kernel_addr=0x65000000\0"              \
+	"kernel_addr=0x61000000\0"              \
 	"scriptaddr=0x80000000\0"               \
 	"scripthdraddr=0x80080000\0"		\
 	"fdtheader_addr_r=0x80100000\0"         \
@@ -274,6 +274,12 @@
 		"&& sf read $kernelheader_addr_r $kernelheader_start "
 	\
 		"$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \
 		"bootm $load_addr#$board\0"		\
+	"nor_bootcmd=echo Trying load from nor..;"	\
+		"cp.b $kernel_addr $load_addr "		\
+		"$kernel_size; env exists secureboot "	\
+		"&& cp.b $kernelheader_addr $kernelheader_addr_r "	\
+		"$kernelheader_size && esbc_validate
 ${kernelheader_addr_r}; " \
+		"bootm $load_addr#$board\0"	\
 	"sd_bootcmd=echo Trying load from SD ..;"	\
		"mmcinfo; mmc read $load_addr "		\
		"$kernel_addr_sd $kernel_size_sd && "	\
(quoted diff) +0 -0

b/include/configs/ls1046aqds.h index
eea738e602..d5d96c4ed5 100644

include/configs/ls1046aqds.h +0 -0
@@ -457,19 +457,17 @@ unsigned long get_board_ddr_clk(void);
 
Quoted 5 lines

include/configs/ls1046aqds.h unsigned long get_board_ddr_clk(void);

Quoted 3 lines
include/configs/ls1046aqds.h +0 -1
 #undef CONFIG_BOOTCOMMAND
 #ifdef CONFIG_TFABOOT
-#define QSPI_NOR_BOOTCOMMAND		"sf probe && sf read

I don't see updated definition of QSPI_NOR_BOOTCOMMAND?

Have updated the definition.

Quoted 46 lines
Quoted 11 lines
include/configs/ls1046aqds.h +0 -1
 $kernel_load "    \
-					"e0000 f00000 && bootm

$kernel_load"
-#define IFC_NOR_BOOTCOMMAND "cp.b $kernel_start
$kernel_load " \

include/configs/ls1046aqds.h +0 -1
-					"$kernel_size && bootm

$kernel_load"
-#define SD_BOOTCOMMAND "mmc info; mmc read $kernel_load"
\

include/configs/ls1046aqds.h +0 -1
-					"$kernel_addr_sd $kernel_size_sd &&
Quoted 2 lines

bootm $kernel_load"
+#define IFC_NOR_BOOTCOMMAND "run distro_bootcmd; run

nor_bootcmd;

include/configs/ls1046aqds.h

Quoted 13 lines

" \

include/configs/ls1046aqds.h +2 -0
+			   "env exists secureboot && esbc_halt;;"
+#define SD_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; "
	\
include/configs/ls1046aqds.h +1 -0
+			   "env exists secureboot && esbc_halt;;"

#else

include/configs/ls1046aqds.h +0 -2
-#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
-#define CONFIG_BOOTCOMMAND		"sf probe && sf read

$kernel_load " \

include/configs/ls1046aqds.h +0 -1
-					"e0000 f00000 && bootm

$kernel_load"

include/configs/ls1046aqds.h +2 -0
+#if defined(CONFIG_SD_BOOT)
+#define CONFIG_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd;

"

Quoted 8 lines
	\
include/configs/ls1046aqds.h +1 -0
+			   "env exists secureboot && esbc_halt;;"

#else
-#define CONFIG_BOOTCOMMAND "cp.b $kernel_start
$kernel_load " \

include/configs/ls1046aqds.h +0 -1
-					"$kernel_size && bootm

$kernel_load"
+#define CONFIG_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd;

"

Quoted 7 lines
	\
include/configs/ls1046aqds.h +1 -0
+			   "env exists secureboot && esbc_halt;;"

#endif
#endif

--
2.17.1

Priyanka