diff mbox series

[3/3] include: configs: am64x_evm: Add env variables for booting to kernel using USB MSC device

Message ID 20210804131247.6672-4-a-govindraju@ti.com
State Accepted
Commit 3c01557df8971f59628f156c69bd1989f69d168c
Delegated to: Tom Rini
Headers show
Series AM64: Add support for booting to kernel from USB MSC device | expand

Commit Message

Aswath Govindraju Aug. 4, 2021, 1:12 p.m. UTC
Add env variables for booting to kernel from USB MSC device. The second
partition in the USB MSC device needs to formatted as ext4 file system with
kernel and dtb images, present in the /boot folder.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
 include/configs/am64x_evm.h | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

Comments

Tom Rini Sept. 11, 2021, 12:16 p.m. UTC | #1
On Wed, Aug 04, 2021 at 06:42:46PM +0530, Aswath Govindraju wrote:

> Add env variables for booting to kernel from USB MSC device. The second
> partition in the USB MSC device needs to formatted as ext4 file system with
> kernel and dtb images, present in the /boot folder.
> 
> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
index 7c520f4395b5..f3d46449011a 100644
--- a/include/configs/am64x_evm.h
+++ b/include/configs/am64x_evm.h
@@ -96,6 +96,34 @@ 
 		"${bootdir}/${name_fit}\0"				\
 	"partitions=" PARTS_DEFAULT
 
+#define EXTRA_ENV_AM642_BOARD_SETTING_USBMSC				\
+	"args_usb=run finduuid;setenv bootargs console=${console} "	\
+		"${optargs} "						\
+		"root=PARTUUID=${uuid} rw "				\
+		"rootfstype=${mmcrootfstype}\0"				\
+	"init_usb=run args_all args_usb\0"				\
+	"get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+	"get_overlay_usb="						\
+		"fdt address ${fdtaddr};"				\
+		"fdt resize 0x100000;"					\
+		"for overlay in $name_overlays;"			\
+		"do;"							\
+		"load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && "	\
+		"fdt apply ${dtboaddr};"				\
+		"done;\0"						\
+	"get_kern_usb=load usb ${bootpart} ${loadaddr} "		\
+		"${bootdir}/${name_kern}\0"				\
+	"get_fit_usb=load usb ${bootpart} ${addr_fit} "			\
+		"${bootdir}/${name_fit}\0"				\
+	"usbboot=setenv boot usb;"					\
+		"setenv bootpart 0:2;"					\
+		"usb start;"						\
+		"run findfdt;"						\
+		"run init_usb;"						\
+		"run get_kern_usb;"					\
+		"run get_fdt_usb;"					\
+		"run run_kern\0"
+
 #define EXTRA_ENV_DFUARGS \
 	DFU_ALT_INFO_MMC \
 	DFU_ALT_INFO_EMMC \
@@ -108,7 +136,8 @@ 
 	DEFAULT_MMC_TI_ARGS						\
 	EXTRA_ENV_AM642_BOARD_SETTINGS					\
 	EXTRA_ENV_AM642_BOARD_SETTINGS_MMC				\
-	EXTRA_ENV_DFUARGS
+	EXTRA_ENV_DFUARGS						\
+	EXTRA_ENV_AM642_BOARD_SETTING_USBMSC
 
 /* Now for the remaining common defines */
 #include <configs/ti_armv7_common.h>