Skip to content

ski-efi: A new binary for a minimal EFI binary #9

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

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

phcoder
Copy link
Contributor

@phcoder phcoder commented Apr 8, 2025

This is far from fully functional EFI but this stub allows running ia64 GRUB and in turn it was able to run modified sim kernel. So it is already somewhat useful. Based on ski-bootloader and EFI specification

@trofi
Copy link
Owner

trofi commented Apr 8, 2025

The change looks reasonable. ski-bootloader has this simple Makefile: https://github.com/trofi/ski/blob/master/ski-bootloader/Makefile . How do you build this efi stub? Does PR happed to miss it by accident?

@phcoder
Copy link
Contributor Author

phcoder commented Apr 8, 2025

Makefile was ignored due to .gitignore. Added it and repushed

@trofi trofi merged commit 8bcc95a into trofi:master Apr 8, 2025
@trofi
Copy link
Owner

trofi commented Apr 8, 2025

Ahh, I'll have a look at overeager .gitignore.

Pulled a is.

Thank you!

trofi added a commit that referenced this pull request Apr 9, 2025
Some of the subdirectories have manual Makefiles.

Was mentioned by phcoder in #9 (comment).
@johnny-mnemonic
Copy link
Contributor

@phcoder:
Sounds great! Unfortunately I did publish an overview article about Ski already some days ago. This new functionality could have been a highlight there. Well, maybe I make an update. :-)

# Current status

`ski-efi` still relies on `Ski`-specific "syscalls" and can boot
`GRUB` which in turn can load kernel up to `linux-4.19`.
Copy link
Contributor

Choose a reason for hiding this comment

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

@phcoder , @trofi : I forward-ported the HP-Sim platform support incrementally up to mainline early last year. But seems like this is not well known yet. So you can actually run all (current) stable kernels since 5.4 (e.g. check a run here) and mainline (logs) in Ski. Patches are available here: https://github.com/linux-ia64/ski/tree/hp-sim-for-linux

Notice: to support this in later kernels (since 6.1, see https://github.com/linux-ia64/ski/blob/hp-sim-for-linux/linux-6.1.y/linux-6.1.76-add-hp-sim-w-o-machvec-dirty.patch#L2313) I had to patch out a check for too big memory holes to support CONFIG_FLATMEM for HP-Sim. This is a little unclean, but I believe nothing different to how this worked in earlier kernel versions.

@johnny-mnemonic
Copy link
Contributor

@phcoder : A question: what needs to be modified on a HP-Sim kernel, so it works with GRUB loaded by ski-efi?

@@ -0,0 +1,40 @@
`ski-efi` is a minimal EFI for Ski to load EFI binaries
in PE32+ format.
Copy link
Contributor

Choose a reason for hiding this comment

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

So this could also work with ELILO then. Need to check that in time...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most likely elilo will choke on lack of disk drivers. You can always try. On GRUB I had to put kernel on embed ramdisk for it to work.

@phcoder
Copy link
Contributor Author

phcoder commented Apr 9, 2025

@phcoder : A question: what needs to be modified on a HP-Sim kernel, so it works with GRUB loaded by ski-efi?

Just a normal hp-Sim kernel. No modifications. Note: I only checked that attempt to boot it without command line resulted in an expected failure to mount root, feel free to test more.

@trofi
Copy link
Owner

trofi commented Apr 9, 2025

Attempted to fix Makefile .gitignore as:

Fixed PR presubmit build failures as (via dependabot plumbing: 2aad600):

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

Successfully merging this pull request may close these issues.

3 participants