[LG Optimus 2x] rugglez:
Troubleshooting guide:

1. Patch failure

HUNK failed means that a particular file was not patched to some problem. In this case, a .rej file is saved in the same folder as the file to be patched, and it contains the stuff not patched.

Do not neglect "failed" hunk since it means a partially applied patch(some files patched, some files not), and may cause problems. "Ignored hunk" is ok, if the patch had been attempted before on a file and had succeeded on that file last time.

To manually patch the failed hunk, go that file where the hunk failed (has same name as .rej file without .rej extension)

For example, if .rej file is board-star.c.rej, and it contains the following sample lines (look for lines beginning with '+' and remove the + before adding, similar for -) go to board-star.c, and add the lines manually like this:

#if defined (CONFIG_STAR_REBOOT_MONITOR) || defined (CONFIG_BSSQ_REBOOT_MONITOR)
#define RAM_RESERVED_SIZE 100*1024
/* Force the reserved_buffer to be at its old (Froyo/GB) location
for reboot to work with the older bootloader */
if (strstr(saved_command_line, "brdrev=")) {
extern void *reserved_buffer;

pr_info("The older bootloader detected\n");
if (memblock_end_of_DRAM() > 0x17f80000) {
if (memblock_reserve(0x17f80000, RAM_RESERVED_SIZE)) {
pr_err("Fail to get reserved_buffer for the older bootloader\n");
} else {
pr_info("Change reserved_buffer for the older bootloader\n");
reserved_buffer = phys_to_virt(0x17f80000);
}
} else {
pr_info("Change reserved_buffer\n");
reserved_buffer = ioremap(0x17f80000, RAM_RESERVED_SIZE);
}
}
#endif

This was in the .rej file, and is to be added immediately after

#if defined(CONFIG_LGE_BROADCAST_TDMB)
star_dmb_init();
#endif /* CONFIG_LGE_BROADCAST */

in board-star.c (and before the next #if defined or closing bracket)

Similarly, the - lines to be deleted and + lines are to be added in that failed hunk file

(do this manual stuff only if hunk fails)

2. If ramhack kernel fails, but normal kernel works:

From your pc, in terminal do

adb shell dmesg > dmesg.txt

or from your phone, in android terminal emulator, do

dmesg > /sdcard/dmesg.txt

Copy it from your dmesg.txt starting from loglevel=0 till the end (serialno)

Look for a line in dmesg.txt which resembles this:

<5>[70:01:01 00:00:00.000] Kernel command line: loglevel=0 muic_state=1 CRC=10203036179a93 brdrev=1.0 uniqueid=37c7006421f6097 video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:35e00:2800:800,linux:34700:1000:800,mbr:400:200:800,system:600:2bc00:800,cache:2c200:8000:800,misc:34200:400:800,userdata:38700:c0000:800 mem=512M@0M vmalloc=128M androidboot.mode=normal androidboot.hardware=star androidboot.serialno=37c7006421f6097

Use your own phone's parameters instead of this and then set carveout size.

3. Problem with config file:

Pulling kernel config from device:

You need to retrieve a working kernel config from the device, and unzip it.

For that, connect your phone to your pc, enable USB debugging if it was disabled, and then in terminal

adb pull /proc/config.gz ~/kernel/lge-star-kernel-jellybean/config.gz
cat config.gz | gunzip > .config

Alternatively, you can pull the .config from the newest boot.img

scripts/extract-ikconfig boot.img > .config