[HTC Pico (Explorer)] <JohnCarter>:
#THIS GUIDE IS ONLY FOR ADVANCED USERS, WHO KNOW HOW TO COMPILE AND MAKE MODIFICATIONS TO KERNEL AND MODIFYING VARIOUS PARAMETERS IN RAMDISK IN THE RAMDISK LEVEL #

Hey guys this guide will tell you how to add support for Dual bootinga as primary ROM.

YOU MUST USE ATLEAST CLASS 6 OR ABOVE SDCARD WITH MINIMUM 8GB CAPACITY

First you need 3 EXT4 partitions on SD-card, using minitool partition wizard

1) around 400 MB - SD-SYSTEM (ext4)

2) around 1 GB (or can be less) - SD-DATA(ext4 format),

3)around 75MB (can be less) SD-CACHE(ext4 format) (refer to the screenshot):

This is very important : You should remove any memory increasing script that you were using. Because /data partition is now on SDcard, using memory increasing script will cause conflict and makes ROM unbootable.

Now making kernel level Changes :

Step 1- open the defconfig of your kernel source and make this change in it

Enable LBDAF (for multiple partitions to work)

[COLOR="Navy"]CONFIG_LBDAF=y[/COLOR]

Now compile the kernel.

Step 2- Ramdisk level changes:

All modifications are performed on init.rc file.

Step 1- Search for this line :

mount yaffs2 mtd@system /system
mount yaffs2 mtd@system /system ro remount

Replace it with this :

[COLOR="Navy"]# Mount SD-SYSTEM
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
mount ext4 /dev/block/mmcblk0p2 /system
mount ext4 /dev/block/mmcblk0p2 /system ro remount[/COLOR]

Step 2 - find this line :

mount yaffs2 mtd@userdata /data nosuid nodev

Now replace it with :

[COLOR="navy"]# Mount SD-DATA
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
mount ext4 /dev/block/mmcblk0p3 /data nosuid nodev noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue[/COLOR]

Step 3- Find this line :

mount yaffs2 mtd@cache /cache nosuid nodev

Replace it with :

[COLOR="navy"]# Mount SD-CACHE
wait /dev/block/mmcblk0p4
wait /dev/block/mmcblk0p4
wait /dev/block/mmcblk0p4
wait /dev/block/mmcblk0p4
mount ext4 /dev/block/mmcblk0p4 /cache nosuid nodev noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue[/COLOR]

That's it now pack the ramdisk with the kernel you made earlier

All of this is much similar like pll2 Oc by cute_prince.

Now the Updater-script changes

This was the real pain in finding out, It took me nearly a month to figure out how to extract system on the partition, and learn the mount function.. If you are using it PLEASE give me some credits ;)

Step 1- one the updater-script of the ROM find these lines :

format("yaffs2", "MTD", "system", "0", "/system");
mount("yaffs2", "MTD", "system", "/system");
package_extract_dir("system", "/system");

Replace them with these:

[COLOR="navy"]run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/system");
run_program("/sbin/busybox", "rm", "-rf", "/system/*");
package_extract_dir("system", "/system");[/COLOR]

That's it you've Successfully added support for the rom as primary ROM !! :D

Head Over here : http://xdaforums.com/showthread.php?t=2409236

for flashing instructions ,dual boot app by galaxy freak and switching mechanisms

IF YOU WANT TO PLL2 OC BOTH PRIMARY AND SECONDARY ROMs GO TO THE GUIDE BY [MENTION=5158920]Arslankirmani[/MENTION] HERE : http://xdaforums.com/showpost.php?p=45063954&postcount=84

Now if you are using it for adding support for ROM , please PM either me,adityalahiri13 or galaxyfreak the download link so that we can add on the dual boot thread.. IF you are a ROM developer ,i kindly request you to let us also keep the download link for the primary enable ROM.