diff options
author | Frieder Paape <frieder@konvera.io> | 2023-06-05 09:00:33 +0000 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-06-30 04:07:59 -1000 |
commit | a25ee8d7007094548ba8fa9802e3b2099d9d090c (patch) | |
tree | e9d9d77f251d67b1a7c689abb0abb383821d865d /scripts/lib/wic/plugins/source/bootimg-efi.py | |
parent | 74d46587e477cf5385132eeff6f2bd36b39c4090 (diff) | |
download | poky-a25ee8d7007094548ba8fa9802e3b2099d9d090c.tar.gz |
image_types: Fix reproducible builds for initramfs and UKI img
I've encountered issues reproducing initramfs and UKI image builds,
which will be fixed with this patch.
1. initramfs
There's a symbolic link to /sbin/init, which is appended to the cpio archive after creation.
The links timestamp needs to be static and the cpio append command needs the '--reproducible' flag to produce deterministic outcomes.
2. Unified Kernel Image
'--preserve-dates' is required for a static 'Time/Date' entry.
I've added '--enable-deterministic-archives' although in my case this
didn't change anything.
(From OE-Core rev: 7bf9463665c46e331f40f9ca4f04733d14f9ab44)
Signed-off-by: Frieder Paape <frieder@konvera.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit fd027729bafb4e085ba0949e38e724f3a8cad102)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts/lib/wic/plugins/source/bootimg-efi.py')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index d6aeab2aad..8ebb2a9be8 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py | |||
@@ -351,6 +351,8 @@ class BootimgEFIPlugin(SourcePlugin): | |||
351 | 351 | ||
352 | # https://www.freedesktop.org/software/systemd/man/systemd-stub.html | 352 | # https://www.freedesktop.org/software/systemd/man/systemd-stub.html |
353 | objcopy_cmd = "%s-objcopy" % target_sys | 353 | objcopy_cmd = "%s-objcopy" % target_sys |
354 | objcopy_cmd += " --enable-deterministic-archives" | ||
355 | objcopy_cmd += " --preserve-dates" | ||
354 | objcopy_cmd += " --add-section .osrel=%s/usr/lib/os-release" % staging_dir_host | 356 | objcopy_cmd += " --add-section .osrel=%s/usr/lib/os-release" % staging_dir_host |
355 | objcopy_cmd += " --change-section-vma .osrel=0x20000" | 357 | objcopy_cmd += " --change-section-vma .osrel=0x20000" |
356 | objcopy_cmd += " --add-section .cmdline=%s" % cmdline.name | 358 | objcopy_cmd += " --add-section .cmdline=%s" % cmdline.name |