Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#2180787) Dynamically calculate UEFI sections offset #63

Merged
merged 3 commits into from
Jul 24, 2023

Commits on Jun 27, 2023

  1. 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 <[email protected]>
    
    (Cherry-picked commit: f32e95b)
    
    Resolves: #2180787
    keentux authored and pvalena committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    ea33207 View commit details
    Browse the repository at this point in the history
  2. fix(dracut.sh): handle imagebase for uefi

    * UEFI creation didn't handle the ImageBase data for the PE file
      generation. Create an UKI thanks a stub file with a non zero BaseImage
      logs some warning ans generate a bad file offset management. The efi
      becomes unloadable.
    * This commit parse the PE file header, get the data and apply the
      ImageBase on the objcopy command.
    
    Fixes dracutdevs#2284
    
    Signed-off-by: Valentin Lefebvre <[email protected]>
    
    (Cherry-picked commit: 6178a9d)
    
    Related: #2180787
    keentux authored and pvalena committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    50fa4a9 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2023

  1. fix(dracut.sh): use gawk for strtonum

    strtonum is a gawkism and is not available in all awks, e.g. mawk. Use gawk
    to avoid failure.
    
    Fixes: f32e95b
    Signed-off-by: Sam James <[email protected]>
    
    (Cherry-picked commit: 33a66ed)
    
    Related: #2180787
    thesamesam authored and pvalena committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    f3b3b62 View commit details
    Browse the repository at this point in the history