Skip to content
Nick Desaulniers edited this page Apr 11, 2021 · 18 revisions

Table of Contents

Install dependencies

$ sudo apt install gcc-arm-linux-gnueabi binutils-arm-linux-gnu

(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/ClangBuiltLinux/boot-utils/raw/main/images/arm/rootfs.cpio.zst
$ zstd -d rootfs.cpio.zst
$ gzip rootfs.cpio
$ rm rootfs.cpio.zst

How to build (kernel)

$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j$(nproc) nintendo3ds_defconfig
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j$(nproc) nintendo3ds_ctr.dtb nintendo3ds_ktr.dtb zImage

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