linuxboot / linuxboot/book

Linux kernel entry

Open
#149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
300
Forks
54
PR merge metrics
No merged PRs in 30d

Description

head.S

for multiple architectures, there is arch/$ARCH/kernel/head.S, where the first instructions reside.

EFI stub

can be as simple as https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/riscv/kernel/head.S?id=cb7d2dd5612a77a2597c00fce770a52c921e2ea5

or designed elegantly to allow for pure DT + EFI coexistence, see arm64 where the EFI stub checks for the EFI system table, calls the method to retrieve the kernel cmdline, injects that information into the FDT and then continues with the kernel as usual. A boot loader can just skip the whole stub and continue with the regular kernel, so loading an EFI kernel works without having the EFI interfaces. Note that the kernel later checks for presence of EFI features, which are tracked by setting bits in the EFI stub. The stub itself is added via Kconfig CONFIG_EFI_STUB, as well as the interface calling, but that comes with a separate CONFIG_EFI (default).

TODO: code references

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the architecture-specific arch/$ARCH/kernel/head.S entry points, including the linked riscv head.S change, then compare the arm64 EFI stub behavior described in the issue. Add code references for the kernel entry, EFI stub, CONFIG_EFI_STUB, and CONFIG_EFI paths, with the documentation matching the referenced implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
documentation, operating-systems
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.