[Galaxy S I9000 Android Development] n01ce:
OK guys. So I've made some research.

(Almost) Nobody wants to go back to a CyanogenMod 7 kernel to have bcmon working on the Galaxy S.

There's no practical way to build only the Wi-Fi driver module of the kernel, as there would be a magic version mismatch (module load can be forced with modprode -f module-name but that's a very bad idea), along with the impact of using different kernel flags, so we have to build and flash the full kernel.

My purpose is to build a recent (CM-11.0) kernel for the Galaxy S (Aries kernel, CM-11.0 branch).

The different issues I've came through so far:

bcmon source has 2 flavors:

bcmdhd bcmon driver source for 4330 chipset (I guess)

bcm4329 bcmon driver source for 4329 chipset

The thing is that our phone has a 4329 chipset, but the recent Aries kernel versions come with a bcmdhd driver...

So as I want to avoid any potential compatibility issue I'll be building a bcm4329 bcmon driver to start.

Attempt to build the Aries kernel (galaxysmtd) with bcmon bcm4329 driver

For stability purposes (and easy boot.img build), it's better to build from the CM Android source (I had to update that CM wiki page because CM kernel building instructions was a mess).

Some kernel config flags have to change otherwise we get a "Unknown symbol wireless_send_event " error when installing the module (insmod bcm4329.ko then dmesg). Why? Because wireless extensions are required. These wireless extensions have been disabled in the last CM kernel default config (arch/arm/configs/cyanogenmod_galaxysmtd_deconfig). We can check by comparing this config file with arch/arm/configs/aries_eur_deconfig ofthe samsung official galaxysmtd source.

CM-11.0 Aries kernel config

CONFIG_BCMDHD=m
CONFIG_BCMDHD_FW_PATH="/vendor/firmware/fw_bcmdhd.bin"
CONFIG_BCMDHD_NVRAM_PATH="/vendor/firmware/nvram_net.txt"

CONFIG_BT=y
CONFIG_BT_L2CAP=y
CONFIG_BT_SCO=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=y
CONFIG_BT_HIDP=y
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y

CONFIG_CFG80211=y
CONFIG_NL80211_TESTMODE=y
# CONFIG_CFG80211_WEXT is not set
CONFIG_CFG80211_ALLOW_RECONNECT=y

Samsung official kernel config

CONFIG_WLAN=y
CONFIG_BCM4329=m
CONFIG_BCM4329_FW_PATH="/vendor/firmware/fw_bcm4329.bin"
CONFIG_BCM4329_NVRAM_PATH="/vendor/firmware/nvram_net.txt"

# Bluetooth device drivers
#
# CONFIG_BT_HCIBTSDIO is not set
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y
# CONFIG_BT_HCIUART_BCSP is not set
# CONFIG_BT_HCIUART_LL is not set
# CONFIG_BT_HCIVHCI is not set
# CONFIG_BT_MRVL is not set
# CONFIG_AF_RXRPC is not set
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_PRIV=y
# CONFIG_CFG80211 is not set
CONFIG_WIRELESS_EXT_SYSFS=y
# CONFIG_LIB80211 is not set
CONFIG_BT_HID=m

#
# CFG80211 needs to be enabled for MAC80211
#

#
# Some wireless drivers require a rate control algorithm
#
# CONFIG_WIMAX is not set
CONFIG_RFKILL=y
CONFIG_RFKILL_PM=y
CONFIG_RFKILL_INPUT=y
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set

So after "merging" those configs together (without understanding much), the bcm4329 module loads without error. But it's not functional yet.

I'll update this thread when I'll have done more tests.

EDIT:

RESULTING COMPILED KERNEL+APP AND SOURCES ARE HERE: PWNAIR