kernel: Fix a lot of build errors
This commit will fix a few build errors in the start. There are still more errors.