Live data from Hacker News

The Linux Boot Process: From Power Button to Kernel

0xkato.xyz

91–96 of 96 posts

Re: The Linux Boot Process: From Power Button to Kernel

#91

UEFI is an interface implemented by firmware (literally, Unified Extensible Firmware Interface), it's not the firmware itself. Saying "it starts the machine" is a bit of a nomenclature faux pas. The firmware starts the machine, you talk to the firmware via UEFI. This post skips all the interesting things in the modern firmware dance. Not the least of which is when you call ExitBootServices() you're already in long mo…

Where do I read more about this?

https://www.youtube.com/playlist?list=PLUFkSN0XLZ-ltETI20mpX...

The ost2.fyi courses are all high quality

Re: The Linux Boot Process: From Power Button to Kernel

#92

Earlier quoted context omitted.

Very much overdue, i would say! Lately HN was turning into just adware for AI news. Does anybody have pointers to similar low-level details specific to iOS/Android systems? Given that most of us by now have a few of these lying around the house gathering dust, they can make a nice DUT to hack/study/learn a few technical things. I would be quite interested in knowing more about how the RF subsystem works and maybe rep…

Agreed, a very refreshing change. I cant reccomend anything apple or android based, but the PinePhone has some reasonable low-level documentation on itś SoC (Allwinner A64). And there are a great series of tutorials of how Apache Nuttx was ported to the PP. Here's one of the earlier ones: https://lupyuen.org/articles/uboot I've been working through them myself but still dont understand the boot process, and a long wa…

Nice, thank you.

My introduction to this subject was through Harald Welte's work on OpenMoko (i still have an old one lying around somewhere) but after the explosion of iPhones/Android phones have not kept apace. Here is Harald's old but still informative presentation Anatomy of smartphone hardware: Dissecting contemporary cellphone hardware - https://media.ccc.de/v/25c3-3008-en-anatomy_of_smartphone_ha...

Also you might find Roger Ye's old book Embedded Programming with Android: Bringing Up an Android System from Scratch pretty useful.

Re: The Linux Boot Process: From Power Button to Kernel

#93

Earlier quoted context omitted.

In a past life I held the title Firmware Engineer. The day-to-day development process did not differ from subsequent positions as a Software Engineer. Write-Compile-Test-Repeat. Then put it up for review so your colleagues can skewer it, or, on rare occasion, offer considerate and thorough feedback. Firmware development is indeed taught in higher education. But not under the name "Firmware". It will be an "embedded s…

How do you test stuff that's deployed to firmware? At least when it comes to normie software your Linux or Mac box resembles the server you deploy to. And you can close the distance quite a bit with Docker. But firmware? Totally different. FreeRTOS does have a POSIX backend, which helps some. Maybe you can run it under a hardware emulator. But it seems like lots of the stuff you want to test isn't really testable fro…

I'm not a firmware dev but the one's I've seen working usually have all sorts of fancy test kits, debug instrumentation, Software (chip scope?), etc. to debug with, not just relying on print debugging.

Not to say it isn't a valid way to debug, but there are definately better options available.

Re: The Linux Boot Process: From Power Button to Kernel

#94

Earlier quoted context omitted.

In a past life I held the title Firmware Engineer. The day-to-day development process did not differ from subsequent positions as a Software Engineer. Write-Compile-Test-Repeat. Then put it up for review so your colleagues can skewer it, or, on rare occasion, offer considerate and thorough feedback. Firmware development is indeed taught in higher education. But not under the name "Firmware". It will be an "embedded s…

How do you test stuff that's deployed to firmware? At least when it comes to normie software your Linux or Mac box resembles the server you deploy to. And you can close the distance quite a bit with Docker. But firmware? Totally different. FreeRTOS does have a POSIX backend, which helps some. Maybe you can run it under a hardware emulator. But it seems like lots of the stuff you want to test isn't really testable fro…

> A lot of firmware dev iteration seems to be build -> flash -> watch serial connection for debug prints.

Serial port? Maybe for the fancy folks. Us lunch-pail types would find an unused GPIO, blue-wire an LED, and blink out a code of your choosing.

Okay, I never actually had to blink an LED but it was in my bag of tricks. The real golden-ticket to debugging embedded devices was a development kit with JTAG. JTAG, coupled with expensive additional hardware and equally expensive software license, gave you a gdb-like interface for debug. Breakpoints, stack traces, all the good stuff you take for granted when working with Windows, Linux, or those ugly abominations we call web browsers.

Emulators were also a thing, especially if your product had a custom ASIC and you needed pre-silicon development. But I didn't use them a lot myself and it seemed like by the time you had your emulation environment setup, there was 1st gen silicon and a debug board sitting at your desk.

Re: The Linux Boot Process: From Power Button to Kernel

#95

Earlier quoted context omitted.

I dont know, i just don't like the tone. This is a complex subject where the target audience should probably already know what is an hexadecimal number or an interrupt and the explanation of a cpu register ought to be better than: "A register is a tiny slot inside the CPU. It holds a number the CPU is using right now." If the subject interest you, you deserve better.

Agreed. A lot of these articles leave me with more questions than answers. These blog posts really annoy me because I feel like with 20% more effort you could have something worth reading.

I wonder if anyone will actually write their own article/blog providing a much better explanation of the subject matter. Or at least provide links to those articles that are alternatives to this.

Re: The Linux Boot Process: From Power Button to Kernel

#96
post #79
post #60

Earlier quoted context omitted.

I'm currently trying to learn more about how the boot process works, specifically with UEFI. Yesterday I watched a video on how to program a UEFI bootloader so I was happy when I saw this article this morning. The article jumps over so many steps and leaves out so many mechanics that I had to stop reading, because it just opened more and more questions without closing any. For example, right at the beginning: > Right…

Would love to see the video you're referencing. Mind providing a link?

Its the series from Queso Fuego. Too lazy to get the link right now :)
Post reply on HN