Hacker News new | past | comments | ask | show | jobs | submit login

I don't have the Raspberry Pi, mainly because, since I develop embedded software for a living, I have an endless supply of development boards I can hack on at work and am free to take home (during those evenings when I am not so fucking tired of flipping bits that I don't even want to SEE C code!), but:

* A platform with less legacy crap than x86 is wonderful for learning about OS development. I don't know how the Pi fares for this, with Broadcom's chip and all, but if I had the free time to hack an OS in my spare time, not dealing with all the thirty year-old cruft nor shedding a gazillion EUR on a PowerPC system would be ideal.

* There's a legitimate audience of visual artists, musicians or just tinkerers who, as outrageous as might sound to us, long-bearded bit twiddlers, find learning anything other than Python either hopelessly complicated or just not refreshing enough. Aye, their needs would be better served by a 5-dollar MCU, but when an extra twenty dollars buying you the ability to write the code on the same computer that runs it, it's hard to resist. I find myself breaking the sacred oath of not using even one bit more than I need, too, because it's Saturday and my cat wants some attention too and I derive far more pleasure from seeing the jukebox playing music than from knowing the half-done file loader module that will eventually be part of a jukebox eighteen Saturdays from now on is so optimized that even an optimizing compiler would slash its veins in envy.

* The "cheap webserver" part is generally useful when you actually want one to interface something with the outside world over the Interwebs. I find the idea of using HTTP for much of this rather... repugnant, but there are people to whom it isn't, and a VPS isn't of much use if the requirement is to toggle this relay in response to that HTTP request.




> A platform with less legacy crap than x86 is wonderful for learning about OS development. I don't know how the Pi fares for this, with Broadcom's chip and all, but if I had the free time to hack an OS in my spare time, not dealing with all the thirty year-old cruft nor shedding a gazillion EUR on a PowerPC system would be ideal.

Actually I'd say the x86/PC is probably one of the best-documented and most stable platforms out there to learn on at the moment, precisely because it has been around for so long. Largely due to Broadcom policy the Pi is notoriously closed and proprietary at the hardware level, and unless there is somehow a massive amount of reverse-engineering like what happened with early home computers (which were better documented so the process started more easily), or a datasheet leak, the situation is unlikely to change. Any of the other open ARM devboards in the same price range would also be good candidates for OS development, but not the Pi.


> Actually I'd say the x86/PC is probably one of the best-documented and most stable platforms out there to learn on at the moment, precisely because it has been around for so long.

Unfortunately, that also means there's a lot of inconsistency, conflicting advice and outdated code that beginners take for granted. It's quite annoying.


This is something I'm very interested in, and nearly bought a Pi today; I want a board that I can learn ARM assembly and C on to build a toy OS. I built half of a tiny kernel on X86 (woo real-mode!) nearly a decade ago, so I know a tiny bit about it all, but I'd assumed the Pi was a great target: well priced, tonnes of them out there so hopefully well documented, etc.

What would you suggest instead? I'm considering just firing up QEMU and it's ARM baseboard target then dealing with porting to real hardware later, but there's something exciting about seeing a real circuit firing up your kernel that makes me smile.


Basically what userbinator said.

I had to deal with them before, so if you can, stay away from cheap Chinese boards or hackable routers. When you're just learning, it's not worth it, the dollars you save will be more than made up in working around subtle bugs and trying to figure out what the poorly-worded, incomplete documentation is trying to convey.

I also warmly suggest not to bother with anything that says Atheros or Broadcom on the case. Their documentation is hopelessly tucked away behind a gazillion NDAs you have to sign, and working based on leaked material isn't fun. As for their SDKs, if you could get me started (but you can't because I signed that gazillion bazillion NDAs and I don't wanna go to jail), I could talk for days.

Sadly, I haven't worked with it either, but the Beaglebone Black looks like a good option and there's an actual community around it.


I'll definitely pick a up a Black then, as I do love TI chipsets and have had good experiences with their documentation. Such a shame they left the mobile market.

I'm setting up QEMU to have a crack at that while I wait for it to arrive. Thanks for the advice! I wish I could get you started, damn NDAs, I reckon you'll have a few stories to tell


Do you, by any chance, know of a resource that documents the process of actually getting your toy OS (which I assume was cross-compiled) to run on another board such as the BBB or the RPi?


Sorry for the late reply, I just saw your message. I don't have a toy OS (not enough spare time), but I did work on one as part of my job.

I don't know of any documents, but the way you'd generally want to do it is wrap hardware- and board-specific parts of your code in a hardware-agnostic interface which is what you use to write higher-level code in the system. That way, getting the OS to run on another CPU or board is all about writing the relevant callbacks. You can get the general idea from Linux's mach-* and plat-* files. This isn't really OS-specific; I'm pointing at Linux because it will probably be easiest to get documentation about it, though my personal preference is elsewhere.


If you're looking for something in the Pi price range, a Beaglebone Black seems about right and the TI SoC it uses has tons of publicly available, detailed documentation. On the other hand, if you want more features/periperals/cores, and don't mind not-so-thorough documentation, one of the boards based on Chinese SoCs could be more fun...

Here's a huge list of others: http://socialcompare.com/en/comparison/low-cost-arm-boards


I think the current version of qemu can more closely emulate a Pi, rather than just a generic ARM processor.

There was also a small Pi emulator posted as part of the StarFox project on HN a while back.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: