include/image.h defines constants for the FIT property and node names,
and most of the FIT code uses them, but mkimage, boot/ and the SPL FIT
loader still spell a few of the names out as string literals. This
series converts the remaining ones in those three areas: mkimage in
patches 1 and 2, boot/ in patch 3 and SPL in patch 4.
Most of the changes swap a literal for the matching constant. Two need
a word of explanation. fdt_property_file() in mkimage already takes the
property name as an argument but ignores it and hardcodes "data", so
patch 2 uses the argument; every caller passes FIT_DATA_PROP.
FIT_COMPAT_PROP was added for the compatible property of configuration
nodes by commit 3059eb0c27dd ("boot/fit: declare (and use) new constant
for conf's compatible prop"), which noted that the same property can
appear in FPGA image nodes but did not convert those. Patches 3 and 4
use FIT_COMPAT_PROP for the FPGA image node as well, in U-Boot proper
and in SPL.
No functional change is intended. Built for sandbox, sandbox_spl and
dra7xx_evm (U-Boot proper, SPL and host tools), the objects of all
touched files are identical before and after the series once debug
info is stripped and the embedded version string is held fixed. The
only exception is four __LINE__ values in boot/image-fit.c log calls,
which move down by one where patch 3 wraps a line. Each patch builds
for those three boards, and the sandbox FIT, vboot, mkimage and
dm-verity pytests pass.
The series is based on next, where the dm-verity code touched by patch
3 lives.
Link to v1:
https://lore.kernel.org/u-boot/[email protected]/
Changes in v2:
- Split v1 patch 1 in two, so that the fdt_property_file() change,
which is not a plain constant swap, is a patch of its own (Quentin)
- No code changes; collected Quentin's Reviewed-by on all patches,
carried over to both halves of the split patch
Aristo Chen (4):
tools: mkimage: use FIT_ALGO_PROP for the signature algo property
tools: mkimage: use the name argument in fdt_property_file()
boot: fit: use constants for FIT property names
spl: fit: use constants for FIT property names
boot/boot_fit.c | 4 ++--
boot/image-board.c | 3 ++-
boot/image-fit.c | 3 ++-
common/spl/spl_fit.c | 12 ++++++------
tools/fit_image.c | 2 +-
tools/image-host.c | 3 ++-
6 files changed, 15 insertions(+), 12 deletions(-)
--
2.43.0