[BOOTLOADER][SAFEBOOT] Ouya Bootmenu (mlq)

Search This thread

milaq

Inactive Recognized Developer
Feb 24, 2009
638
2,643
milaq.net
https%3A%2F%2Fi.ibb.co%2FXz9gtGC%2Fbootloader.png


Ouya Bootmenu development/release thread

This is based on the awesome work by Hal9k.
Because of the fact that the Ouya doesn't have recovery accessibility via hardware buttons we need to play safe and utilise chainbooting.
This bootmenu resides in the kernel partition and is loaded on every normal bootup.
In-depth info in Hal9k's thread here: http://forum.xda-developers.com/showthread.php?t=2499673.

It presents various choices on every boot:
  • Normal boot - (default) loads bootimage from system partition (/system/boot.img)
  • Alternate boot - loads bootimage from sdcard (/sdcard/altboot.img)
  • Recovery - reboots into recovery (recovery partition)
  • Failsafe - loads built-in failsafe mode
  • Bootloader - Reboots into stock bootloader (for fastboot access - USE WITH CARE)

Notes about the failsafe
the failsafe mode (which has the bootmenu built-in) will pop up in the following cases:
  • the bootmenu could not find a valid bootimage (read: /system/boot.img for "normal boot"; /sdcard/altboot.img for "alternate boot")
  • the user selects "failsafe" from the menu

the failsafe mode resides in the bootmenu image itself and should ONLY be used (as its name suggests) as failsafe.
for regular flashing you need to use a newer cwm version which resides in the recovery partition and is accessible via the "recovery" entry in the bootmenu (see below).

And remember: After flashing this you DON'T NEED TO EVER touch your boot/LNX partition again

Reminder: Failsafe mode is ONLY to be used in case you can't boot into your recovery partition. For regular rom flashing the respective CWM recovery (see below) is required.

Installation
You need to have a newer CWM recovery installed in order to flash the bootmenu.
READ AND UNDERSTAND what you are doing!
This bootmenu is flashed over your current bootimage - newer cyanogenmod builds will place their bootimage to /system/boot.img automatically. if you are not using a custom rom you will need to relocate your bootimage (read: kernel) to /system/boot.img manually.

You need to have a newer CWM recovery installed in order to flash the bootmenu (otherwise you'll get a build.product mismatch while installing).

1a) If you already have an older custom recovery installed:
Boot into recovery and flash https://download.milaq.net/public/android/ouya/misc/recovery-clockwork-6.0.4.8-ouya.zip. This will update your recovery to a newer version allowing you to flash the bootmenu regularly.

1b) If you don't have a custom recovery installed:
You can either use the one-click installer from http://forum.xda-developers.com/showthread.php?t=2295645 and continue with step 1a).
Or you can flash a newer recovery via fastboot (if you know what you are doing): https://download.milaq.net/public/android/ouya/misc/recovery-clockwork-6.0.4.8-ouya.img

2.) Flash the bootmenu via (the new) recovery by installing the latest updatezip (download below). Make sure that the installation procedure was successful.
If you get a "MD5 mismatch" your download is probably broken. Just redownload and try again. The installscript checks the md5's mutliple times while installing and reflashes your old bootimage in case something goes wrong.
So if you are not doing something REALLY stupid this is safe to go.

Download
Download latest version (v2.0.4)


Changelog
Code:
2.0.4
 * reduce menu timeout for faster regular boot
 * ui improvements in failsafe mode

2.0.3
 * bootmenu: increase maximum number of input devices to 5 - e.g. the gpio
   keys (the ouya power button - 1 node), a mutlimedia keyboard (2 nodes), a mouse (1 nodes)
   and a controller (1 node).

2.0.2
 * add in additional alternate boot image folder handling to fix compatibility with kitkat
 * update failsafe recovery to differ more from regular recovery
 * minor ui and ux tweaks in both bootmenu and failsafe

2.0.1
 * initial reworked version
And as always: we take no responsibility whatsoever for raging, screaming, crying, frustration, failing, confusion, dead kittens, etc.

Source
https://github.com/milaq/ouya_bootmenu
 
Last edited:

milaq

Inactive Recognized Developer
Feb 24, 2009
638
2,643
milaq.net
Thanks/Credits
  • Hal9k - for the inital ouya bootmenu and many great ideas
  • Dan Pasanen (invisiblek) - for great work on the recovery and initial porting efforts

Let me know if i omitted you and i will add you here asap

IRC channel
Visit us in #cyanogenmod (general) or #cyanogenmod-dev (only dev related talk) on freenode
 

milaq

Inactive Recognized Developer
Feb 24, 2009
638
2,643
milaq.net
alright so i installed it, and normal boot boots back into recovery

This bootmenu is flashed over your current bootimage (you will need to relocate your kernel (to /system/boot.img) if you not using a custom rom)

most probably because /system/boot.img is not found. you need to install cyanogenmod afterwards or relocate your bootimage if still on stock.
 

frickinjerms

Senior Member
Sep 14, 2008
715
378
34
Victoria, TX
Fyi everyone, if you scroll down through the options in cmw a couple times you'll activate rainbow mode! I'm not sure if this is an ouya specific cmw mod or not cuz all my other devices have twrp but anywho ENJOY!

Sent from my Galaxy Nexus using XDA Premium 4 mobile app
 

effortless

Senior Member
Feb 11, 2007
859
1,380
Philadelphia
Is it possible to use this bootloader with the EternityProject Kernel 3.4.37 for OUYA and the OUYA-Enhanced Rom. I can flash the ROM from within Recovery, but how do I install their kernel for it to boot in ouya bootmenu? I just don't want to brick, thanks for your help!
 

paco8

Senior Member
May 12, 2013
212
87
Just wanted to be the first to tell you that it's working fine and I'm glad to finally give the ouya what it deserves: a custom ROM! Thanks dude!
 

firmtech

Member
Jan 22, 2010
6
2
So can this be dualbooted? If stock ouya boot image is put on /sdcard and named altboot.bin? Right now if I select Alternate Boot, it boots cwm 6.0.3.2. Same as Failsafe.
 

milaq

Inactive Recognized Developer
Feb 24, 2009
638
2,643
milaq.net
So can this be dualbooted? If stock ouya boot image is put on /sdcard and named altboot.bin? Right now if I select Alternate Boot, it boots cwm 6.0.3.2. Same as Failsafe.

update the bootmenu to v2.0.2 and rename your alternate bootimage on /sdcard to "altboot.img" and you should be ready to go
 

krest

Member
May 15, 2009
42
7
milaq thanks for excellent work....
Can you add reboot recovery options in Ouya Failsafe menu to get the full recovery menu?
The power button(for choices) works only if ouya connected-hdmi to hdmi
If Ouya connected hdmi to dvi(Pc monitor) the power button does not respond!
So to go into recovery mode, you can use alt + printScn (SysRq) + i (if keyboard connected)
But now the Ouya goes into a Failsafe menu.
 

milaq

Inactive Recognized Developer
Feb 24, 2009
638
2,643
milaq.net
version bump again

the power button does not respond!

i suspect that you have too many input devices connected during boot.
in version <=2.0.2 the maximum number of input devices that are recognised in the bootmenu was 3.
in case you have a keyboard (usually takes up 2 input nodes) and a mouse connected, the ouya power button (also an input device) was at the end of the list thus not taken into account.

i raised the number of recognised input devices to 5 in version 2.0.3 (see first post for download). that should allow most setups to work fine.

in case you still can't use the power button to select just briefly disconnect your usb devices at boot and reconnect them after making your choice in the bootmenu.
 

krest

Member
May 15, 2009
42
7
i suspect that you have too many input devices connected during boot.
in version <=2.0.2 the maximum number of input devices that are recognised in the bootmenu was 3.
in case you have a keyboard (usually takes up 2 input nodes) and a mouse connected, the ouya power button (also an input device) was at the end of the list thus not taken into account.

i raised the number of recognised input devices to 5 in version 2.0.3 (see first post for download). that should allow most setups to work fine.

in case you still can't use the power button to select just briefly disconnect your usb devices at boot and reconnect them after making your choice in the bootmenu.

Yes, you're right....
Now it's working perfectly
In any case, it would be great if you added the reboot recovery options in Ouya Failsafe menu.
Thanks
 
Last edited:

KJRob

Member
Aug 1, 2013
39
9
Bringhurst
Dual Boot

Now that I have CWM with the newest boot menu and CM11 running super smooth how do I go about flashing the stock Ouya ROM to the SD card without wiping the whole thing again? Must restore balance in the household. The natives are demanding to have Amazing Frog back!
 

milaq

Inactive Recognized Developer
Feb 24, 2009
638
2,643
milaq.net
bootmenu v2.0.4

new version up.
see first post for details.

Now that I have CWM with the newest boot menu and CM11 running super smooth how do I go about flashing the stock Ouya ROM to the SD card without wiping the whole thing again?

dual booting the stock rom is not as easy as it may seem.
with the boot menu you _have_ the ability to dual boot another boot image (read: kernel/ramdisk) but you still need to have a partition where all stock roms system files reside. the internal "sdcard" is out of the game here as it is just a fused filesystem. but i could imagine external usb storage or such. one needs to partition it and make the respective changes to the stock ramdisk for it to work.

nevertheless, i will not spend time working on stock rom dualboot compatibility. but anyone willing to invest time into it is very welcomed to do so.
 

KJRob

Member
Aug 1, 2013
39
9
Bringhurst
new version up.
see first post for details.



dual booting the stock rom is not as easy as it may seem.
with the boot menu you _have_ the ability to dual boot another boot image (read: kernel/ramdisk) but you still need to have a partition where all stock roms system files reside. the internal "sdcard" is out of the game here as it is just a fused filesystem. but i could imagine external usb storage or such. one needs to partition it and make the respective changes to the stock ramdisk for it to work.

nevertheless, i will not spend time working on stock rom dualboot compatibility. but anyone willing to invest time into it is very welcomed to do so.

I appreciate the reply. I would love to have the know how to do the work but that is out of my knowledge base. Maybe one day I will. I can wait for the official Ouya store to hit android. The kids will have to wait as well. I love my KK device just the way it is.
 

IncognitoMan

Senior Member
Jul 2, 2013
132
209
dual booting the stock rom is not as easy as it may seem.
with the boot menu you _have_ the ability to dual boot another boot image (read: kernel/ramdisk) but you still need to have a partition where all stock roms system files reside. the internal "sdcard" is out of the game here as it is just a fused filesystem. but i could imagine external usb storage or such. one needs to partition it and make the respective changes to the stock ramdisk for it to work.

nevertheless, i will not spend time working on stock rom dualboot compatibility. but anyone willing to invest time into it is very welcomed to do so.

It's doable but once its done both sides of the roms would have significant storage reduction... on another note the method would be completely ( and easily ) reversible to the actual installed rom.

The other route is like you said with usb storage which would probably be the better of the 2 options.

Although with all this said we know that the ouya storefront is coming in the form of an app and I guess the other option would be to "portablize" the current framework ( I did it with 519... could try with the latest one... but I never tried it on anything higher than 4.3 )
 
  • Like
Reactions: primo_4c4

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    https%3A%2F%2Fi.ibb.co%2FXz9gtGC%2Fbootloader.png


    Ouya Bootmenu development/release thread

    This is based on the awesome work by Hal9k.
    Because of the fact that the Ouya doesn't have recovery accessibility via hardware buttons we need to play safe and utilise chainbooting.
    This bootmenu resides in the kernel partition and is loaded on every normal bootup.
    In-depth info in Hal9k's thread here: http://forum.xda-developers.com/showthread.php?t=2499673.

    It presents various choices on every boot:
    • Normal boot - (default) loads bootimage from system partition (/system/boot.img)
    • Alternate boot - loads bootimage from sdcard (/sdcard/altboot.img)
    • Recovery - reboots into recovery (recovery partition)
    • Failsafe - loads built-in failsafe mode
    • Bootloader - Reboots into stock bootloader (for fastboot access - USE WITH CARE)

    Notes about the failsafe
    the failsafe mode (which has the bootmenu built-in) will pop up in the following cases:
    • the bootmenu could not find a valid bootimage (read: /system/boot.img for "normal boot"; /sdcard/altboot.img for "alternate boot")
    • the user selects "failsafe" from the menu

    the failsafe mode resides in the bootmenu image itself and should ONLY be used (as its name suggests) as failsafe.
    for regular flashing you need to use a newer cwm version which resides in the recovery partition and is accessible via the "recovery" entry in the bootmenu (see below).

    And remember: After flashing this you DON'T NEED TO EVER touch your boot/LNX partition again

    Reminder: Failsafe mode is ONLY to be used in case you can't boot into your recovery partition. For regular rom flashing the respective CWM recovery (see below) is required.

    Installation
    You need to have a newer CWM recovery installed in order to flash the bootmenu.
    READ AND UNDERSTAND what you are doing!
    This bootmenu is flashed over your current bootimage - newer cyanogenmod builds will place their bootimage to /system/boot.img automatically. if you are not using a custom rom you will need to relocate your bootimage (read: kernel) to /system/boot.img manually.

    You need to have a newer CWM recovery installed in order to flash the bootmenu (otherwise you'll get a build.product mismatch while installing).

    1a) If you already have an older custom recovery installed:
    Boot into recovery and flash https://download.milaq.net/public/android/ouya/misc/recovery-clockwork-6.0.4.8-ouya.zip. This will update your recovery to a newer version allowing you to flash the bootmenu regularly.

    1b) If you don't have a custom recovery installed:
    You can either use the one-click installer from http://forum.xda-developers.com/showthread.php?t=2295645 and continue with step 1a).
    Or you can flash a newer recovery via fastboot (if you know what you are doing): https://download.milaq.net/public/android/ouya/misc/recovery-clockwork-6.0.4.8-ouya.img

    2.) Flash the bootmenu via (the new) recovery by installing the latest updatezip (download below). Make sure that the installation procedure was successful.
    If you get a "MD5 mismatch" your download is probably broken. Just redownload and try again. The installscript checks the md5's mutliple times while installing and reflashes your old bootimage in case something goes wrong.
    So if you are not doing something REALLY stupid this is safe to go.

    Download
    Download latest version (v2.0.4)


    Changelog
    Code:
    2.0.4
     * reduce menu timeout for faster regular boot
     * ui improvements in failsafe mode
    
    2.0.3
     * bootmenu: increase maximum number of input devices to 5 - e.g. the gpio
       keys (the ouya power button - 1 node), a mutlimedia keyboard (2 nodes), a mouse (1 nodes)
       and a controller (1 node).
    
    2.0.2
     * add in additional alternate boot image folder handling to fix compatibility with kitkat
     * update failsafe recovery to differ more from regular recovery
     * minor ui and ux tweaks in both bootmenu and failsafe
    
    2.0.1
     * initial reworked version
    And as always: we take no responsibility whatsoever for raging, screaming, crying, frustration, failing, confusion, dead kittens, etc.

    Source
    https://github.com/milaq/ouya_bootmenu
    8
    Thanks/Credits
    • Hal9k - for the inital ouya bootmenu and many great ideas
    • Dan Pasanen (invisiblek) - for great work on the recovery and initial porting efforts

    Let me know if i omitted you and i will add you here asap

    IRC channel
    Visit us in #cyanogenmod (general) or #cyanogenmod-dev (only dev related talk) on freenode
    4
    new version

    new version is available in the first post
    4
    bootmenu v2.0.4

    new version up.
    see first post for details.

    Now that I have CWM with the newest boot menu and CM11 running super smooth how do I go about flashing the stock Ouya ROM to the SD card without wiping the whole thing again?

    dual booting the stock rom is not as easy as it may seem.
    with the boot menu you _have_ the ability to dual boot another boot image (read: kernel/ramdisk) but you still need to have a partition where all stock roms system files reside. the internal "sdcard" is out of the game here as it is just a fused filesystem. but i could imagine external usb storage or such. one needs to partition it and make the respective changes to the stock ramdisk for it to work.

    nevertheless, i will not spend time working on stock rom dualboot compatibility. but anyone willing to invest time into it is very welcomed to do so.
    2
    version bump again

    the power button does not respond!

    i suspect that you have too many input devices connected during boot.
    in version <=2.0.2 the maximum number of input devices that are recognised in the bootmenu was 3.
    in case you have a keyboard (usually takes up 2 input nodes) and a mouse connected, the ouya power button (also an input device) was at the end of the list thus not taken into account.

    i raised the number of recognised input devices to 5 in version 2.0.3 (see first post for download). that should allow most setups to work fine.

    in case you still can't use the power button to select just briefly disconnect your usb devices at boot and reconnect them after making your choice in the bootmenu.
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