From: Andrew Davis <afd@ti.com>
To: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
Praneeth Bajjuri <praneeth@ti.com>, Ryan Eatmon <reatmon@ti.com>,
Bryan Brattlof <bb@ti.com>, <u-boot@lists.denx.de>
Cc: Andrew Davis <afd@ti.com>
Subject: [PATCH] environment: ti: Add get_fit_config command to get FIT config string
Date: Tue, 25 Apr 2023 11:20:45 -0500 [thread overview]
Message-ID: <20230425162045.7568-1-afd@ti.com> (raw)
When OE is packaging a dtb file into the FIT image it names the node based
on the dtb filename. Node names can't have "/" so it is turned into "_".
We select our FIT config using the "fdtfile" env var so we don't duplicate
the board_name to fdt logic. Result is fdtfile needs mangled when used to
select a config node from OE made FIT image. Do this here.
Signed-off-by: Andrew Davis <afd@ti.com>
---
include/configs/ti_armv7_common.h | 3 ++-
include/environment/ti/ti_armv7_common.env | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index d54c208ef66..149a74d98e8 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -55,7 +55,8 @@
"do;" \
"setenv overlaystring ${overlaystring}'#'${overlay};" \
"done;\0" \
- "run_fit=bootm ${addr_fit}#conf-${fdtfile}${overlaystring}\0" \
+ "get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}\0" \
+ "run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}\0" \
/*
* DDR information. If the CONFIG_NR_DRAM_BANKS is not defined,
diff --git a/include/environment/ti/ti_armv7_common.env b/include/environment/ti/ti_armv7_common.env
index 4d334648c05..0c0929d8628 100644
--- a/include/environment/ti/ti_armv7_common.env
+++ b/include/environment/ti/ti_armv7_common.env
@@ -20,5 +20,6 @@ get_overlaystring=
do;
setenv overlaystring ${overlaystring}'#'${overlay};
done;
-run_fit=bootm ${addr_fit}#conf-${fdtfile}${overlaystring}
+get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
+run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
--
2.39.2
next reply other threads:[~2023-04-25 16:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 16:20 Andrew Davis [this message]
2023-04-25 17:20 ` [PATCH] environment: ti: Add get_fit_config command to get FIT config string Tom Rini
2023-05-05 0:59 ` 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=20230425162045.7568-1-afd@ti.com \
--to=afd@ti.com \
--cc=bb@ti.com \
--cc=praneeth@ti.com \
--cc=reatmon@ti.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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.