]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(dracut.sh): use dynamically uefi's sections offset
authorValentin Lefebvre <valentin.lefebvre@suse.com>
Mon, 13 Mar 2023 11:06:13 +0000 (12:06 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 20 Mar 2023 11:56:24 +0000 (11:56 +0000)
commitf32e95bcadbc5158843530407adc1e7b700561b1
tree9c61b73f15ce77b7b0989769f61c6f916f01dd4a
parente9b4774239989257999053033fc92cded7803896
fix(dracut.sh): use dynamically uefi's sections offset

* Uefi section are creating by `objcopy` with hardcoded sections
offset. This commit allow to have the correct offset between
each part of the efi file, needed to create an UKI. Offsets
are simply calculated so no sections overlap, as recommended
in  https://wiki.archlinux.org/title/Unified_kernel_image#Manually
Moreover, efi stub file's header is parsed to apply the correct
offsets according the section alignment factor.
* Remove EFI_SECTION_VMA_INITRD, no need anymore as initrd
section offset dynamically calculated

Fixes dracutdevs#2275

Signed-off-by: Valentin Lefebvre <valentin.lefebvre@suse.com>
dracut-functions.sh
dracut.sh