1. Identify the boot storage medium
2. Copy the first sector to RAM
3. Stash any useful information in registers, like the SATA port/device number/etc
4. Jump to the boot sector
How to boot like a normal-ass adult in 4 simple steps
"But where should I put my SoC's boot up code to initialize shit and read the boot device?"
In a ROM chip mapped to address 0 and unmapped when jumping to the boot sector, you dumb dumb
"But how do I identify the boot up device?"
Use a magic number for bootable devices, provide a UI for the user to select/configure the boot media from, hell, use a dip switch to choose between eMMC and microSD, like I care
@sir If you don't mind I am going to formalize this all into a 1-2 page specification.
@alexbuzzbee please do
@sir Okay, took a little longer than expected to get it up on the server. I ended up having to complicate the "stash useful information in registers" step somewhat because there is no universal fixed set of useful values or register names. I made an in-memory data structure for information like host controller addresses and memory maps and "which boot device." Also I gave the boot block a fixed length of 4K so you can fit enough code. Thoughts?
@alexbuzzbee can you post your draft in the form of an email to ~firstname.lastname@example.org, for easier reviewing?
@sir There are tables and stuff that really don't render well in plain text. I've tried my hardest to keep my HTML as simple as possible. Do you want me to send an HTML email or try to bludgeon it into plain?
@sir Okay there's a little ragged alignment in the tables but it's pretty much okay.
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.