Homebrew [Release] Linux for the 3DS

szymon170

Pr0FessiuNal HelPeR wiTh HaxXX
Member
Joined
Jan 2, 2016
Messages
381
Trophies
0
Age
29
Location
Where I live
XP
537
Country
Poland
What kind of recovery mode would GRUB provide that isn't already available from Decrypt9WIP and related tools?
By recovery mode I mean Linux recovery mode, for example when you boot Ubuntu or many other distos when you are in GRUB you can select Recovery Mode if anything is wrong with Ubuntu itself.
 

erikas

Well-Known Member
Member
Joined
Mar 28, 2015
Messages
374
Trophies
0
Age
29
XP
2,008
Country
So will writing to microsd card ever be supported? This may sound silly, but i'd like to use my 3ds to run linux scripts. Not for everyday programming, but when i have to demonstrate my programs in university. 3ds better to carry than a huge gaming laptop.
 
D

Deleted User

Guest
So will writing to microsd card ever be supported? This may sound silly, but i'd like to use my 3ds to run linux scripts. Not for everyday programming, but when i have to demonstrate my programs in university. 3ds better to carry than a huge gaming laptop.

For running linux scripts on an ARM architecture - might I suggest the PocketC.H.I.P.? It's an ARM Linux computer, and it's just a bit larger than a 3DS XL - I have one, and I use it frequently for any Linux-related tasks (installing Linux on a calculator and a Wii - you know, normal things).
Of course, if you don't want to buy one (they aren't the cheapest), and want to use your 3DS - full read/write support will probably be available eventually, but I don't think the 3DS would ever be able to run a script that would require external programs, seeing as most of them probably require more RAM and a faster CPU than the 3DS has. But hey, we almost got DS games running on this thing, didn't we? You never know!
 

ChaosKids

New Member
Newbie
Joined
Nov 19, 2016
Messages
4
Trophies
0
Age
41
XP
52
Country
Canada
booting off tftp to load linux.
# SUBARCH tells the usermode build what the underlying arch is. That is set
# first, and if a usermode build is happening, the "ARCH=um" on the command
# line overrides the setting of ARCH below. If a native build is happening,
# then ARCH is assigned, getting whatever value it gets normally, and
# SUBARCH is subsequently ignored.
# When performing cross compilation for other architectures ARCH shall be set
# to the target architecture. (See arch/* for the possibilities).
# ARCH can be set during invocation of make:

# Another way is to have ARCH set in the environment.
# The default ARCH is the host where make is executed.
# CROSS_COMPILE specify the prefix used for all executables used
# during compilation. Only gcc and related bin-utils executables
# are prefixed with $(CROSS_COMPILE).
# CROSS_COMPILE can be set on the command line
 
Last edited by ChaosKids,

paulguy

Member
Newcomer
Joined
Jul 1, 2011
Messages
21
Trophies
0
XP
147
Country
United States
I was able to get the New 3DS memory to work just fine in 3DS Linux by editing the dtb file.

You'll need the dtc (Device Tree Compiler) package.

Code:
fdtdump nintendo3ds_ctr.dtb > nintendo3ds_ctr.dts

Open the file and edit the line after:
Code:
device_type = "memory";
and change the second value from 0x08000000 to 0x10000000.

Code:
dtc -O dtb nintendo3ds_ctr.dts >nintendo3ds_ctr.dtb
(chat's capital letter 'O'.)
Overwrite the file in the linux directory in your SD card and boot up and you should have 247MB total memory. Tested by filling up tmpfs and it seems to work just fine.

In case anyone thinks you can just change the size and get more free RAM, that is not the case and this will not work on the Old 3DS. The New 3DS just has more RAM that extends past the RAM region within the Old 3DS, but it's still only 256MB.

At that point, this could be legitimately useful if this had a keyboard like the one from the original DSLinux and networking. :P

EDIT: I have a touch screen based virtual keyboard mostly working. I'll put in a pull request once I clear up a few more quirks I'm running in to with it.

Also, CTRL+ALT+SHIFT+SYSRQ+B seems to crash it. :P
 
Last edited by paulguy,

paulguy

Member
Newcomer
Joined
Jul 1, 2011
Messages
21
Trophies
0
XP
147
Country
United States
And you're on a new 3DS(XL), right? Not an old (2,3)DS(XL)? Otherwise I don't know what could be going wrong.

Also if you don't want to download as much of the repo, just do git clone --depth=1 <url>

That'll only download the latest revision and not the entire history of linux since ever. :P
 
Last edited by paulguy,

paulguy

Member
Newcomer
Joined
Jul 1, 2011
Messages
21
Trophies
0
XP
147
Country
United States
Not sure how to determine that.

Updated the virtual keyboard driver working back from what was there. Now it's two separate files and the buttons work again.
 

paulguy

Member
Newcomer
Joined
Jul 1, 2011
Messages
21
Trophies
0
XP
147
Country
United States
Oh I ran in to that problem too with buildroot. You just need to make menuconfig and change the thigns it complains about and then it'll work. I believe it'll also complain about GCC version.
 
  • Like
Reactions: jsa

paulguy

Member
Newcomer
Joined
Jul 1, 2011
Messages
21
Trophies
0
XP
147
Country
United States
I haven't experimented with moving the rootfs but I imagine it's possible since the existing rootfs is just an initrd. The filesystem it mounts would obviously have to be able to expose the proper filesystem attributes and whatnot so you couldn't just have the rootfs on the FAT32 on the disk itself, but I imagine you'd be able to create a rootfs image file and mount that.

The dpad is the arrows, and if there's enough demand/interest I might go about reorganizing the keyboard to make it a bit easier to type on. I did only test it on a new 3ds XL to be fair so yeah it's probably a bit cramped on a 3DS non-XL. In reality the way this should be done is that the bottom screen should be another framebuffer and the virtual keyboard should be in userland pushing events through uinput, but the bottom screen isn't exposed and I haven't messed with doing that because testing anything on the 3DS is a real pain and I really don't have enough knowledge to go on for any of that anyway.
 
  • Like
Reactions: Deleted User

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: yawn