Jump to content

[idea] two ROMs on one device (aka dualboot)


Recommended Posts

Guest Snap.IT
Posted

Having the whole thing on SD would also make us to be able to boot more than two roms by either swapping the card or swapping files.

For me that looks like a good direction.

Or simply using different partitions on the same SD for different roms, exactly as you would do if you installed it in your computer (you can also install into different files as the bootloader would have the information which partition to boot), you can have a multitude of partitions, 16 1GB partitions on a 32GB card and you will still have twice as much space as stock for each and 16GB for music, video and so on.

This would be ideal.

Guest Snap.IT
Posted

I tried editing boot.img ram disk I think the initramfs files lies here.I put some some dual boot supported initramfs scripts but it didn't fit the boot partition.So we have to make small sized dual boot supported scripts.will try soon.

I think it's a better option to use a bootloader and put the zImage on partitions, of course, the ideal solution would be a combined bootloader and recovery, that way you could leave one ROM intact on the phones internal memory and have it remain untouched.

Guest Sulthekk
Posted

I think it's a better option to use a bootloader and put the zImage on partitions, of course, the ideal solution would be a combined bootloader and recovery, that way you could leave one ROM intact on the phones internal memory and have it remain untouched.

That's why I was thinking on kexec... You can just place a kernel and an initrd directly in the root of the partition, and from now on you would only need to tell the loader program where the partition is, then it would find the necessary things by itself, since the paths would be the same for everytime. But I'm still doing a research on it as I'm not experienced with it, so what I say maybe isn't working... Handle it that way.

Guest android@sam
Posted

I got the right initramfs files and the kernels source which contains dual boot scripts.Just those are needed to be merged in zte kernel source and compiled.

Guest Sulthekk
Posted

I got the right initramfs files and the kernels source which contains dual boot scripts.Just those are needed to be merged in zte kernel source and compiled.

If it were that easy... I think any multiboot mod would need to be edited for the blade.

Guest android@sam
Posted

If it were that easy... I think any multiboot mod would need to be edited for the blade.

I know it's not that easy.both I have got another scripts which copy the rom and directories like /data /cache to sdcard and which setups the .config file for setting up the rom for dual booting

Guest Sulthekk
Posted

I know it's not that easy.both I have got another scripts which copy the rom and directories like /data /cache to sdcard and which setups the .config file for setting up the rom for dual booting

.config? Please tell me that you aren't trying to insert a kernel config into an existing rom! :(

Guest android@sam
Posted

.config? Please tell me that you aren't trying to insert a kernel config into an existing rom! :(

no man it tells the init scripts where are the yaffs images like caches.img,data.img are to be mounted in /sdcard

Guest Sulthekk
Posted

no man it tells the init scripts where are the yaffs images like caches.img,data.img are to be mounted in /sdcard

Whew! Sorry for asking such a question, but I that's something I was scared of...

What solution are you trying to implement? Maybe I could help with the kernel?

Guest android@sam
Posted

As you said in few post back,i researched for the initramfs,etc things and i found some helpfull things.I found that some changes are to be made in init.c and initramfs.c in /init/ folder in kernel source.Also the ramdisk is to be modified.And if we press a key within 3 seconds from the boot the phone will boot into sdcard rom.

Guest Sulthekk
Posted (edited)

As you said in few post back,i researched for the initramfs,etc things and i found some helpfull things.I found that some changes are to be made in init.c and initramfs.c in /init/ folder in kernel source.Also the ramdisk is to be modified.And if we press a key within 3 seconds from the boot the phone will boot into sdcard rom.

Okay... Do we need to patch the second rom's initrd/kernel too?

Edited by Sulthekk
Guest android@sam
Posted (edited)

Okay... Do we need to patch the second rom's initrd/kernel too?

no need to patch the second rom's kernel.Only we have to modify first rom's kernel for dual booting Edited by android@sam
Guest Sulthekk
Posted

no need to patch the second rom's kernel.Only we have to modify first rom's kernel for dual booting

Well, that's good, because that means that we only need to modify the fstab for the second rom, wich is as simple as running diff and patch. :)

Guest android@sam
Posted

Well, that's good, because that means that we only need to modify the fstab for the second rom, wich is as simple as running diff and patch. :)

Yes and we can compile a recovery wirh dual boot option also

Guest Sulthekk
Posted

Yes and we can compile a recovery wirh dual boot option also

That would solve the issues for flashing the second rom, but... That solution would also mean that we have to compile for every new version. That's a great start, but having some kind of patcher to turn a normal boot.img into a multiboot boot.img would make more sense. What if we would check the differences between an ordinary and a patched initrd, and then apply them with diff & bsdiff... We could build an update.zip for it, Burstlam's kernel updater package is a great base, it has the tools needed to split and repack a boot.img, we would need to compile some tools to modify the initrd itself, though.

Guest android@sam
Posted

That would solve the issues for flashing the second rom, but... That solution would also mean that we have to compile for every new version. That's a great start, but having some kind of patcher to turn a normal boot.img into a multiboot boot.img would make more sense. What if we would check the differences between an ordinary and a patched initrd, and then apply them with diff & bsdiff... We could build an update.zip for it, Burstlam's kernel updater package is a great base, it has the tools needed to split and repack a boot.img, we would need to compile some tools to modify the initrd itself, though.

Can you link me to the Burstlam's tool?

Guest Sulthekk
Posted (edited)

Can you link me to the Burstlam's tool?

Huhh, that was a long ago, when the gb kernel source came out... Wait a minute, I will find it.

That was the thread:

Edited by Sulthekk
Guest KonstaT
Posted

...Burstlam's kernel updater package is a great base, it has the tools needed to split and repack a boot.img, we would need to compile some tools to modify the initrd itself, though.

Fyi, It's koush's AnyKernel.

Guest android@sam
Posted

Huhh, that was a long ago, when the gb kernel source came out... Wait a minute, I will find it.

That was the thread:

thanks
Guest android@sam
Posted (edited)

Where i can found the instructions for the tool?

Edited by android@sam
Guest Sulthekk
Posted

Where i can found the instructions for the tool?

I don't think anybody ever wrote a guide for it. That's basically an Edify script which calls binary command line tools to do the job. It needs 2 things to know: Edify and how to run a cli application. But first, we should check it out that we can create a working multiboot image, because writing a patcher is step further away. I just mentioned it because it can fix an important problem (make it working with any boot.img).

Guest android@sam
Posted

I don't think anybody ever wrote a guide for it. That's basically an Edify script which calls binary command line tools to do the job. It needs 2 things to know: Edify and how to run a cli application. But first, we should check it out that we can create a working multiboot image, because writing a patcher is step further away. I just mentioned it because it can fix an important problem (make it working with any boot.img).

Thanks!By the way just got the zte kernel source ad will start the compiling soon!

Guest android@sam
Posted (edited)

Tried the compiling.Compiled successfully but it breaks the recovery.So will have to try something different.

Edited by android@sam
Guest Sulthekk
Posted

Tried the compiling.Compiled successfully but it breaks the recovery.So will have to try something different.

Is the code looking for a specific button or any button triggers the alternate boot? What about changing it to look for a specific keycode, for example the home or the back button?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.