]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
filemap.py: enforce maximum of 4kb block size
authorAndrew Geissler <geissonator@gmail.com>
Fri, 24 Mar 2023 20:13:33 +0000 (15:13 -0500)
committerSteve Sakoman <steve@sakoman.com>
Wed, 5 Apr 2023 16:24:00 +0000 (06:24 -1000)
commit303cc9ce3a9d7ca85542f12ebfda27eeb449e73b
tree939a82cbc4608b666112453a8f6b089f912e2bec
parente8bcd269f42f7c8e7a67dd1c28f76cca682efab0
filemap.py: enforce maximum of 4kb block size

The logic in this script validates that the length of data sections are
evenly divisible by the block size. On most systems the block size is
4KB and all is good. Some systems though, such as ppc64le, have a block
size larger then 4KB. For example on a POWER9 based ppc64le system, the
block size is 64KB.

This results in this script failing with errors like this when building
wic images:
|440, in _do_get_mapped_ranges
|     assert extent_len % self.block_size == 0
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| AssertionError

In this case the data section size was 268KB and the block size was
64KB, resulting in the above assert failure.

Resolves https://bugzilla.yoctoproject.org/show_bug.cgi?id=15075

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1e23b803af6991fc20e4a4e88a0ef0541399e722)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/lib/wic/filemap.py