Kernel/Building kernel

This page walks you through building a linux-wiiu kernel image from the source.

Prerequisites
This page assumes you have the following:
 * A GNU/Linux environment
 * An internet connection
 * Sudo access

Recommended:
 * Basic knowledge of how to use GNU/Linux

Installing necessary dependencies
First we'll install the dependencies by opening a terminal (Ctrl-Alt-T) and running the following command:

Hopefully it finds all the packages and you can move on to the next step.

Downloading kernel source
You could manually download the kernel source but we'll do it using git. We'll download the 4.19-rewrite branch like this:

And change to the downloaded source using:

After that completes, you can move on to the next step. This is also the time to apply any patches you may want or need to to the kernel source, make sure to change back to here afterwards.

Building the kernel
First we'll generate the config files by running

Using the slim defconfig creates a module-based kernel with a few more drivers and such that won't fit in a standalone binary, but requires you to be able to install the modules to your linux filesystem (Windows users may struggle with this, as Windows can't read ext4 drives). If you'd like an all-in-one kernel image without modules, use  in place of.

Afterwards we'll start the kernel compilation, this may take a while:

Now, if everything went well, the kernel dtbImage.wiiu will be in. For modular kernels using, get the modules out by doing something like the following:

The  folder should now have modules ready to copy into your rootfs'   folder.

All done!