

Baking Pi - Operating Systems Development - udp
http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/

======
asb
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).

~~~
hermanhermitage
VideoCore version anyone? :-)

------
eckyptang
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.

------
UK-AL
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.

------
tesmar2
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.

~~~
eckyptang
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).

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

~~~
eckyptang
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.

~~~
jgeralnik
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?

~~~
eckyptang
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...](http://education.ti.com/images/product-family/nspire-
touchpad-84-Keypad-Insertion.jpg) )

------
kcon
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.

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

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

------
onebot
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.

~~~
dillona
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++

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

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

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

~~~
teraflop
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.

------
darkof
This is fantastic! :)

------
nferraz
Super cool project! Thanks for sharing!!!

