U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Aswath Govindraju <a-govindraju@ti.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
	Aswath Govindraju <a-govindraju@ti.com>,
	Lokesh Vutla <lokeshvutla@ti.com>,
	Dave Gerlach <d-gerlach@ti.com>, Simon Glass <sjg@chromium.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	"Matwey V. Kornilov" <matwey.kornilov@gmail.com>,
	<u-boot@lists.denx.de>
Subject: [PATCH 3/3] include: configs: am64x_evm: Add env variables for booting to kernel using USB MSC device
Date: Wed, 4 Aug 2021 18:42:46 +0530	[thread overview]
Message-ID: <20210804131247.6672-4-a-govindraju@ti.com> (raw)
In-Reply-To: <20210804131247.6672-1-a-govindraju@ti.com>

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(-)

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>
-- 
2.17.1


  parent reply	other threads:[~2021-08-04 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 13:12 [PATCH 0/3] AM64: Add support for booting to kernel from USB MSC device Aswath Govindraju
2021-08-04 13:12 ` [PATCH 1/3] board: ti: am64x: Add support for fixing dr_mode while booting from USB Aswath Govindraju
2021-09-11 12:16   ` Tom Rini
2021-08-04 13:12 ` [PATCH 2/3] environment: ti: mmc.h: Make the finduuid generic for usage across different device types Aswath Govindraju
2021-09-11 12:16   ` Tom Rini
2021-08-04 13:12 ` Aswath Govindraju [this message]
2021-09-11 12:16   ` [PATCH 3/3] include: configs: am64x_evm: Add env variables for booting to kernel using USB MSC device Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210804131247.6672-4-a-govindraju@ti.com \
    --to=a-govindraju@ti.com \
    --cc=d-gerlach@ti.com \
    --cc=kishon@ti.com \
    --cc=lokeshvutla@ti.com \
    --cc=matwey.kornilov@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox