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

[BOOT] FIREFIREFIRE 1.2 - bootloader with recovery selection

Tip us?
 
pokey9000
Old
(Last edited by pokey9000; 10th January 2012 at 07:11 AM.)
#1  
Senior Member - OP
Thanks Meter 385
Posts: 765
Join Date: Apr 2007
Location: Austin
Default [BOOT] FIREFIREFIRE 1.2 - bootloader with recovery selection


This is a replacement bootloader so you can get into recovery with just the one power button. It's very simple to use, just turn on the Fire, and when the logo pops up press the power button.

FIREFIREFIRE also makes fastboot easy. For a few seconds on every boot, fastboot is enabled; no idme bootmode or special cable needed. The USB ID is changed to one that's supported by even the oldest fastboots. Unlike the stock, you do not need to use the "-i 0x1949" on every run of fastboot.

Now FIREFIREFIRE can fix your partition tables. "fastboot oem format" will overwrite the partition table with the stock table. You can use this to revert to factory partitioning if you have been messing with parted or the like, or can be used with the USB boot kit (Rekindle) to manually rebuild a totally bricked Fire. Running this command on 1.0 or earlier will fail.

Release notes:
1.2 - MD5: a8c8d702606de8ab7e73b898de50b4b6 u-boot.bin
  • Merge in 6.2->6.2.1 changes: low battery charge safety shutdown, official offsets for NVRAM params
  • The power LED now tells you more stuff: dim slightly while in fastboot / ready to detect recovery button press, bright green again when the boot of standard OS starts, more orangey orange when recovery starts
  • Fix Amazon's broken LED code

1.1 - MD5: 7a4f1a2ff60b13a3534df318f99d813c u-boot.bin
  • Fixed the built-in partitioning to match the partition map on a stock KF
  • Removed USB PID version. Realized this would screw up Windows. VID:PID will always be 18d1:0100 from now on

1.0
  • Fastboot USB VID switched to Google's VID. Once this is installed you don't need to use "-i 0x1949" on every fastboot command
  • USB PID reflects the version. 0x0100 is version 1.0, 0x0402 is 4.2, etc
0.9
  • New logo with "press power button for recovery" message at the bottom
  • Delays ~10 seconds if no button pressed, but pushing the button immediately goes into recovery
  • During the delay, you can connect with fastboot. Works under Linux, but the delay may be too short for Windows

Howto flash
The TWRP installer flashes FFF 1.0 when it's run. For most purposes this is ok, but because TWRP has been orphaned, I can't recommend it as a way to get the latest. By the time you read this, KFU should support flashing FFF, and for Windows users is by far the easiest way.

Howto flash by hand
  • Get into fastboot mode somehow. Having and older FFF from the TWRP installer is a good start. Currently KFU or fbmode is the easiest
  • flash with "fastboot -i 0x1949 flash bootloader u-boot.bin" (take out "-i 0x1949" if FFF is already installed)
  • disable fastboot: "fastboot -i 0x1949 oem idme bootmode 4000"
  • reboot: "fastboot -i 0x1949 reboot"

Howto backup EVERYTHING (on Linux):
(not relevant in this post anymore, but good reference)
  • This will back up all partitions and the hidden NVRAM data. If you ever have to restore from scratch, you can get fastboot to write a new partition table and then fastboot in these backups
  • Need >8GB local free, and adb installed and able to get a shell.
  • Make a new directory to store the dump files and cd into it.
  • Make sure that your KF is running adb as root. As of 6.2.1 this requires running BurritoRoot, then "adb root" on your PC after it completes.
  • Then run in a terminal:
Code:
for F in `seq 1 12`; do adb pull /dev/block/mmcblk0p$F; done
adb shell idme ? > nvram.txt
On a brand new KF, this backup will bzip2 down to ~300MB. Once you start writing to the flash, this will go up even if you delete files due to nonempty free blocks.

github is now up at https://github.com/pokey9000/kf_u-boot
Attached Files
File Type: zip u-boot-firefirefire-1.2.zip - [Click for QR Code] (126.3 KB, 16729 views)
The Following 23 Users Say Thank You to pokey9000 For This Useful Post: [ Click to Expand ]
 
SikYou
Old
(Last edited by SikYou; 30th November 2011 at 11:47 AM.)
#2  
SikYou's Avatar
Senior Member
Thanks Meter 63
Posts: 389
Join Date: Oct 2010

 
DONATE TO ME
So will this still work with 6.2? I'm confused. Anyway, this is awesome! Just what we needed

Sent from my ADR6400L using Tapatalk
I love you!
 
Xeddicus
Old
#3  
Member
Thanks Meter 6
Posts: 37
Join Date: Nov 2011
Yeah, a boring video of the "factory cable" method since the nvram boot mode is broke would be useful :P But awesome that it works.
 
SikYou
Old
#4  
SikYou's Avatar
Senior Member
Thanks Meter 63
Posts: 389
Join Date: Oct 2010

 
DONATE TO ME
I can't remember what the device was doing before the update but now if I try adb commands for recovery, bootloader, and fastboot, it looks like there is some response. I don't actually get in to recovery but it looks like maybe the device is rebooting in to fastboot. I don't have a ton of experience with this but just figured it was worth mentioning.
 
pokey9000
Old
#5  
Senior Member - OP
Thanks Meter 385
Posts: 765
Join Date: Apr 2007
Location: Austin
Quote:
Originally Posted by SikYou View Post
So will this still work with 6.2? I'm confused. Anyway, this is awesome! Just what we needed

Sent from my ADR6400L using Tapatalk
I just need to debug it. For some reason even the u-boot that comes with the 6.2 source drop doesn't respect the new NVRAM layout. This is just a proof of concept since TWRP is still AWOL, so don't worry. I plan to make the button handling a little more robust, including a way to select recovery or fastboot with just the button so you can ditch the Fire ROM altogether.
 
pokey9000
Old
#6  
Senior Member - OP
Thanks Meter 385
Posts: 765
Join Date: Apr 2007
Location: Austin
Quote:
Originally Posted by SikYou View Post
I can't remember what the device was doing before the update but now if I try adb commands for recovery, bootloader, and fastboot, it looks like there is some response. I don't actually get in to recovery but it looks like maybe the device is rebooting in to fastboot. I don't have a ton of experience with this but just figured it was worth mentioning.
I noticed that too. I tried building the u-boot from the 6.2 source drop and it doesn't detect when I set the bootmode either, but the one in the update .bin does.
 
SikYou
Old
#7  
SikYou's Avatar
Senior Member
Thanks Meter 63
Posts: 389
Join Date: Oct 2010

 
DONATE TO ME
Quote:
Originally Posted by pokey9000 View Post
I just need to debug it. For some reason even the u-boot that comes with the 6.2 source drop doesn't respect the new NVRAM layout. This is just a proof of concept since TWRP is still AWOL, so don't worry. I plan to make the button handling a little more robust, including a way to select recovery or fastboot with just the button so you can ditch the Fire ROM altogether.
Sounds great, looking forward to seeing the finished product.

Sent from my Kindle Fire using Tapatalk
I love you!
 
pokey9000
Old
#8  
Senior Member - OP
Thanks Meter 385
Posts: 765
Join Date: Apr 2007
Location: Austin
Quote:
Originally Posted by Xeddicus View Post
Yeah, a boring video of the "factory cable" method since the nvram boot mode is broke would be useful :P But awesome that it works.


There you go.
The Following 3 Users Say Thank You to pokey9000 For This Useful Post: [ Click to Expand ]
 
SikYou
Old
#9  
SikYou's Avatar
Senior Member
Thanks Meter 63
Posts: 389
Join Date: Oct 2010

 
DONATE TO ME
BTW, have you been in touch with agrabren from TWRP? He is the one kinda spearheading the KF TWRP project and I think one of the issues was not having a reliable method for booting to recovery; if that is the case you have obviously done a lot of work towards solving that problem.

Sent from my Kindle Fire using Tapatalk
I love you!
 
death2all110
Old
#10  
Senior Member
Thanks Meter 236
Posts: 314
Join Date: Sep 2010
Location: Illinois

 
DONATE TO ME
This is awesome!

Not trying to nitpick, but is there a way to add on-screen options or no?

Tags
bootloader u-boot
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes