Skip to content

Commit 9424356

Browse files
committed
bin/generate-zbm: add .linux section last
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
1 parent 36a0a66 commit 9424356

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/generate-zbm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,9 +841,11 @@ sub createUEFIBundle {
841841
$uki_offset = addBundleSection( \@cmd, ".cmdline", $cmdline, $uki_offset, $uki_alignment );
842842
}
843843

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

846+
# Add the kernel last, so that it can decompress without overflowing other sections
847+
$uki_offset = addBundleSection( \@cmd, ".linux", $kernel, $uki_offset, $uki_alignment );
848+
847849
push( @cmd, ( $uefi_stub, $output_file ) );
848850

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

0 commit comments

Comments
 (0)