4 ms·
The gist is (which doesn't hold universally true), when the CPU is powered up, it initializes its internal RAM, loads in a pre-boot ROM, executes it. pre-boot R
by ignoramous 4y ago
The gist is (which doesn't hold universally true), when the CPU is powered up, it initializes its internal RAM, loads in a pre-boot ROM, executes it. pre-boot ROM's job is to initialize whatever it has to, to bring in the initial bootloader which initializes RAM, finds a suitable bootloader program and loads it in. This program, also called second-stage bootloader, is an Operating System in its own right. It can understand filesystems, explore attached hardware, speak multiple network protocols, initialize devices as needed. The second-stage bootloader (there may also be a third-stage) usually then boots into a Kernel. The Linux Kernel invokes the init process and things proceed into the userspace from there.
At each of those stages, the bootloader images, the kernel image, the device trees, and the disk / filesystem are verified ("measured") for integrity eventually anchored on a "hardware root-of-trust".
If you're a visual learner:
How TI Beagleboard boots (33m): https://www.youtube.com/watch?v=DV5S_ZSdK0s https://www.youtube.com/watch?v=DV5S_ZSdK0s / https://ghostarchive.org/varchive/DV5S_ZSdK0s https://ghostarchive.org/varchive/DV5S_ZSdK0s
How ARM Cortex M boots (9m): https://www.youtube.com/watch?v=3brOzLJmeek https://www.youtube.com/watch?v=3brOzLJmeek / https://ghostarchive.org/varchive/3brOzLJmeek https://ghostarchive.org/varchive/3brOzLJmeek
Bootloader 101 (embedded devices; 38m): https://www.youtube.com/watch?v=UvFG76qM6co https://www.youtube.com/watch?v=UvFG76qM6co / https://ghostarchive.org/varchive/UvFG76qM6co https://ghostarchive.org/varchive/UvFG76qM6co
Measured Boot (39m): https://www.youtube.com/watch?v=EzSkU3Oecuw https://www.youtube.com/watch?v=EzSkU3Oecuw / https://ghostarchive.org/varchive/EzSkU3Oecuw https://ghostarchive.org/varchive/EzSkU3Oecuw
Coreboot (38m): https://www.youtube.com/watch?v=iffTJ1vPCSo https://www.youtube.com/watch?v=iffTJ1vPCSo / https://ghostarchive.org/varchive/iffTJ1vPCSo https://ghostarchive.org/varchive/iffTJ1vPCSo
U-Boot (1h 25m): https://www.youtube.com/watch?v=INWghYZH3hI https://www.youtube.com/watch?v=INWghYZH3hI
UEFI for U-Boot (38m): https://www.youtube.com/watch?v=VnsF3uRZzNk https://www.youtube.com/watch?v=VnsF3uRZzNk / https://ghostarchive.org/varchive/VnsF3uRZzNk https://ghostarchive.org/varchive/VnsF3uRZzNk
Device Trees (43m): https://www.youtube.com/watch?v=Nz6aBffv-Ek https://www.youtube.com/watch?v=Nz6aBffv-Ek / https://ghostarchive.org/varchive/Nz6aBffv-Ek https://ghostarchive.org/varchive/Nz6aBffv-Ek
ARM Trust Zone (46m): https://www.youtube.com/watch?v=q32BEMMxmfw https://www.youtube.com/watch?v=q32BEMMxmfw
- rramadass 4y agoVery Nice; Thank You for all the links ! PS: Your profile which seems to be a cheat-sheet of various HN handles categorized into their areas of expertise is very useful too :-)