├── baedit ├── .gitignore ├── Makefile └── baedit.go ├── docs ├── _config.yml ├── tux-wii.png ├── wii-linux-ngx-logo.png ├── gumboot.html └── index.md ├── dt_node_info ├── CHANGELOG.md ├── gumboot.lst ├── dt_stat └── README.md /baedit/.gitignore: -------------------------------------------------------------------------------- 1 | baedit 2 | baedit-ppc 3 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker 2 | -------------------------------------------------------------------------------- /docs/tux-wii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neagix/wii-linux-ngx/HEAD/docs/tux-wii.png -------------------------------------------------------------------------------- /docs/wii-linux-ngx-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neagix/wii-linux-ngx/HEAD/docs/wii-linux-ngx-logo.png -------------------------------------------------------------------------------- /docs/gumboot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 | Running modern Linux on Wii consoles.
6 |
7 | This project provides:
8 | * source code for a working Linux kernel for GC/Wii, in the form of git branches (stable Linux trees + necessary patches)
9 | * kernel single-binary releases in ELF format (zImage)
10 | * ready to use Debian Jessie images/rootfs
11 | * [Gumboot](https://neagix.github.io/gumboot/)
12 | * support for framebuffer RGBA mode
13 |
14 | See [README](https://github.com/neagix/wii-linux-ngx/blob/master/README.md) for a full description and instructions.
15 |
16 | # Releases
17 |
18 | * [https://github.com/neagix/wii-linux-ngx/releases](https://github.com/neagix/wii-linux-ngx/releases)
19 |
20 | # Issues
21 |
22 | Visit the issues tracker to see what needs help:
23 | * [https://github.com/neagix/wii-linux-ngx/issues](https://github.com/neagix/wii-linux-ngx/issues)
24 |
25 | Pull requests are welcome!
26 |
27 | # Frequently Asked Questions
28 |
29 |
4 |
5 | The [wii-linux-ngx repository](https://github.com/neagix/wii-linux-ngx) contains Linux kernel branches with rebased patches for the purpose of running a modern Linux distribution on the Wii.
6 |
7 | Up-to-date documentation and scripts can always be found on the [master branch](https://github.com/neagix/wii-linux-ngx/tree/master).
8 |
9 | Feel free to open Issues/Pull requests for improvement/discussion purposes.
10 |
11 | See also [Frequently Asked Questions](https://github.com/neagix/wii-linux-ngx/blob/master/docs/index.md#frequently-asked-questions).
12 |
13 | ## How to install
14 |
15 | Download the compressed image from the releases, decompress it (`gunzip`) and then flash it to an SD card with your program of choice.
16 |
17 | ## How it works
18 |
19 | ### Wii
20 |
21 | wii-linux-ngx works with an SD card (or USB mass storage) with the following layout:
22 | * first partition, FAT32 with MINI and [Gumboot](https://neagix.github.io/wii-linux-ngx/gumboot) (Bootmii is provided as fallback)
23 | * second partition with ext3 Linux rootfs
24 |
25 | You can add other partitions of your choice; performance of SD cards is better than USB mass storage.
26 |
27 | You can use Priiloader to make Bootmii your default choice, effectively creating this chain:
28 |
29 | ```
30 | Wii power on -> MINI -> (Gumboot selection with power/eject buttons ->) Linux kernel zImage
31 | ```
32 |
33 | See also:
34 | * [Gumboot](https://neagix.github.io/wii-linux-ngx/gumboot)
35 | * [customized MINI](https://github.com/neagix/mini)
36 |
37 | ### GameCube
38 |
39 | Currently not tested on GameCube.
40 |
41 | ### vWii
42 |
43 | Currently not tested on virtual Wii.
44 |
45 | ## Default credentials
46 |
47 | The SD image and rootfs have `root:root` credentials.
48 |
49 | 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.
50 |
51 | ## History
52 |
53 | Chronological history of Linux for Wii/GameCube:
54 |
55 | * [gc-linux (v2.6-based) MIKEp5](http://www.gc-linux.org/wiki/MINI:KernelPreviewFive) - this is the original project and corresponds to the bulk work done to bring Linux to the Wii
56 | * [DeltaResero's fork (unofficial MIKEp7)](https://github.com/DeltaResero/GC-Wii-Linux-Kernels) - considerable work done by DeltaResero to bring up the GC/Wii patches into a v3.x kernel
57 | * [this project, wii-linux-ngx](https://github.com/neagix/wii-linux-ngx) - continuation of the previous work, distribution packaging and maintenance
58 |
59 | 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.
60 |
61 | ## Status
62 |
63 | A few branches are currently maintained:
64 | * [stable-v3.x](https://github.com/neagix/linux/tree/stable-v3.x), latest working v3.x kernel with most up to date upstream patches
65 | * [experimental-v3.x](https://github.com/neagix/linux/tree/experimental-v3.x), some features might be broken (SDHC)
66 | * [experimental-v4.x](https://github.com/neagix/linux/tree/experimental-v4.x), some features might be broken (SDHC)
67 | * [rebased-deltares-v3.x](https://github.com/neagix/linux/tree/rebased-deltares-v3.x), original v3.12.11 by DeltaResero rebased for easier merges + v3.12.12 merge
68 | * [stable-v3.x-w-extras](https://github.com/neagix/linux/tree/stable-v3.x-w-extras), features added by DeltaRes but not in stable-v3.x can be found in this branch.
69 |
70 | Some of the dropped features (easy to re-add through cherry-pick) are:
71 | * Nold360's GameCube SDHC support (http://www.gc-forever.com/forums/portal.php)
72 | - (https://github.com/Nold360/GC-Linux-Kernel-2.6.32/commits/master)
73 |
74 | ## Framebuffer support
75 |
76 | Current version has framebuffer support with Farter's Deferred I/O Framebuffer patch (http://fartersoft.com/) and neagix (author)'s support for RGBA.
77 |
78 | To change mode to 32bit:
79 | ```
80 | fbset -xres 576 -yres 432 -vxres 576 -vyres 432 -depth 32
81 | ```
82 |
83 | Change the last parameter to go back to 16bit.
84 |
85 | To display an image:
86 | ```
87 | $ fbv mario.png
88 | ```
89 |
90 | Xorg using framebuffer works fine.
91 |
92 | ## Known issues
93 |
94 | Boot from MINI is well tested, but not boot from IOS. Xorg framebuffer driver is also not tested.
95 |
96 | Bugs probably introduced in the port of MIKEp5 from v2.6 to v3.x tree:
97 | * 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)
98 | * 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.
99 | * 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
100 | - 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.
101 | 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.
102 | 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).
103 |
104 | See [open issues](https://github.com/neagix/wii-linux-ngx/issues).
105 |
106 | ## Changing bootargs with baedit
107 |
108 | 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.
109 |
110 | To show current bootargs embedded in the kernel:
111 | ```
112 | $ baedit zImage
113 | >OK: 3201336 bytes read
114 | current bootargs = 'root=/dev/mmcblk0p2 console=tty0 console=ttyUSB0,115200 force_keyboard_port=4 video=gcnfb:tv=auto loader=mini nobats rootwait
115 | ```
116 |
117 | To change the arguments, just pass them as second parameter to `baedit`:
118 | ```
119 | $ baedit zImage 'your new arguments here'
120 | >OK: 3201336 bytes read
121 | current bootargs = 'root=/dev/mmcblk0p2 console=tty0 console=ttyUSB0,115200 force_keyboard_port=4 video=gcnfb:tv=auto loader=mini nobats rootwait
122 | replaced bootargs = 'your new arguments here '
123 | >OK: 3201336 bytes written
124 | ```
125 |
126 | # Connecting via Ethernet dongle
127 |
128 | Connection will work automatically and it uses regular Debian configuration files.
129 |
130 | # Connecting to Wi-Fi
131 |
132 | The `whiite-ez-wifi-config` script is included in `/root` to easily connect to a Wi-Fi network.
133 |
134 | Supported modes (from http://en-americas-support.nintendo.com/app/answers/detail/a_id/498/~/compatible-wireless-modes-and-wireless-security-types):
135 |
136 | Wireless Frequency: 2.4 GHz Frequency
137 | Wireless Modes: 802.11b, 802.11g
138 | Wireless Security Modes: WEP, WPA-PSK (TKIP), WPA-PSK (AES), WPA2-PSK (AES)
139 |
140 | ## Network troubleshooting resources
141 |
142 | * http://www.gc-linux.org/wiki/WL:Wifi_Configuration
143 | * http://www.linux-tips-and-tricks.de/overview#english
144 | * http://www.linux-tips-and-tricks.de/downloads/collectnwdata-sh/download
145 | * http://forum.wiibrew.org/read.php?29,68339,68339
146 |
147 | # Swap
148 |
149 | It is suggested to create a swap partition and enable it to speed up operations, since the Wii has little memory available (~80M).
150 |
151 | # Installing packages
152 |
153 | The Jessie rootfs is stripped down so you will need to run `apt-get update` before being able to install any package.
154 |
155 | # Building the kernel
156 |
157 | Compiling this kernel will has some dependencies that must be installed.
158 | On a Debian-based system, these dependecies can be installed by running the following command:
159 |
160 | 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
161 |
162 | Give a look to DeltaResero's script to see how to use ccache for kernel compilation
163 | ## (Cross) Compiling the Kernel
164 |
165 | 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`).
166 | Enabling zcache and other kernel options requres editing the default bootargs.
167 | 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).
168 |
169 | Related pages:
170 | * http://www.gc-linux.org/wiki/Building_a_GameCube_Linux_Kernel_%28ARCH%3Dpowerpc%29
171 |
172 | ## ZRAM
173 |
174 | The zram-config v0.5 files are provided in `/root/zram-config`, there is no init integration though.
175 |
176 | You can verify whether zRam ha started by running the following command as root:
177 |
178 | swapon -s
179 |
180 | zRam swapping can be turned off with the following command:
181 |
182 | swapoff /dev/zram0
183 |
184 | Change the command accordingly to which device should be stopped.
185 |
186 | Related readings:
187 | * how to start zRam: http://forums.debian.net/viewtopic.php?t=77627
188 | * http://gionn.net/2012/03/11/zram-on-debian-ubuntu-for-memory-overcommitment/
189 |
190 | ## Mounting a disc
191 |
192 | Create a "dvd" folder (as root) in the "/media" directory (only if the folder doesn't exist) with the command:
193 |
194 | mkdir /media/dvd
195 |
196 | Then run the following (also as root):
197 |
198 | mount /dev/rvl-di /media/dvd
199 |
200 | 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:
201 |
202 | umount /dev/rvl-di /media/dvd
203 |
204 | 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.
205 |
206 | ## Related pages:
207 | * http://fartersoft.com/blog/2011/08/17/debian-installer-for-wii/
208 |
--------------------------------------------------------------------------------