[Sony Xperia S, Acro S, Ion] someone755:
Thanks again, but --

In the makefile, the only CFLAGS lines are these:

ifdef CONFIG_FUNCTION_TRACER
# Do not trace debug files and internal ftrace files
CFLAGS_REMOVE_lockdep.o = -pg
CFLAGS_REMOVE_lockdep_proc.o = -pg
CFLAGS_REMOVE_mutex-debug.o = -pg
CFLAGS_REMOVE_rtmutex-debug.o = -pg
CFLAGS_REMOVE_cgroup-debug.o = -pg
CFLAGS_REMOVE_irq_work.o = -pg
endif

So should I just add that line or what?

EDIT: Nevermind, I found it in the [source folder]/Makefile. I was searching in [source folder]/kernel/Makefile before...

But how does this fix the error with the file being twice as big as it should be?

I'll see if it does actually help, will update this post (or make another one if somebody posts before me).

EDIT2:

I'm seriously going to punch this source in the face.

CC drivers/gpu/msm/adreno.o
drivers/gpu/msm/adreno.c: In function 'adreno_iommu_setstate':
drivers/gpu/msm/adreno.c:433: warning: the frame size of 1032 bytes is larger than 1024 bytes; see http://go/big_stack_frame
error, forbidden warning: adreno.c:433
make[3]: *** [drivers/gpu/msm/adreno.o] Error 1
make[2]: *** [drivers/gpu/msm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2

What on Earth could be causing this?

I added the -w flag to all of the CFLAGS_KERNEL lines (there are three, EOS0, EOS1 and EOS2, I think. Not sure, though. The ~/kernel/Makefile (not the ~/Makefile) says the kernel uses EOS2...

Before, I added the -w flag to the last CFLAGS line, the EOS0 one. Will all three do the trick?

I'll update this post again :D

EDIT3:

Okay, so adding -w to all of them did the trick, but what now? I have the zImage, and I have the ramdisk and the rpm thing from the CM10.1 kernel.

My question here is, is there a special command for the mkelf.py file for Android 4.2? Or does the JB one work in general?

I'm rebooting into windows to try and fastboot flash the thing, I'll make another EDIT to inform you if it all went okay :D

EDIT4:

Nothing went okay ;-;

I get a black screen, that's all. Good thing there's fastboot :P

So could this be the aftermath of a wrong mkelf.py command or something else?

The compile didn't return any errors (warnings were hidden because of the -w flags), so it's not the compile's fault or a source error.

EDIT5: I've been told by a reliable source that this is the way ramdisk should be packed for 4.2:

ramdisk.img@0x41500000

All else is said to remain the same (RPM and the zImage, that is).

I'll try and report if it actually works. :D

EDIT6: Yup, the above edit should do the trick for 4.2 :D

Now all I got to do is figure out why editing files for overclocking disables all buttons and the screen...

I *might* have gone a bit too far with this xD

EDIT7: Okay, nevermind.

RaymanFX helped, the defconfig file is opensemc_fuji_nozomi_defconfig (or something like that) in his kernel sources. The screen works now.

A question now:

for the -O3 optimizaions, do I add the -O3 flag where I added the -w flag?

I'll try and report (if anyone's even watching this post still :P)

EDIT8: Yeah, I must have screwed something up really bad because the kernel won't boot... :I

So could it be the -O3 flag in the Makefile? I'll eliminate the possible bugs one by one, and, ofc, report.

This has become like my personal page on this thread... :3