Skip to content

Latest commit

 

History

History
207 lines (130 loc) · 9.96 KB

README.md

File metadata and controls

207 lines (130 loc) · 9.96 KB

Modern Linux for Wii/GameCube

Tux + Wii

The wii-linux-ngx repository contains Linux kernel branches with rebased patches for the purpose of running a modern Linux distribution on the Wii.

Up-to-date documentation and scripts can always be found on the master branch.

Feel free to open Issues/Pull requests for improvement/discussion purposes.

See also Frequently Asked Questions.

How to install

Download the compressed image from the releases, decompress it (gunzip) and then flash it to an SD card with your program of choice.

How it works

Wii

wii-linux-ngx works with an SD card (or USB mass storage) with the following layout:

  • first partition, FAT32 with MINI and Gumboot (Bootmii is provided as fallback)
  • second partition with ext3 Linux rootfs

You can add other partitions of your choice; performance of SD cards is better than USB mass storage.

You can use Priiloader to make Bootmii your default choice, effectively creating this chain:

Wii power on -> MINI -> (Gumboot selection with power/eject buttons ->) Linux kernel zImage

See also:

GameCube

Currently not tested on GameCube.

vWii

Currently not tested on virtual Wii.

Default credentials

The SD image and rootfs have root:root credentials.

If you prefer to login via USB serial console, edit the last line of /etc/inittab in order to use ttyUSB0 as a login terminal; you might need to recompile the kernel with your serial-over-USB driver as only the PL2303 driver is included.

History

Chronological history of Linux for Wii/GameCube:

The original (2.6.32 and prior) gcLinux work can be found at: http://sourceforge.net/projects/gc-linux/; at the time of writing project has not seen activity since 2013.

Status

A few branches are currently maintained:

Some of the dropped features (easy to re-add through cherry-pick) are:

Framebuffer support

Current version has framebuffer support with Farter's Deferred I/O Framebuffer patch (http://fartersoft.com/) and neagix (author)'s support for RGBA.

To change mode to 32bit:

fbset -xres 576 -yres 432 -vxres 576 -vyres 432 -depth 32

Change the last parameter to go back to 16bit.

To display an image:

$ fbv mario.png

Xorg using framebuffer works fine.

Known issues

Boot from MINI is well tested, but not boot from IOS. Xorg framebuffer driver is also not tested.

Bugs probably introduced in the port of MIKEp5 from v2.6 to v3.x tree:

  • In IOS mode, external swap partitions don't mount correctly as of kernel version 2.6.39. As a workaround, use a local swapfile (This bug should be relatively easy to find using git bisect)
  • Both IOS and MINI modes seem to have a bug that prevents Linux from booting if a GameCube Controller is inserted in one of the ports while the serial port is enabled in the config. This bug is caused by a glitch that was created when forward porting from 2.6.32 to 2.6.33. It should be possible to find this bug using git bisect.
  • Both IOS and MINI also still suffer from the same hardware limitations that they did in 2.6.32.y. For example, wireless and disc support for Wii consoles is still limited to MINI mode. Also, DVDs can be mounted as they were in version 2.6.32.y, but due to hardware limitations, it's unable to write to any disc and is unable to read CDs and certain types of DVD's
    • Support for DVD-RW and DVD-DL disc seems to vary. Currently, -R and +R (both mini & full-size) DVDs are know to work on both GameCube and Wii consoles. All WiiU as well as some of the newer Wii disc drives, lack support for DVDs as they don't contain the same type of disc drive. In other words, support will vary on the age of the console, but most standard GameCube consoles should be able to read mini DVDs (full-sized DVDs are too big for unmodified Gamecube consoles, but they can be read).

See open issues.

Changing bootargs with baedit

It is possible to change kernel command line arguments (also known as bootargs from the DTS file) with a hex editor, with (very careful) usage of sed, or with the provided baedit tool.

To show current bootargs embedded in the kernel:

$ baedit zImage
>OK: 3201336 bytes read
current  bootargs = 'root=/dev/mmcblk0p2 console=tty0 console=ttyUSB0,115200 force_keyboard_port=4 video=gcnfb:tv=auto loader=mini nobats rootwait       

To change the arguments, just pass them as second parameter to baedit:

$ baedit zImage 'your new arguments here'
>OK: 3201336 bytes read
current  bootargs = 'root=/dev/mmcblk0p2 console=tty0 console=ttyUSB0,115200 force_keyboard_port=4 video=gcnfb:tv=auto loader=mini nobats rootwait       
replaced bootargs = 'your new arguments here                                                                                                                              '
>OK: 3201336 bytes written

Connecting via Ethernet dongle

Connection will work automatically and it uses regular Debian configuration files.

Connecting to Wi-Fi

The whiite-ez-wifi-config script is included in /root to easily connect to a Wi-Fi network.

Supported modes (from http://en-americas-support.nintendo.com/app/answers/detail/a_id/498/~/compatible-wireless-modes-and-wireless-security-types):

Wireless Frequency: 2.4 GHz Frequency
Wireless Modes: 802.11b, 802.11g
Wireless Security Modes: WEP, WPA-PSK (TKIP), WPA-PSK (AES), WPA2-PSK (AES)

Network troubleshooting resources

Swap

It is suggested to create a swap partition and enable it to speed up operations, since the Wii has little memory available (~80M).

Installing packages

The Jessie rootfs is stripped down so you will need to run apt-get update before being able to install any package.

Building the kernel

Compiling this kernel will has some dependencies that must be installed. On a Debian-based system, these dependecies can be installed by running the following command:

sudo apt-get install advancecomp autoconfig automake bash build-essential bzip2 ccache coreutils fakeroot file gcc g++ gzip libmpfr-dev libgmp-dev libnurses5-dev make strip

Give a look to DeltaResero's script to see how to use ccache for kernel compilation

(Cross) Compiling the Kernel

Remember to edit the corresponding dts file (arch/powerpc/boot/wii.dts for the Wii when not using the default boot method from SD card (/dev/mmcblk0p2). Enabling zcache and other kernel options requres editing the default bootargs. You can alter the bootargs of an already compiled kernel by using the provided tool baedit (it's found in the rootfs image or you can run/build it with Go).

Related pages:

ZRAM

The zram-config v0.5 files are provided in /root/zram-config, there is no init integration though.

You can verify whether zRam ha started by running the following command as root:

    swapon -s

zRam swapping can be turned off with the following command:

swapoff /dev/zram0

Change the command accordingly to which device should be stopped.

Related readings:

Mounting a disc

Create a "dvd" folder (as root) in the "/media" directory (only if the folder doesn't exist) with the command:

    mkdir /media/dvd

Then run the following (also as root):

    mount /dev/rvl-di /media/dvd

DVDs can be inserted/switched anytime but should be unmount prior to ejecting and then remount again after to prevent errors. To unmount a disc, enter the following command as root:

    umount /dev/rvl-di /media/dvd

Additional packages such as libdvdcss & libdvdread may need to be installed for DVD playblack (may need to search package manager as naming standards aren't consistant). Mplayer and Xine seem to work the best but support will vary depending on the operating system.

Related pages: