Homebrew [Release] Linux for the 3DS

xerpi

Well-Known Member
OP
Member
Joined
Dec 25, 2011
Messages
208
Trophies
0
Age
25
Location
Barcelona
XP
1,038
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
208
Trophies
0
Age
25
Location
Barcelona
XP
1,038
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
5,957
Trophies
2
XP
6,484
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
208
Trophies
0
Age
25
Location
Barcelona
XP
1,038
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
23
Location
Venezuela-Zulia.
XP
831
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
345
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.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • El_Doot @ El_Doot:
    by 1
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    funnily enough when i was telling my openly femboy furry bf and my friend(we talk about femboys sometimes) they said "nope we don't wanna hear that that's disgusting"
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    why is cheeto dust of all things
    the subject that crosses the line
    Gift
  • RichardTheKing @ RichardTheKing:
    Wait, Switch Online now has Super Mario 64, right?
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    i really hate to say this but
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    i dont think it does
    Gift
  • RichardTheKing @ RichardTheKing:
    Huh, makes sense; they did sell that through the 3D All-Stars collection.
    Gift
  • RichardTheKing @ RichardTheKing:
    Which, last I heard was removed from the eShop...so they might as well offer it again, I guess...
    Gift
  • RichardTheKing @ RichardTheKing:
    Will they use the same Shindou-translated ROM, or the original English ROM?
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    googling it, it seems that mario 64 is on the service
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    in japan they use the shindou version apparently but in the states and elsewhere they use the original rom
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    oh boy oh boy oh boy i sure do love living in japan and being a mario fan, i just got the new expansion pack, i cant wait to do some bljs!
    +1
    Gift
  • RichardTheKing @ RichardTheKing:
    From what I've heard about the Expansion Pack, the emulator used has some noticeable input delay and/or lag...would BLJs even be possible?
    Gift
  • RichardTheKing @ RichardTheKing:
    Apparently Nintendo adapted the 3D All-Stars emulator, instead of their old Virtual Console emulator - or, if nothing else, copying what fans have done.
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    from what i can seem to gather there's some issues but nothing dramatic enough to severely impact what you're playing
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    honestly the whole expansion pack confuses me since i thought the nes/snes games were just a neat little bonus
    Gift
  • El_Doot @ El_Doot:
    wait julie your bf is a femboy holy shit im jealous
    +1
    Gift
  • AkiraKurusu @ AkiraKurusu:
    So many planes flying overhead, and they sound close...
    Gift
  • DJPlace @ DJPlace:
    do you need friends to play the games online for the switch exapsion pack i know snes and nes do.
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    @El_Doot well hey hot people do get more benefits in life
    Gift
  • J @ Jephter:
    Please I need help with this. I just homebrew my old 3ds console and downloaded a CIA file, but after surfing through for only 10 sec or less this appears. please can someone help me? Thank you in advance.
    Gift
  • Veho @ Veho:
    Start a new thread in the 3DS board, the chat box is not the best place to ask for such advice.
    Gift
  • Gift
  • RichardTheKing @ RichardTheKing:
    A week ago I got a payment request, through PayPal, from "[email protected]", who wanted US$64.
    Scam? Cancelled it anyway.
    Gift
  • RichardTheKing @ RichardTheKing:
    The note added to it simply said "Lucky Charms?", too.
    Gift
    RichardTheKing @ RichardTheKing: The note added to it simply said "Lucky Charms?", too.