[Defy Android Development] sevenrock:
Hi,

this morning I self-compiled another 4.1.2 image based on current Quarx git.

I had to use these patches to fix compile bugs:

Description: http://xdaforums.com/showpost.php?p=39639414&postcount=16112

--- cm10_backup/hardware/ti/wlan/mac80211/compat_wl12xx/include/linux/compat-2.6.34.h 2013-03-27 17:38:35.247546006 +0100
+++ cm10/hardware/ti/wlan/mac80211/compat_wl12xx/include/linux/compat-2.6.34.h 2013-03-27 20:33:35.569714455 +0100
@@ -268,7 +268,6 @@
{ return 0; }

#define MMC_PM_KEEP_POWER (1 << 0) /* preserve card power during suspend */
-#define sdio_set_host_pm_flags(a, b) 0

#define rcu_dereference_protected(p, c) (p)
#define rcu_access_pointer(p) ACCESS_ONCE(p)

Description: http://xdaforums.com/showthread.php?p=39964716#post39964716

--- cm10_backup/bootable/recovery/libreboot/Android.mk 2013-03-27 17:37:12.706323780 +0100
+++ cm10/bootable/recovery/libreboot/Android.mk 2013-04-07 08:19:00.927130209 +0200
@@ -24,7 +24,7 @@
LOCAL_CFLAGS += -DRECOVERY_PRE_COMMAND_CLEAR_REASON
endif

-include $(BUILD_STATIC_LIBRARY)
+#include $(BUILD_STATIC_LIBRARY)

# build device static library
@@ -46,4 +46,4 @@
LOCAL_CFLAGS += -DRECOVERY_SHELL
LOCAL_STATIC_LIBRARIES += libcrecovery

-include $(BUILD_STATIC_LIBRARY)
+#include $(BUILD_STATIC_LIBRARY)

Unfortunately WiFi does not work with the image due to errors shown in dmesg:

Compat-wireless backport release: ol_R5.SP3.01
Backport based on wl12xx.git ol_R5.SP3.01
cfg80211: Calling CRDA to update world regulatory domain
wl12xx: Unknown symbol compat_release_firmware
wl12xx: Unknown symbol compat_request_firmware

Manually loading wl12xx shows this:

modprobe wl12xx
modprobe: module 'compat_firmware_class' not found
modprobe: 'wl12xx.ko': unknown symbol in module or invalid parameter

It seems that CONFIG_COMPAT_FIRMWARE_CLASS is activated somehow, using this patch

--- cm10_backup/device/moto/jordan-common/BoardConfig.mk 2013-03-27 17:37:15.707481947 +0100
+++ cm10/device/moto/jordan-common/BoardConfig.mk 2013-04-07 10:57:27.651024295 +0200
@@ -142,6 +142,7 @@
make clean -C hardware/ti/wlan/mac80211/compat_wl12xx
make -C hardware/ti/wlan/mac80211/compat_wl12xx KERNEL_DIR=$(KERNEL_OUT) KLIB=$(KERNEL_OUT) KLIB_BUILD=$(KERNEL_OUT) ARCH=arm CROSS_COMPILE="arm-eabi-"
mv hardware/ti/wlan/mac80211/compat_wl12xx/compat/compat.ko $(KERNEL_MODULES_OUT)
+ mv hardware/ti/wlan/mac80211/compat_wl12xx/compat/compat_firmware_class.ko $(KERNEL_MODULES_OUT)
mv hardware/ti/wlan/mac80211/compat_wl12xx/net/mac80211/mac80211.ko $(KERNEL_MODULES_OUT)
mv hardware/ti/wlan/mac80211/compat_wl12xx/net/wireless/cfg80211.ko $(KERNEL_MODULES_OUT)
mv hardware/ti/wlan/mac80211/compat_wl12xx/drivers/net/wireless/wl12xx/wl12xx.ko $(KERNEL_MODULES_OUT)
--- cm10_backup/device/moto/jordan-common/profiles/ramdisk/init.mapphone_umts.rc 2013-03-27 17:37:16.207572489 +0100
+++ cm10/device/moto/jordan-common/profiles/ramdisk/init.mapphone_umts.rc 2013-04-07 11:00:15.640594809 +0200
@@ -43,6 +43,7 @@

# Load wifi drivers (all except wl12xx_sdio)
insmod /system/lib/modules/compat.ko
+ insmod /system/lib/modules/compat_firmware_class.ko
insmod /system/lib/modules/cfg80211.ko
insmod /system/lib/modules/mac80211.ko
insmod /system/lib/modules/wl12xx.ko

fixes the module loading bug but WiFi still is not working, manually calling wifical.sh fails to create wl1271-nvs.bin:

Fail to set PLT power mode on
Calibration not complete, Removing half-baked nvs.