Homebrew [Release] Linux for the 3DS

pcs3rd

Well-Known Member
Newcomer
Joined
Jan 10, 2017
Messages
73
Trophies
0
Location
The Absolute freak'n MIDDLE OF NOWHERE.
Website
www.google.com
XP
78
Country
United States

TheLukeGuy

Member
Newcomer
Joined
Apr 17, 2017
Messages
10
Trophies
0
XP
53
Country
United States
I get a staticy screen when I run the payload. The payload is in the luma3ds payloads folder. Any idea on what's going on?
 

ShadowEO

Well-Known Member
Member
Joined
Mar 31, 2009
Messages
542
Trophies
0
Age
31
Location
Ohio, USA
XP
434
Country
United States
ok. but, i run linux deploy with full lxde armhf debian on about 756 bytes. how much ram does a 3ds have? and could you make it into a cia, where everything is booted after the firmware loads, possibly giving access to the sdcard. kinda like cia format file explorers. also, I need help getting this to run on o3ds. What should the sdcard's dir tree look like? and what is resource usage on x for a 3ds?

Wat? You run LXDE/Debian on 756 bytes? Impossible. Running LXDE or even XFCE4 on my tablet with Linux Deploy took about 786MBs of RAM, not 756 bytes. But even still, that's not enough to do much comfortably. Not to mention that for X to work, unless you are using a native framebuffer (Unlikely due to the state of mobile GPUs, unless you have a Tegra, PowerVR or Freedreno-supported GPU), you still have Android's overhead and the X Server above that (For argument's sake, we'll include the X server in that memory estimate above, but not Android [though technically we should, since in this case, Android is hosting the Linux environment in a container] despite the fact that the X server is running under Android and not the chroot)

But then you'll have apps like Firefox and Chrome which will allocate memory for their use, along with any background processes. One reason your Android chroot may be so small (not sure what you run in it so I can't entirely debunk you) is because you are ignoring background processes (because only certain services are needed, and init isn't used by default in a chroot) and because you aren't using the distribution's kernel.

wat? I mostly use my install for servers, openarena, doomsday, and a many few other thingsglx gears? wats that

Now if you're using linux deploy for servers, wait, no, none of those will fit in 756 bytes of RAM. Anyway, that's enough of that, now to actually answer your questions.

The 3DS has 1GB of RAM hence my above rant. The Linux kernel uses the ARM9 Kernel-mode to boot, so the firmware is unloaded for Linux to start (no SD access that way) and is actually answered in a previous topic here on these forums: https://gbatemp.net/threads/q-decrypt9-or-similar-as-cia.399418/ (Since both Linux and Decrypt9 are Brahma payloads, this is relevant)

I cannot speak for what the sdcard's tree should look like or what the resource usage is for X on the 3DS since I haven't actually compiled this project with X, only messed with weston/wayland (which is better anyway, you want X, build a copy with XWayland built in and use that as your X Server, it's still lighter than Xorg itself)

As for GLX Gears, it's an OpenGL test application that simply shows a small window with gears moving and spinning around. To answer the person asking if it would work: possibly, the fact that Wayland starts suggests some form of GLX support exists (even if it's software rasterizing), you wouldn't be able to run glxgears without XWayland though since GLXGears/Insert Your X11 Application Here doesn't speak Wayland.

pcs3rd: I don't mean this post to sound as inflammatory as it reads, my apologies if it comes off that way, I'm trying to be informative but I tend to be slightly abrasive while doing so.
 

pcs3rd

Well-Known Member
Newcomer
Joined
Jan 10, 2017
Messages
73
Trophies
0
Location
The Absolute freak'n MIDDLE OF NOWHERE.
Website
www.google.com
XP
78
Country
United States
Wat? You run LXDE/Debian on 756 bytes? Impossible. Running LXDE or even XFCE4 on my tablet with Linux Deploy took about 786MBs of RAM, not 756 bytes. But even still, that's not enough to do much comfortably. Not to mention that for X to work, unless you are using a native framebuffer (Unlikely due to the state of mobile GPUs, unless you have a Tegra, PowerVR or Freedreno-supported GPU), you still have Android's overhead and the X Server above that (For argument's sake, we'll include the X server in that memory estimate above, but not Android [though technically we should, since in this case, Android is hosting the Linux environment in a container] despite the fact that the X server is running under Android and not the chroot)

But then you'll have apps like Firefox and Chrome which will allocate memory for their use, along with any background processes. One reason your Android chroot may be so small (not sure what you run in it so I can't entirely debunk you) is because you are ignoring background processes (because only certain services are needed, and init isn't used by default in a chroot) and because you aren't using the distribution's kernel.



Now if you're using linux deploy for servers, wait, no, none of those will fit in 756 bytes of RAM. Anyway, that's enough of that, now to actually answer your questions.

The 3DS has 1GB of RAM hence my above rant. The Linux kernel uses the ARM9 Kernel-mode to boot, so the firmware is unloaded for Linux to start (no SD access that way) and is actually answered in a previous topic here on these forums: https://gbatemp.net/threads/q-decrypt9-or-similar-as-cia.399418/ (Since both Linux and Decrypt9 are Brahma payloads, this is relevant)

I cannot speak for what the sdcard's tree should look like or what the resource usage is for X on the 3DS since I haven't actually compiled this project with X, only messed with weston/wayland (which is better anyway, you want X, build a copy with XWayland built in and use that as your X Server, it's still lighter than Xorg itself)

As for GLX Gears, it's an OpenGL test application that simply shows a small window with gears moving and spinning around. To answer the person asking if it would work: possibly, the fact that Wayland starts suggests some form of GLX support exists (even if it's software rasterizing), you wouldn't be able to run glxgears without XWayland though since GLXGears/Insert Your X11 Application Here doesn't speak Wayland.

pcs3rd: I don't mean this post to sound as inflammatory as it reads, my apologies if it comes off that way, I'm trying to be informative but I tend to be slightly abrasive while doing so.
no, look at my signature, anything linux in my signature is usually having those. all except linux deploy... n a kindle fire 2012 tate.ive ran debian on about 512 meg. runs x. not good for much more than a ip cam or basic web server or music player. also, i do have init enabled

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

gtg fpr da night./
 
  • Like
Reactions: ShadowEO

ShadowEO

Well-Known Member
Member
Joined
Mar 31, 2009
Messages
542
Trophies
0
Age
31
Location
Ohio, USA
XP
434
Country
United States
no, look at my signature, anything linux in my signature is usually having those. all except linux deploy... n a kindle fire 2012 tate.ive ran debian on about 512 meg. runs x. not good for much more than a ip cam or basic web server or music player. also, i do have init enabled

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

gtg fpr da night./
Ok, Like I said, didn't mean for it to seem inflammatory, your number is a little more reasonable than the previous 765B so I'm going to go ahead and assume it was a typo and you meant megabytes instead of bytes :P And ya, exactly, not good for much more than simple applications, though with Wayland and XWayland, it may be possible to fit a little extra in there with the resources saved from not running Xorg as the main display server (I'm not sure of the relative savings between XWayland and Xorg, but I'm sure there has to be some at least.)

But ya, ARM9 execution is the reason there isn't a CIA. I'm not even sure it is possible to gain ARM9 execution from a CIA (perhaps someone more enlightened can shed some light on that, as I'm just coming back to the scene after a very long hiatus after the NDS scene, so I'm not entirely up to date, been trying to get myself up to speed with 3DBrew)
 
Last edited by ShadowEO,

pcs3rd

Well-Known Member
Newcomer
Joined
Jan 10, 2017
Messages
73
Trophies
0
Location
The Absolute freak'n MIDDLE OF NOWHERE.
Website
www.google.com
XP
78
Country
United States
Ok, Like I said, didn't mean for it to seem inflammatory, your number is a little more reasonable than the previous 765B so I'm going to go ahead and assume it was a typo and you meant megabytes instead of bytes :P And ya, exactly, not good for much more than simple applications, though with Wayland and XWayland, it may be possible to fit a little extra in there with the resources saved from not running Xorg as the main display server (I'm not sure of the relative savings between XWayland and Xorg, but I'm sure there has to be some at least.)
my mistake, good luck running anything past dos on bytes... Do you have it installed on a sdcard?
 
Last edited by pcs3rd,

ShadowEO

Well-Known Member
Member
Joined
Mar 31, 2009
Messages
542
Trophies
0
Age
31
Location
Ohio, USA
XP
434
Country
United States
my mistake, good luck running anything past dos on megs... Do you have it installed on a sdcard?
I currently do not have it installed. I played with it a while back (like about 4 months ago) but didn't actually compile an image myself, so it was rather useless for me since I don't have time or knowledge to mess around with the kernel/loader's internals. (Can compile a kernel, but I'm not great at kernel-mode code, so I don't have enough knowledge to assist with bugs to the project)
 

pcs3rd

Well-Known Member
Newcomer
Joined
Jan 10, 2017
Messages
73
Trophies
0
Location
The Absolute freak'n MIDDLE OF NOWHERE.
Website
www.google.com
XP
78
Country
United States
I currently do not have it installed. I played with it a while back (like about 4 months ago) but didn't actually compile an image myself, so it was rather useless for me since I don't have time or knowledge to mess around with the kernel/loader's internals.
well, currently working on getting a banana pro running. Ima go to bed soon
 
  • Like
Reactions: ShadowEO

Flame

Me > You
Global Moderator
Joined
Jul 15, 2008
Messages
6,885
Trophies
3
XP
15,952
I'm a total noob here when I ask this, but anyway, how would I go about running the Linux BIN file?

do you have cfw?


if so and if its luma do this

1) Copy the linux folder to the root of the SD card
2) Copy 'a9lh_linux_loader.bin' to your a9lh payloads folder which is "luma" folder in sd card and then payload
3) Run start a9lh_linux_loader.bin by pressing start before your 3ds starts and select a9lh_linux_loader


its in the 1st post really but mine is for luma specific
 

xerpi

Well-Known Member
OP
Member
Joined
Dec 25, 2011
Messages
212
Trophies
1
Age
27
Location
Barcelona
XP
1,283
Country

gnmmarechal

Well-Known Member
Member
GBAtemp Patron
Joined
Jul 13, 2014
Messages
6,001
Trophies
2
Age
24
Location
https://gs2012.xyz
Website
gs2012.xyz
XP
5,673
Country
Portugal
General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: Hope they made lots of spaget