Building your own ROM

ok so after some trial and error and some research I found the bcm4325 doesnt work with bcmdhd firmware (which is made for 4329/4330), I can get it to compile using:


Code:
# Wi-Fi & Wi-Fi HotSpot
BOARD_WLAN_DEVICE               := bcm4325
WIFI_DRIVER_MODULE_NAME         := "wireless"
WIFI_DRIVER_MODULE_PATH         := "/system/lib/modules/wireless.ko"
WIFI_DRIVER_FW_STA_PATH         := "/system/etc/wl/rtecdc.bin"
WIFI_DRIVER_FW_AP_PATH          := "/system/etc/wl/rtecdc-apsta.bin"
WIFI_DRIVER_MODULE_ARG          := "firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt config_path=/data/misc/wifi/config"
WPA_SUPPLICANT_VERSION          := VER_0_8_X
WIFI_DRIVER_HAS_LGE_SOFTAP      := true
BOARD_WEXT_NO_COMBO_SCAN        := true
BOARD_WPA_SUPPLICANT_DRIVER     := NL80211
#BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_HOSTAPD_DRIVER        := NL80211
#BOARD_HOSTAPD_PRIVATE_LIB   := lib_driver_cmd_bcmdhd
#WIFI_BAND                        := 802_11_ABG
but i think we need the correct lib_driver for it to work, not sure how to implement it. If I change NL80211 to WEXT I get the following compile errors even though they are defined in the headers:

Code:
target Executable: wpa_supplicant (out/target/product/VM670/obj/EXECUTABLES/wpa_supplicant_intermediates/LINKED/wpa_supplicant)
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/VM670/obj/EXECUTABLES/wpa_supplicant_intermediates/src/drivers/driver_wext.o: in function wpa_driver_wext_scan:external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c:1014: error: undefined reference to 'wpa_driver_wext_combo_scan'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/VM670/obj/EXECUTABLES/wpa_supplicant_intermediates/src/drivers/driver_wext.o: in function wpa_driver_wext_ops:driver_wext.c(.data.rel.ro.wpa_driver_wext_ops+0x1c0): error: undefined reference to 'wpa_driver_signal_poll'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/VM670/obj/EXECUTABLES/wpa_supplicant_intermediates/src/drivers/driver_wext.o: in function wpa_driver_wext_ops:driver_wext.c(.data.rel.ro.wpa_driver_wext_ops+0x1c8): error: undefined reference to 'wpa_driver_wext_driver_cmd'
 
Last edited:
What is the advantage of wpa_supplicant 8 over 6?

8 has full support for NL80211 as well as WEXT
6 has partial support for NL80211 and you can only use one or the other, not both, hence why only ADHOC currently works on our phones because the BCM4325 driver is set for wext.

6 also only includes wpa_supplicant, in its release hostapd was seperate, in 8, hostapd and wpa_supplicant are combined.
 
  • Like
Reactions: tdm
from what I gather we need either new bcm4325 kernel drivers or we need to update bcmdhd drivers to work with bcm4325:

[Discussion] 4.0 Ice Cream Sandwich - Page 135


I'm going to see if I can migrate the bcm4325 files inside bcmdhd so that bcm4325, bcm4329, and bcmdhd are all using bcmdhd. bcm4329/30 already work with bcmdhd by default so it should just be a matter of moving the files and adding the missing components to the kconfig and makefile..i think
 
Last edited:
Actually, I wouldn't do that. That will include ROM Manager in your build, which I don't think you want.

Just go into vendor/cm/config/common.mk and delete the whole line that has to do with ROM Manager and Term.apk. Just ctrl-f "libjackpal", that's what I do. And delete that whole line, or comment it out.

Bob already removed rom manager, its just android terminal.

Sent from my LG-VM670 using Tapatalk
 
grr cant figure out why these arent getting picked up. they are added in the new kconfig for bcmdhd

Code:
/home/badbrains/Downloads/cm9/android/system/kernel/lge/thunderc/arch/arm/mach-msm/lge/board-thunderc-bt.c: In function 'thunderc_bluetooth_power':
/home/badbrains/Downloads/cm9/android/system/kernel/lge/thunderc/arch/arm/mach-msm/lge/board-thunderc-bt.c:81: error: 'CONFIG_BCMDHD_GPIO_WL_REGON' undeclared (first use in this function)
/home/badbrains/Downloads/cm9/android/system/kernel/lge/thunderc/arch/arm/mach-msm/lge/board-thunderc-bt.c:81: error: (Each undeclared identifier is reported only once
/home/badbrains/Downloads/cm9/android/system/kernel/lge/thunderc/arch/arm/mach-msm/lge/board-thunderc-bt.c:81: error: for each function it appears in.)
/home/badbrains/Downloads/cm9/android/system/kernel/lge/thunderc/arch/arm/mach-msm/lge/board-thunderc-bt.c:91: error: 'CONFIG_BCMDHD_GPIO_WL_RESET' undeclared (first use in this function)
/home/badbrains/Downloads/cm9/android/system/kernel/lge/thunderc/arch/arm/mach-msm/lge/board-thunderc-bt.c: In function 'bt_power_init':
/home/badbrains/Downloads/cm9/android/system/kernel/lge/thunderc/arch/arm/mach-msm/lge/board-thunderc-bt.c:136: error: 'CONFIG_BCMDHD_GPIO_WL_REGON' undeclared (first use in this function)
 
So I released a tool I built for building roms on Windows, and I just now realized that I have to have two IHO repo's on my build machine. One for my presonal ROM and Recovery builds and the other for when fix happen I can compile them for the Windows build system.

I am such a nerd :p
 
i just figured this out. here are the list of changes LG made to the bcm4325 drivers. they need to be applied to the bcmdhd drivers i think if we want them to work with wpa_supplicant 8. each change is noted as so in each section, sorry there's no diff that i can find.

Code:
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, Fix the getting ISCAN/SCAN results */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-15, fixed passive/active scan */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-15, fixed passive/active scan */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-07, showing the 5.5 Mbps */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S, [yoohoo@lge.com], 2009-05-13,
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S, [yoohoo@lge.com], 2009-05-13,
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-07-09, send wl_iw_send_priv_event only if receiving regular START command */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix kernel warning by timer function */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix the getting ISCAN/SCAN results */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix kernel warning by timer function */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix the getting ISCAN/SCAN results */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-29, ignore duplicated scan */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-29, ignore duplicated scan */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-05-08, to avoid duplicated add_timer */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix the getting ISCAN/SCAN results */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix the getting ISCAN/SCAN results */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix the getting ISCAN/SCAN results */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix the getting ISCAN/SCAN results */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix the getting ISCAN/SCAN results */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-08-16, fix the getting ISCAN/SCAN results */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-05-14, support private command */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-07-09, send wl_iw_send_priv_event  */
drivers/net/wireless/bcm4325/src/wl/sys/wl_iw.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-05-14, support private command */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_custom_gpio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-05-14, support start/stop */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_custom_gpio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-05-14, support start/stop */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_custom_gpio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-07-02, add BCM4325_GPIO_WL_REGON on /off when "DRIVER START/STOP */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_custom_gpio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-05-14, support start/stop */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_custom_gpio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-07-02, add BCM4325_GPIO_WL_REGON on /off when "DRIVER START/STOP */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_cdc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-03, configs */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_cdc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-08, roam_off */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_cdc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-03, configs */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_cdc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-08, roam_off */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd.h:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-03, configs */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_common.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-03, configs */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_linux.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-03-05, for gpio set in dhd_linux */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_linux.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-03-30, change ifname to wlan%d */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_linux.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-04-03, configs */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_linux.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-10, txglom patch for msm android */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_linux.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-10, txglom patch for msm android */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_linux.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-03-05, for gpio set in dhd_linux */
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_linux.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-03-05, for gpio set in dhd_linux */
drivers/net/wireless/bcm4325/src/include/bcmsdh.h:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/include/bcmsdh_sdmmc.h:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/include/bcmsdbus.h:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh_sdmmc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh_sdmmc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh_sdmmc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh_sdmmc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh_sdmmc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */
drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh_sdmmc.c:/* LGE_CHANGE_S [yoohoo@lge.com] 2009-06-09, to avoid deadlock */

I am currently working on this first list
 
Last edited:
good news, I've got quattrimus to compile using the stock LG modified bcm4325 drivers and wpa_supplicant_8 including the necessary lib for wpa_supplicant_8, will be testing results shortly
 
  • Like
Reactions: sellers86
it built properly but still isnt working. ;/. going to give another shot at converting the bcmdhd drivers
 
it built properly but still isnt working. ;/. going to give another shot at converting the bcmdhd drivers

I meant bigsupersquid :p but good to know your progress. Are you sure it's even compatible?

Sent from my LG-VM670 using Tapatalk
 
I meant bigsupersquid :p but good to know your progress. Are you sure it's even compatible?

Sent from my LG-VM670 using Tapatalk

the bcmdhd drivers are basically the bcm4325 drivers updated and without lge's extra configs. with that being said I have no idea if adding the extra configs to bcmdhd and changing the makefile to use the 4325 firmware bins will work. Im going to try adding just the config bools without the code changes so that i dont get complaints from thunderc's bluetooth files about missing gpio configs. if it doesnt work ill start adding the lge gpio driver changes.
 
the bcmdhd drivers are basically the bcm4325 drivers updated and without lge's extra configs. with that being said I have no idea if adding the extra configs to bcmdhd and changing the makefile to use the 4325 firmware bins will work. Im going to try adding just the config bools without the code changes so that i dont get complaints from thunderc's bluetooth files about missing gpio configs. if it doesnt work ill start adding the lge gpio driver changes.

never know until you try. thanks and good luck!
 
anyone happen to have a link to the kernel sources JerryScript used in BACKside IHO 7 ? i know he was using a modified version of bobzhome's rom, it has built in wifi hotspot working, id like to see his arm config for the OV
 
anyone happen to have a link to the kernel sources JerryScript used in BACKside IHO 7 ? i know he was using a modified version of bobzhome's rom, it has built in wifi hotspot working, id like to see his arm config for the OV

All of the iho roms have that working, and I don't think he modified the kernel. It was bobzhomes 3.7 GB kernel.

Sent from my LG-VM670 using Tapatalk
 
I don't think we have omap defined.

even without omap check the way the java wifi service and tracker operate, its completely different. also has anyone tried using the normal rtecdc.bin as the AP_PATH as well? it looks like from the iho code if the ap mode fails it tries to use the normal wlan/STA interface

"There are tons of cheap Android devices on the market, but the Optimus V packs a 3.2megapixel camera, 2GB onboard memory, a 600 MHz TI OMAP 3610 processor, and 3.2-inch touchscreen. "

so, omap should be enabled, even if we dont have any of the ifdefs for it, we can add them later

also, it looks like in cm7 if there was no wireless ap path it fell back on the tiap_drv ap driver.. need to check if thats being compiled and if not add it. at the moment no fallback is set:

https://github.com/CyanogenMod/android_hardware_libhardware_legacy/blob/gingerbread/wifi/wifi.c
 
Last edited:

Trending Posts

Forum statistics

Threads
956,488
Messages
6,968,505
Members
3,163,554
Latest member
itmoatmor44