Jump to content

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


Guest karololszak

Recommended Posts

Guest android@sam

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?

Button trigger was all set and you have to press home button for booting into the second rom.But it needs the dual boot integrated recovery which flashes the secondary rom on /sdcard or /sd-ext.But the recovery is broken.

Link to comment
Share on other sites

Guest Sulthekk

Button trigger was all set and you have to press home button for booting into the second rom.But it needs the dual boot integrated recovery which flashes the secondary rom on /sdcard or /sd-ext.But the recovery is broken.

Probably because the recovery is inside the initrd too... Okay, a dual-boot recovery would needed some more mods anyway, but were you able to boot any second rom? I mean you obviously can't just flash, but modifying the paths in the updater-script (in case of re-installed normal recovery) or copying files manually should be enough...

Edited by Sulthekk
Link to comment
Share on other sites

Guest android@sam

Probably because the recovery is inside the initrd too... Okay, a dual-boot recovery would needed some more mods anyway, but were you able to boot any second rom? I mean you obviously can't just flash, but modifying the paths in the updater-script (in case of re-installed normal recovery) or copying files manually should be enough...

No but i will try by changing the paths in the updater script.

Link to comment
Share on other sites

Guest Sulthekk

If everything fails,then we can run the second rom as chrooted that means top on the original rom.

But if they are totally different ( like ICS or JB compared to any GB ) they need different kernels! That's something that can't be done with simply chrooting...

If that fails there's still kexec. After some reading it looks like something that may actually work if a lot of time is spent in it...

Link to comment
Share on other sites

Guest android@sam

But if they are totally different ( like ICS or JB compared to any GB ) they need different kernels! That's something that can't be done with simply chrooting...

If that fails there's still kexec. After some reading it looks like something that may actually work if a lot of time is spent in it...

Ok so we will have to work on kexec now.This project is going more exciting now.

Link to comment
Share on other sites

Guest Sulthekk

Ok so we will have to work on kexec now.This project is going more exciting now.

Just for curiosity: what patches have you tried to implement?

Link to comment
Share on other sites

Guest android@sam

Just for curiosity: what patches have you tried to implement?

I patch the /init folder in the source from a dual boot kernel that is i patched initramfs.c in the source it compiled successfully.But recovery included in it was configured for another phone so it was broken.
Link to comment
Share on other sites

Guest Sulthekk

I patch the /init folder in the source from a dual boot kernel that is i patched initramfs.c in the source it compiled successfully.But recovery included in it was configured for another phone so it was broken.

Wait... Recovery in the source of an experimental dual boot kernel? Is it a samsung device?

Edited by Sulthekk
Link to comment
Share on other sites

Guest Sulthekk

Yes

Galaxy S and some other samsung devices have their recovery integrated into the kernel instead of having it on a separate partition, unlike most of other phones, including Blade... Could you link the patches for me to see how they actually work?

Edited by Sulthekk
Link to comment
Share on other sites

Guest Snap.IT

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.

Aye, my thoughts exactly, this would also mean that just copying the files into the correct directories would work for installing any rom.

Using grub legacy code for ARM i can get it to boot grub2 but there isn't much i can do with that yet, the mappings just doesn't work at all.

Link to comment
Share on other sites

Guest Sulthekk

Aye, my thoughts exactly, this would also mean that just copying the files into the correct directories would work for installing any rom.

Using grub legacy code for ARM i can get it to boot grub2 but there isn't much i can do with that yet, the mappings just doesn't work at all.

Great :)

I didn't know that GRUB ever had ARM support...

Link to comment
Share on other sites

Guest android@sam

I have cloned successfully NAND rom into sdcard by doing some fun with dev/block/mmcblk.Just needed some modifications in init.blade.rc and a script for alternating the boot.

Link to comment
Share on other sites

Guest Sulthekk

@sulthekk Any progress?

Still had no time at PC, and I'm limited to android... :(

Until I don't resolve that problem I can't compile. Or more precisely, I don't want to compile on the Blade because it's damn long.

Link to comment
Share on other sites

  • 3 weeks later...
Guest android@sam

Still had no time at PC, and I'm limited to android... :(

Until I don't resolve that problem I can't compile. Or more precisely, I don't want to compile on the Blade because it's damn long.

Still no progress?

Link to comment
Share on other sites

Guest Sulthekk

Aww... I totally forgot about this during the vacation. :(

Before leaving I also forgot to mention that I found some really interesting things at https://wiki.ubuntu.com/Specs/ARMSoftbootLoader

Some of that looks promising.

For example, kboot is written in shellscript, all it needs is a kexec-able kernel (and probably kexec-tools too) with minor modifications to load the kernel from a specified path, and to attach the 'root=' parameter to he kernel cmdline.

Edited by Sulthekk
Link to comment
Share on other sites

Guest Sulthekk

The mount command shows that. I post it there anyway:

dev: size erasesize name

mtd0: 00500000 00020000 "recovery"

mtd1: 00500000 00020000 "boot"

mtd2: 00180000 00020000 "splash"

mtd3: 00080000 00020000 "misc"

mtd4: 00200000 00020000 "cache"

mtd5: 0a000000 00020000 "system"

mtd6: 115e0000 00020000 "userdata"

mtd7: 00020000 00020000 "oem"

mtd8: 00180000 00020000 "persist"

———————————————

Today I have compiled burstlam's Turies GB kernel with CONFIG_KEXEC enabled, it boots and works fine for standard use. Haven't tested kexec'ing because I fail to compile kexec-tools, which we need to use that feature. I guess something is bad around my toolchain as it compiled nicely on x86, but fails on arm. I am not at the PC at the moment, but I remember a warning about implicit declaration of if_nameindex and and muliple error's saying something like 'converting integer to pointer without a cast' or 'incomplete type' from multiple lines between 45-60. I will check on that later.

Edit: /proc/mtd seems a better way to go than mount as it shows only the partitions on the NAND.

Edited by Sulthekk
Link to comment
Share on other sites

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.