##Some background## The most important thing you should know is that the RaspberryPi is a strange beast where the `ARM CPU` is the not main CPU - it's only a co-processor to the `VideoCore GPU`. When the RaspberryPi starts, a GPU blob is read from the SD card to the L2 cache and executed. This code then brings up all the important peripherals (RAM, clocks etc) and starts the `ARM CPU`. Then the 2nd stage bootloader or some operating system itself can be run on `ARM CPU`. GPU blob is not only a bootloader. It's actually an operating system (Video Core OS) by itself. Some important elements of the system are not directly accessible by ARM CPU and it has to communicate with `GPU` (using `mailbox` messaging system) to use them. There is [partial documentation][1] about this available. Now `Video Core OS` (`VCOS`) is extended from time to time by Broadcom employees to enable features needed by `Linux` kernel, `RISC OS` or sometimes even some hobby OSes. There is no good documentation about this however, you would have to dig in the `RaspberryPi forum`, `github` and possibly other places to find information about this. But it's there.. somewhere. And there are a few people who write their own bare metal code or even OSes on the RaspberryPi to help you out. And of course a lot of open source code - RasbperryPi's Linux kernel for example. VideoCore is proprietary, there is no official documentation and development tools. So unless you want to put a lot of effort, you can't rewrite `VCOS` with your own code. Another problem is that the `USB` stack by Synopsys is proprietary and again there is no documentation for it and it seems that even with documentation it's hard to implement it reliably. But again, the code is available (linux kernel, u-boot, [CSUD][6]). Using advanced graphics capabilities of `Video Core` may also be hard - there is some [open source code][5] for the graphics libraries, but it's only for the `ARM` side. That being said, it was possible to make the `RISC OS` port from the information available (it's not entirely clear to me if they were using only publicly accessible information, though), some people are rewriting (independently from Broadcom) the Linux kernel for mainline, there is a `FreeBSD` port, 'U-boot` and others. So it is definitively possible to write your own OS. It's just not as easy as it might possibly be. ## Your goals ## ### Number 1 ### As far as I know, there is no way that the SoC could start in another way than the one described. So first stage bootloader has to be on `SD card`. And it has to be a `GPU` binary, not an `ARM` binary which is another problem. And there is no on board flash in the RaspberryPi which is also a problem. ### Number 2 ### The main problem is that there is no on-board `flash` on RaspberryPi. You could add one and it could be activated in your bootloader (which would have to be the 2nd stage bootloader already). Writing a USB driver could be problematic, however. ### Number 3, 4, 5 ### This shouldn't be much of a problem. Most of the peripherals (at least those accessible to the `ARM`) are documented [here][2]. Existing bootloader makes this even easier since you get your SoC completely configured. You can look [here][3] and [here][4] for some code and documentation. ### Alternatives ### I don't know any other board as good as RaspberryPi so it's hard to recommend something but you may take a look at some mature projects like `Beagleboard`/`Beaglebone`/`Pandaboard` or you can follow the development of some new boards like the `Cubieboard`. It all depends on what exactly you want to accomplish. [1]: https://github.com/raspberrypi/firmware/wiki [2]: http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf [3]: https://github.com/dwelch67 [4]: http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/ [5]: https://github.com/raspberrypi/userland [6]: https://github.com/Chadderz121/csud