Skip to content

fit: use constants for property names in mkimage, boot and SPL

Aristo Chen u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 5 repliesIn review
  2. v13 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- 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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tools: mkimage: use FIT_ALGO_PROP for the signature algo propertytools/image-host.c+2 -11 reply
2/4tools: mkimage: use the name argument in fdt_property_file()tools/fit_image.c+1 -11 reply
3/4boot: fit: use constants for FIT property namesboot/boot_fit.c boot/image-board.c boot/image-fit.c+6 -41 reply
4/4spl: fit: use constants for FIT property namescommon/spl/spl_fit.c+6 -61 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchQuentin SchulzSimon Glass
1/4R-b R-b
2/4R-b R-b
3/4R-b R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] fit: use constants for property names in mkimage, boot and SPL

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(-)
Signature · 1 line
2.43.0