Homebrew [Release] Linux for the 3DS

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,406
Trophies
2
Website
www.flashkarten.tk
XP
3,497
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,406
Trophies
2
Website
www.flashkarten.tk
XP
3,497
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,406
Trophies
2
Website
www.flashkarten.tk
XP
3,497
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,386
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,386
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,690
Trophies
1
Age
28
Location
Imola
XP
6,909
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
    AncientBoi @ AncientBoi: iH