Linux

From wiki.gp2x.org

Contents

Firmware \ Linux Introduction

The GP2X comes from the factory loaded with default Firmware containing a bootloader, a Linux kernel, a user interface program, and a set of simple linux tools. In the forums and mailing lists 'Firmware' and 'Linux' are often used interchangeably. Most of the time this is fine, however in some topics and situations they are not interchangeable.

Throughout this page, "Kernel" or "Linux" will mean only to the Linux Kernel (for more on Linux see the Wikipedia Entry) and "Firmware" means the kernel, bootloader, and associated programs.

A couple of community-produced kernels are available to replace the factory default kernel, such as Open2x. These generally add functionality, or fix known bugs in the existing kernel. Custom bootloaders are also available to 'boot' the device into a kernel (be it a factory kernel, or a custom kernel).


Factory Firmware

The firmware that comes factory loaded on the GP2X is a specalized Linux distribution based on the 2.4 kernel, as well as a set of basic tools. Most of these are standard for any Linux distribution, including busybox, telnet, samba and web (Apache and PHP) servers, and a GUI.

The 2.4 kernel was developed for GP2X by Dignsys prior to the Firmware Version 2.0.0.

See Firmware History for older versions of the firmware.

The firmware itself is a small GNU/Linux system with busybox; some basic system tools; and telnet, samba and web (Apache and PHP) servers.

See also: Included Libraries and Upgrading Firmware

Linux on the GP2X

Benefits of Linux on the GP2X

  • Linux is a stable, feature-rich, efficient and relatively bug-free crossplatform operating system kernel with support for a wide array of hardware past and present
  • Ease of development, including filesystem management and easier hardware interface
  • Supports a large array of applications and games on numerous platforms including X86, PowerPC, SPARC, 680x0, ARM, etc.
  • Full support for the Simple DirectMedia Layer library.

Drawbacks of Linux

  • The secondary processor core (ARM940T) is not usable in Symmetric MultiProcessing (SMP) configuration due its lack of an MMU (Memory Management Unit) so software must be specially written to utilize it at the hardware level, rather than through the Linux kernel's original conventions for utilizing multiple processors. This can be a complex and tricky task anyway given the means in which the MMSP2 integrates the secondary processor regardless of the OS the system utilizes.
  • While the upper 32MB of RAM tied to the ARM940T coprocessor can be used by the Linux-based OS, it cannot be accessed by conventional means and special code is required. The process, however, is not difficult, and it can be used to store any manner of data including hardware SDL surfaces (used like Video Memory) for use by the MMSP2's onboard blitter (2D Accelerator).
  • The use of any operating system entails overhead such as memory usage and a minor reduction in speed of very intensive program code due to processor time required by the OS kernel and essential daemons. However, the speed hit imposed by the Linux-based OS are very minimal, and RAM consumption reasonable. An estimated 7 MB of Main RAM of the GP2X's total 32MB, and 16MB of its upper 32MB, are utilized by the Linux-based OS and onboard hardware, leaving approximately 41 MB of RAM free for use.
Personal tools