For some good ideas on building your own OS, search the Foundries at www.sourceforge.net there are several OS projects in various stages of development.
There are several questions you need to answer in relation to building your own operating system.
How am I going to use this computer?
What kinds of software do I want to run?
What kind of hardware do I plan to use?
If you want to do assembly level code work, or build dedicated automated systems, your OS will not need to be very complex.
If you want to be able to run commercially available software, or use anything beyond basic graphics, you will either need to emulate a current OS, or create a very large amount of code.
The big trick for writing your own BIOS is to keep it clean and compact.
The tough part of writing your own BIOS will be collecting all of the hardware level addresses, commands and syntax for your motherboard.
You can step back 30 years or so and look at the old Altair computers. The set of commands that a user needed to enter manually one byte at a time were essentially a form of BIOS.
One place you can start if you want to learn about the intricacies of hardware level programming for PCs is Craig Hart's page.
http://members.datafast.net.au/dft0802/
Of course beyond the acquired knowledge you will gain, the big question is why do you want to do this? Do you have 5 or 10 years to dedicate to learning the details and writing the millions of lines of code you will need?
I'm not suggesting that this might not be an interesting project. Just that you are looking at doing something that presently takes months and years for teams of skilled individuals to create.
I would start out small. Pick a development project at Source Forge that interests you and see if you can join the team. Then, move forward from there.
Chas