Ouya (ouya-ouya): Difference between revisions
Add note about HDMI CEC |
No edit summary |
||
(35 intermediate revisions by 18 users not shown) | |||
Line 2: | Line 2: | ||
| manufacturer = Ouya, Inc. | | manufacturer = Ouya, Inc. | ||
| name = Ouya | | name = Ouya | ||
| codename = | | codename = ouya-ouya | ||
| image = File: | | image = File:OUYA-Console-set-h_(cropped,shrunk).jpg | ||
| imagecaption = Ouya | | imagecaption = Ouya | ||
| releaseyear = 2013 | | releaseyear = 2013 | ||
| originalsoftware = Android | | originalsoftware = Android | ||
| chipset = Nvidia Tegra 3 | | chipset = Nvidia Tegra 3 (T33) | ||
| cpu = | | cpu = Quad-core 1.7 GHz Cortex-A9 | ||
| gpu = | | gpu = NVIDIA ULP GeForce GPU 12 cores 520 MHz (12.48 GFLOPS) | ||
| storage = 8/16 GB | | storage = 8/16 GB | ||
| display = | | display = up to FullHD via HDMI | ||
| memory = 1 GB | | memory = 1 GB | ||
| architecture = armv7 | | architecture = armv7 | ||
| type = Game Console | |||
| whet_dhry = 1450.2 | | whet_dhry = 1450.2 | ||
| status_usbnet = Y | | status_usbnet = Y | ||
Line 22: | Line 23: | ||
| status_xwayland = Y | | status_xwayland = Y | ||
| status_fde = P | | status_fde = P | ||
| status_mainline = | | status_mainline = Y | ||
| status_battery = - | | status_battery = - | ||
| status_3d = | | status_3d = P <!-- Hardware accelerated 3D graphics (e.g. with freedreno) --> | ||
| status_accel = - | | status_accel = - | ||
| status_audio = | | status_audio = Y | ||
| status_bluetooth = Y | | status_bluetooth = Y | ||
| status_camera = - | | status_camera = - | ||
| status_gps = - | | status_gps = - | ||
| status_nfc = - | |||
| status_mobiledata = - | | status_mobiledata = - | ||
| status_sms = - | | status_sms = - | ||
| status_calls = - | | status_calls = - | ||
| | | status_otg = Y | ||
| booting = yes | | booting = yes | ||
}} | | pmoskernel = mainline grate | ||
}}{{Based on SoC|Nvidia_Tegra_3_(tegra30)|Tegra 3}} | |||
== Users owning this device == | |||
{{Device owners}} | |||
== Safe Boot == | == Safe Boot == | ||
Line 64: | Line 61: | ||
The Tegra30 HDA driver writes 4 frames and then hangs. | The Tegra30 HDA driver writes 4 frames and then hangs. | ||
< | <syntaxhighlight lang="shell-session"> | ||
$ speaker-test -Dhw:0,3 -c 2 | $ speaker-test -Dhw:0,3 -c 2 | ||
Line 93: | Line 90: | ||
xrun_recovery failed: -5,I/O error | xrun_recovery failed: -5,I/O error | ||
Transfer failed: I/O error | Transfer failed: I/O error | ||
</ | </syntaxhighlight> | ||
The kernel PCM framework in <code>sound/core/pcm_native.c</code> has a timeout waiting for the device to respond. | The kernel PCM framework in <code>sound/core/pcm_native.c</code> has a timeout waiting for the device to respond. | ||
< | <pre> | ||
[ 691.115717] tegra-hda 70030000.hda: playback write error (DMA or IRQ trouble?) | [ 691.115717] tegra-hda 70030000.hda: playback write error (DMA or IRQ trouble?) | ||
</ | </pre> | ||
It is uncertain why the HDA device isn't working on mainline. | It is uncertain why the HDA device isn't working on mainline. | ||
Line 108: | Line 105: | ||
A random MAC address is generated by the kernel at each boot. This is because the smsc9500 Ethernet device does not have a valid mac address stored in EEPROM. To set a consistent MAC address, create the file <code>/etc/udev/rules.d/99-mac-address.rules</code> with the following udev rule. | A random MAC address is generated by the kernel at each boot. This is because the smsc9500 Ethernet device does not have a valid mac address stored in EEPROM. To set a consistent MAC address, create the file <code>/etc/udev/rules.d/99-mac-address.rules</code> with the following udev rule. | ||
< | <pre> | ||
ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth0", RUN+="/sbin/ip link set dev %k address f6:23:f0:42:98:cf" | ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth0", RUN+="/sbin/ip link set dev %k address f6:23:f0:42:98:cf" | ||
</ | </pre> | ||
== Radio == | == Radio == | ||
Line 119: | Line 116: | ||
== Display Resolution == | == Display Resolution == | ||
On the mainline kernel, display resolutions above 1280x720 are glitchy. The GPU is dependent on memory bandwidth but EMC scaling is not implemented in mainline. The Ouya bootloader sets the memory to 400 Mhz. Higher display resolutions work a bit better when the memory is set to 800Mhz but it is still glitchy. | On the mainline kernel, display resolutions above 1280x720 are glitchy. The GPU is dependent on memory bandwidth but EMC scaling is not implemented in mainline. The Ouya bootloader sets the memory to 400 Mhz. Higher display resolutions work a bit better when the memory is set to 800Mhz but it is still glitchy. | ||
[https://lore.kernel.org/linux-tegra/YRZKlYg5YQlbmqFg@orome.fritz.box/T/#r31c48b164840cdd9bc2ed4a48ac3f5627783b63d A kernel patchset] was [https://cgit.freedesktop.org/tegra/linux/commit/?h=drm/tegra/for-5.15-rc1&id=04d5d5df9df79f9045e76404775fc8a084aac23d committed] on 2021-08-13 to add support for memory bandwidth management. This should be released in v5.15. | |||
== HDMI CEC == | == HDMI CEC == | ||
Line 125: | Line 124: | ||
References: | References: | ||
* [http://ouyaforum.com/showthread.php?9682-What-remote-controls-do-you-want-supported What remote controls do you want supported? ] | * [https://web.archive.org/web/20190527212027/http://ouyaforum.com/showthread.php?9682-What-remote-controls-do-you-want-supported What remote controls do you want supported? ] | ||
* [https://forum.kodi.tv/showthread.php?tid=186121 https://forum.kodi.tv/showthread.php?tid=186121] | * [https://forum.kodi.tv/showthread.php?tid=186121 https://forum.kodi.tv/showthread.php?tid=186121] | ||
== UART == | |||
The debug UART is exposed on J3, an unpopulated header near the lid. It operates at 115200 baud, 3.3V. The pinout is: 3.3V, TX, RX, GND; pin 1 is marked with a white corner on the silkscreen. | |||
== Other Notes == | == Other Notes == | ||
* Splash screen doesn't appear | * Splash screen doesn't appear | ||
* USB booting needs to be tested | * USB booting needs to be tested | ||
== Installation == | |||
=== How to enter flash mode === | === How to enter flash mode === | ||
1. Connect Ouya to PC | 1. Connect Ouya to PC | ||
2. Use <code>adb reboot recovery</code> to enter recovery (or <code>adb reboot bootloader</code> to enter bootloader for fastboot commands) | 2. Use <code>adb reboot recovery</code> to enter recovery (or <code>adb reboot bootloader</code> to enter bootloader for fastboot commands) | ||
=== Downloads === | |||
You'll need OneClickOuyaRecovery.zip from [https://download.milaq.net/public/android/ouya/misc/ here] (original link is dead) | |||
===pmbootstrap=== | ===pmbootstrap=== | ||
1. Flash [https://forum.xda-developers.com/showthread.php?t=2295645 CWM] and [https://forum.xda-developers.com/showthread.php?t=2692836 Ouya BootMenu]. | 1. Flash [https://forum.xda-developers.com/showthread.php?t=2295645 CWM] and [https://forum.xda-developers.com/showthread.php?t=2692836 Ouya BootMenu]. | ||
Line 148: | Line 151: | ||
3. Run the following using ''pmbootstrap'': | 3. Run the following using ''pmbootstrap'': | ||
< | <syntaxhighlight lang="shell-session"> | ||
$ # You will be asked for the Postmarket Version and Device. Select edge and ouya (with codename ouya). | |||
$ # You may then select the mainline kernel, or the default 3.1 Ouya kernel for installation. | |||
$ pmbootstrap init | $ pmbootstrap init | ||
$ pmbootstrap install | $ pmbootstrap install | ||
$ pmbootstrap export | $ pmbootstrap export | ||
$ # make sure the Ouya is in the bootloader at this point | |||
$ # if this fails, read below (Flashing to the data partition) | |||
$ pmbootstrap flasher flash_rootfs | $ pmbootstrap flasher flash_rootfs | ||
</ | </syntaxhighlight> | ||
{{note|'''WARNING''': This will create two partitions under ''system'' partition instead of one which won't allow you to use '''Normal Boot''' option in Ouya BootMenu}} | {{note|'''WARNING''': This will create two partitions under ''system'' partition instead of one which won't allow you to use '''Normal Boot''' option in Ouya BootMenu}} | ||
Line 161: | Line 168: | ||
7. Copy postmarketOS ''boot.img'' to ''/sdcard'' as ''altboot.img'': | 7. Copy postmarketOS ''boot.img'' to ''/sdcard'' as ''altboot.img'': | ||
< | <syntaxhighlight lang="shell-session"> | ||
$ adb push /tmp/postmarketOS-export/boot.img-ouya-ouya /sdcard/altboot.img | $ adb push /tmp/postmarketOS-export/boot.img-ouya-ouya /sdcard/altboot.img | ||
</ | </syntaxhighlight> | ||
8. Reboot Ouya, then press the power button many times until it scrolls to '''Alternate Boot''', and then wait until postmarketOS appears. | 8. Reboot Ouya, then press the power button many times until it scrolls to '''Alternate Boot''', and then wait until postmarketOS appears. | ||
Line 171: | Line 178: | ||
{{note|'''WARNING''': Flashing to the userdata partition will overwrite all data on the device. Backup all data to another device before proceeding.}} | {{note|'''WARNING''': Flashing to the userdata partition will overwrite all data on the device. Backup all data to another device before proceeding.}} | ||
It is much more usable to flash rootfs to the data partition which is around 5.7GB in size. | It is much more usable to flash rootfs to the data partition which is around 5.7GB in size. | ||
==== Flashing to the data partition ==== | ==== Flashing to the data partition ==== | ||
Specify the partition to flash rootfs to with the <code>--partition</code> argument: | Specify the partition to flash rootfs to with the <code>--partition</code> argument: | ||
< | <syntaxhighlight lang="shell-session"> | ||
$ pmbootstrap flasher flash_rootfs --partition userdata | $ pmbootstrap flasher flash_rootfs --partition userdata | ||
</ | </syntaxhighlight> | ||
Boot the Ouya into Recovery and make sure to mount /system in recovery. Copy postmarketOS <code>boot.img</code> and <code>initramfs-extra</code> to <code>/system</code>. Unmount /system. | |||
<syntaxhighlight lang="shell-session"> | |||
$ adb push /tmp/postmarketOS-export/boot.img /system/ | |||
$ adb push /tmp/postmarketOS-export/initramfs-extra /system/ | |||
</syntaxhighlight> | |||
Do note, if the rootfs is larger than ~750mb Ouya's fastboot won't be able to flash it. In that case you may need to use <code>dd</code> to install the image from a usb drive. This can be done with adb shell in recovery. After you've ran <code>pmbootstrap export</code> ouya-ouya.img will be in <code>/tmp/postmarketOS-export/</code>. Make sure to copy the actual files and not the links in <code>/tmp/postmarketOS-export/</code>. | |||
Boot to recovery, then log into your Ouya with <code>adb shell</code> | |||
==== Updating the kernel | <syntaxhighlight lang="shell-session"> | ||
# # blkid should list your USB drive as /dev/sda1 | |||
# mkdir /tmp/mnt | |||
# mount /dev/sda1 /tmp/mnt | |||
# cd /tmp/mnt | |||
# dd if=ouya-ouya.img of=/dev/block/mmcblk0p9 | |||
</syntaxhighlight> | |||
=== Updating the kernel === | |||
When the <code>apk</code> package manager updates the kernel package (e.g. <code>linux-ouya-ouya</code> or <code>linux-ouya-ouya-mainline</code>) then the <code>boot.img</code> will be regenerated with the new kernel. Run the following commands on device to install the updated <code>boot.img</code>: | When the <code>apk</code> package manager updates the kernel package (e.g. <code>linux-ouya-ouya</code> or <code>linux-ouya-ouya-mainline</code>) then the <code>boot.img</code> will be regenerated with the new kernel. Run the following commands on device to install the updated <code>boot.img</code>: | ||
< | |||
For altboot.img on /sdcard: | |||
<syntaxhighlight lang="shell-session"> | |||
# mkdir /data | |||
</ | # mount /dev/mmcblk1p9 /data | ||
# cp /boot/boot.img-ouya-ouya /data/media/altboot.img | |||
</syntaxhighlight> | |||
For boot.img on /system: | |||
<syntaxhighlight lang="shell-session"> | |||
# mkdir /system | |||
# mount /dev/mmcblk1p3 /system | |||
# cp /boot/boot.img-ouya-ouya /system/boot.img | |||
</syntaxhighlight> | |||
== Maintainer(s) == | |||
* rendeko | |||
== Contributors == | |||
* rendeko | |||
* ryang2678 (Decatf) | |||
* ollieparanoid | |||
== Links == | == Links == | ||
Line 197: | Line 234: | ||
* [https://forum.xda-developers.com/showthread.php?t=2295645 CWM] | * [https://forum.xda-developers.com/showthread.php?t=2295645 CWM] | ||
* [https://www.s-config.com/cyanogen-mod-and-the-ouya/ CyanogenMod documentation blog] | * [https://www.s-config.com/cyanogen-mod-and-the-ouya/ CyanogenMod documentation blog] | ||
* [https://github.com/tofurky/tegra30_debrick/ tegra30_debrick tool] | |||
* {{MR|269|pmaports}} Add mainline based kernel for Ouya | * {{MR|269|pmaports}} Add mainline based kernel for Ouya | ||
* {{Device package|ouya-ouya}} |
Latest revision as of 12:05, 10 March 2025
![]() Ouya | |
Manufacturer | Ouya, Inc. |
---|---|
Name | Ouya |
Codename | ouya-ouya |
Released | 2013 |
Type | game console |
Hardware | |
Chipset | Nvidia Tegra 3 (T33) |
CPU | Quad-core 1.7 GHz Cortex-A9 |
GPU | NVIDIA ULP GeForce GPU 12 cores 520 MHz (12.48 GFLOPS) |
Display | up to FullHD via HDMI |
Storage | 8/16 GB |
Memory | 1 GB |
Architecture | armv7 |
Software | |
Original software | Android |
postmarketOS | |
Category | testing |
Pre-built images | no |
Mainline | yes |
postmarketOS kernel | mainline grate |
Unixbench Whet/Dhry score | 1450.2 |
Flashing |
Partial |
---|---|
USB Networking |
Works |
Internal storage |
No data |
SD card |
No data |
Multimedia | |
3D Acceleration |
Partial |
Audio |
Works |
Camera Flash |
No data |
Connectivity | |
WiFi |
Works |
Bluetooth |
Works |
Miscellaneous | |
FDE |
Partial |
USB OTG |
Works |
HDMI/DP |
No data |
Sensors | |
Magnetometer |
No data |
Ambient Light |
No data |
Proximity |
No data |
Hall Effect |
No data |
Haptics |
No data |
Barometer |
No data |
This device is based on the Tegra 3. See the SoC page for common tips, guides and troubleshooting steps |
Users owning this device
Safe Boot
We avoid flashing the boot
partition because a corrupted kernel would irreversibly brick the Ouya. We use a tool called Ouya BootMenu (source) that allows us to chain load the postmarketOS kernel using kexec.
Audio
There are two mechanisms to output audio through HDMI.
- Tegra30 HDA
- Tegra30 SPDIF
The HDA device is what is used by the downstream kernel and stock Ouya Android ROM. The SPDIF device only outputs to the left channel.
Audio output through the HDA device works on the downstream kernel. The HDA device is card 0 device 3. It can be tested by running speaker-test -Dhw:0,3 -c 2
. The SPDIF device is card 1 device 0. It can be tested by running speaker-test -Dhw:1,0 -c 2
.
The mainline kernel has a tegra30-hda driver but it isn't working on Ouya. There is no upstreamed driver for the Tegra30 SPDIF device.
The Tegra30 HDA driver writes 4 frames and then hangs.
$ speaker-test -Dhw:0,3 -c 2
speaker-test 1.1.8
Playback device is hw:0,3
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
snd_pcm_hw_writei
hw_writei: frames = 4096, xferi.result = 4096, err = 0
snd_pcm_hw_writei
hw_writei: frames = 4096, xferi.result = 4096, err = 0
snd_pcm_hw_writei
hw_writei: frames = 4096, xferi.result = 4096, err = 0
snd_pcm_hw_writei
hw_writei: frames = 4096, xferi.result = 4096, err = 0
snd_pcm_hw_writei
hw_writei: frames = 4096, xferi.result = -5, err = -5
Write error: -5,I/O error
xrun_recovery failed: -5,I/O error
Transfer failed: I/O error
The kernel PCM framework in sound/core/pcm_native.c
has a timeout waiting for the device to respond.
[ 691.115717] tegra-hda 70030000.hda: playback write error (DMA or IRQ trouble?)
It is uncertain why the HDA device isn't working on mainline. Possible avenues to explore:
- Compare pinmuxes to downstream kernel.
- Are the necessary clocks enabled and at the correct frequency?
Ethernet
A random MAC address is generated by the kernel at each boot. This is because the smsc9500 Ethernet device does not have a valid mac address stored in EEPROM. To set a consistent MAC address, create the file /etc/udev/rules.d/99-mac-address.rules
with the following udev rule.
ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth0", RUN+="/sbin/ip link set dev %k address f6:23:f0:42:98:cf"
Radio
- The Ouya uses a BCM4330 radio chip for wifi and bluetooth. The downstream and mainline kernel use the same wifi firmware. The firmware shipped with the device is the only known firmware to work with the Ouya. The BCM4330 firmware in
linux-firmware
does not work.
- Two later releases (the completely white special edition and completely black 2nd generation) allegedly use a BCM4334 chipset. This needs to be implemented and tested at a future date.
Display Resolution
On the mainline kernel, display resolutions above 1280x720 are glitchy. The GPU is dependent on memory bandwidth but EMC scaling is not implemented in mainline. The Ouya bootloader sets the memory to 400 Mhz. Higher display resolutions work a bit better when the memory is set to 800Mhz but it is still glitchy.
A kernel patchset was committed on 2021-08-13 to add support for memory bandwidth management. This should be released in v5.15.
HDMI CEC
The Ouya is missing HDMI CEC support at the hardware design level.
References:
UART
The debug UART is exposed on J3, an unpopulated header near the lid. It operates at 115200 baud, 3.3V. The pinout is: 3.3V, TX, RX, GND; pin 1 is marked with a white corner on the silkscreen.
Other Notes
- Splash screen doesn't appear
- USB booting needs to be tested
Installation
How to enter flash mode
1. Connect Ouya to PC
2. Use adb reboot recovery
to enter recovery (or adb reboot bootloader
to enter bootloader for fastboot commands)
Downloads
You'll need OneClickOuyaRecovery.zip from here (original link is dead)
pmbootstrap
1. Flash CWM and Ouya BootMenu.
2. Turn on Ouya, then press the power button many times until it scrolls to Bootloader, and then wait until the boot menu disappears.
3. Run the following using pmbootstrap:
$ # You will be asked for the Postmarket Version and Device. Select edge and ouya (with codename ouya).
$ # You may then select the mainline kernel, or the default 3.1 Ouya kernel for installation.
$ pmbootstrap init
$ pmbootstrap install
$ pmbootstrap export
$ # make sure the Ouya is in the bootloader at this point
$ # if this fails, read below (Flashing to the data partition)
$ pmbootstrap flasher flash_rootfs
WARNING: This will create two partitions under system partition instead of one which won't allow you to use Normal Boot option in Ouya BootMenu |
4. Reboot Ouya, then press the power button many times until it scrolls to Recovery, and then wait until CWM appears.
6. Using CWM menu options, mount /data partition.
7. Copy postmarketOS boot.img to /sdcard as altboot.img:
$ adb push /tmp/postmarketOS-export/boot.img-ouya-ouya /sdcard/altboot.img
8. Reboot Ouya, then press the power button many times until it scrolls to Alternate Boot, and then wait until postmarketOS appears.
Using data partition as rootfs
WARNING: Flashing to the userdata partition will overwrite all data on the device. Backup all data to another device before proceeding. |
It is much more usable to flash rootfs to the data partition which is around 5.7GB in size.
Flashing to the data partition
Specify the partition to flash rootfs to with the --partition
argument:
$ pmbootstrap flasher flash_rootfs --partition userdata
Boot the Ouya into Recovery and make sure to mount /system in recovery. Copy postmarketOS boot.img
and initramfs-extra
to /system
. Unmount /system.
$ adb push /tmp/postmarketOS-export/boot.img /system/
$ adb push /tmp/postmarketOS-export/initramfs-extra /system/
Do note, if the rootfs is larger than ~750mb Ouya's fastboot won't be able to flash it. In that case you may need to use dd
to install the image from a usb drive. This can be done with adb shell in recovery. After you've ran pmbootstrap export
ouya-ouya.img will be in /tmp/postmarketOS-export/
. Make sure to copy the actual files and not the links in /tmp/postmarketOS-export/
.
Boot to recovery, then log into your Ouya with adb shell
# # blkid should list your USB drive as /dev/sda1
# mkdir /tmp/mnt
# mount /dev/sda1 /tmp/mnt
# cd /tmp/mnt
# dd if=ouya-ouya.img of=/dev/block/mmcblk0p9
Updating the kernel
When the apk
package manager updates the kernel package (e.g. linux-ouya-ouya
or linux-ouya-ouya-mainline
) then the boot.img
will be regenerated with the new kernel. Run the following commands on device to install the updated boot.img
:
For altboot.img on /sdcard:
# mkdir /data
# mount /dev/mmcblk1p9 /data
# cp /boot/boot.img-ouya-ouya /data/media/altboot.img
For boot.img on /system:
# mkdir /system
# mount /dev/mmcblk1p3 /system
# cp /boot/boot.img-ouya-ouya /system/boot.img
Maintainer(s)
- rendeko
Contributors
- rendeko
- ryang2678 (Decatf)
- ollieparanoid
Links
- Ouya BootMenu (source)
- CWM
- CyanogenMod documentation blog
- tegra30_debrick tool
- pmaports!269 Add mainline based kernel for Ouya
- Device package