Nintendo 3DS (nintendo-ctr)

From postmarketOS
Jump to navigation Jump to search
Nintendo 3DS
Nintendo 3DS
Nintendo 3DS
Manufacturer Nintendo
Name 3DS
Codename nintendo-ctr
Released 2011
Category testing
Original software 3DS OS
postmarketOS kernel 5.11-rc1
Hardware
Chipset Nintendo CPU CTR
CPU 2x 268 MHz ARM11, 134 MHz ARM9
GPU DMP PICA200
Display 400x240, 320x200 w/ touchscreen
Storage 2 GB
Memory 128 MB
Architecture armhf
Non-Android based device
Features
USB Networking
Unavailable
Flashing
Unavailable
Touchscreen
Works
Display
Works
WiFi
Broken
Xwayland
FDE
Mainline
Partial
Battery
Broken
3D Acceleration
Audio
Broken
Bluetooth
Unavailable
Camera
Broken
GPS
Unavailable
Mobile data
Unavailable
SMS
Unavailable
Calls
Unavailable
USB OTG
Unavailable
NFC
Sensors
Accelerometer
Works
Magnetometer
Ambient Light
Proximity
Hall Effect
Misc
Ir TX
TrustZone


Nintendo New 3DS
200px
Nintendo 3DS
Manufacturer Nintendo
Name New 3DS
Codename nintendo-ktr
Released 2014
Category testing
Original software 3DS OS
postmarketOS kernel 5.11-rc1
Hardware
Chipset Nintendo CPU LGR A
CPU 4x 804 MHz ARM11, 134 MHz ARM9
GPU DMP PICA200
Display 400x240, 320x200 w/ touchscreen
Storage 1 GB
Memory 256 MB
Architecture armhf
Non-Android based device
Features
USB Networking
Unavailable
Flashing
Unavailable
Touchscreen
Works
Display
Works
WiFi
Broken
Xwayland
FDE
Mainline
Partial
Battery
Broken
3D Acceleration
Audio
Broken
Bluetooth
Unavailable
Camera
Broken
GPS
Unavailable
Mobile data
Unavailable
SMS
Unavailable
Calls
Unavailable
USB OTG
Unavailable
NFC
Sensors
Accelerometer
Broken
Magnetometer
Ambient Light
Proximity
Hall Effect
Misc
Ir TX
TrustZone

The Nintendo 3DS is a handheld video game console released by Nintendo in 2011. A later revision, the New Nintendo 3DS, was released in 2014.

Contributors

Maintainer(s)

Users owning this device

  • AAT596 (Notes: Testing/Experimenting with Homebrew)
  • Bastindo (Notes: Original 3DS with stock firmware)
  • BlackEyedSquid (Notes: Original Nintendo 3DS with Luma3DS CFW)
  • Coatlessali
  • Earboxer (Notes: nintendo-ktr: New Nintendo 3DS XL)
  • Illen (Notes: Nintendo 3DS XL)
  • Knuxfanwin8 (Notes: New Nintendo 3DS XL)
  • Little-miss-synth (Notes: runs luma3ds, with 3dslinux as alt payload)
  • Schrmh (Notes: 3DS on FW 1.0.0E; 3DS xl and new 3DS. Also have a GW card & Cubic Ninja)
  • Tfuxu (Notes: Owns a original CTR version in Cosmo Black color)
  • Thejsa (Notes: New Nintendo 3DS (nintendo-ktr) x2)
  • UltrasonicMadness
  • Veast (Notes: Untested)
  • Zephyr1112 (Notes: Old 2DS, 16GB SDHC, latest EU firmware w/ Luma3DS)


Software used

This port makes use of the 3DS Linux fork, arm9linuxfw and firm_linux_loader maintained by members of the linux-3ds organization on GitHub.

Installation

Note Note: Before you can run Linux on the console, you will first need to install Luma3DS. To do so, follow the guide on 3ds.hacks.guide. Avoid video tutorials as they may be obsolete.

This will not overwrite your 3DS's internal memory. The kernel is loaded off the SD card by the firm_linux_loader (which can be triggered at startup from Luma3DS's firmware selection menu).

Note Note: This is not yet available in the main pmaports repository; see WIP pmaports fork with 3DS-related packages.

In pmbootstrap init, choose:

  • nintendo-ctr if you own an Old 3DS, Old 3DS XL or Old 2DS.
  • nintendo-ktr if you own a New 3DS, New 3DS XL or New 2DS XL

Then, choose one of the following installation methods:

Method 1 - repartitioning your existing SD card

Icon
Warning!
This procedure involves resizing partitions, which can cause data loss. Make sure you have a backup of your SD card's contents before doing this!
Note Note: it might be easier (and faster - resizing partitions can take a loooooong time) to remove all existing partitions, create the new partitions from scratch, then copy the files back to the partitions as explained in this method.

postmarketOS expects the SD card to have two partitions: a boot partition and a root partition. Since Linux and the main 3DS OS share the entire SD card, we need to repartition it to satisfy both of them.

Using your favorite repartitioning tool (explaining how to use them is out-of-scope for this guide - for starters, check out GParted, which is available in pretty much every Linux distro), modify the partitions on your SD card as such:

  • First partition - FAT32, label: pmOS_boot - this partition will function as the main 3DS SD card storage as well as the postmarketOS boot partition.
  • Second partition - ext4, label: pmOS_root - this is the root partition for postmarketOS.

Once you're done with the re-partitioning:

  • Run pmbootstrap install and pmbootstrap export.
  • Run dd bs=512 skip=499712 if=/tmp/postmarketOS-export/nintendo-ctr.img of=/tmp/3ds-rootfs to extract the rootfs from the device image (replace ctr with ktr if you're using a New Nintendo 3DS.) Note that this assumes you have the boot partition size set to the default value of 256MB; if that is not the case, you can run fdisk -l /tmp/postmarketOS-export/nintendo-ctr.img and replace the skip value with the start value of the second partition.
  • Finally, run sudo dd bs=512 if=/tmp/3ds-rootfs of=/dev/mmcblk0p2 (replace mmcblk0 with your SD card's block device).

Now, we need to add the files necessary for booting. Mount the pmOS_boot partition, as we will be adding files to it.

The following commands will prepare a folder named "linux3ds" in your home directory ($HOME), which will contain all the necessary files:

codename="ctr" # replace with ctr or ktr depending on your console 
mkdir ~/linux3ds
mkdir ~/linux3ds/linux
mkdir -p ~/linux3ds/luma/payloads
pmbootstrap export
cp /tmp/postmarketOS-export/vmlinuz ~/linux3ds/linux/zImage
cp /tmp/postmarketOS-export/initramfs ~/linux3ds/linux/initramfs.cpio.gz
cp ~/.local/var/pmbootstrap/chroot_rootfs_nintendo-*tr/boot/nintendo3ds_*tr.dtb ~/linux3ds/linux
cp ~/.local/var/pmbootstrap/chroot_rootfs_nintendo-*tr/lib/firmware/3ds/arm9linuxfw.bin ~/linux3ds/linux
cp ~/.local/var/pmbootstrap/chroot_rootfs_nintendo-*tr/lib/firmware/3ds/firm_linux_loader.firm ~/linux3ds/luma/payloads
cp /tmp/postmarketOS-export/initramfs-extra ~/linux3ds/initramfs-extra

Copy the contents of the linux3ds folder to the root of the pmOS_boot partition.

Method 2 - on a separate SD card

This method uses a separate SD card just for postmarketOS, and allows us to use pmbootstrap install to partition the SD card.

Replace /dev/mmcblk0 in the following commands with your SD card's block device name.

  • Run pmbootstrap install --sdcard=/dev/mmcblk0.
  • Once it's done, run pmbootstrap export
  • Copy the necessary Luma3DS boot files (boot.firm, etc.) and the files necessary to boot postmarketOS (see the commands in the previous method) to the pmOS_boot partition.

Booting

While booting your 3DS (on the Luma3DS splash screen, if enabled) hold the Start button. If you only have one payload installed (luma/payloads only has firm_linux_loader.firm in it), Linux will boot automatically. Otherwise, a menu will pop up allowing you to select a firmware. Choose firm_linux_loader from the list.

You'll first see garbage on the screen, and after a few seconds the kernel logs should appear.

See also