karololszak

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

76 posts in this topic

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.

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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! :(

0

Share this post


Link to post
Share on other sites

.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

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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 [email protected]
0

Share this post


Link to post
Share on other sites

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. :)

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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.

1

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

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
1

Share this post


Link to post
Share on other sites

...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.

1

Share this post


Link to post
Share on other sites

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
1

Share this post


Link to post
Share on other sites

Fyi, It's koush's AnyKernel.

Thanks for the info, I wasn't aware of that.

1

Share this post


Link to post
Share on other sites

Where i can found the instructions for the tool?

Edited by [email protected]
1

Share this post


Link to post
Share on other sites

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).

1

Share this post


Link to post
Share on other sites

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!

1

Share this post


Link to post
Share on other sites

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

Edited by [email protected]
1

Share this post


Link to post
Share on other sites

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?

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.