|Building a kernel image|
WSL works too
|Kernel source||Linux 4.19|
This page walks you through building a linux-wiiu kernel image from the source.
This page assumes you have the following:
- A GNU/Linux environment
- An internet connection
- Sudo access
- Basic knowledge of how to use GNU/Linux
Installing necessary dependencies
|This section assumes your package manager is |
First we'll install the dependencies by opening a terminal (Ctrl-Alt-T) and running the following command:
sudo apt install git gcc-10-powerpc-linux-gnu gcc-powerpc-linux-gnu make gcc flex binutils bison libssl-dev
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:
git clone https://gitlab.com/linux-wiiu/linux-wiiu.git --depth 1 -b rewrite-4.19
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
|In the next section, the |
First we'll generate the config files by running
make wiiu_slim_defconfig ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- CROSS32_COMPILE=powerpc-linux-gnu- -j2
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
wiiu_defconfig in place of
Afterwards we'll start the kernel compilation, this may take a while:
make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- CROSS32_COMPILE=powerpc-linux-gnu- -j2
Now, if everything went well, the kernel dtbImage.wiiu will be in
arch/powerpc/boot/dtbImage.wiiu . For modular kernels using
wiiu_slim_defconfig, get the modules out by doing something like the following:
mkdir modules make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- CROSS32_COMPILE=powerpc-linux-gnu- INSTALL_MOD_PATH=modules modules_install -j2
modules folder should now have modules ready to copy into your rootfs'