If you talk of "primary PCs" (OS X) it's as open as proprietary gets - more than say Windows - such as the kernel is open source.
For OS X 10.7.2, you can grab the source at http://opensource.apple.com/source/xnu/xnu-1699.24.8/.
The "README" at http://opensource.apple.com/source/xnu/xnu-1699.24.8/README has instructions on building and installing the kernel. Admittedly, while I have never actually done this, I've seen lots of instructions floating around for doing this "correctly".