[KERNEL] (Development) Linux 4.x for the OUYA.

pgwipeout

Member
May 26, 2010
44
9
8
THIS WILL LIKELY KILL YOUR OUYA
We provide no warranty to the work here, it will likely cause your OUYA to die if you attempt it.

So myself and another fellow are working on bringing the latest and greatest Linux Kernel to the OUYA.
The good news: It boots to command line. The bad news: That's about all that works right now.

It's in an extremely unstable state right now, I actually managed to burn out the onboard ethernet chip trying to get the regulators right.
I2C causes random hard locks. Don't even ask about I2S. EMMC is detected, but we can't do anything with it yet. Haven't even tried getting video working yet.

If anyone would like to get involved, my repository resides at https://github.com/pgwipeout/linux/

Be warned, this is VERY MUCH a work in progress, don't expect clean commits, sanity in the code, or lack of dragons.
If anyone would like to get involved feel free to post here or use the Github page.

The goals are as follows:
Maintain this as close as possible to mainline, all changes to mainline will be posted as separate patches in the main git.
As much as possible is done through the device tree and kernel config.

Currently we have two patches applied, both are perspective in mainline so we may get lucky and not need them anymore.
Trusted-Foundations Patch: Necessary to get the L2 Cache Controller to work, this enabled secure monitor mode.
Tegra-Clock Patch: The Tegra3 has a lot of clocks that do necessary things, during init the drivers would reset these clocks causing hard locks.

I will post here periodically as we make progress.

/* EDIT: Update 2: The following is the current status of the project. */

I have made enough progress with this that I felt it was time to give an update.
I am sourcing this against Linux-Next, as there is a lot of work going into the Tegra video drivers right now.
Performance is good, though running off USB we get I/O bound extremely easily.
Currently it builds the kernel in about 50 minutes from a clean slate.

Working:
Boots with serial support.
Systemd and Sysvinit are supported.
Reboot works, poweroff does not.
Wifi and Ethernet both work.
Both RTCs.
USB
Four cores active, with L2 cache support.

In Progress:
eMMC support.
CPUFREQ driver support.
Video Support.

eMMC support is proving extremely tricky, we still don't have it talking.
It is currently precluding my first release candidate.

If anyone is interested in building this for themselves, leave me a message and I'll help you out.

Currently a TTL converter is necessary to use this.

The CPUFREQ driver I'm working on porting the T20 driver over.
Video support is hopeful.

UPDATE #1
It's ALIVE!

Working:
V4.14
Boots Reliably, use SysV-Init, Systemd boots, but locks up after a short period.
Onboard Lan
TPS power regulator
USB
Four cores active, fixed at 1 GHz until CPUFREQ is working.
L2 Cache Controller

In Progress:
RTC, both are readable, but writing doesn't work yet.
EMMC support
CPUFREQ (Maybe, not sure if we will ever get this fully working)
Video Support (A lot of experimental drivers and software going into this)
Moving to v4.16

To do:
Proper thermal support (fan is hardcoded on low speed right now)
Audio

Known issues:
Systemd locks up after being left idle
Systemd cannot do any power related functions
Sysvinit can reboot, but poweroff doesn't work yet
 
Last edited:

Zaf9670

Senior Member
Mar 21, 2010
151
17
0
Knoxville, TN
Question, would the development happening on the Switch in any way help your development? I wasn't quite sure if it was a joke or not but fail0verflow did say their exploit may very well work on the Ouya. So I'm not sure if being able to tap into the bootloader would help devleopments or not.

I'm just about to start my deeper linux learning myself and may be able to contribute after a while. fail0verflow/shofel2 on github for reference.
 

pgwipeout

Member
May 26, 2010
44
9
8
Short Answer: Yes and No.
Long Answer: The Switch is light years ahead of the Ouya in terms of the SOC, but there are similarities.
Any development on the Linux kernel for Tegra devices helps.
Unfortunately we likely won't be able to break into the Ouya the same way, since so few of the IO pins are actually utilized on the main board of the Ouya.
Most of the pins on the Ouya's T3 go nowhere.
That being said, we may get lucky, but the number of Ouya's out there to experiment with is much smaller than the number of Switches.
Currently I've gotten 4.16 to boot with good success.
4.17 does not currently boot, likely due to major changes that are occurring in the kernel.
Power management, cpufreq, audio, video, and wireless are still on the table though.
Power management I'm making progress with, sysvinit can do some functions including reboot, but systemd still locks up.
Cpufreq may be shelved indefinitely, I'm using this to learn kernel development and I do not have the skills to port this from the T2 or Nvidia's custom implementation.
Video will likely come with 4.17 or 4.18, a lot of staging work is going on right now.
Audio is slaved to video, so I haven't even tried yet.
Bluetooth and wireless might be a futile effort, as they are running proprietary blobs that do not play nice yet.
But as it is, it boots, USB and networking works, and it is running at 1 GHz on all four cores.
 
  • Like
Reactions: jpearn

theqwertman

Member
Feb 3, 2013
20
3
0
I came across this wondering if there was a way to use any of my old Android devices (which includes my OUYA) as nodes in a Docker cluster, although that generally means using a custom kernel as Android's default has a lot of Docker-required features missing. It sounds like this isn't really in a place where that's possible yet, though, is that right? No eMMC = no disk, boots but then freezes, might overheat?

It frustrates me that I have old Android devices in general that have become useless with their ancient distros. I'd love to be able to do this sort of kernel work to help remedy that. @pgwipeout, how did you end up acquiring the know-how that you needed to make the progress that you have on this?
 

pgwipeout

Member
May 26, 2010
44
9
8
So I did get this pretty well working, though I haven't touched it in a while.
The work is continuing over at PostmarketOS, and their support is shaping up quite nicely as Dmitry's Tegra video driver matures.
The eMMC issues were resolved, and now with the embedded memory controller driver merged into ryang's kernel performance is darn good.

Just to compare performance, the RK3328 running mainline comes in a less than half of the performance of the T33 based Ouya.
 

lolmaniac

New member
Apr 26, 2019
1
0
0
Hey, You still work on this little computer ?

Hello ! I got my hands on a OUYADEVS and i'm looking foward to change the OS to make an operational embedded system. Do you have some updates on your created System ? Much appreciated !
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone