PR install/59195 and PR port-evbmips/60302: fix hashes in gzimg directories
Hashes in gzimg directories for some ports either correspond to the
wrong (i.e., uncompressed) files or do not cover all files. These
problems are described in PR install/59195 and PR port-evbmips/60302,
respectively. The potential solution offered for PR 59195 does not
work if multiple image files exist in a single gzimg directory.
The correct solution involves three aspects: (i) make checksums
independently of mkimage, which allows a common list of hashes in
etc/Makefile, (ii) for directories producing more than one compressed
image, make checksums in individual temporary files, one per
compressed image, to combine at the end, and (iii) add make targets to
allow parallelism across multiple images within each directory.
This patch implements those steps for the evbarm, evbmips, evbppc, and
riscv ports, which were the only ones previously using mkimage for
checksums.
Add a MKRAID build option, which defaults to yes everywhere except
m68000, which controls building of RAID-related utilities (including
hardware RAID controllers).
build.sh: consider tools/make/configure and tools/make/*.in
When deciding if nbmake is out-of-date the files in tools/make
should be considered too.
Reviewed by: riastradh
Don't forget to advance within the segment in _bus_dmamap_load_raw.
This went unnoticed, because the function is rarely used. While it is
wired in PowerPC DMA routines, no PowerPC specific drivers actually
use it. It only appears in a few MI drivers.
With small _dm_segcnt, load just failed with EFBIG, with large value
all segments pointed to the same page, which resulted in corrupting
the transfer.