[Samsung Galaxy Nexus] dlhxr:
Dual-boot Powered by U-boot and Custom Kernel on Galaxy Nexus.​

Everyone can look at my github for details.

https://github.com/dlhxr

The uboot-tuna repository is for u-boot and the 2nd-kernel-for-galaxy-nexus is for kernel modification.

Edit: I forked the fancykernel repository and change the ramdisk to support image boot in branch fancykernel-ramdisk-imageboot. You can easily use that repository to build an image boot supported kernel.

Instructions are in the post #2, #3 and #4.

The first post is for introduction and some pre-built binaries.

There are pre-built u-boot for dual-boot, tri-boot, quad-boot and quad-recovery-boot!!!

You can find how I modify the u-boot in the branches of uboot-tuna repository.

Dual Boot

View attachment 1837172

* Normal Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img

* Recovery Boot -> Volume Up key pressed, green LED -> Go to recovery

* Custom Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img

!!!It will replace your kernel. Remember to copy your boot.img to /data/media/boot/1st.img first!!!

Tri Boot

View attachment 1840463

* First Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img

* Third Boot -> Volume Up key pressed, green LED -> Find kernel in /data/media/boot/3rd.img

* Second Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img

!!!It will replace your kernel. Remember to copy your boot.img to /data/media/boot/1st.img first!!!

Quad Boot Thank Zittoro to remind me about pessing both keys!

View attachment 1843686

* First Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img

* Third Boot -> Volume Up key pressed, green LED -> Find kernel in /data/media/boot/3rd.img

* Second Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img

* Recovery Boot -> Volume Up and Down keys pressed, yellow LED ->Go to recovery

Quad Boot with Recovery Image Boot

View attachment 1874835

* First Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img

* Third Boot -> Volume Up key pressed, green LED -> Find kernel in /data/media/boot/3rd.img

* Second Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img

* Recovery Boot -> Volume Up and Down keys pressed, yellow LED ->Find recovery image in /data/media/boot/recovery.img. You can put either CWM recovery or TWRP recovery image there.

!!!It will replace your kernel. Remember to copy your boot.img to /data/media/boot/1st.img first!!!

If you want to bulid your own u-boot from source, you can look into post #2.

Three ways to modify the 2nd kernel fully working now!

1. Image Boot Recommanded!

Partition relation for the 2nd kernel.

system /rdata/media/rom/system.img
data /rdata/media/rom/data.img
cache /rdata/media/rom/cache.img

See post #3 part I

2. Image Folder Mix Boot

Partition relation for the 2nd kernel

system /rdata/media/2nd/system.img
data /rdata/media/2nd/data
cache /rdata/media/2nd/cache

See post #3 part II

3. Folder Cache Boot

Partition relation for the 2nd kernel.

system /dev/block/platform/omap/omap_hsmmc.0/by-name/cache
data /rdata/media/2nd/data
cache /rdata/media/2nd/cache

See post #3 part III.

Acknowledgement

twistedumbrella for doing these thing together and his help.

sp3dev for his port of u-boot to galaxy nexus and his help to modify u-boot source.

Jijonhyuni for firstly putting his dual boot kernel on xda.

crayon for his busybox mount way to support HTC DHD multiboot, which inspired me a lot!

Most Frequently Asked Questions Updated on April 18th.

Q: Some of the 4.1 kernels seem not work, right?

A: The init binary in the ramdisk is not compatible. Replace the init in /ramdisk/ by this one.View attachment 1872465

(Don't forget to extract the init in the init.7z first.)

Q: Some kernel has serious color problem, the screen showing a green color?

A: Unpack the kernel and repack it with the cmdline adding "mms_ts.panel_id=18". And I made an easy linux script for this.View attachment 1877098:laugh: and an android arm script and binary for people's computer not available.View attachment 1891896 I use SManager to execute the script.

Edit: Someone reported his panel_id is not 18, but 162. If 18 doesn't work with your device, try 162.

Q: When I am using the image boot way to dual boot, the zip file seems not being flashed?

A: The TWRP seems not compatible with image boot flashing script and please use CWM recovery instead.