[HTC Pico (Explorer)] cute_prince:
/**** THIS GUIDE IS ONLY FOR ADVANCED USERS, WHO KNOW HOW TO COMPILE AND MAKE MODIFICATIONS TO KERNEL AND MODIFYING VARIOUS PARAMETERS IN RAMDISK ****/

Hello guys, here I am giving you a detailed tutorial for Overclocking devices that comes with NAND and having only PLL2 support.

Although this guide is written for HTC Explorer, the method can also be applied on similar devices.

So, before we begin you should understand the difference between OCing with PLL4 and OCing with PLL2.

XDA user [MENTION=4880538]rootdefyxt320[/MENTION] has written an excellent post that tells the exact difference between PLL4 OC and PLL2 OC. I am quoting it:

In case of HTC Explorer, it uses Qualcomm MSM7225A chipset. This chipset does not have PLL4 support. So the only way to overclock is by OC'ing PLL2. But OC'ing PLL2 causes not only the CPU but also everything connected to the board to OC as well. This includes the External Bus Interface (EBI). Our NAND is connected to EBI and when OC happens the Write access through NAND becomes so high causing every block in those partitions which are mounted as RW to become Bad. This is what we call "NAND BURN".

The partitions in NAND that are affected by OC are /data and /cache. This is because only these two partitons are mounted with RW access. As I mentioned above the increased Write access during OC is what causing the blocks to corrupt. All other partitions including /misc, /devlog, /boot, /system and /recovery are mounted as Read-Only and therefore are not affected.

The Workaround for this dilemma is to disable both /data and /cache partitions ( By disable, I mean not even mounting them ) in NAND and use a portion of your SDcard to act as /data and /cache. This is what we are going to do.

/* FOLLOWING PROCEDURE IS FOR AOSP ROMS ONLY */​

THE PROCEDURE

================

The procedure consists of four parts. They are listed below:

Preparing The SDcard

Kernel Level Changes

Setting Up RamDisk

Removing Memory Increasing Script

Detailed description of each part is given below:

PART 1 : Preparing The SDcard

==========================

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

CLASS 4 and CLASS 2 SDcards will definitely cause slow responsiveness because /data/data is on SDcard. Furthermore these SDcards can't handle OC at high frequencies and will die out quickly.

SO PROCEED ONLY IF YOU ARE HAVING CLASS 6 OR CLASS 10 SDCARD. YOU CAN TRY CLASS 4 SDCARD BUT YOU CAN'T OVERCLOCK ABOVE A CERTAIN LIMIT AND NO GUARANTEE ABOUT HOW LONG THE CARD WILL LAST.

We are going to create two EXT4 partitions ( First one for replacing /data and second one for replacing /cache in NAND ) on the SDcard, in addition to the normal FAT32 partition.

Using MiniTool Partition Wizard, create two EXT4 partitions as shown in following figure:

For SD-DATA, you can give whatever size you want. This where the user applications are installed.

For SD-CACHE, around 65MB is enough.

You should keep the order in which partitions are created. Partition Type for both SD-DATA and SD-CACHE should be Primary.

Assuming you have successfully prepared SDcard, lets go the second part:

PART 2 : Kernel Level Changes

==========================

First, you need to replace arch/arm/mach-msm/acpuclock-7201 with this one: https://dl.dropboxusercontent.com/u/95625633/acpuclock-7201.c

This contains the overclocked frequencies and logic to dynamically calculate PLL2 values according to different frequencies.

When you look through the overclocked frequencies, you can see I have disabled 900MHz. This is because Class 4 SDcards can't handle data rate at this frequency. Those who have Class 10 SDcards can enable and try whether it is stable for them.

**** DO NOT OC GPU. ITS FAKE AND ACTUALLY DEGRADES PERFORMANCE. REVERT GPU OC IF YOU HAVE ENABLED IT ****

Next, you need to edit the configuration file ( pico_defconfig in my case ) and enable the following option. Its disabled by default so you have to enable it:

[COLOR="Blue"][B]CONFIG_LBDAF=y[/B][/COLOR]

That's all. Now compile your kernel.

PART 3 : Setting Up RamDisk

========================

Since, we are not using /data and /cache in NAND anymore, the changes must be made in RamDisk.

All modifications are performed on init.rc file.

Open init.rc and perform the following modifications:

1. Find the following line:

[B][COLOR="Red"]mount yaffs2 mtd@userdata /data nosuid nodev[/COLOR][/B]

Replace the above line with following:

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

2. Now find the following line:

[B][COLOR="Red"]mount yaffs2 mtd@cache /cache nosuid nodev[/COLOR][/B]

Replace the above line with following:

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

3. Since we are extensively using SDcard, we should adjust the read_ahead_kb parameter for maximum performance:

Add the following lines after the line: mount ext4 /dev/block/mmcblk0p3 /cache nosuid nodev noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue

[B][COLOR="Blue"]# SDcard read speed boost
write /sys/block/mmcblk0/bdi/read_ahead_kb 2048[/COLOR][/B]

PART 4 : Removing Memory Increasing Script

=====================================

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

That's all, now you can flash your favourite ROM with the new OCed boot image and enjoy overclocking. :)

NOTE: A new Recovery must be made to support the new /SD-CACHE partition.