Homebrew [Release] Linux for the 3DS

xerpi

Well-Known Member
OP
Member
Joined
Dec 25, 2011
Messages
212
Trophies
1
Age
28
Location
Barcelona
XP
1,331
Country
Note: the Linux for 3DS project has been moved to: https://github.com/linux-3ds

Compilation instructions: https://github.com/linux-3ds/linux/wiki


This is just a bare-minimum Linux environment with Busybox (which "simulates" some programs like ls, cat, top, etc) and Weston (the Wayland compositor) plus a few Weston clients demos.

DOWNLOAD:

https://github.com/xerpi/linux_3ds/releases

Installation:

  1. Install boot9strap or fastboot3DS
  2. Copy the linux folder to the root of the SD card (sd:/linux/)
  3. Copy firm_linux_loader.firm to the SD
    • Luma3DS: sd:/luma/payloads/
  4. Run the .firm file to boot Linux
    • Luma3DS: you can add a prefix to the file such as down_firm_linux_loader.firm to boot Linux if you power on while pressing down.
  5. Profit!
Linux login:
  • User: root
  • Pass: root
Other stuff:
  • You can start Weston by running:
    # /start-weston.sh
  • You can mount the SD card (read-only) to /media/sd by running:
    # /sdmount.sh
  • You can change the input mode (keyboard, mouse) by pressing SELECT
Sources:
Build instructions: https://gist.github.com/xerpi/3c720d345820691a2985502fcd80268f

Old downloads:

Other downloads:
 
Last edited by xerpi,

xerpi

Well-Known Member
OP
Member
Joined
Dec 25, 2011
Messages
212
Trophies
1
Age
28
Location
Barcelona
XP
1,331
Country
nice job!

I actually made a video using the last release you made in the "Linux for 3DS" thread, but I didn't do that much in it. is this build any different to it?

I should try out the client demos...
Yeah it's a bit different! I've changed the compression format and now it's muuuch faster, it will only take 3 seconds to boot :D
I've also improved the keyboard and the mouse virtual input methods.
And as you already know I've added Weston clients.

Nice video btw, thanks :)
 
Last edited by xerpi,
  • Like
Reactions: ihaveahax

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,872
Country
United States
Yeah it's a bit different! I've changed the compression format and now it's muuuch faster, it will only take 3 seconds to boot :D
I've also improved the keyboard and the mouse virtual input methods.
And as you already know I've added Weston clients.
I will get on trying it out right now

any way we could put our own files into the filesystem? I want to try doing that even if it means building my own version

--------------------- MERGED ---------------------------

I just noticed you edited some things into the post on how to build.
 

xerpi

Well-Known Member
OP
Member
Joined
Dec 25, 2011
Messages
212
Trophies
1
Age
28
Location
Barcelona
XP
1,331
Country
I will get on trying it out right now

any way we could put our own files into the filesystem? I want to try doing that even if it means building my own version
You'll need to follow the Building instructions until you have built buildroot.
When you have the buildroot/output/images/rootfs.cpio.gz file generated, you can add your files to buildroot/output/target/ and then run make again, buildroot will regenerate the rootfs.cpio.gz with your files inside.
 
  • Like
Reactions: ihaveahax

AtlasFontaine

Well-Known Member
Member
Joined
Jul 18, 2015
Messages
1,095
Trophies
0
Age
26
Location
Venezuela-Zulia.
XP
865
Country
Venezuela
As you may know from this thread: https://gbatemp.net/threads/linux-for-3ds.388658 I've managed to get Linux booting on the Nintendo 3DS.

Since I'm using Brahma2, it will only work on FW less or equal than 9.2.

Currently the environment is very simple, you have Busybox (which "simulates" some programs like ls, cat, top, etc) and Weston (the Wayland compositor) plus a few Weston clients demos (don't expect me to try to run the X server).

Downloads:
Readme:
Code:
Linux 3DS Loader by xerpi

Installation:
1) Copy the zImage and the nintendo3ds_ctr.dtb to the root of the SD card
2) Copy the 3ds folder to the root of the SD card
3) Run 3DS Linux Loader.3dsx with a Homebrew Launcher
    User: root
    Pass: root

Linux things:
* You can start Weston by running:
    # /start-weston.sh
* You can change the input mode (keybord, mouse) by pressing SELECT


Sources:
* Linux: https://github.com/xerpi/linux
* Buildroot: https://github.com/buildroot/buildroot
* Linux 3DS Loader: https://github.com/xerpi/3DS-Linux-Loader

Note: Currently it doesn't support the SD card, Wi-Fi, the touchscreen, etc because only the ARM9 CPU has access to them, and Linux runs on the ARM11 CPU.
I will have to add a custom ARM9 "kernel" that communicates with the ARM11 CPU.
Don't expect me to have it coded very soon.

How to compile it yourself
  • Step 1: Compiling or Downloading the toolchain
    • Step 1.a: Downloading the toolchain if you have Linux x86-64
      • Download the Precompiled ARM toolchain
      • Uncompress it to /opt/x-tools/arm-unknown-linux-gnueabihf
    • Step 1.b: Compiling the ARM toolchain
      • Git clone https://github.com/crosstool-ng/crosstool-ng.git
      • Run: autoconf && ./configure --enable-local && make install
      • Run ./ct-ng ct-ng menuconfig
        • Go to Target options
          • Target Architecture -> Select arm
          • Floating point -> Select hardware (FPU)
          • Emit assembly for CPU -> Write mpcore
          • Exit -> Exit -> Save? Yes
      • Run ./ct-ng build
  • Step 3: Build Linux
    • Git clone https://github.com/xerpi/linux.git
    • Copy buildroot/output/images/rootfs.cpio.gz to the linux folder
    • Run sh make_3ds.sh
      • (you can edit the script and change -j3 to the value you want to speedup the compilation)
  • Step 4: Copy Linux to the SD
    • Copy linux/arch/arm/boot/zImage to the root of your SD card
    • Copy linux/arch/arm/boot/dts/nintendo3ds_ctr.dtb to the root of your SD card
  • Step 5: Build and copy the 3DS Linux Loader to the SD
Screenshots:

4xXNaQql.jpg

Will you fix the screen rotation? or is that supposed to look like that? GJ Tho.
 

Rosselman

Spooky Skeleton
Member
Joined
Oct 29, 2015
Messages
463
Trophies
0
Location
Santiago
XP
376
Country
Chile
You have Wayland running on a 3DS? That's impressive, even if it's only a novelty for now.

This project is very good i dont know why linux was never come to the psp

Typing console commands with the PSP controls seems like a torture. Besides, it was weak, and the MIPS architecture doesn't make the porting easier, unlike ARM.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, as Snoop Dogg said: "smoke weed everyday"
    +1
  • Xdqwerty @ Xdqwerty:
    Wait it was nate who said it
    +1
  • BigOnYa @ BigOnYa:
    I only did shrooms a handful of times, and it was always while out camping/ fishing. And always had lots of beer to calm the effect if it got too intense.
    +1
  • BigOnYa @ BigOnYa:
    Booze, Beers n buds is all I do anymore, too old for that other shit, and scared cause nowadays you never know what's in it, like fentynal
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, not interested in alcohol
    +1
  • Xdqwerty @ Xdqwerty:
    Only in drugs
  • Xdqwerty @ Xdqwerty:
    And vaping
  • Psionic Roshambo @ Psionic Roshambo:
    Damn TVs are dirt cheap these days lol
    +1
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Shouldn't you not be allowed to smoke at a young age?
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, probably doing it when i get older ofc
    +1
  • SylverReZ @ SylverReZ:
    Ah okay, that's totally up to you.
    +1
  • BigOnYa @ BigOnYa:
    Yea psi they are, I just recently got a 50" 4k Vizio for spare bedroom $249 at Wallys.
  • Psionic Roshambo @ Psionic Roshambo:
    Was looking at one on Amazon about that price then noticed the giant ones are not much more these days
  • Psionic Roshambo @ Psionic Roshambo:
    What's odd to me is that the 65 inch one is 20 bucks more than the 70 inch one lol
  • BigOnYa @ BigOnYa:
    Just like ken always tells you at night, bigger is better.
    +2
  • Xdqwerty @ Xdqwerty:
    I don't know why I feel "bad" when watching videos of people raging at video games
  • Xdqwerty @ Xdqwerty:
    Specially children
  • K3Nv2 @ K3Nv2:
    Would you like one dosage of Lizzo to help you feel better about yourself?
  • BigOnYa @ BigOnYa:
    120hz TVs are still kinda expensive tho, but they are nice for gaming on, Series X can output true 4k 120hz.
    +1
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, i don't get it
  • K3Nv2 @ K3Nv2:
    Mister I'm going to randomly say someone's name over here then ignore the reply when they say something
    +1
  • The Real Jdbye @ The Real Jdbye:
    @Xdqwerty PTSD flashbacks?
    +1
  • K3Nv2 @ K3Nv2:
    Youtubers acting like cutscenes are magic piss me off we get it it took you longer than we had to watch
    K3Nv2 @ K3Nv2: Youtubers acting like cutscenes are magic piss me off we get it it took you longer than we had...