Jump to content


Photo

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

- - - - -

  • Please log in to reply
75 replies to this topic

#21
karololszak

karololszak

    Regular

  • Members
  • PipPip
  • 72 posts
Yeah, the only way for it to work is either having a second ROM or /data partition(s) on the SD card.
My opinion is to have the /data on the SD, because we already have some working solutions (link2sd and so on) and nobody really tried putting a blade rom on a SD; but it all depends on dev that would decide to try to do it.

  • 0

FREE BITCOINS! Yes, we give away bitcoins for absolutely free! Check it out!


#22
Snap.IT

Snap.IT

    Addict

  • Members
  • PipPipPipPipPip
  • 861 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Devices:ZTE Blade 3, Alcatel OT995

Yeah, the only way for it to work is either having a second ROM or /data partition(s) on the SD card.
My opinion is to have the /data on the SD, because we already have some working solutions (link2sd and so on) and nobody really tried putting a blade rom on a SD; but it all depends on dev that would decide to try to do it.


The internal should be left alone.

Use a file on external and mount it as a filesystem. This works and backups are as simple as copying a file.

The other alternative is to install it to separate partitions on the sd card, ext partitions. (Note that ext stands for the filesystem, not extended partition)

This gets rid of space limitations entiely.

  • 0

#23
Sulthekk

Sulthekk

    Addict

  • Members
  • PipPipPipPipPip
  • 619 posts
  • Devices:ZTE Blade

The internal should be left alone.

Use a file on external and mount it as a filesystem. This works and backups are as simple as copying a file.

The other alternative is to install it to separate partitions on the sd card, ext partitions. (Note that ext stands for the filesystem, not extended partition)

This gets rid of space limitations entiely.


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.

Edited by Sulthekk, 15 July 2012 - 04:12 PM.

  • 0

#24
android@sam

android@sam

    Enthusiast

  • Members
  • PipPipPip
  • 259 posts
  • Gender:Male
  • Location:Nagpur,India
  • Interests:Computers, MObilez...
  • Devices:DELL XCD35 aka ZTE BLADE

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.

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.

  • 1

Sony Ericsson UI On your ZTE BLADE

"CYANSCAPE"


#25
Sulthekk

Sulthekk

    Addict

  • Members
  • PipPipPipPipPip
  • 619 posts
  • Devices:ZTE Blade

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.

What did you exactly do?

Edited by Sulthekk, 15 July 2012 - 05:22 PM.

  • 0

#26
Snap.IT

Snap.IT

    Addict

  • Members
  • PipPipPipPipPip
  • 861 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Devices:ZTE Blade 3, Alcatel OT995

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

#27
Snap.IT

Snap.IT

    Addict

  • Members
  • PipPipPipPipPip
  • 861 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Devices:ZTE Blade 3, Alcatel OT995

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

#28
Sulthekk

Sulthekk

    Addict

  • Members
  • PipPipPipPipPip
  • 619 posts
  • Devices:ZTE Blade

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

#29
android@sam

android@sam

    Enthusiast

  • Members
  • PipPipPip
  • 259 posts
  • Gender:Male
  • Location:Nagpur,India
  • Interests:Computers, MObilez...
  • Devices:DELL XCD35 aka ZTE BLADE
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

Sony Ericsson UI On your ZTE BLADE

"CYANSCAPE"


#30
Sulthekk

Sulthekk

    Addict

  • Members
  • PipPipPipPipPip
  • 619 posts
  • Devices:ZTE Blade

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

#31
android@sam

android@sam

    Enthusiast

  • Members
  • PipPipPip
  • 259 posts
  • Gender:Male
  • Location:Nagpur,India
  • Interests:Computers, MObilez...
  • Devices:DELL XCD35 aka ZTE BLADE

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

Sony Ericsson UI On your ZTE BLADE

"CYANSCAPE"


#32
Sulthekk

Sulthekk

    Addict

  • Members
  • PipPipPipPipPip
  • 619 posts
  • Devices:ZTE 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


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

  • 0

#33
android@sam

android@sam

    Enthusiast

  • Members
  • PipPipPip
  • 259 posts
  • Gender:Male
  • Location:Nagpur,India
  • Interests:Computers, MObilez...
  • Devices:DELL XCD35 aka ZTE BLADE

.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

Sony Ericsson UI On your ZTE BLADE

"CYANSCAPE"


#34
Sulthekk

Sulthekk

    Addict

  • Members
  • PipPipPipPipPip
  • 619 posts
  • Devices:ZTE Blade

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

#35
android@sam

android@sam

    Enthusiast

  • Members
  • PipPipPip
  • 259 posts
  • Gender:Male
  • Location:Nagpur,India
  • Interests:Computers, MObilez...
  • Devices:DELL XCD35 aka ZTE BLADE
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

Sony Ericsson UI On your ZTE BLADE

"CYANSCAPE"


#36
Sulthekk

Sulthekk

    Addict

  • Members
  • PipPipPipPipPip
  • 619 posts
  • Devices:ZTE Blade

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, 16 July 2012 - 03:18 PM.

  • 0

#37
android@sam

android@sam

    Enthusiast

  • Members
  • PipPipPip
  • 259 posts
  • Gender:Male
  • Location:Nagpur,India
  • Interests:Computers, MObilez...
  • Devices:DELL XCD35 aka ZTE BLADE

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, 16 July 2012 - 03:29 PM.

  • 0

Sony Ericsson UI On your ZTE BLADE

"CYANSCAPE"


#38
Sulthekk

Sulthekk

    Addict

  • Members
  • PipPipPipPipPip
  • 619 posts
  • Devices:ZTE Blade

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

#39
android@sam

android@sam

    Enthusiast

  • Members
  • PipPipPip
  • 259 posts
  • Gender:Male
  • Location:Nagpur,India
  • Interests:Computers, MObilez...
  • Devices:DELL XCD35 aka ZTE BLADE

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

Sony Ericsson UI On your ZTE BLADE

"CYANSCAPE"


#40
Sulthekk

Sulthekk

    Addict

  • Members
  • PipPipPipPipPip
  • 619 posts
  • Devices:ZTE Blade

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users