A custom OS kernel is easy. It's sometimes done as a project in a graduate or upper division CS course. The drivers are the hard part. Maybe a couple to few dozen man-years if you can find enough documentation on all the hardware and CPU configuration needed. Then the libraries and frameworks on top of that can take hundreds to thousands of man-years. Enjoy.
Usually done in C, with tiny bits of assembly for the stuff that's invisible to the C compiler (process state save/restore, cache and TLB/page table setup, & etc.)
Usually done in C, with tiny bits of assembly for the stuff that's invisible to the C compiler (process state save/restore, cache and TLB/page table setup, & etc.)