Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,156 Members 40,197 Now Online
XDA Developers Android and Mobile Development Forum

[Development discussion] FIREFIREFIRE Extended (dualbooting)

Tip us?
 
eldarerathis
Old
(Last edited by eldarerathis; 23rd April 2012 at 05:13 PM.)
#1  
Senior Member - OP
Thanks Meter 306
Posts: 154
Join Date: Jun 2010
Default [Development discussion] FIREFIREFIRE Extended (dualbooting)

Update: For anyone interested in simply USING this, I have started a new thread for the public release of FFF Extended: http://forum.xda-developers.com/show....php?t=1615093. I wanted to keep all of this development discussion separate from the release.

I'm going to re-purpose the title a bit to leave this as a general discussion thread (at least for now) since there's still a lot of interesting discussion still taking place.

-----

Please understand the following: This is what I consider a proof-of-concept only. It will probably not be all that useful to most people unless you have your device partitioned the same way mine is (protip: you almost certainly DON'T). Please please PLEASE don't mess with this (for now) unless you understand what you're doing. Thanks!

-----

So as the title and little disclaimer above states, I've got something of a proof-of-concept that I wanted to share in case it proves to be useful for others down the line. What I've basically done is taken FIREFIREFIRE 1.2 (thank you pokey9000!) and modified it a bit so that I can dual boot my Fire.

The way this works is actually pretty simple. FFF1.2 lets you get into recovery by starting up fastboot and listening for 10 seconds for you to press the power button. If you press it then it boots into recovery instead of doing a normal boot.

What this version does is somewhat different: it listens for 5 seconds and starts up fastboot like FFF1.2 does, but when you press the power button it restarts the 5 second countdown and effectively changes the selected boot state. This provides more flexibility because it allows you to "cycle" between boot options instead of just being a one-shot thing.

Here's a (somewhat blurry) video demo to help illustrate how it works:



In the video I'm dual booting CM9 (which is on my normal boot partition) and CM7 (which is set up on a "boot2" partition). I know it's really hard to read, but the boot options are "Normal boot", "Recovery", and "Alternate boot". Here's a screenshot:



Before you say anything, I know it's not fancy. The u-boot image needs to fit onto the bootloader partition, and fancy images are simply too big to fit, whereas ones with a lot of solid colors (in this case mostly black) can be compressed much smaller when using RLE. Sorry to all you graphics types out there

This is still rough around the edges, but the basic breakdown of what's been changed is:
  • Fastboot delay is 5 seconds instead of 10
  • Delay resets to 5 after each button press
  • Visually indicates what you're selecting to boot
  • Adds the option to boot from a boot2 partition (in addition to boot and recovery as normal)

Also note, if you decide to try this out: the button still has a slight delay at startup before it will accept input. You can tell when it's ready for input when the LED fades a bit (from bright green to darker green), just like on FFF 1.2 (this is simply unchanged). So don't mash the button right after the screen comes up, because it won't respond. You also may need to press and hold it for just a split second to make sure it registers the press properly. Just a few minor niggles.

The source for this can all be found on my GitHub here: https://github.com/eldarerathis/FIRE...-Multiboot-PoC. Fair warning: I'm not really a C guy, I'm a C#/Java guy by trade, so this may not be the prettiest C (it's been a few years). However, I hope that it's easy enough to follow to perhaps be useful in a more friendly dual-boot solution that doesn't involve repartitioning like I did.

Again, this probably needs some more work, but I wanted to share nonetheless. Also, if you really want to you can use this as a bootloader just for getting into recovery. Selecting "Alternate boot" will in theory not really do anything if you try to use it but you don't have a boot2 partition (and you'd simply need to restart your device), so...don't select it from the menu and you're fine. This also boots fine using pokey9000's omap4boot (see it here: http://forum.xda-developers.com/show...0&postcount=74) for testing it out.

With that in mind, here's a binary you can play with if you want to, but remember - use at your own risk! Just unzip and flash it with fastboot ('fastboot flash bootloader u-boot.bin') or boot it from omap4boot.
https://github.com/downloads/eldarer...-multiboot.zip
I may also make a version that replaces the "Alternate boot" option with something like "Fastboot" so that it will be more useful to the general public for the time being. I was thinking that might be nice so you don't have to worry about catching the fastboot delay from your computer.

Lastly, thanks again to pokey9000 for his FIREFIREFIRE work that this is all built on. Remember where it started people!

Got an Android question? Stop by Android Enthusiasts!
The Following 14 Users Say Thank You to eldarerathis For This Useful Post: [ Click to Expand ]
 
johnwayne007
Old
#2  
Senior Member
Thanks Meter 178
Posts: 272
Join Date: Nov 2008
Location: 127.0.0.1
Thats awesome, i have been testing Bootmanager on my KF and it seems to work pretty smooth. I like this concept though, if you want someone else to give it a try i'm willing. Definitely Good stuff though!
Devices

ATT LG Optimus G (TwistedKat 2.4)
Asus Nexus 7 (Stock 4.4.2)
 
MainCourse
Old
#3  
MainCourse's Avatar
Member
Thanks Meter 25
Posts: 74
Join Date: Mar 2012
Location: New Zealand - Kiwi as bro
Default Thanks!

Cool, looks great.
Thanks for making dual boot possible!
BTW, what is the ICS rom you're using?
and where do you get it?
If I helped, Click Thanks!
---------------------------------------------------
Devices:
Phone(s): Current: Sony Xperia Z Previous: Motorola RaZr XT910, Motorola Defy, HTC Wildfire S, Huawei IDEOS X3 and U8150, iPhone 3G
Tablets: Nexus 7, and ma trusty ol' HP Touchpad
---------------------------------------------------
 
johnwayne007
Old
#4  
Senior Member
Thanks Meter 178
Posts: 272
Join Date: Nov 2008
Location: 127.0.0.1
The ICS roms are all around in this same forum. I have been using the EnergyRom and i highly recommend it.
Devices

ATT LG Optimus G (TwistedKat 2.4)
Asus Nexus 7 (Stock 4.4.2)
 
eldarerathis
Old
#5  
Senior Member - OP
Thanks Meter 306
Posts: 154
Join Date: Jun 2010
Quote:
Originally Posted by johnwayne007 View Post
Thats awesome, i have been testing Bootmanager on my KF and it seems to work pretty smooth. I like this concept though, if you want someone else to give it a try i'm willing. Definitely Good stuff though!
At some point I may try to write up what I did to create my dual boot setup, at which point you'd certainly be welcome to try it out. The thing is that I did mine by creating a second set of partitions which I named boot2, system2, userdata2 and cache2, then I put CM7 on these secondary partitions. In doing that, I also had to modify the boot image to point to the right places.

In other words, it's probably not for the faint of heart at this point, but if something easier can be worked out then maybe this will prove to be a useful bootloader. I might try to figure out how the NC/NT are doing their boot from SD card stuff since we could probably fake it with the /sdcard partition even though it's not a physically separate card (or something like that).

Quote:
Originally Posted by MainCourse View Post
Cool, looks great.
Thanks for making dual boot possible!
BTW, what is the ICS rom you're using?
and where do you get it?
It's CyanogenMod 9, from nind's source tree. You can grab the latest unofficial build from this thread: http://forum.xda-developers.com/show....php?t=1411895.

Got an Android question? Stop by Android Enthusiasts!
 
CodenameDeadpool
Old
#6  
CodenameDeadpool's Avatar
Senior Member
Thanks Meter 39
Posts: 441
Join Date: Dec 2011
Question Just to be clear...

We need to re-partition in order to user this?
 
smirkis
Old
#7  
smirkis's Avatar
Senior Member
Thanks Meter 611
Posts: 1,805
Join Date: Oct 2010
Location: San Diego, CA
very nice! I was talking with fattire about porting cyanoboot but you pretty much made it out of fff, I'm astonished. bravo.

Sent from my Kindle Fire using xda premium
T-Mobile G2>HTC Glacier>Samsung Galaxy Nexus>Google Nexus 4

Asus Transformer>Amazon Kindle Fire>Google Nexus 7>2013 Nexus 7
 
eldarerathis
Old
(Last edited by eldarerathis; 15th March 2012 at 05:36 AM.)
#8  
Senior Member - OP
Thanks Meter 306
Posts: 154
Join Date: Jun 2010
Quote:
Originally Posted by CodenameDeadpool View Post
We need to re-partition in order to user this?
To use the alternate boot at this point, yes. I mainly did it just to see if I could do it (and for my own use) so it's not yet ideal for mass consumption. You could also use it strictly for getting into recovery if you wanted, you'd just have no use for the third option in the boot menu. Nothing damaging should happen if you were to accidentally choose "Alternate Boot" in that case. I've tested it after deleting my boot2 partition and it just hangs at the splash screen, forcing me to simply hold down the power button to restart it.

Got an Android question? Stop by Android Enthusiasts!
The Following User Says Thank You to eldarerathis For This Useful Post: [ Click to Expand ]
 
foxdog66
Old
#9  
Senior Member
Thanks Meter 43
Posts: 407
Join Date: Jul 2010
Sweet. Just out of curiosity, would it be possible to have an option to repartition the device built into the bootloader that works like the fastboot OEM format option? With say pre defined layouts
 
aaricchavez
Old
#10  
aaricchavez's Avatar
Senior Member
Thanks Meter 47
Posts: 169
Join Date: Aug 2010
Location: Tampa

 
DONATE TO ME
This is pretty cool. I don't think i'll use it right now as it seems like too much work, but thanks alot for sharing this with us.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes