]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
environment: ti: Add get_fit_config command to get FIT config string
authorAndrew Davis <afd@ti.com>
Tue, 25 Apr 2023 16:20:45 +0000 (11:20 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 4 May 2023 17:03:54 +0000 (13:03 -0400)
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>
Reviewed-by: Tom Rini <trini@konsulko.com>
include/configs/ti_armv7_common.h
include/environment/ti/ti_armv7_common.env

index d54c208ef66fd558a4ef2ca0d8367fe4fac86f04..149a74d98e8a4a625cf1221f44c0cec0a9fb06a5 100644 (file)
@@ -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,
index 4d334648c05d3872b9096e14634aee0ad91662f7..0c0929d862867f0064dc154c4c43e640158313e4 100644 (file)
@@ -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}