The clean-up half of the v1 review of the imagemap series ([email protected]).
Patches 1 to 4 are self-contained tidy-ups without any functional changes: the suite list and the sandbox defconfig put back in order, FIT_VERITY_NODENAME in place of a second spelling of the node name, a derived size for the header probe in place of a bare 64, a corrected rationale on the imagemap_lookup() guard, and test locals hoisted out of an anonymous block and a mid-block declaration. Patches 5 and 6 correct the documentation: the imagemap_create() signature, which callers a reader can actually reach, bootmeth_openwrt described as a future consumer, the index entry sorted, and the section on phase gating that the commit adding the file claimed was there. Patches 7 to 10 are the structural ones which do introduce functional changes: imagemap devices are named after the partition they cover and hold a name driver model owns, so two mappings on one block device stay distinct. bootm_start() sets the imagemap itself, keeping the invariant in one function. The data-position and totalsize-alignment sequence is shared between fit_image_get_data() and the storage path, which also gives the latter the range check it lacked and settles the two spellings of the alignment. Finally the two imagemap pointers compile only when CONFIG_IMAGEMAP is on, reached through accessors that fold away when it is off. Patch 11 adds a new unit test Simon had asked for in his review. Signed-off-by: Daniel Golle <[email protected]> Daniel Golle (11): test: cmd_ut: keep the suite list alphabetical boot: bootm: derive the header probe size boot: imagemap: correct the lookup guard rationale test: boot: imagemap: declare locals at the top doc: imagemap: describe the API and phase gating doc: develop: sort the imagemap index entry boot: imagemap: name the device after its partition boot: bootm: set the imagemap from bootm_start() boot: fit: share the external-data offset calculation boot: build the imagemap pointers only when enabled test: boot: imagemap: caller-owned region not resized boot/bootm.c | 39 ++++++------- boot/image-fit.c | 94 ++++++++++++++++++------------ boot/imagemap.c | 33 ++++++++--- doc/develop/imagemap.rst | 30 +++++++--- doc/develop/index.rst | 2 +- include/bootm.h | 17 ++++++ include/image.h | 31 ++++++++++ test/boot/imagemap.c | 123 ++++++++++++++++++++++++++++++++++----- test/cmd_ut.c | 4 +- 9 files changed, 282 insertions(+), 91 deletions(-) base-commit: 03e0ee96b1cf21a20def03c079ca05427ebff208 -- 2.56.0
