Contents
- Introduction
- Getting a fresh build
- Notes on Extra RAM
- Directory Structure
- Extracting the build on Windows
- Extracting the build on Linux
- Notes regarding SD/CF-based storage devices
- Notes regarding devices supporting SRAM
- Booting DSLinux
- Notes for GBAMP users
- Notes for Supercard SD users
- How to use DSLinux in Ideas
- Where to go from here
Introduction
Running DSLinux is just like running any other homebrew on your DS. If you haven't run homebrew before, read RunningHomebrew.
Getting a fresh build
Kineox occasionally builds a new version and posts it on http://kineox.free.fr/DS/.
Fully automatically created nightly builds are possibly available here.
Make sure you download the build you need:
If you have a device that is supported by the DLDI Interface you want this version.
See here for a list of devices supported by DLDI and here for more information about patching with DLDI
See here for a incomplete list of hardware known to be compatible with DSLinux
Please remember to patch dslinux.nds with the appropriate DLDI file if your device doesn't support Auto-DLDI patching.
Do NOT patch with the software supplied with most cards which are for commerical roms only.
dslinuxm.nds has madplay and Nano-X in RAM for speed and should only be used with Slot-2 expansion RAM
If you are using a GBAMoviePlayer CF you want this version.
If you are using WirelessMultiboot you want this version.
If you are using a DSMEM you want this version.
If you have a GBA Flash Cart that is not supported by DLDI you can use this version.
Notes on Extra RAM
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.
Device |
Onboard RAM |
Supercard SD/CF/Lite (NOT Rumble) |
32MB |
M3 Perfect (NOT Pro) |
32MB |
M3 DS Real GBA Expansion Pack (NOT Rumble RAM pack) |
32MB |
G6 Lite |
32MB |
EZ-V 3-in-1 |
16MB |
Opera Expansion Pak |
8MB |
Slot-1 devices cannot provide extra RAM. You can however use a Slot-1 device to boot DSLinux and at the same time use a Slot-2 device to provide extra memory. It is technically possible to access media in both Slot-1 and Slot-2 but support is not currently implemented.
Directory Structure
The archives for builds that support permanent storage on CF or SD cards contain a file called "dslinux.nds" or "dslinux.ds.nds" and a directory called "linux". Both of these must be extracted to the root directory of the CF or SD card. The dslinux.nds file can be renamed if you wish. Don't rename the linux folder.
To make things more clear (hopefully), this is an (incomplete!) example of what the directory tree on your CF or SD card should look like after you've extracted the archive to it:
CF/SD card
|--dslinux.nds
|--dslinuxm.nds
|
|--linux/
|
|--etc/
| |--... <a few files>
|
|--home/
|
|--lib/
| |--... <a few files>
|
|...
.
.
.Note that if your archiving program (probably silently) refuses to extract empty directories, you will get problems trying to run DSLinux, because important directories (such as the home directory) may be missing. You should compare what got extracted to your CF or SD card with what is being listed as content of the archive!
Extracting the build on Windows
The archives can be extracted under Windows with most common archiver tools. Just try the one you are usually using and it will likely work. 7zip, WinRar, and PowerArchiver have been reported to work. Careful now: ZipGenius and Winzip apparently neglect empty directories (like linux/home) and mess up line endings in files which will result in an unbootable system because the startup scripts will fail to run. Also under windows make sure when you download a .tgz file windows does not default it to a .tar file otherwise it will not extract correctly and you will end up with one file instead of the directories and .nds file.
- *Important! Once you open the first .tgz file you must rename the file inside to .tar.gz if it does not have an extension. After that you can extract and get the directories + .nds files. **
Extract the archive directly to the drive that represents your CF or SD card (for example, "F:").
Extracting the build on Linux
Under Linux, mount your CF card. For example, let's say the mount point was /media/cf, and you downloaded the build for GBAMP. Then run this command to extract the archive:
tar -C /media/cf -zxvf dslinux-gbamp.tgz
Notes regarding SD/CF-based storage devices
If you wrote files to the card, don't forget to flush the write buffers before removing the card! You can use the "umount" command, the "poweroff" command or the "sync" command. To umount the CF/SD card on the DLDI build use
umount /media
To umount the SD on DSMEM, use
umount /sd
Notes regarding devices supporting SRAM
On GBA Flash Cart and M3 you can save to the SRAM on the cart. This is small (normally 64kb) and has to be formatted, so back up any game saves first! To use the SRAM, place a .sav file in the same folder as the DSLinux file. Run the following commands from within DSLinux:
eraseall /dev/mtd1 mount -t jffs2 /dev/rom1 /sram
You will also need to remember to umount /sram and save the sram to the SD card manually after each poweroff. You should use the command 'poweroff' to turn off DSLinux, NOT the power button. As soon as the DS goes off, switch it back on again.
There might be a bug on MD3/SD. On my M3/SD i can create the /sram file - but it's not saved into NDSSAVE/dslinux.ds.DAT. The file exists, a stored file into /sram survives a reboot - but not a launch of another .nds file.
Booting DSLinux
Once you have extracted and copied DSLinux to your media card you can boot Linux by running the dslinux.nds file just as you would run any other homebrew program.
Notes for GBAMP users
On GBAMP, older versions of DSOrganize can not start DSLinux, even if it can start other homebrew programs. Versions with MightyMax bootloader set in configuration should boot DSLinux OK.
Notes for Supercard SD users
On certain physical versions of the Supercard SD (non-rumble/lite), the standard scsd.dldi will not work. In this case you could try scsd_moon.dldi, which uses an alternative FAT driver and may work with your device. Note that this has only occurred once.
How to use DSLinux in Ideas
You can apparantly use the DLDI version of linux in recent versions of Ideas. Go to the property page and set it to use the r4 dldi and also uncheck the box to use the default arm7. Then patch dslinux.nds with the r4 DLDI patch. Ensure that the linux directory is at the same directory as the nds file and boot it up.
Where to go from here
See UsingDSLinux for how to go on from here.
