Homebrew [Release] Linux for the 3DS

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,414
Trophies
2
Website
www.flashkarten.tk
XP
3,533
Country
Gambia, The
On the o3DS, n3DS, and n3DSXL, the SD card reader is on a separate PCB. Possible eMMC replacement?
As long as programs with more than 128/256MB are not run, the RAM situation should be fine. Did you know that Linux ran on the PS2 which the retail models had just 32MB of RAM?
Did you know that a DS Linux port exists? The retail models have just 4MB of RAM.
 

ParzivalWolfram

Well-Known Member
Member
Joined
Jun 28, 2017
Messages
294
Trophies
0
Age
54
XP
754
Country
United States
I would be careful using the SD card as swap. The Raspberry Pi is a great example of what can happen. It apparently smokes brand new (micro)SD cards within months.
Days, in my case. Hours, actually, is my record.

Did you know that a DS Linux port exists? The retail models have just 4MB of RAM.
Yes, but it was severely limited in what could be done and swap wasn't supported. Swap would greatly increase what can be done on the 3DS. Plus, that port only ran in DSi mode or on flashcarts that add RAM, so it was actually running on 16MB, not 4MB.
 

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,414
Trophies
2
Website
www.flashkarten.tk
XP
3,533
Country
Gambia, The
Days, in my case. Hours, actually, is my record.


Yes, but it was severely limited in what could be done and swap wasn't supported. Swap would greatly increase what can be done on the 3DS. Plus, that port only ran in DSi mode or on flashcarts that add RAM, so it was actually running on 16MB, not 4MB.
It actually works with just 4MB, but more is suggested.
 

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,414
Trophies
2
Website
www.flashkarten.tk
XP
3,533
Country
Gambia, The
All the devices it has a release for on the old page have RAM expansions (or only work in DSi mode)
"The DS only has 4MB of RAM which severely limits how much you can do with DSLinux. Thanks to the work of Amadeus and many others, the DLDI Build will now detect and enable the GBA RAM automatically on most Slot-2 cards that have built-in RAM. If you do not have a RAM extension you may experience crashes and "out of memory" errors when running most of the applications."
http://www.dslinux.org/wiki/RunningDSLinux.html
 
  • Like
Reactions: Itzumi

ParzivalWolfram

Well-Known Member
Member
Joined
Jun 28, 2017
Messages
294
Trophies
0
Age
54
XP
754
Country
United States
"The DS only has 4MB of RAM which severely limits how much you can do with DSLinux. Thanks to the work of Amadeus and many others, the DLDI Build will now detect and enable the GBA RAM automatically on most Slot-2 cards that have built-in RAM. If you do not have a RAM extension you may experience crashes and "out of memory" errors when running most of the applications."
http://www.dslinux.org/wiki/RunningDSLinux.html
Huh. Alright, I admit defeat, you win. However, Linux, I WILL NEVER LET YOU BEAT ME SO HELP ME LINUS
 
  • Like
Reactions: Manzini and Itzumi

Pickle_Rick

I'm a pickle Morty!
Member
Joined
Aug 28, 2017
Messages
694
Trophies
0
Age
27
Location
Garage
XP
1,469
Country
United States
If this actually works it would be cool to get a Dingux port. I'm pretty sure most of the devices that run Dingux are less powerful than the 3ds and they also don't have gpu support (they use the framebuffer driver). I think it would work really well. (GBA emulation on dingux would be really cool.)
 

Wolfvak

nyaa~
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
Silent rage, if you must know... trying to figure out how the hell the singular driver should be structured.
I've been working on it for a while, ported all of xerpi's tree to 4.20 (latest when I started) and got some stuff like SD read/write working, as well as other devices.

If you want you can take a look at my code (be warned, it's very rough and unfinished, but it works and is pretty stable)

https://github.com/Wolfvak/arm9linuxfw
 

ParzivalWolfram

Well-Known Member
Member
Joined
Jun 28, 2017
Messages
294
Trophies
0
Age
54
XP
754
Country
United States
I've been working on it for a while, ported all of xerpi's tree to 4.20 (latest when I started) and got some stuff like SD read/write working, as well as other devices.

If you want you can take a look at my code (be warned, it's very rough and unfinished, but it works and is pretty stable)

https://github.com/Wolfvak/arm9linuxfw
This is basically what I was trying to do. THANK FUCK you managed this, I was getting worried I couldn't do it xD

(Drivers are hard...)
 
  • Like
Reactions: Pickle_Rick

Wolfvak

nyaa~
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
(Drivers are hard...)

I found the biggest problem to be a lack of up to date sample drivers, the LDD3 is horribly out of date and most examples don't even compile.

Another big problem is choosing the right interface - using the block layer directly isn't as efficient as using the MMC cobtroller layer, but on the other hand passing each register to be written or read to the ARM9 would be unbearably slow.

If anyone wants to help out with the repo, feel free to open a PR
 

Pickle_Rick

I'm a pickle Morty!
Member
Joined
Aug 28, 2017
Messages
694
Trophies
0
Age
27
Location
Garage
XP
1,469
Country
United States
I've been working on it for a while, ported all of xerpi's tree to 4.20 (latest when I started) and got some stuff like SD read/write working, as well as other devices.

If you want you can take a look at my code (be warned, it's very rough and unfinished, but it works and is pretty stable)

https://github.com/Wolfvak/arm9linuxfw

currently implemented devices
all ARM11 specific devices (SMP, timers, distributed interrupt controller)
dumb framebuffer output
HID input (face buttons + LR)
I2C controller
SPI controller
touchscreen and circle pad
MCU as mfd
notification LED (only red for now)
backlight intensity control (only intensity, no on/off yet)
RTC
battery and AC charger status report
reboot and poweroff
PXI communications with ARM9
MMC controller (SD and NAND access)

Wow, this is very impressive. This is actually useable now! (Plus, it's on Linux 4.20! Blaze it.)
 

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,696
Trophies
1
Age
28
Location
Imola
XP
6,924
Country
Italy
As long as programs with more than 128/256MB are not run, the RAM situation should be fine. Did you know that Linux ran on the PS2 which the retail models had just 32MB of RAM?
The real problem is that programmers don't know the value of a megabyte - 32 MB for a (non general purpose) system designed in 1999 wasn't top end but definitely usable, while the official PS2 Linux (which depending on who you ask for, was a tax elusion scheme, a PR boosting stunt, or a gimmick) released 3-5 years later would feature software providing acceptable performance by then's standards

Whereas less than a decade ago, the early versions of Gnome 3 made one of the heaviest desktop environments with the least user-accessible customization!!

Luckily most Linux systems are can be modular enough (in theory and practice) to allow choosing more efficient components; but I would be lying if I said that Dillo, Lynx, or even Midori have compatibility comparable to the big name browsers*...

(* comparison cherry picked to rant at modern browsers operating systems explicitly designed for (usually) sandboxed, hard-to-control without extensions, arbitrary code execution from arbitrary sources you didn't choose)
 

ParzivalWolfram

Well-Known Member
Member
Joined
Jun 28, 2017
Messages
294
Trophies
0
Age
54
XP
754
Country
United States
I found the biggest problem to be a lack of up to date sample drivers, the LDD3 is horribly out of date and most examples don't even compile.

Another big problem is choosing the right interface - using the block layer directly isn't as efficient as using the MMC cobtroller layer, but on the other hand passing each register to be written or read to the ARM9 would be unbearably slow.

If anyone wants to help out with the repo, feel free to open a PR
So apparently devkitPro drank the coolaid and wants to force me to use pacman to download it. Can you send me a build of your arm9linuxfw?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Jayro @ Jayro:
    Eventhough the New 3DS XL is more powerful, I still feel like the DS Lite was a more polished system. It's a real shame that it never got an XL variant keeping the GBA slot. You'd have to go on AliExpress and buy an ML shell to give a DS phat the unofficial "DS Lite" treatment, and that's the best we'll ever get I'm afraid.
    +1
  • Jayro @ Jayro:
    The phat model had amazingly loud speakers tho.
    +1
  • SylverReZ @ SylverReZ:
    @Jayro, I don't see whats so special about the DS ML, its just a DS lite in a phat shell. At least the phat model had louder speakers, whereas the lite has a much better screen.
    +1
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
  • BakerMan @ BakerMan:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :sad:.. :tpi::rofl2: Or others :shy::blush::evil:
    +1
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ if you could find a v5 DS ML you would have the best of both worlds since the v5 units had the same backlight brightness levels as the DS Lite unlockable with flashme
  • The Real Jdbye @ The Real Jdbye:
    but that's a long shot
  • The Real Jdbye @ The Real Jdbye:
    i think only the red mario kart edition phat was v5
  • BigOnYa @ BigOnYa:
    A woman with no arms and no legs was sitting on a beach. A man comes along and the woman says, "I've never been hugged before." So the man feels bad and hugs her. She says "Well i've also never been kissed before." So he gives her a kiss on the cheek. She says "Well I've also never been fucked before." So the man picks her up, and throws her in the ocean and says "Now you're fucked."
    +1
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    anyways, we need to re-normalize physical media

    if i didn't want my games to be permanent, then i'd rent them
    +1
  • BigOnYa @ BigOnYa:
    Agreed, that why I try to buy all my games on disc, Xbox anyways. Switch games (which I pirate tbh) don't matter much, I stay offline 24/7 anyways.
  • AncientBoi @ AncientBoi:
    I don't pirate them, I Use Them :mellow:. Like I do @BigOnYa 's couch :tpi::evil::rofl2:
    +1
  • cearp @ cearp:
    @BakerMan - you can still "own" digital media, arguably easier and better than physical since you can make copies and backups, as much as you like.

    The issue is DRM
  • cearp @ cearp:
    You can buy drm free games / music / ebooks, and if you keep backups of your data (like documents and family photos etc), then you shouldn't lose the game. but with a disk, your toddler could put it in the toaster and there goes your $60

    :rofl2:
  • cearp @ cearp:
    still, I agree physical media is nice to have. just pointing out the issue is drm
    cearp @ cearp: still, I agree physical media is nice to have. just pointing out the issue is drm