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

sys-kernel/coreos-modules: Enable EFI_ZBOOT for arm64 #2507

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jepio
Copy link
Member

@jepio jepio commented Dec 9, 2024

Enable EFI_ZBOOT for arm64

Arm64 now supports booting a compressed kernel through EFI. This is hidden behind the EFI_ZBOOT Kconfig option. The EFI_ZBOOT is only enabled in the arm64 config because it is not available for x86. X86 relies on an architecture specific compression mechanism on EFI. The KERNEL_ZSTD Kconfig option applies to both arches so move it to commonconfig. The other change required is that the kernel image name changes.

In my local build it looks like the kernel size goes down from 59MB to 43MB.

How to use

Build an arm64 image and boot it.

Testing done

Build tested only.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

@jepio jepio requested review from ader1990 and a team December 9, 2024 11:14
Copy link
Contributor

@chewi chewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks straightforward. I'm happy if CI passes and the image changes look good. Have we got away with this before because the uncompressed arm64 kernel is just smaller than the amd64 one due to fewer drivers and such?

@jepio jepio changed the title sys-kernel/coreos-modules: Enable KERNEL_ZBOOT for arm64 sys-kernel/coreos-modules: Enable EFI_ZBOOT for arm64 Dec 9, 2024
jepio added 2 commits December 9, 2024 12:52
Arm64 now supports booting a compressed kernel through EFI. This is
hidden behind the EFI_ZBOOT Kconfig option. The EFI_ZBOOT is only
enabled in the arm64 config because it is not available for x86. X86
relies on an architecture specific compression mechanism on EFI. The
KERNEL_ZSTD Kconfig option applies to both arches so move it to
commonconfig. The other change required is that the kernel image name
changes.

In my local build it looks like the kernel size goes down from 59MB to
43MB.

Signed-off-by: Jeremi Piotrowski <[email protected]>
@jepio jepio force-pushed the jepio/compressed-arm64-kernel branch from 34d6219 to d824d15 Compare December 9, 2024 13:25
Copy link
Contributor

@ader1990 ader1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good!

@jepio jepio added the on-hold label Dec 9, 2024
@jepio
Copy link
Member Author

jepio commented Dec 9, 2024

Looks like grub 2.02 doesn't like the change:

�[0m�[30m�[40m�[2J�[01;01H�[0m�[37m�[40m�[02;30HGNU GRUB  version 2.02


�[04;02H/----------------------------------------------------------------------------\�[05;02H|�[05;79H|�[06;02H|�[06;79H|�[07;02H|�[07;79H|�[08;02H|�[08;79H|�[09;02H|�[09;79H|�[10;02H|�[10;79H|�[11;02H|�[11;79H|�[12;02H|�[12;79H|�[13;02H|�[13;79H|�[14;02H|�[14;79H|�[15;02H|�[15;79H|�[16;02H|�[16;79H|�[17;02H|�[17;79H|�[18;02H|�[18;79H|�[19;02H|�[19;79H|�[20;02H|�[20;79H|�[21;02H|�[21;79H|�[22;02H|�[22;79H|�[23;02H|�[23;79H|�[24;02H|�[24;79H|�[25;02H|�[25;79H|�[26;02H|�[26;79H|�[27;02H|�[27;79H|�[28;02H|�[28;79H|�[29;02H|�[29;79H|�[30;02H|�[30;79H|�[31;02H|�[31;79H|�[32;02H|�[32;79H|�[33;02H|�[33;79H|�[34;02H|�[34;79H|�[35;02H|�[35;79H|�[36;02H|�[36;79H|�[37;02H|�[37;79H|�[38;02H|�[38;79H|�[39;02H|�[39;79H|�[40;02H|�[40;79H|�[41;02H|�[41;79H|�[42;02H|�[42;79H|�[43;02H\----------------------------------------------------------------------------/�[44;02H�[45;02H     Use the ^ and v keys to select which entry is highlighted.          

      Press enter to boot the selected OS, `e' to edit the commands       

      before booting or `c' for a command-line.                           �[05;80H �[0m�[30m�[47m�[05;03H*Flatcar default                                                            �[0m�[37m�[40m�[05;78H�[06;03H Flatcar USR-A                                                              �[06;78H�[07;03H Flatcar USR-B                                                              �[07;78H�[08;03H                                                                            �[08;78H�[09;03H                                                                            �[09;78H�[10;03H                                                                            �[10;78H�[11;03H                                                                            �[11;78H�[12;03H                                                                            �[12;78H�[13;03H                                                                            �[13;78H�[14;03H                                                                            �[14;78H�[15;03H                                                                            �[15;78H�[16;03H                                                                            �[16;78H�[17;03H                                                                            �[17;78H�[18;03H                                                                            �[18;78H�[19;03H                                                                            �[19;78H�[20;03H                                                                            �[20;78H�[21;03H                                                                            �[21;78H�[22;03H                                                                            �[22;78H�[23;03H                                                                            �[23;78H�[24;03H                                                                            �[24;78H�[25;03H                                                                            �[25;78H�[26;03H                                                                            �[26;78H�[27;03H                                                                            �[27;78H�[28;03H                                                                            �[28;78H�[29;03H                                                                            �[29;78H�[30;03H                                                                            �[30;78H�[31;03H                                                                            �[31;78H�[32;03H                                                                            �[32;78H�[33;03H                                                                            �[33;78H�[34;03H                                                                            �[34;78H�[35;03H                                                                            �[35;78H�[36;03H                                                                            �[36;78H�[37;03H                                                                            �[37;78H�[38;03H                                                                            �[38;78H�[39;03H                                                                            �[39;78H�[40;03H                                                                            �[40;78H�[41;03H                                                                            �[41;78H�[42;03H                                                                            �[42;78H�[42;80H �[05;78H�[48;01H   The highlighted entry will be executed automatically in 1s.                 �[05;78H�[48;01H   The highlighted entry will be executed automatically in 0s.                 �[05;78H�[0m�[30m�[40m�[2J�[01;01H�[0m�[37m�[40m�[0m�[30m�[40m�[2J�[01;01H�[0m�[37m�[40m  Booting `Flatcar default'


error: invalid magic number.

This needs some investigation.

This is from these test cases:

17:10:57  ########### Some tests failed and will be re-run (5 / 5). ###########
17:10:57  Failed tests:
17:10:57  extra-test.[first_dual].cl.update.docker-btrfs-compat
17:10:57  extra-test.[first_dual].cl.update.oem
17:10:57  extra-test.[first_dual].cl.update.payload

Copy link

github-actions bot commented Dec 9, 2024

Build action triggered: https://github.com/flatcar/scripts/actions/runs/12241687577

@jepio
Copy link
Member Author

jepio commented Dec 9, 2024

Looks like this is what changed things: torvalds/linux@29636a5

So this is blocked until we come up with a solution.

@jepio
Copy link
Member Author

jepio commented Dec 9, 2024

This is the grub commit that dropped the magic number check (using RH fork because the canonical grub repo is not on github): rhboot/grub2@69edb31

This went in between 2.06 and 2.12.

@chewi
Copy link
Contributor

chewi commented Dec 9, 2024

Well, I wanted to chat to you about the upgrade path anyway. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants