]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Mar 2023 14:24:57 +0000 (15:24 +0100)
commit1e23b803af6991fc20e4a4e88a0ef0541399e722
tree57f46e1a4b0abc602aa60c71f33408acfd11ec21
parent917b5da673cfe2271cf8854529b7f1ea7172a737
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>
scripts/lib/wic/filemap.py