DSLinux
Encyclopedia
DSLinux is a port of the Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 operating system to the Nintendo DS
Nintendo DS
The is a portable game console produced by Nintendo, first released on November 21, 2004. A distinctive feature of the system is the presence of two separate LCD screens, the lower of which is a touchscreen, encompassed within a clamshell design, similar to the Game Boy Advance SP...

. DSLinux was maintained until sometime in 2010.

Software

DSLinux runs a modified μClinux kernel. It is based on uCLinux 2.6.14 (Linux-2.6.14-hsc0). It only runs in textmode and nano-x which is displayed using a custom framebuffer console driver. A keyboard is displayed on the touchscreen of the Nintendo DS to allow user input.

DSLinux is compiled using a GCC
GNU Compiler Collection
The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain...

-based cross-compilation toolchain for ARM
ARM architecture
ARM is a 32-bit reduced instruction set computer instruction set architecture developed by ARM Holdings. It was named the Advanced RISC Machine, and before that, the Acorn RISC Machine. The ARM architecture is the most widely used 32-bit ISA in numbers produced...

 processors.

ncurses
Ncurses
ncurses is a programming library that provides an API which allows the programmer to write text user interfaces in a terminal-independent manner. It is a toolkit for developing "GUI-like" application software that runs under a terminal emulator...

, libpcap, SDL
Simple DirectMedia Layer
Simple DirectMedia Layer is a cross-platform, free and open source multimedia library written in C that presents a simple interface to various platforms' graphics, sound, and input devices....

 along with many other libraries have been ported, so DSLinux is in theory capable of running almost any application that has an ncurses-based or framebuffer based user interface. It also runs basic shell applications provided by BusyBox
BusyBox
BusyBox provides several stripped-down Unix tools in a single executable. It runs in a variety of POSIX environments such as Linux, Android, FreeBSD and others, such as proprietary kernels, although many of the tools it provides are designed to work with interfaces provided by the Linux kernel. It...

 and GNU Coreutils has also been ported. The C-library is uClibc
UClibc
In computing, uClibc is a small C standard library intended for embedded Linux systems. uClibc was created to support uClinux, a version of Linux not requiring a memory management unit and thus suited for microcontrollers .The project lead is Erik Andersen. The other main contributor is Manuel...

.

DSLinux has no package management facilities. Instead, DSLinux builds are distributed as a single tar archive.

Supported hardware

With the exception of the microphone (it works, but the driver is incomplete), all hardware inside the Nintendo DS, including the wireless is supported by DSLinux. The Nintendo DS firmware
Firmware
In electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices...

 can be read from /dev/firmware, but write support is left out for safety reasons.

DSLinux supports storing files on a variety of add-on hardware devices, none of which are officially endorsed by Nintendo. DSLinux can store files in SRAM memory found in GBA Flash Carts and CompactFlash
CompactFlash
CompactFlash is a mass storage device format used in portable electronic devices. Most CompactFlash devices contain flash memory in a standardized enclosure. The format was first specified and produced by SanDisk in 1994...

 and SD
Secure Digital
Secure Digital is a non-volatile memory card format developed by the SD Card Association for use in portable devices. The SD technology is used by more than 400 brands across dozens of product categories and more than 8,000 models, and is considered the de-facto industry standard.Secure Digital...

 cards, which can be used with any of the following adaptors: GBAMP, M3, or SuperCard. Newer versions have included DLDI support, allowing for a much wider range of compatibility.

Memory limitations

The Nintendo DS does not have a memory management unit
Memory management unit
A memory management unit , sometimes called paged memory management unit , is a computer hardware component responsible for handling accesses to memory requested by the CPU...

 (MMU), and has only 4 MB
Megabyte
The megabyte is a multiple of the unit byte for digital information storage or transmission with two different values depending on context: bytes generally for computer memory; and one million bytes generally for computer storage. The IEEE Standards Board has decided that "Mega will mean 1 000...

 of RAM. Both kernel and userspace XIP and SLOB memory allocation were the first techniques used to increase the amount of available RAM a little. Later, support for the internal RAM present on some add-on hardware devices, such as the SuperCard
Game Boy Advance flash cartridge
A Game Boy Advance flash cartridge is one of several cartridges containing flash memory that have been developed for use in the Nintendo Game Boy Advance. These cartridges enable homebrew applications and games to be used on a GBA. The capacity of the cartridges ranges from 64 Mbit up to 8 Gbit...

 or M3, has been added, offering up to an extra 32MB of memory. Adding support for external RAM was not trivial, as the GBA slot bus only supports 16-bit writes. If only 8 bits are sent over the bus, the result ending up in memory is garbage. A DSLinux developer called Amadeus found a workaround for this, which involved replacing "strb" (store byte) ARM assembly instructions with "swpb" (swap byte) instructions. The swpb instruction first reads from the requested address, populating the data cache, then the 8-bit write is performed into the cache. Later, when the cache line is evicted, 16-bit writes are used, thus eliminating all 8-bit writes over the bus. Amadeus modified the GCC code generator for ARM so that all applications compiled for DSLinux now use swpb instead of strb instructions. Assembly code in the Linux kernel had to be adapted manually.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK