Skip to content

Commit

Permalink
bin/generate-zbm: add .linux section last
Browse files Browse the repository at this point in the history
systemd-boot's ukify script recommends adding the .linux section last so
that when it's decompressed, it doesn't overflow other sections.

https://github.com/systemd/systemd/blob/main/src/ukify/ukify.py#L774-L817
  • Loading branch information
zdykstra committed Oct 24, 2023
1 parent 36a0a66 commit 9424356
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/generate-zbm
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,11 @@ sub createUEFIBundle {
$uki_offset = addBundleSection( \@cmd, ".cmdline", $cmdline, $uki_offset, $uki_alignment );
}

$uki_offset = addBundleSection( \@cmd, ".linux", $kernel, $uki_offset, $uki_alignment );
$uki_offset = addBundleSection( \@cmd, ".initrd", $initramfs, $uki_offset, $uki_alignment );

# Add the kernel last, so that it can decompress without overflowing other sections
$uki_offset = addBundleSection( \@cmd, ".linux", $kernel, $uki_offset, $uki_alignment );

push( @cmd, ( $uefi_stub, $output_file ) );

my $command = join( ' ', @cmd );
Expand Down

0 comments on commit 9424356

Please sign in to comment.