Skip to content

Commit

Permalink
genimage: fix the order of the kernel files in making bootcheckum
Browse files Browse the repository at this point in the history
Ostree bootchecksum is calculated from four files, they are standard
kernel image, rt kernel image, vmlinuz and initramfs file. Different
order makes different checksum value.

WRCP's INSVC patch does not touch kernel images or initramfs file
while it requires a fixed bootchecksum value. So fix the order as
standard kernel, rt kernel, vmlinuz and initramfs.

Here "kernels" is a list contains standard kernel and then rt kernel.
Remove line "kernels = set(kernels)" to avoid the randomization of
their order.

Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
  • Loading branch information
xzhang1 committed Dec 5, 2023
1 parent 13e5231 commit 3ddaf92
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion recipes-support/genimage/files/genimage/genimage.py
Expand Up @@ -862,7 +862,6 @@ def _do_rootfs_post(self, rootfs=None):
if self.data.get('multiple-kernels'):
for ks in self.data.get('multiple-kernels').split():
kernels.extend(glob.glob(ks, root_dir=os.path.join(rootfs.target_rootfs, "boot/")))
kernels = set(kernels)
os.environ['OSTREE_MULTIPLE_KERNELS'] = ' '.join(kernels) if kernels else ''
logger.debug("kernels %s", kernels)

Expand Down

0 comments on commit 3ddaf92

Please sign in to comment.