All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan Brattlof <bb@ti.com>
To: Tom Rini <trini@konsulko.com>,
	Vignesh Raghavendra <vigneshr@ti.com>, Andrew Davis <afd@ti.com>,
	Judith Mendez <jm@ti.com>, Kamlesh Gurudasani <kamlesh@ti.com>
Cc: UBoot Mailing List <u-boot@lists.denx.de>, Bryan Brattlof <bb@ti.com>
Subject: [PATCH 4/5] configs: am62a: convert bootcmd to distro_bootcmd
Date: Fri, 23 Dec 2022 19:15:24 -0600	[thread overview]
Message-ID: <20221224011525.4696-5-bb@ti.com> (raw)
In-Reply-To: <20221224011525.4696-1-bb@ti.com>

We're currently using CONFIG_BOOTCOMMAND to run custom boot scripts to
jump into linux. While this works, let's begin the transition to more
distribution friendly jumps to linux by enabling distro_bootcmd.

Convert the custom bootcmd to a distro_bootcmd

Signed-off-by: Judith Mendez <jm@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
---
 configs/am62ax_evm_a53_defconfig |  1 -
 include/configs/am62ax_evm.h     | 29 ++++++++++++++++++++++++++---
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig
index 0c2cf945c62bf..6e97fd4060e05 100644
--- a/configs/am62ax_evm_a53_defconfig
+++ b/configs/am62ax_evm_a53_defconfig
@@ -20,7 +20,6 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
-CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern"
 CONFIG_SPL_MAX_SIZE=0x58000
 CONFIG_SPL_PAD_TO=0x0
 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h
index 5406c39350f64..0bc0b13922f0f 100644
--- a/include/configs/am62ax_evm.h
+++ b/include/configs/am62ax_evm.h
@@ -9,7 +9,6 @@
 #define __CONFIG_AM62AX_EVM_H
 
 #include <linux/sizes.h>
-#include <config_distro_bootcmd.h>
 #include <environment/ti/mmc.h>
 #include <environment/ti/k3_dfu.h>
 
@@ -55,12 +54,36 @@
 		"${bootdir}/${name_fit}\0"				\
 	"partitions=" PARTS_DEFAULT
 
+#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance)		\
+	DEFAULT_MMC_TI_ARGS						\
+	EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC				\
+	"bootcmd_ti_mmc="						\
+		"run findfdt; run envboot; run init_mmc;"		\
+		"run get_kern_mmc; run get_fdt_mmc;"			\
+		"run get_overlay_mmc;"					\
+		"run run_kern;\0"
+
+#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance)		\
+	"ti_mmc "
+
+#if CONFIG_IS_ENABLED(CMD_MMC)
+	#define BOOT_TARGET_MMC(func)					\
+		func(TI_MMC, ti_mmc, na)
+#else
+	#define BOOT_TARGET_MMC(func)
+#endif /* CONFIG_IS_ENABLED(CMD_MMC) */
+
+#define BOOT_TARGET_DEVICES(func)					\
+	BOOT_TARGET_MMC(func)
+
+#include <config_distro_bootcmd.h>
+
 /* Incorporate settings into the U-Boot environment */
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	DEFAULT_LINUX_BOOT_ENV						\
-	DEFAULT_MMC_TI_ARGS						\
+	DEFAULT_FIT_TI_ARGS						\
 	EXTRA_ENV_AM62A7_BOARD_SETTINGS					\
-	EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC				\
+	BOOTENV
 
 /* Now for the remaining common defines */
 #include <configs/ti_armv7_common.h>
-- 
2.39.0


  parent reply	other threads:[~2022-12-24  1:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-24  1:15 [PATCH 0/5] add support for hs bootflows to am62a Bryan Brattlof
2022-12-24  1:15 ` [PATCH 1/5] configs: restrict am62ax wakup SPL size Bryan Brattlof
2023-01-11  2:16   ` Tom Rini
2022-12-24  1:15 ` [PATCH 2/5] configs: am62a: move stack and heap to HSM RAM Bryan Brattlof
2023-01-11  2:17   ` Tom Rini
2022-12-24  1:15 ` [PATCH 3/5] arm: mach-k3: copy bootindex to OCRAM for main domain SPL Bryan Brattlof
2023-01-11  2:17   ` Tom Rini
2022-12-24  1:15 ` Bryan Brattlof [this message]
2023-01-11  2:17   ` [PATCH 4/5] configs: am62a: convert bootcmd to distro_bootcmd Tom Rini
2022-12-24  1:15 ` [PATCH 5/5] configs: am62a: use kernel fitImage when using secure bootflow Bryan Brattlof
2023-01-11  2:17   ` Tom Rini
2022-12-29  9:14 ` [PATCH 0/5] add support for hs bootflows to am62a Kamlesh Gurudasani

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=20221224011525.4696-5-bb@ti.com \
    --to=bb@ti.com \
    --cc=afd@ti.com \
    --cc=jm@ti.com \
    --cc=kamlesh@ti.com \
    --cc=trini@konsulko.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.