summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source
diff options
context:
space:
mode:
authorFrieder Paape <frieder@konvera.io>2023-06-05 09:00:33 +0000
committerSteve Sakoman <steve@sakoman.com>2023-07-12 05:11:38 -1000
commitb954f15d660f6faff59960ebb660d8d8b7b57e64 (patch)
tree86df497484fb7c8840c3628862be348da83c101d /scripts/lib/wic/plugins/source
parent6646aadd71fdf473ff242abee385c0e5297d1513 (diff)
downloadpoky-b954f15d660f6faff59960ebb660d8d8b7b57e64.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: 0d8890f7c1fbea5036acefa3031dcd442b316725) 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')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py2
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 c28d3917c2..a2b9f4c893 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -330,6 +330,8 @@ class BootimgEFIPlugin(SourcePlugin):
330 330
331 # https://www.freedesktop.org/software/systemd/man/systemd-stub.html 331 # https://www.freedesktop.org/software/systemd/man/systemd-stub.html
332 objcopy_cmd = "%s-objcopy" % target_sys 332 objcopy_cmd = "%s-objcopy" % target_sys
333 objcopy_cmd += " --enable-deterministic-archives"
334 objcopy_cmd += " --preserve-dates"
333 objcopy_cmd += " --add-section .osrel=%s/usr/lib/os-release" % staging_dir_host 335 objcopy_cmd += " --add-section .osrel=%s/usr/lib/os-release" % staging_dir_host
334 objcopy_cmd += " --change-section-vma .osrel=0x20000" 336 objcopy_cmd += " --change-section-vma .osrel=0x20000"
335 objcopy_cmd += " --add-section .cmdline=%s" % cmdline.name 337 objcopy_cmd += " --add-section .cmdline=%s" % cmdline.name