Skip to content
Wolfvak edited this page Jul 1, 2021 · 18 revisions

Table of Contents

Install dependencies

$ sudo apt install gcc-arm-linux-gnueabi binutils-arm-linux-gnu flex bison libssl-dev

(TODO: there are more)

Fetch sources

$ git clone https://github.com/linux-3ds/linux.git --depth=1

Fetch initrd (optional)

This is optional if you know how to create your own rootfs.cpio.gz, otherwise you may use this simple one for now until we create a more full featured release. This is the userspace that we bundle into the kernel image as a "ram disk" for simplicity so we can focus on driver development during kernel bringup.

$ cd linux
$ wget https://github.com/linux-3ds/buildroot/releases/download/latest/rootfs.cpio.gz

How to build (kernel)

$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j$(nproc) nintendo3ds_defconfig all

Put on SD Card

Place arch/arm/boot/zImage, arch/arm/boot/dts/nintendo3ds_ctr.dtb, and arch/arm/boot/dts/nintendo3ds_ktr.dtb on the sdcard under linux/

example:

$ cp arch/arm/boot/zImage /media/nick/6332-3234/linux/zImage
$ cp arch/arm/boot/dts/nintendo3ds_ctr.dtb /media/nick/6332-3234/linux/.
$ cp arch/arm/boot/dts/nintendo3ds_ktr.dtb /media/nick/6332-3234/linux/.
Clone this wiki locally