include: env: ti: default_findfdt: Follow the bootstd/distro conventions
PATCH 1/1 include: env: ti: default_findfdt: Follow the bootstd/distro conventions
Distroboot and bootstd both mandate a findfdt variable pointing to the correct device tree blob. Current mechanism calls a find_fdt function to set this variable. We do not need a find_fdt command to set the environment variable to a single dtb. Simplify the default_findfdt to remove variable expansion while at it.
For legacy scripts depending on a TI convention of name_fdt, provide a find_fdt wrapper that behaves like before.
NOTE: As part of this change, we also drop the cooked up default_device_tree_arch default_device_tree_subarch variables.
--- include/env/ti/default_findfdt.env | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
include/env/ti/default_findfdt.env +4 -9
@@ -1,12 +1,7 @@ -default_device_tree=CONFIG_DEFAULT_DEVICE_TREE -default_device_tree_arch=ti #ifdef CONFIG_ARM64 -findfdt= - setenv name_fdt ${default_device_tree_arch}/${default_device_tree}.dtb; - setenv fdtfile ${name_fdt} +fdtfile=ti/CONFIG_DEFAULT_DEVICE_TREE.dtb; #else -default_device_tree_subarch=omap -findfdt= - setenv name_fdt ${default_device_tree_arch}/${default_device_tree_subarch}/${default_device_tree}.dtb; - setenv fdtfile ${name_fdt} +fdtfile=ti/omap/CONFIG_DEFAULT_DEVICE_TREE.dtb; #endif + +findfdt=setenv name_fdt ${fdt_file}
Signature · 1 line
2.43.0
Quoted 42 lines · Nishanth Menon
Distroboot and bootstd both mandate a findfdt variable pointing to the correct device tree blob. Current mechanism calls a
find_fdtfunction to set this variable. We do not need afind_fdtcommand to set the environment variable to a single dtb. Simplify thedefault_findfdtto remove variable expansion while at it.For legacy scripts depending on a TI convention of
name_fdt, provide afind_fdtwrapper that behaves like before.NOTE: As part of this change, we also drop the cooked up
default_device_tree_archdefault_device_tree_subarchvariables.Reported-by Jonathan Humphreys <[email protected]>Signed-off-by Nishanth Menon <[email protected]>--- include/env/ti/default_findfdt.env | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)include/env/ti/default_findfdt.env +4
-9@@ -1,12 +1,7 @@ -default_device_tree=CONFIG_DEFAULT_DEVICE_TREE -default_device_tree_arch=ti #ifdef CONFIG_ARM64 -findfdt= - setenv name_fdt ${default_device_tree_arch}/${default_device_tree}.dtb; - setenv fdtfile ${name_fdt} +fdtfile=ti/CONFIG_DEFAULT_DEVICE_TREE.dtb; #else -default_device_tree_subarch=omap -findfdt= - setenv name_fdt ${default_device_tree_arch}/${default_device_tree_subarch}/${default_device_tree}.dtb; - setenv fdtfile ${name_fdt} +fdtfile=ti/omap/CONFIG_DEFAULT_DEVICE_TREE.dtb; #endif + +findfdt=setenv name_fdt ${fdt_file}Signature · 1 line
2.43.0
This should have been RFC
Generates quotes
fdtfile=ti/"k3-am62a7-sk".dtb;
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 41 lines · Nishanth Menon
Distroboot and bootstd both mandate a findfdt variable pointing to the correct device tree blob. Current mechanism calls a
find_fdtfunction to set this variable. We do not need afind_fdtcommand to set the environment variable to a single dtb. Simplify thedefault_findfdtto remove variable expansion while at it.For legacy scripts depending on a TI convention of
name_fdt, provide afind_fdtwrapper that behaves like before.NOTE: As part of this change, we also drop the cooked up
default_device_tree_archdefault_device_tree_subarchvariables.Reported-by Jonathan Humphreys <[email protected]>Signed-off-by Nishanth Menon <[email protected]>--- include/env/ti/default_findfdt.env | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)include/env/ti/default_findfdt.env +4
-9@@ -1,12 +1,7 @@ -default_device_tree=CONFIG_DEFAULT_DEVICE_TREE -default_device_tree_arch=ti #ifdef CONFIG_ARM64 -findfdt= - setenv name_fdt ${default_device_tree_arch}/${default_device_tree}.dtb; - setenv fdtfile ${name_fdt} +fdtfile=ti/CONFIG_DEFAULT_DEVICE_TREE.dtb; #else -default_device_tree_subarch=omap -findfdt= - setenv name_fdt ${default_device_tree_arch}/${default_device_tree_subarch}/${default_device_tree}.dtb; - setenv fdtfile ${name_fdt} +fdtfile=ti/omap/CONFIG_DEFAULT_DEVICE_TREE.dtb; #endif + +findfdt=setenv name_fdt ${fdt_file}Signature · 1 line
2.43.0
Nishanth, only am62/beagleplay uses the default_findfdt.env definitions. Others (eg, j721e) define their own and have a run-time component to them.
Jon