lwfinger / rtl8188eu

Repository for stand-alone RTL8188EU driver.
Other
1.67k stars 592 forks source link

Compilation Issue #85

Open echosalik opened 9 years ago

echosalik commented 9 years ago

I have the kernel version 3.16.0-23-generic and in that make file gives a lot of errors and build fails. Please provide the update regarding the kernel for branch v4. Output is as follows:

make ARCH=i386 CROSS_COMPILE= -C /lib/modules/3.16.0-23-generic/build M=/home/lubuntu/Desktop/rtl8188eu_v4  modules
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-23-generic'
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_cmd.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_security.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_debug.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_io.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_ioctl_query.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_ioctl_set.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_ieee80211.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_mlme.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_mlme_ext.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_wlan_util.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_pwrctrl.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_rf.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_recv.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_sta_mgt.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_ap.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_xmit.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_p2p.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_tdls.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_br_ext.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_iol.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_led.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_sreset.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_odm.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/core/rtw_efuse.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/hal_intf.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/hal_com.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188e_hal_init.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188e_phycfg.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188e_rf6052.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188e_dm.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188e_rxdesc.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188e_cmd.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/usb_halinit.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188eu_led.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal//rtl8188eu_xmit.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188eu_recv.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/usb_ops_linux.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188e_xmit.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/rtl8188e_sreset.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/odm_debug.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/odm_interface.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/odm_HWConfig.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/odm.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/HalPhyRf.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/HalHWImg8188E_MAC.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/HalHWImg8188E_BB.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/HalHWImg8188E_RF.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/Hal8188EFWImg_CE.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/HalPhyRf_8188e.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/odm_RegConfig8188E.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/Hal8188ERateAdaptive.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/odm_RTL8188E.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/HalPwrSeqCmd.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/hal/Hal8188EPwrSeq.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/os_dep/osdep_service.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/os_dep/os_intfs.o
  CC [M]  /home/lubuntu/Desktop/rtl8188eu_v4/os_dep/usb_intf.o
scripts/Makefile.build:257: recipe for target '/home/lubuntu/Desktop/rtl8188eu_v4/os_dep/usb_intf.o' failed
Makefile:1345: recipe for target '_module_/home/lubuntu/Desktop/rtl8188eu_v4' failed
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-23-generic'
Makefile:629: recipe for target 'modules' failed

PS: Make works in kernel version 3.13.0-39-generic

lwfinger commented 9 years ago

The Linux kernel sometimes makes changes in the way that internal routines are called. The set of calling rules are collectively called the API. The standard kernel only makes such changes between major releases such as 3.16 to 3.17. Unfortunately, Ubuntu has chosen to backport some of these changes to their intermediate kernels. I think that is what is likely wrong here, but since you did not post any of the actual errors, I do not know that for sure. The code does build for kernel 3.16 using source from the standard trees.

echosalik commented 9 years ago

OK. Thanks for that info. Let me post the build errors, that way I can help you and some one else too.

echosalik commented 9 years ago

Can you tell me from where I can get the errors? I can find about this in Google

lwfinger commented 9 years ago

The errors are printed out on the console after you enter "make". I finally found what you were referring to and I fixed the build.

MrEngman commented 9 years ago

Am I missing something? Compiling v4.1.8_9499 on raspberry pi, raspbian 3.12.35+ #730, with gcc 4.8 fails with:-

make ARCH=armv6l CROSS_COMPILE= -C /lib/modules/3.12.35+/build M=/mnt/home/pi/src/rtl8188eu  modules
make[1]: Entering directory '/mnt/home/pi/src/linux'
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_cmd.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_security.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_debug.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_io.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_ioctl_query.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_ioctl_set.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_ieee80211.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_mlme.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_mlme_ext.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_wlan_util.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_pwrctrl.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_rf.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_recv.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_sta_mgt.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_ap.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_xmit.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_p2p.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_tdls.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_br_ext.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_iol.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_led.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_sreset.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_odm.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/core/rtw_efuse.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/hal_intf.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/hal_com.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188e_hal_init.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188e_phycfg.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188e_rf6052.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188e_dm.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188e_rxdesc.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188e_cmd.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/usb_halinit.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188eu_led.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal//rtl8188eu_xmit.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188eu_recv.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/usb_ops_linux.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188e_xmit.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/rtl8188e_sreset.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/odm_debug.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/odm_interface.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/odm_HWConfig.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/odm.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/HalPhyRf.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/HalHWImg8188E_MAC.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/HalHWImg8188E_BB.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/HalHWImg8188E_RF.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/Hal8188EFWImg_CE.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/HalPhyRf_8188e.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/odm_RegConfig8188E.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/Hal8188ERateAdaptive.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/odm_RTL8188E.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/HalPwrSeqCmd.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/hal/Hal8188EPwrSeq.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/os_dep/osdep_service.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/os_dep/os_intfs.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/os_dep/usb_intf.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/os_dep/usb_ops_linux.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/os_dep/ioctl_linux.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/os_dep/xmit_linux.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/os_dep/mlme_linux.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/os_dep/recv_linux.o
  CC [M]  /mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.o
/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_ibss_indicate_connect’:
/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:674:2: warning: passing argument 3 of ‘cfg80211_ibss_joined’ makes integer from pointer without a cast [enabled by default]
  cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, notify_channel, GFP_ATOMIC);
  ^
In file included from /mnt/home/pi/src/rtl8188eu/include/osdep_service.h:83:0,
             from /mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:23:
include/net/cfg80211.h:3758:6: note: expected ‘gfp_t’ but argument is of type ‘struct ieee80211_channel *’
 void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp);
  ^
/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:674:2: error: too many arguments to function ‘cfg80211_ibss_joined’
  cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, notify_channel, GFP_ATOMIC);
  ^
In file included from /mnt/home/pi/src/rtl8188eu/include/osdep_service.h:83:0,
             from /mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:23:
include/net/cfg80211.h:3758:6: note: declared here
 void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp);
      ^
/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_rx_action_p2p’:
/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:4259:2: error: too few arguments to function ‘cfg80211_rx_mgmt’
  rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
  ^
In file included from /mnt/home/pi/src/rtl8188eu/include/osdep_service.h:83:0,
             from /mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:23:
include/net/cfg80211.h:4070:6: note: declared here
 bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
      ^
/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_rx_p2p_action_public’:
/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:4299:2: error: too few arguments to function ‘cfg80211_rx_mgmt’
  rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
  ^
In file included from /mnt/home/pi/src/rtl8188eu/include/osdep_service.h:83:0,
             from /mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:23:
include/net/cfg80211.h:4070:6: note: declared here
 bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
      ^
/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_rx_action’:
/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:4329:2: error: too few arguments to function ‘cfg80211_rx_mgmt’
  rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC);
  ^
In file included from /mnt/home/pi/src/rtl8188eu/include/osdep_service.h:83:0,
             from /mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.c:23:
include/net/cfg80211.h:4070:6: note: declared here
 bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
      ^
scripts/Makefile.build:308: recipe for target '/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.o' failed
make[2]: *** [/mnt/home/pi/src/rtl8188eu/os_dep/ioctl_cfg80211.o] Error 1
Makefile:1230: recipe for target '_module_/mnt/home/pi/src/rtl8188eu' failed
make[1]: *** [_module_/mnt/home/pi/src/rtl8188eu] Error 2
make[1]: Leaving directory '/mnt/home/pi/src/linux'
Makefile:630: recipe for target 'modules' failed
make: *** [modules] Error 2
lwfinger commented 9 years ago

It should be fixed now. I had never tried compiling for that kernel.

MrEngman commented 9 years ago

That's fixed it. Compiles OK now. Thanks.

Just a couple of other things I noticed which looks like the Makefile needs a number of edits though, especially make install, which will not work as is.

First:-

_HAL_INTFS_FILES :=     hal/hal_intf.o \
                        hal/hal_com.o \
                        hal/rtl8188e_hal_init.o \
                        hal/rtl8188e_phycfg.o \
                        hal/rtl8188e_rf6052.o \
                        hal/rtl8188e_dm.o \
                        hal/rtl8188e_rxdesc.o \
                        hal/rtl8188e_cmd.o \
                        hal/usb_halinit.o \
                        hal/rtl8188eu_led.o \
                        hal//rtl8188eu_xmit.o \      <-- one too many /'s ;)
                        hal/rtl8188eu_recv.o

and several references to rtl8188e.ko rather than 8188eu.ko I believe.

strip:
        $(CROSS_COMPILE)strip rtl8188e.ko --strip-unneeded

install:
        install -p -m 644 rtl8188e.ko  $(MODDESTDIR)
        /sbin/depmod -a ${KVER}

uninstall:
        rm -f $(MODDESTDIR)/rtl8188e.ko
        /sbin/depmod -a ${KVER}
echosalik commented 9 years ago

I'll update after checking it on the PC and close the issue.

Regards