I want to learn how to build an OS and thought that a Raspberry Pi would be perfect to experiment with. However, as I have no prior knowledge of building operating systems, I am looking for a guide or tutorial on how to build one. The best guide I've found so far is this guide but it is a few years old and I'm worried that not all of the steps will work if I purchase a brand new Raspberry Pi.
As you have chosen RPi for the same, the following book - ARM System Developer's Guide by Andrew N. Sloss, Dominic Symes, Chris Wright and John Rayfield - should be a good option.
They explain with code on how to implement a small and simple bootloader, OS for ARM.