setup_earlycon(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

setup_earlycon β€” match and register earlycon console, bestie. This is the setup_earlycon(9) page from the Kernel API Manual, and we are gonna make it make sense πŸ’…

✨ SYNOPSIS ✨

int setup_earlycon (char *buf );

πŸŽ€ ARGUMENTS πŸŽ€

  • buf β€” the earlycon param string. That's the little string doing all the matchmaking, no cap.

πŸ’… DESCRIPTION πŸ’…

So this function registers the earlycon console that matches the earlycon specified in the param string buf. The acceptable param strings are totally giving these forms:

<name>,io|mmio|mmio32|mmio32be,<addr>,<options>
<name>,0x<addr>,<options>
<name>,<options>
<name>

Only for the third form β€” yep, the <name>,<options> one β€” does the earlycon setup method receive the <options> string in the 'options' parameter. All the other forms set that parameter to NULL. That's the rule, bestie, don't forget it 🫢

It returns 0 if an attempt to register the earlycon was made; otherwise it gives you a negative error code. So 0 is literally "an attempt was made" β€” that's the whole return vibe 😌

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/tty/serial/earlycon.c β€” go read it, it's the main character πŸ”₯

mwah πŸ’‹ this page is sourced from ./drivers/tty/serial, dated October 2026, and it's the setup_earlycon(9) entry in the Kernel API Manual. bye bestie, slay your earlycon setup 🌈✨

πŸ“¦ where this page comes from