Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Development discussion] FIREFIREFIRE Extended (dualbooting)

OP eldarerathis

15th March 2012, 05:28 AM   |  #1  
OP Senior Member
Thanks Meter: 315
 
158 posts
Join Date:Joined: Jun 2010
More
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!
Last edited by eldarerathis; 23rd April 2012 at 06:13 PM.
The Following 14 Users Say Thank You to eldarerathis For This Useful Post: [ View ]
15th March 2012, 05:50 AM   |  #2  
Senior Member
Flag 127.0.0.1
Thanks Meter: 180
 
281 posts
Join Date:Joined: Nov 2008
More
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!
15th March 2012, 05:53 AM   |  #3  
MainCourse's Avatar
Member
Flag New Zealand - Kiwi as bro
Thanks Meter: 25
 
74 posts
Join Date:Joined: Mar 2012
More
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?
15th March 2012, 06:20 AM   |  #4  
Senior Member
Flag 127.0.0.1
Thanks Meter: 180
 
281 posts
Join Date:Joined: Nov 2008
More
The ICS roms are all around in this same forum. I have been using the EnergyRom and i highly recommend it.
15th March 2012, 06:21 AM   |  #5  
OP Senior Member
Thanks Meter: 315
 
158 posts
Join Date:Joined: Jun 2010
More
Quote:
Originally Posted by johnwayne007

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

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.
15th March 2012, 06:24 AM   |  #6  
CodenameDeadpool's Avatar
Senior Member
Thanks Meter: 39
 
441 posts
Join Date:Joined: Dec 2011
More
Question Just to be clear...
We need to re-partition in order to user this?
15th March 2012, 06:27 AM   |  #7  
smirkis's Avatar
Senior Member
San Diego, CA
Thanks Meter: 613
 
1,808 posts
Join Date:Joined: Oct 2010
More
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
15th March 2012, 06:32 AM   |  #8  
OP Senior Member
Thanks Meter: 315
 
158 posts
Join Date:Joined: Jun 2010
More
Quote:
Originally Posted by CodenameDeadpool

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.
Last edited by eldarerathis; 15th March 2012 at 06:36 AM.
The Following User Says Thank You to eldarerathis For This Useful Post: [ View ]
15th March 2012, 07:29 AM   |  #9  
Senior Member
Thanks Meter: 43
 
412 posts
Join Date:Joined: 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
15th March 2012, 07:42 AM   |  #10  
aaricchavez's Avatar
Senior Member
Flag Tampa
Thanks Meter: 47
 
170 posts
Join Date:Joined: Aug 2010
Donate to Me
More
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.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes