It was exciting when Sony first announced that PlayStation 3 would be able to run Linux directly. Initially, it was difficult to install Linux directly. The installer programs supported by PS 3 run a custom script, and manually convert the Fedora Core 5 or 6 installation DVD into a system running with a special PS3 kernel. People spend a lot of time working on other systems (such as Ubuntu. Terrasoft's Yellow Dog Linux comes with a graphics installer that can really run on the PS3.
As time passes, many things have changed. Now you can install Fedora 7 directly on the PS3. The most difficult part of the installation process is to select the storage drive of the PS3 so that it can find the installation DVD, remember to specify the video mode in the initial installation command line to view the installer.
Therefore, Linux can be run on the PS3. The problem is that it is not running well yet. If you use PS3 as a cheap Cell development system, you will be a little disappointed to find that after the default installation process is executed, you have used hundreds of megabytes or even more swap space before entering the shell prompt.
Obtain Fedora 7 (Fedora 8 may also work, but I used Fedora 7 when writing this series ). Obviously, if you use a specially optimized or small and efficient version, it may be better, but Fedora 7 has a huge advantage: it is subject to Cell/B. e. SDK support (RHEL 5.1 is also supported, but Fedora 7 is better ).
PlayStation 2 can also run Linux, but it is troublesome. To this end, Sony has released a dedicated toolkit, but it can only run on earlier heavy PS2 machines, and requires the use of additional hard disks. It does not support later (more common) "slim" PS2 machines, so the Toolkit quickly disappears. However, the main reason for its disappearance is that it is almost just a proof of concept; The PS2 system does not have enough memory or dedicated compilation tools, and the CPU is just a standard MIPS kernel. In addition to Sony's dedicated tools, vector units are not widely supported and there is not enough documentation.
In contrast, before the release of the PS3, there was support for running Linux, and Sony also provided a large number of support code and support packages. The "Cell addons" disc launched before and after the system release contains direct support for Fedora 5 and 6, and provides all the files required for the development of PS3 for other Linux releases. Therefore, you can run Fedora 7 on the PS3 without a separate disc, but you still need to download and install the Boot Loader from Sony. The value-added software Cd (see references) will continue to be updated with the new kernel version.
Understand hypervisor
The Basic specification of the PS3 is 256 MB primary memory, one Cell/B. e. processor, wired Ethernet Card (802.11b/g wireless network card in some models), known as RSX Graphics Processing Unit (with 256 MB of memory) and a SATA hard disk. There are also some external devices, including USB ports, Bluetooth, and card readers on some models. However, this is not a machine running the PS3 Linux.
On the PS3, Linux runs under hypervisor control-in fact, the PS3 Linux runs on a VM similar to the Xen. Hypervisor provides constrained and filtered access to the PS3 hardware. For example, Linux Code cannot directly access RSX graphics processor, but you can use the dedicated devices provided by RSX for limited access, so as to achieve a good 2D frame buffer efficiency.
Hypervisor provides many conversions. For example, as mentioned above, hypervisor provides a virtual Frame Buffer Device for Linux, which is subsequently implemented by hypervisor using the RSX graphics kernel. Similarly, Linux cannot access SATA hard disks and can only access SCSI drivers, which are mapped to the areas allocated to the "other operating systems" partition on the internal drive. You cannot physically access the disks used by the PS3 game software.
Network hardware may be the most interesting part. For PS3 Linux, both 1-gigabit Ethernet and 802.11g wireless networks can be accessed, but not at the same time. When configuring a network interface, if the SSID is used to specify it as a wireless interface, the hypervisor uses a wireless interface. Otherwise, a wired interface is used.
The modified specifications are discussed below. The PS3 Linux runs on a virtual machine. The virtual machine has a Cell/B with six SPEs. e. processor, approximately 212 MB main memory, a network interface, a SCSI disk (if there is a card reader, there will be more SCSI disks), a SCSI device (possibly DVD-ROM, CD-ROM, or Blu-ray drive), USB and Bluetooth ports. Images are provided through special frame buffering devices and support various video modes (See Understanding consumer video modes ).
Plan the development environment
To make better use of PS3 for development, you must first determine the development environment you need. If you want to completely cancel X, it will save a lot of memory (gnoora runs Gnome by default, which may not be the most memory-saving policy ). Many System Setup tools can be accessed through X, but it takes a long time to run. It took me several hours to run the graph package update program in Gnome. This may be because the process requires a total of 375 MB of memory, seriously exceeding the available physical memory. Most of the time is spent waiting for the disk to be switched, just like the Emacs on VAX.
The lesson is that the available memory will be the biggest weakness on the PS3. Close unnecessary services as soon as possible. Use xterm to replace gnome terminals. If you need multiple windows, run screen instead of multiple xterms.
Show options
If you are just playing games, you don't have to worry too much about these issues. However, if you need to view the display result during running, you need to consider the display option. The quality of the HDMI output of the PS3 is the best. If you have a computer monitor, the HDMI to DVI line is cheap, but make sure that the monitor supports High-bandwidth Digital Content Protection (HDCP ). If the invigilator is not supported, only a black screen is displayed, or a bright color may appear. If you are using the KVM switch, please note that the switch must also support HDCP! Unfortunately, it seems that this "feature" cannot be disabled; unencrypted signals cannot be obtained. Although this approach is to protect high definition movies, it is a bit annoying to view X desktops with Special licenses. HDMI/DVI supports every video mode provided by the PS3, including the consumer electronic mode (such as 720 p) and PC mode (such as WXGA ).
If you do not have an HDCP instance or monitor that supports DVI, you can only switch to a component video. Most TVs accept component videos, and some computer monitors also support them. The effect of the Component Video is similar to that of the early VGA, but it only has three RCA connectors, one output is red, the other output is green, and the other output is blue. The component video line is charged separately-but it is the same as the PS2 component video line. If there is a PS2 line, you can continue to use it. The video of a weight can be displayed at 720 p and 1080 I, but may not be displayed at p (if you do not know what these are, see understanding the consumer's electronic video mode ). The resolution and resolution provided by the component video are higher than those of the following two options.
If there is no video weight, you can use a device that supports S-video. S-video supports I, but the signal must be decomposed into two independent channels. One Channel transmits the brightness and the other channel transmits the color ("brightness" and "color "). The definition is better than the final option-compound video. The compound video is an old-style RCA connector, usually yellow and almost compatible with any TV. If you do not need a composite video, do not use it.
Note that the Fedora 7 installer cannot be used in 720 p unless it is in text mode. In fact, if you plan to use the PS3 as the development system, it is better to use a higher resolution mode. The Linux system is suitable for large displays. The Window environment of Fedora has very poor performance on low-resolution displays. In addition, low-resolution display-especially when transmitted through a composite video line-is hard to see clearly and the interface is very blurred.