Hacker News new | past | comments | ask | show | jobs | submit login
Baking Pi - Operating Systems Development (cam.ac.uk)
237 points by udp on Sept 2, 2012 | hide | past | web | favorite | 24 comments

Alex Chadwick has done a fantastic job on this. He's just finished his first year of the undergraduate CS course, and has spent the summer interning for us at the computer lab working on this. It's fair to say that it's more a guide to bare-metal programming on the Raspberry Pi right now, but Alex is planning to add further material. I think a contribution many hobbyist developers will find useful is his minimal USB HID driver, which should hopefully be far easier to put in to your own minimal OS than the dwc_otg driver used in Linux (and probably a more concise source for learning what you need to know about the Raspberry Pi's USB controller).

VideoCore version anyone? :-)

Now this is EXACTLY what I was hoping to see!

I did a bit of ARM assembly in the late 80's and early 90's on Acorn kit and it taught me more than anything else.

Seems more like how to program a microcontroller/soc course rather then operating systems course ATM. Still good though.

I did simlar things in a electronics course for pic microcontrollers which I would hardly call a os course.

The Rasberry Pi is the perfect board for a new CS student as it is powerful enough to do almost anything a regular linux server would be normally used for (NAS, Print Server, Web Server) and cheap enough for a starving student to afford. Plus it keeps the students away from playing games as it is too slow to be fun.

Yes it costs only 8 pints for a massively powerful computing platform.

I remember paying 45 pints for a calculator at university (TI 85).

(pints of cheap lager that is).

Measuring costs of hardware in beer brings a whole new twist to "free as in beer"

An 83 is the first machine I programmed on and I think it's still a great tool to start with because of its portability. The Pi is nice because of projects like this article mentioned.

The sad bit is the ti calcs haven't gotten any cheaper. Monopoly rent, anyone?

And? Why should they. They have an eternal shelf life and it's not like their functionality becomes obsolete every two years.

For ref I paid 25GBP for an NSpire CAS - just don't buy new.

Because the cost of manufacture is something like 1% of the cost from 20 years ago? Because similar devices can and would be sold for a fraction of the price if students were allowed to use them?

I don't think it is 1% of the cost. That's an out of the air figure which makes no sense at all.

I used to be an EE and a reduction in manufacturing cost like that is never going to happen unless you're selling LED keyrings or something.

Probably a more realistic one is 80% of the cost and the profit margin has probably been destroyed by the uptake of computers in schools.

Also don't forget that even though they are simple devices, their SoC (z80) is binary compatible going back to 1996 (that's 16 years). It takes a lot of money to keep that compatibility and good supplier relations producing old silicon yet adding features.

Other manufacturers such as Casio don't open up their platform as much as TI and therefore can swap CPUs etc. If you look at Casio, each device is fundamentally different and incompatible. Some of them are SH3, some microcontroller, some dedicated silicon. Buy a Casio 9750 now and it won't run a program you wrote on a 7400 a few years ago.

TI decided to fix all this with the NSpire which uses Mentor Nucleus as the OS and gives people binary compatibility through other means i.e a higher bedrock abstraction.

The 83 is spot on for schools which is why they insist on it. It's just the right device for the job and is a sensible convention.

The NSpire emulates a TI83 to give you an idea how important this is to TI ( http://education.ti.com/images/product-family/nspire-touchpa... )

I love that he uses assembly to twiddle the bits in memory, but the title is quite misleading. I was expecting tutorials on using something like Buildroot, OpenEmbedded, or a similar embedded linux development environment.

This is great, and the first project for my Raspberry Pi I think.

I've been looking for a long-term use for my pi, and now I have it: experimental os dev!

This is awesome, thanks. I would love to see an equivalent using C so that one could learn to make a more portable OS for other ARM chips.

Realistically, you have to have some assembly in every operating system to do things like service interrupts and enter protected mode (in the case of x86).

However I agree that as/if they expand this tutorial, it would be useful to introduce some C or C++

Fantastic! Now if my Pi just gets here already...

This doesn't really have much to do with operating system development.

Really? How does a course about developing an operating system not have anything to do with operating system development?

Because the end product doesn't seem to be an operating system by any reasonable definition. The code is basically just a collection of I/O functions that can be called by other kernel-level code.

Not that that's not a useful starting point for low-level hacking, but it's really a stretch to call it an OS given that there's no hint of anything like memory management, task management, hardware abstraction, or any notion of user-level processes that are distinct from the OS itself. Fiddling with GPIOs and writing data to video RAM is great for instant gratification, but it's probably the least interesting part of even a toy operating system.

He's saying it's not a course about developing an operating system, and I agree. It's certainly useful in that it lays some of the necessary groundwork though.

This is fantastic! :)

Super cool project! Thanks for sharing!!!

Applications are open for YC Winter 2020

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