←back to thread

309 points LorenDB | 3 comments | | HN request time: 0.001s | source
Show context
Santosh83 ◴[] No.42637177[source]
Read somewhere that it is relatively easy to adapt NetBSD's drivers into a custom kernel... maybe Serenity folks can go that way? Device drivers are huge obstacle for any fledgling OS.
replies(6): >>42637487 #>>42638178 #>>42638309 #>>42639168 #>>42642231 #>>42665209 #
mysterydip ◴[] No.42637487[source]
> Device drivers are a huge obstacle for any fledgling OS.

I've wondered if new/hobby OSes would fare better by starting out targeting a popular single board computer like a raspberry pi? A mostly fixed set of hardware to make/get drivers for and test your system on.

replies(6): >>42637523 #>>42638258 #>>42639203 #>>42639284 #>>42639368 #>>42646433 #
junon ◴[] No.42639203[source]
That implies AArch64 support which many hobby OSes don't have, usually because the introductory osdev material is written largely for x86.

But yes, raspi is a good platform if you are targeting arm.

As I'm also designing an OS, my biggest piece of advice for anyone seriously considering it is to target two archs at once, in parallel. Then adding a third becomes much easier.

replies(2): >>42639325 #>>42649587 #
kelnos ◴[] No.42639325[source]
Raspberry Pi has a bizarre boot sequence and bringup process, much of it which is not open and not implemented in open source code. I think it's probably not a great platform for this sort of thing, despite it being decently well-documented.

(And even then, its USB controller, for example, has no publicly-available datasheet. If you want to write your own driver for it, you have to read the Linux driver source and adapt it for your needs.)

replies(2): >>42641524 #>>42643315 #
1. jazzyjackson ◴[] No.42641524{3}[source]
For anyone that hasn't fallen into this rabbit hole yet it's a good one: raspberry pi started out as a kind of digital billboard appliance, so they chose a GPU with efficient 1080p decoding and strapped a CPU to the die. On power up the (proprietary) GPU boots first and then brings up the CPU.

That's as far as I got before discovering the Armbian project could handle all that for me. Coincidentally that's also when I discovered QEMU because 512MB was no longer enough to pip install pycrypto once they switched to Rust and cargo. My pip install that worked fine with earlier versions suddenly started crashing due to running out of memory, so I got to use Armbians faculties for creating a disk image by building everything on the target architecture via QEMU. Pretty slick. This was for an Orange Pi.

replies(1): >>42645894 #
2. officeplant ◴[] No.42645894[source]
>GPU boots first and then brings up the CPU.

IS that the reason for the full screen of colors before you see the boot sequence? Never thought about that.

replies(1): >>42648911 #
3. jazzyjackson ◴[] No.42648911[source]
Yep.

The "color gamut" display, as you call it, is a GPU test pattern, created by start.elf (or start4.elf, or one of the other start*.elf files, depending on what is booting). That 3rd stage bootloader is run by the GPU which configures other hardware (like the ARM cores and RAM split).

https://forums.raspberrypi.com/viewtopic.php?t=336516