Writing an OS for the Raspberry Pi is harder work that it should be because of the Broadcom SoC. It's a closed, proprietary chip that does a lot of the heavy lifting (including the initial boot mechanism). My advice to you if you want to write an OS targeting a developer board is to use one of the many open hardware platforms rather than the Raspberry Pi specifically. The Raspberry Pi's are better for tinkering with stuff that runs atop of the OS rather than designing kernels.