[Development discussion] FIREFIREFIRE Extended (dualbooting)

Search This thread

three-p-o

Senior Member
Apr 20, 2012
100
29
Thank a lot to lovejoy777 i finally got the dualbooting working

my mistake i was using wrong boot.img compiling command.

Finally, 10 posts so I can finally get help in the correct thread...

What is the command? Because I think that might be why I cannot get mine to work.

My partitions:
Code:
Model: MMC MMC08G (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name        Flags
 1      131kB   262kB   131kB                xloader
 2      262kB   524kB   262kB                bootloader
 3      524kB   11.0MB  10.5MB               dkernel
 4      11.0MB  212MB   201MB                dfs
 5      212MB   229MB   16.8MB               recovery
 6      229MB   296MB   67.1MB  ext4         backup
 7      296MB   307MB   10.5MB               boot
 8      307MB   312MB   5243kB               splash
 9      312MB   849MB   537MB   ext4         system
10      849MB   2041MB  1192MB  ext4         userdata
11      2041MB  2309MB  268MB   ext4         cache
12      2309MB  5810MB  3501MB  fat32        media       msftres
13      5810MB  5821MB  10.5MB               boot2
14      5821MB  6357MB  537MB   ext4         system2
15      6357MB  7550MB  1192MB  ext4         userdata2
16      7550MB  7818MB  268MB   ext4         cache2
My updater scrupt
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p14");
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
.......
package_extract_file("boot.img", "/dev/block/mmcblk0p13");
My init.omap4430.rc
Code:
on fs
    mount ext4 /dev/block/mmcblk0p14 /system wait ro
    mount ext4 /dev/block/mmcblk0p15 /data wait noatime nosuid nodev errors=continue
#    mount ext4 /dev/block/platform/mmci-omap-hs.1/by-name/cache /cache wait noatime nosuid nodev errors=contin$
    mount ext4 /dev/block/mmcblk0p8 /dropbox wait noatime nosuid nodev errors=continue
This is what I have been using to build the boot image after changing the init.
Code:
./mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel boot.img-kernel --ramdisk ramdisk-new.gz -o boot-new.img
I got this from http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
 

lovejoy777

Inactive Recognized Developer
Dec 30, 2011
3,725
4,541
Nottingham
two things
1, data is 16 not 15
2, all i swapped was the text between ""marks, so left everything else the same ie, i think there should be a "0"); at the end
3, its a o not a zero ie mmcklop


Sent from my Kindle Fire using xda premium
 

three-p-o

Senior Member
Apr 20, 2012
100
29
two things
1, data is 16 not 15
2, all i swapped was the text between ""marks, so left everything else the same ie, i think there should be a "0"); at the end
3, its a o not a zero ie mmcklop


Sent from my Kindle Fire using xda premium

I thank you for attempting to help, but I am not entirely sure what the hell you are talking about...
1. The original setting for /data was this
Code:
mount ext4 /dev/block/platform/mmci-omap-hs.1/by-name/userdata /data wait noatime nosuid nodev errors=continue
userdata is supposed to be mapped to userdata2, which is mmcblk0p15. Why are you saying it is 16? Because 16 is cache2...
2. A 0 at the end of what??
3. It is mmcblk0(zero) not mmcblko or mmcblkO. See attached screenshot.

I think the issue is the boot.img that I made. The script and init modifications seem to be correct and in line with what others are using. Also the script installs correctly, its just that I cant boot. Which is why I think its the boot.img recompile.
 

Attachments

  • dev.block.jpg
    dev.block.jpg
    31.5 KB · Views: 126
Last edited:

three-p-o

Senior Member
Apr 20, 2012
100
29
Ah, I see your confusion.
You are under the impression that I used the built in dualboot partition option. I did not. My data is on 15, not 16.

Thank you for the link though. I think I found what I needed with the dsixda's ROM kitchen link on that page. I'll report back if/when it is fixed.
 

lovejoy777

Inactive Recognized Developer
Dec 30, 2011
3,725
4,541
Nottingham
just a quick note.
i found if i modded the updater script in the kitchen for some reason it would never install properly (maybe something to do with converting from update to updater)?
i always choose to leave updater script as is until rom is rebuilt, option (99) then just open up zip with archive manager and edit updater.script, save and flash :)

hope this helps

oh and the zero at the end i was talking about is on most roms i've done, in the boot.img /init.omap4430.rc mod, the "format system" line finishes with a 0 in "" marks?
sorry for the confusion, I wouldn't know where to start altering may own partitions so just presumed you were using the op's stock one's. lol

Sent from my Amazon Kindle Fire using xda premium
 

eldarerathis

Senior Member
Jun 21, 2010
159
316
just a quick note.
i found if i modded the updater script in the kitchen for some reason it would never install properly (maybe something to do with converting from update to updater)?
i always choose to leave updater script as is until rom is rebuilt, option (99) then just open up zip with archive manager and edit updater.script, save and flash :)

hope this helps

oh and the zero at the end i was talking about is on most roms i've done, in the boot.img /init.omap4430.rc mod, the "format system" line finishes with a 0 in "" marks?
sorry for the confusion, I wouldn't know where to start altering may own partitions so just presumed you were using the op's stock one's. lol

Sent from my Amazon Kindle Fire using xda premium

I *only* use the kitchen for the boot images, because it greatly simplifies the unpacking and repacking aspects of it. It never plays nicely with the updater-script for me either so I edit them by hand.
 

three-p-o

Senior Member
Apr 20, 2012
100
29
I think this is going to work as I had nowhere near the correct settings for my rebuild of the boot.img.
Code:
Working folder's boot.img information
-------------------------------------

 Kernel Size                : 3141360 bytes
 Kernel Base Address        : 0x80000000
 Ramdisk Size               : 187920 bytes
 Ramdisk Load Address       : 0x81000000
 Second Stage Size          : 0 bytes
 Second Stage Load Address  : 0x80f00000
 Page Size                  : 4096 bytes
 ASCIIZ Product Name        : (None)

 Command Line: "console=ttyO2,115200n8 mem=463M@0x80000000 init=/init vram=5M omapfb.vram=0:5M"

Ok, so that failed too. I'm going to match the same partition numbers and redo the script/init to use the numbers you use.
 
Last edited:

eldarerathis

Senior Member
Jun 21, 2010
159
316
I think this is going to work as I had nowhere near the correct settings for my rebuild of the boot.img.
Code:
Working folder's boot.img information
-------------------------------------

 Kernel Size                : 3141360 bytes
 Kernel Base Address        : 0x80000000
 Ramdisk Size               : 187920 bytes
 Ramdisk Load Address       : 0x81000000
 Second Stage Size          : 0 bytes
 Second Stage Load Address  : 0x80f00000
 Page Size                  : 4096 bytes
 ASCIIZ Product Name        : (None)

 Command Line: "console=ttyO2,115200n8 mem=463M@0x80000000 init=/init vram=5M omapfb.vram=0:5M"

Ok, so that failed too. I'm going to match the same partition numbers and redo the script/init to use the numbers you use.

Were you using the 3.0 kernel? FWIW, I haven't gotten that to boot on a non-standard boot partition yet. It seems like it's going to start up fine, but then it hangs in the middle with a (IMHO) not-so-helpful and possibly irrelevant logcat message.
 

three-p-o

Senior Member
Apr 20, 2012
100
29
Were you using the 3.0 kernel? FWIW, I haven't gotten that to boot on a non-standard boot partition yet. It seems like it's going to start up fine, but then it hangs in the middle with a (IMHO) not-so-helpful and possibly irrelevant logcat message.

Actually, I'm trying to use the kindle fire 6.3 insecure rom that was posted a few weeks ago.
Maybe that is the issue :p
 

eldarerathis

Senior Member
Jun 21, 2010
159
316
Actually, I'm trying to use the kindle fire 6.3 insecure rom that was posted a few weeks ago.
Maybe that is the issue :p

Oh, okay, nevermind then. For some reason I thought you were using the 3.0 kernel (I should have just gone back to double check your other thread). I did get the 6.2.2 to work eventually with minimal bugs so I would think it's possible to do it with 6.3 unless Amazon changed something significant.
 

three-p-o

Senior Member
Apr 20, 2012
100
29
Oh, okay, nevermind then. For some reason I thought you were using the 3.0 kernel (I should have just gone back to double check your other thread). I did get the 6.2.2 to work eventually with minimal bugs so I would think it's possible to do it with 6.3 unless Amazon changed something significant.

My original idea was to get 3.0 working there, but that was before 3.0 became as reliable as it is now. The only reason I would need to boot to alt, is for recharge, and netflix audio sync issues.

Update: So, apparently my issue was that I was using your original release and not the v2 release. I am now dual booting 3.0 as primary and kindle 6.3 as alternate.
 
Last edited:
  • Like
Reactions: AustinFire

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    Update: For anyone interested in simply USING this, I have started a new thread for the public release of FFF Extended: http://xdaforums.com/showthread.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:

    normalboot.png


    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 :D

    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/FIREFIREFIRE-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://xdaforums.com/showpost.php?p=19800610&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.


    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!
    7
    For anyone following this, I just want to give a quick update:

    This appears to be in a pretty much working state at the moment, but I have a few things I want to try to see if I can alleviate the weirdness on some ROMs (ICS and stock ones, basically). It's just a bunch of shots in the dark, basically, but who knows.

    I'm going to be absolutely slammed at work this week because we're getting ready to ship a new software release on Friday, but I'm hoping to have some time this weekend if all goes well at work. If not then I'll drop in sometime next week to update and hopefully post a "release" thread for the general public shortly thereafter.

    Thanks for your patience!
    5
    this sounds very nice.
    unfortunately a bit to advanced for me to try.
    please excuse my ignorance.
    but can/will, this process be simplified?


    Sent from my Galaxy Nexus using xda premium

    This is what I'm working on now.

    Update: I've already received a sufficient number of PMs from people willing to test, so I'm going to hold off on accepting any additional testers for now so that I can properly attend to any problems the testers may encounter. Thanks for the help everyone!
    4
    I copied your partition layout and cant get CM7 to boot. i flashed your boot2.img but to no avail... any help?

    How did you flash it, and how did you install CM7? For the record, I used dd to copy it over, i.e. from an adb shell in recovery:

    Code:
    # dd if=/sdcard/boot2.img of=/dev/block/mmcblk0p16 bs=512

    Obviously make sure the partition you specify in 'of' is correct so you don't clobber something else. I haven't tried using fastboot to flash it, so I have no idea if that would work or not. To install CM7 I basically just extracted one of the flashable zips and copied everything in /system onto /system2.

    I say wait, we need something similiar to OEM format, but for this. something like multiboot format and it can set this layout, redo OEM format to go back to stock tables.

    Sent from my HTC Glacier using xda premium

    I've been testing a few shell scripts to do the partitioning (and undo it) this evening. It seems to be working okay, so I'd like to try packaging them into zips that can be flashed via recovery.

    So far it's promising, and it's actually pretty safe since the *only* partition that gets modified is /sdcard, so even an error doesn't make my system unbootable or anything. I also repackaged a CM7 build such that it can be flashed from recovery and it will successfully write to the secondary partition set, so no manual copying is required (yay!) but I had to modify the boot image and updater-script (meh).

    Earlier today I experimented a bit with trying to boot from filesystem images kind of like BootManager does, but I haven't been able to make it work (it hangs at the boot splash). I'm not sure if it's worth investigating that angle further at this point.
    4
    I don't want any puppies to die, but is there an update on your progress to this much wanted concept:)

    Sent from my Kindle Fire using xda premium

    I've got some testing in motion. Everything works on my own Fire in both ClockworkMod and TWRP, so I'm hoping I've got this nailed down for the most part. Ideally we'll have some broader testing results in the next couple of days. In the meantime I'll be kind of on hold code-wise to see how my latest changes shake out.

    Incidentally, I don't have a Twitter account (because I think it's kind of stupid) and I don't really use Google+ much, but anyone who wants to keep up on progress is free to poke around my GitHub activity. You'll generally only see when I've committed or uploaded stuff, but it's the fastest way to keep track of what I'm working on, I suppose. Or keeping an eye on this thread. I'll try to keep popping back in here for regular-ish updates when I have them.