I came across this very interesting tutorial by James Molloy on how to roll your own Unix like clone, with nice, detailed, step by step instructions. It assumes your development environment is going to be a GNU/Linux environment.
It's aimed at developing a *nix like operating system on x86 architecture. All the way through setting up a development environment, boot loader, interacting with the screen, dealing with interrupts and the timer, user mode, etc.
This tutorial can be used as a guide for creating any operating system, or simply boot programs, for x86 and x86-like architecture, for example the RDC CPUs used on devices like the Bifferboard.