Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,729,823 Members 52,716 Now Online
XDA Developers Android and Mobile Development Forum

[TABLET Z COMPETITION ENTRY]Multiboot solution [Updated 31/07/2013]

Tip us?
 
rayman
Old
(Last edited by rayman; 31st July 2013 at 08:01 PM.)
#1  
Recognized Developer - OP
Thanks Meter 1086
Posts: 247
Join Date: May 2008

 
DONATE TO ME
Tablet [TABLET Z COMPETITION ENTRY]Multiboot solution [Updated 31/07/2013]

About:
The end-goal is to allow a graphical menu (similar to grub on PC's) that lets you boot different kernels (and ROMs - requires the ROM's to support it) from various media. This includes on-flash, SD based and USB but could theoretically also include network booting as well.

Method:
My current plan is to base the solution on the kexec-hardboot patches my mkasick. I've previously ported those patches to ASUS TF201 and my changes have then been adapted to Nexus 7 and is being used quite extensively.

At present time there is one big disadvantage to this method: It puts requirements on the target kernel. One of my goals in this project is to remove those requirements, so it will also work with stock unmodified kernels.

As far as the graphical part is concerned, the original plan was an extended KxecBoot(.org) or MultiBoot (based on TWRP).
After investigating the available solutions, I decided that I'd (shock-horror) implement my own. The current solutions seem overcomplicated to use and not exactly pretty to look at.

My solution, dubbed Hydra, is a simple - true-and-tried - grid of icons. It's based on recovery's minui graphics and the grid automatically aligns based on how many boot images are present. At present it is limited to 10 boot images, but this will be changed later.
The graphics rendering is optimized and will be improved further, possibly allowing for simple animations and such - but lets leave that for a v2

See screenshots in second post.
It works by reading a simple boot.ini, specifying name, icon, boot.img or raw kernel + ramdisk + cmdline. The device-specific commandline arguments required to boot the kernel will all features are automatically appended to the given cmdline, similarly to how the bootloader does it.
It is going to support multiple boot.ini's which are then merged to give the final set of images. This allows storing a boot.ini on e.g. microsd or usb storage and automatically get a suitable boot icon.

Source and images will come soon, there are a few minor issues that needs to be finished first.

Progress:
  • Tablet arrived!
  • 06/07/13: Kexec patches tested successfully! Kexec booting is a go!
  • 31/07/13: Multiboot solution is nearly done

Links:
Stock kernel with patches
CM Kernel with patches
Kexec tools with hardboot patches

Credits:
Mike Kasick for thinking up the original kexec hardboot patches
DO NOT PRIVATE MSG, EMAIL, TRACK ME DOWN ON FACEBOOK OR ANYTHING ELSE.

Sony Xperia Z (Stock!)
ASUS Transformer Prime (CM10.1)
Notion Ink Adam LCD/3G (AOSP ICS)

NvFlash for B70+ Devices
NvFlash: TF201 | TF300 I TF700
The Following 8 Users Say Thank You to rayman For This Useful Post: [ Click to Expand ]
 
rayman
Old
(Last edited by rayman; 4th August 2013 at 08:34 PM.)
#2  
Recognized Developer - OP
Thanks Meter 1086
Posts: 247
Join Date: May 2008

 
DONATE TO ME
Screenshots:
Actual example of boot images loaded from a boot.ini:


Test with 5 icons


Test with 10 icons:
Attached Thumbnails
Click image for larger version

Name:	hydra_debian.jpg
Views:	3136
Size:	13.8 KB
ID:	2164912   Click image for larger version

Name:	hydra5.jpg
Views:	3133
Size:	16.4 KB
ID:	2164913   Click image for larger version

Name:	hydra16.jpg
Views:	3125
Size:	26.8 KB
ID:	2164914  
DO NOT PRIVATE MSG, EMAIL, TRACK ME DOWN ON FACEBOOK OR ANYTHING ELSE.

Sony Xperia Z (Stock!)
ASUS Transformer Prime (CM10.1)
Notion Ink Adam LCD/3G (AOSP ICS)

NvFlash for B70+ Devices
NvFlash: TF201 | TF300 I TF700
The Following 3 Users Say Thank You to rayman For This Useful Post: [ Click to Expand ]
 
rayman
Old
(Last edited by rayman; 4th August 2013 at 12:31 PM.)
#3  
Recognized Developer - OP
Thanks Meter 1086
Posts: 247
Join Date: May 2008

 
DONATE TO ME
Default Frequently Asked Questions

FAQ:

How does it work?
In essence, it works by replacing kernel/bootimage in RAM while booting.

What does it allow booting from?
It allows booting from any media the linux kernel can access on the device. This includes internal flash (any partition), external SD card and USB Storage. In theory, it can also be extended to support booting over network

Are there any limitations?
No! Or yes. Due to the way android images mount filesystems, the image needs to be modified in order to boot a full system from e.g. SD. For regular linux this is not the case, because they support the 'root' commandline argument and loads filesystem information from that root.

Will it replace e.g. TWRP or CWM
Yes and no. It will replace the primary boot image of the tablet. This means that whenever the tablet boot, the multiboot solution runs. It can be setup to automatically boot an image after a configurable timeout, e.g. a few seconds usually and as such will add some seconds to the total bootup time. But really, how often do you turn off your tablet?
I'm looking at possibly including a CWM or TWRP image in the flashed image, to always have a backup recovery at hand.
DO NOT PRIVATE MSG, EMAIL, TRACK ME DOWN ON FACEBOOK OR ANYTHING ELSE.

Sony Xperia Z (Stock!)
ASUS Transformer Prime (CM10.1)
Notion Ink Adam LCD/3G (AOSP ICS)

NvFlash for B70+ Devices
NvFlash: TF201 | TF300 I TF700
The Following 2 Users Say Thank You to rayman For This Useful Post: [ Click to Expand ]
 
rayman
Old
#4  
Recognized Developer - OP
Thanks Meter 1086
Posts: 247
Join Date: May 2008

 
DONATE TO ME
Reserved 3
DO NOT PRIVATE MSG, EMAIL, TRACK ME DOWN ON FACEBOOK OR ANYTHING ELSE.

Sony Xperia Z (Stock!)
ASUS Transformer Prime (CM10.1)
Notion Ink Adam LCD/3G (AOSP ICS)

NvFlash for B70+ Devices
NvFlash: TF201 | TF300 I TF700
The Following 2 Users Say Thank You to rayman For This Useful Post: [ Click to Expand ]
 
DooMLoRD
Old
#5  
DooMLoRD's Avatar
Recognized Developer
Thanks Meter 37960
Posts: 13,044
Join Date: Jul 2010
Location: Noida
this one is interesting...

if u can get the kexec to work getting the menu to work is easy... i had created someting similar WAY BACK for the Xperia X10:

The Following 2 Users Say Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
juanyunis
Old
#6  
juanyunis's Avatar
Senior Member
Thanks Meter 32
Posts: 121
Join Date: Dec 2010
Location: Barranquilla
Indeed, having a multiple boot options is something amazing, imaging having ubuntu touch and android running on 1 single device.
Previous:
1. Sony Ericsson XPERIA X10 Mini Pro
2. LG GT540 Optimus
3. Motorola Defy MB525 Red Lense
4. Samsung Galaxy S II
5. iPhone 4S 32GB
6. Samsung Galaxy Note II AT&T


Now:
1. iPhone 5 32GB
2. Samsung Galaxy S4 AT&T
3. Sony Xperia Tablet Z


 
theZest
Old
(Last edited by theZest; 5th July 2013 at 04:04 AM.)
#7  
theZest's Avatar
Senior Member
Thanks Meter 60
Posts: 241
Join Date: Oct 2010
Location: Vladivostok
Please take a look on Boot Menu Manager for Moto RAZR XT910. I guess it would help you somehow. At least for overall concept.

Carved in this thread with my RAZR HD
 
skiwong20
Old
#8  
Senior Member
Thanks Meter 338
Posts: 435
Join Date: Nov 2011
i would like to see the multiboot option b used. i have a nexus 7 and love multiboot. i have like 5 roms in my list. i also have a droid razr and have tried BMM as mentioned but still think multiboot is the way to go. thanks for this project Rayman can't wait to see it evolve!
i get my tablet tmrw can't wait
 
rayman
Old
#9  
Recognized Developer - OP
Thanks Meter 1086
Posts: 247
Join Date: May 2008

 
DONATE TO ME
Good news! Tablet is here and the work can begin
Once I've tested my changes, I'll post the kernel changes required for initial version.
DO NOT PRIVATE MSG, EMAIL, TRACK ME DOWN ON FACEBOOK OR ANYTHING ELSE.

Sony Xperia Z (Stock!)
ASUS Transformer Prime (CM10.1)
Notion Ink Adam LCD/3G (AOSP ICS)

NvFlash for B70+ Devices
NvFlash: TF201 | TF300 I TF700
The Following User Says Thank You to rayman For This Useful Post: [ Click to Expand ]
 
skiwong20
Old
#10  
Senior Member
Thanks Meter 338
Posts: 435
Join Date: Nov 2011
YES!

Tags
competetion, multiboot, tablet z, xda tablet z competition
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes