I've been trying to make kamikaze run on the netgear wg602v3 (see http://wiki.openwrt.org/OpenWrtDocs/Har … r/WG602v3).

Apart from some minor configurations things, I have the latest source booting into the kernel and into init (busybox). However, I get a bus error during ifconfig.

I've been adviced to try and play with the CFLAGS used in building the kernel and userspace. But how do I do this?
I've tracked the options used in compiling the packages to $TARGET_CFLAGS, defined in topdir rules.mk:

TARGET_CFLAGS:=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)

changing this to

TARGET_CFLAGS:=$(TARGET_OPTIMIZATION) -fno-delayed-branch $(TARGET_DEBUGGING)

seems to give -fno-delayed-branch to the packages, but not to the kernel.

So:
- is there a more elegant solution (ie. where are TARGET_OPTIMIZATION and TARGET_DEBUGGING defined) ?
- how do I pass it to the kernel ?

.Andrea.