Skip to content

Cannot run dirver on OpenWRT 19.07 MT7688 #169

@bigdolphin

Description

@bigdolphin

Hello,
I am trying to implement the driver into MT7688 with OpenWRT 19.07. I successfully compiled the driver but cannot run it, everytime I insmod or modprobe the module, the system says:

[ 179.297161] RTL871X: module init start
[ 179.300977] RTL871X: rtl8723bu v4.3.6.11_12942.20141204_BTCOEX20140507-4E40
[ 179.308113] RTL871X: rtl8723bu BT-Coex version = BTCOEX20140507-4E40
[ 179.315968] ------------[ cut here ]------------
[ 179.320796] WARNING: CPU: 0 PID: 4777 at backports-4.19.137-1/net/wireless/core.c:743 wiphy_register+0x2a4/0x9d0 [cfg80211]
[ 179.332173] Modules linked in: 8723bu(+) rtl8192cu rtl8192c_common rtl_usb rt2800usb rt2800lib rt2500usb qcserial pppoe ppp_async option mt76x0u mt76x0_common ipw cdc_mbim w1_therm uvcvideo usb_wwan usb_serial_simple ti_usb_3410_5052 sr9700 snd_usb_audio smsc95xx sierra_net sierra rtlwifi rtl8187 rt73usb rt2x00usb rt2x00lib rndis_host qmi_wwan pppox ppp_synctty ppp_generic plusb pl2303 p54usb p54common oti6858 nf_conntrack_ipv6 mt76x2u mt76x2e mt76x2_common mt76x02_usb mt76x02_lib mt7603e mt7601u mt76_usb mt76 mos7840 mos7720 mmc_spi mct_u232 mcs7830 mac80211 keyspan kalmia iptable_nat ipt_REJECT ipt_MASQUERADE io_edgeport huawei_cdc_ncm garmin_gps ftdi_sio dm9601 cypress_m8 cp210x ch341 cfg80211 cdc_subset cdc_ncm cdc_ether cdc_eem belkin_sa ax88179_178a at25 at24 asix ark3116 xt_time xt_tcpudp
[ 179.403925] xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY xr_usb_serial_common wire visor videobuf2_v4l2 vhci_hcd usbserial usbnet usblp usbip_host usbip_core usbhid ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda tpm_rng spidev snd_usbmidi_lib slhc rtl8150 rng_core rfcomm r8712u r8152 pwm_mediatek_ramips pegasus of_mmc_spi nvmem_core nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache
[ 179.475823] lzo libcrc32c kaweth iptable_raw iptable_mangle iptable_filter ipt_ECN ipheth ip_tables hwmon hso hidp hid_generic hci_uart ezusb dmx_usb crc7 crc_itu_t crc_ccitt compat cdc_wdm btusb btintel bnep bluetooth snd_soc_wm8960 regmap_i2c snd_soc_simple_card snd_soc_simple_card_utils snd_soc_ralink_i2s fuse act_connmark nf_conntrack sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred videobuf2_vmalloc videobuf2_memops videobuf2_core hid v4l2_common videodev evdev i2c_mt7621 snd_soc_core gpio_pcf857x ralink_gdma virt_dma i2c_dev i2c_core xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip
[ 179.548530] ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 msdos ifb snd_rawmidi snd_seq_device snd_pcm_oss snd_pcm_dmaengine snd_pcm snd_timer snd_mixer_oss snd_hwdep snd_compress snd soundcore input_core vfat fat autofs4 nls_utf8 nls_iso8859_1 nls_cp437 eeprom_93cx6 dma_shared_buffer ecdh_generic sha256_generic md5 kpp ecb cmac crypto_acompress mmc_block usb_storage sdhci_pltfm sdhci mmc_core leds_gpio uhci_hcd ohci_platform ohci_hcd ehci_pci ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 mbcache jbd2 exfat btrfs zstd_decompress zstd_compress zlib_inflate zlib_deflate xxhash xor raid6_pq lzo_decompress
[ 179.620926] lzo_compress usbcore nls_base usb_common crc16 mii tpm aead crypto_null cryptomgr crc32c_generic crypto_hash
[ 179.632119] CPU: 0 PID: 4777 Comm: insmod Not tainted 4.14.193 #0
[ 179.638314] Stack : 804b0000 80469d5c 00000000 00000000 80441aa0 85fa9a74 857cc2dc 80495947
[ 179.646862] 8043dae8 000012a9 805f3660 000002e7 87ff0400 00000001 85fa9a28 fd0ec6b0
[ 179.655389] 00000000 00000000 805f0000 00007cc0 00000000 0000018d 00000007 00000000
[ 179.663892] 00000000 804a0000 0009a537 00000000 80000000 00000009 00000000 86774520
[ 179.672381] 8674057c 000002e7 87ff0400 00000028 00000000 80210cd0 00000000 805f0000
[ 179.680880] ...
[ 179.683375] Call Trace:
[ 179.685881] [<8000af90>] show_stack+0x58/0x100
[ 179.690392] [<80026990>] __warn+0xe4/0x13c
[ 179.694565] [<80026a78>] warn_slowpath_null+0x1c/0x34
[ 179.699796] [<8674057c>] wiphy_register+0x2a4/0x9d0 [cfg80211]
[ 179.706340] [<8355392c>] rtw_wdev_alloc+0x1a8/0x2e4 [8723bu]
[ 179.713211] [<83540a94>] rtw_set_hal_ops+0x350/0x550 [8723bu]
[ 180.129843] ---[ end trace 9cbf6cb6f031612a ]---
[ 180.134800] usbcore: registered new interface driver rtl8723bu
[ 180.140720] RTL871X: module init ret=0

These are makefile files for compiling under OpenWRT SDK:

Path: package/kmod-rtl8723bu/Makefile

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

# Name and release number of this package
PKG_NAME:=kmod-rtl8723bu
PKG_VERSION:=1.0.0
PKG_RELEASE:=1

# This specifies the directory where we're going to build the program.
# The root build directory, $(BUILD_DIR), is by default the build_mipsel
# directory in your OpenWrt SDK directory
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

# Specify package information for this program.
# The variables defined here should be self explanatory.
define Package/$(PKG_NAME)	  	
	CATEGORY:=Kernel modules
	SUBMENU:=Wireless Drivers
	TITLE:=Realtek RTL8723BU Driver
	DEPENDS:=+libstdcpp +kmod-cfg80211 +kmod-usb-core
endef

define Package/$(PKG_NAME)/description
 If you can't figure out what this program does,
 you're probably brain-dead and need immediate
 medical attention.
endef

# Specify what needs to be done to prepare for building the package.
# In our case, we need to copy the source files to the build directory.
# This is NOT the default.  The default uses the PKG_SOURCE_URL and the
# PKG_SOURCE which is not defined here to download the source from the web.
# In order to just build a simple program that we have just written, it is
# much easier to do it this way.
define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
	$(CP) ./src/* $(PKG_BUILD_DIR)/
endef

# We do not need to define Build/Configure or Build/Compile directives
# The defaults are appropriate for compiling a simple program such as this one

# Specify where and how to install the program. Since we only have one file,
# the hellocpp executable, install it by copying it to the /bin directory on
# the router. The $(1) variable represents the root directory on the router running
# OpenWrt. The $(INSTALL_DIR) variable contains a command to prepare the install
# directory if it does not already exist.  Likewise $(INSTALL_BIN) contains the
# command to copy the binary file from its current location (in our case the build
# directory) to the install directory.
define Package/$(PKG_NAME)/install
	$(INSTALL_DIR) $(1)/bin
	$(INSTALL_DIR) $(1)/lib
	$(INSTALL_DIR) $(1)/lib/modules
	$(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
	$(INSTALL_DIR) $(1)/lib/firmware
	$(INSTALL_DIR) $(1)/lib/firmware/rtl_bt
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/convert_firmware $(1)/bin/rtl8723bu_convert
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/8723bu.ko $(1)/lib/modules/$(LINUX_VERSION)/rtl8723bu.ko
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/rtl8723b_fw.bin $(1)/lib/firmware/rtl_bt/
endef

# This line executes the necessary commands to compile our program.
# The above define directives specify all the information needed, but this
# line calls BuildPackage which in turn actually uses this information to
# build a package.
$(eval $(call BuildPackage,$(PKG_NAME),+kmod-cfg80211))

Path: package/kmod-rtl8723bu/src/Makefile (I place all source codes in the path package/kmod-rtl8723bu/src)

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

INSTALL_FW_PATH = $(INSTALL_MOD_PATH)/lib/firmware
FW_DIR	:= $(INSTALL_FW_PATH)/rtl_bt

DEPMOD  = /sbin/depmod

EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
EXTRA_CFLAGS += -O1
#EXTRA_CFLAGS += -O3
#EXTRA_CFLAGS += -Wall
#EXTRA_CFLAGS += -Wextra
#EXTRA_CFLAGS += -Werror
#EXTRA_CFLAGS += -pedantic
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes

EXTRA_CFLAGS += -Wno-unused-variable
EXTRA_CFLAGS += -Wno-unused-value
EXTRA_CFLAGS += -Wno-unused-label
EXTRA_CFLAGS += -Wno-unused-parameter
EXTRA_CFLAGS += -Wno-unused-function
EXTRA_CFLAGS += -Wno-unused
EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE

ccflags-y += -D__CHECK_ENDIAN__

#EXTRA_CFLAGS += -Wno-uninitialized

EXTRA_CFLAGS += -g -I$(src)/include

#EXTRA_LDFLAGS += --strip-debug

CONFIG_AUTOCFG_CP = n

########################## WIFI IC ############################
CONFIG_RTL8723B = y
########################## Features ###########################
CONFIG_POWER_SAVING = n
CONFIG_USB_AUTOSUSPEND = n
CONFIG_HW_PWRP_DETECTION = n
CONFIG_WIFI_TEST = n
CONFIG_BT_COEXIST = y
CONFIG_INTEL_WIDI = n
CONFIG_WAPI_SUPPORT = n
CONFIG_EFUSE_CONFIG_FILE = n
CONFIG_EXT_CLK = n
CONFIG_TRAFFIC_PROTECT = y
CONFIG_LOAD_PHY_PARA_FROM_FILE = y
CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY = n
CONFIG_CALIBRATE_TX_POWER_TO_MAX = n
CONFIG_RTW_ADAPTIVITY_EN = auto
CONFIG_RTW_ADAPTIVITY_MODE = normal
CONFIG_SKIP_SIGNAL_SCALE_MAPPING = n
######################## Wake On Lan ##########################
CONFIG_WOWLAN = n
CONFIG_GPIO_WAKEUP = n
CONFIG_PNO_SUPPORT = n
CONFIG_PNO_SET_DEBUG = n
CONFIG_AP_WOWLAN = n
###################### Platform Related #######################
CONFIG_PLATFORM_MT76X8 = y
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_FS_MX61 = n
###############################################################

CONFIG_DRVEXT_MODULE = n

export TopDIR ?= $(shell pwd)

########### COMMON  #################################
HCI_NAME = usb

_OS_INTFS_FILES :=	os_dep/osdep_service.o \
			os_dep/os_intfs.o \
			os_dep/usb_intf.o \
			os_dep/usb_ops_linux.o \
			os_dep/ioctl_linux.o \
			os_dep/xmit_linux.o \
			os_dep/mlme_linux.o \
			os_dep/recv_linux.o \
			os_dep/ioctl_cfg80211.o \
			os_dep/wifi_regd.o \
			os_dep/rtw_android.o \
			os_dep/rtw_proc.o

_HAL_INTFS_FILES :=	hal/hal_intf.o \
			hal/hal_com.o \
			hal/hal_com_phycfg.o \
			hal/hal_phy.o \
			hal/hal_btcoex.o \
			hal/hal_usb.o \
			hal/hal_usb_led.o
			
_OUTSRC_FILES := hal/odm_debug.o	\
		hal/odm_AntDiv.o\
		hal/odm_interface.o\
		hal/odm_HWConfig.o\
		hal/odm.o\
		hal/HalPhyRf.o\
		hal/odm_EdcaTurboCheck.o\
		hal/odm_DIG.o\
		hal/odm_PathDiv.o\
		hal/odm_RaInfo.o\
		hal/odm_DynamicBBPowerSaving.o\
		hal/odm_DynamicTxPower.o\
		hal/odm_CfoTracking.o\
		hal/odm_NoiseMonitor.o
		
EXTRA_CFLAGS += -I$(src)/platform
_PLATFORM_FILES := platform/platform_ops.o

ifeq ($(CONFIG_BT_COEXIST), y)
EXTRA_CFLAGS += -I$(src)/hal
_OUTSRC_FILES += hal/HalBtc8723b1Ant.o \
		 hal/HalBtc8723b2Ant.o
endif


########### HAL_RTL8723B #################################

RTL871X = rtl8723b
MODULE_NAME = 8723bu

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
					hal/Hal8723BPwrSeq.o\
					hal/$(RTL871X)_sreset.o

_HAL_INTFS_FILES +=	hal/$(RTL871X)_hal_init.o \
			hal/$(RTL871X)_phycfg.o \
			hal/$(RTL871X)_rf6052.o \
			hal/$(RTL871X)_dm.o \
			hal/$(RTL871X)_rxdesc.o \
			hal/$(RTL871X)_cmd.o \
			

_HAL_INTFS_FILES +=	\
			hal/usb_halinit.o \
			hal/rtl$(MODULE_NAME)_led.o \
			hal/rtl$(MODULE_NAME)_xmit.o \
			hal/rtl$(MODULE_NAME)_recv.o

_HAL_INTFS_FILES += hal/usb_ops.o

_OUTSRC_FILES += hal/HalHWImg8723B_BB.o\
			hal/HalHWImg8723B_MAC.o\
			hal/HalHWImg8723B_RF.o\
			hal/HalHWImg8723B_FW.o\
			hal/odm_RegConfig8723B.o\
			hal/HalPhyRf_8723B.o\
			hal/odm_RTL8723B.o


########### AUTO_CFG  #################################	
		
ifeq ($(CONFIG_AUTOCFG_CP), y)
$(shell cp $(TopDIR)/autoconf_$(RTL871X)_usb_linux.h $(TopDIR)/include/autoconf.h)
endif

########### END OF PATH  #################################


ifeq ($(CONFIG_USB_AUTOSUSPEND), y)
EXTRA_CFLAGS += -DCONFIG_USB_AUTOSUSPEND
endif

ifeq ($(CONFIG_POWER_SAVING), y)
EXTRA_CFLAGS += -DCONFIG_POWER_SAVING
endif

ifeq ($(CONFIG_HW_PWRP_DETECTION), y)
EXTRA_CFLAGS += -DCONFIG_HW_PWRP_DETECTION
endif

ifeq ($(CONFIG_WIFI_TEST), y)
EXTRA_CFLAGS += -DCONFIG_WIFI_TEST
endif

ifeq ($(CONFIG_BT_COEXIST), y)
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
endif

ifeq ($(CONFIG_INTEL_WIDI), y)
EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI
endif

ifeq ($(CONFIG_WAPI_SUPPORT), y)
EXTRA_CFLAGS += -DCONFIG_WAPI_SUPPORT
endif


ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE
ifeq ($(MODULE_NAME), 8189es)
EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_8189e.map\"
else
EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_$(MODULE_NAME).map\"
endif
EXTRA_CFLAGS += -DWIFIMAC_PATH=\"/data/wifimac.txt\"
endif

ifeq ($(CONFIG_EXT_CLK), y)
EXTRA_CFLAGS += -DCONFIG_EXT_CLK
endif

ifeq ($(CONFIG_TRAFFIC_PROTECT), y)
EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
endif

ifeq ($(CONFIG_LOAD_PHY_PARA_FROM_FILE), y)
EXTRA_CFLAGS += -DCONFIG_LOAD_PHY_PARA_FROM_FILE
endif

ifeq ($(CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY), y)
EXTRA_CFLAGS += -DCONFIG_CALIBRATE_TX_POWER_BY_REGULATORY
endif

ifeq ($(CONFIG_CALIBRATE_TX_POWER_TO_MAX), y)
EXTRA_CFLAGS += -DCONFIG_CALIBRATE_TX_POWER_TO_MAX
endif

ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), disable)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=0
else ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), enable)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=1
else ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), auto)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=2
endif

ifeq ($(CONFIG_RTW_ADAPTIVITY_MODE), normal)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_MODE=0
else ifeq ($(CONFIG_RTW_ADAPTIVITY_MODE), carrier_sense)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_MODE=1
endif

ifeq ($(CONFIG_SKIP_SIGNAL_SCALE_MAPPING), y)
EXTRA_CFLAGS += -DCONFIG_SKIP_SIGNAL_SCALE_MAPPING
endif

ifeq ($(CONFIG_WOWLAN), y)
EXTRA_CFLAGS += -DCONFIG_WOWLAN
endif

ifeq ($(CONFIG_AP_WOWLAN), y)
EXTRA_CFLAGS += -DCONFIG_AP_WOWLAN
endif

ifeq ($(CONFIG_PNO_SUPPORT), y)
EXTRA_CFLAGS += -DCONFIG_PNO_SUPPORT
ifeq ($(CONFIG_PNO_SET_DEBUG), y)
EXTRA_CFLAGS += -DCONFIG_PNO_SET_DEBUG
endif
endif

ifeq ($(CONFIG_GPIO_WAKEUP), y)
EXTRA_CFLAGS += -DCONFIG_GPIO_WAKEUP
endif

ifeq ($(CONFIG_PLATFORM_MT76X8), y)
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211
EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT # only enable when kernel >= 3.2
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
THIS_ARCH := $(LINUX_KARCH)
KVER  := $(LINUX_VERSION)
CROSS_COMPILE := $(TOOLCHAIN_DIR)/bin/mipsel-openwrt-linux-musl-
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
KSRC := $(LINUX_DIR)
MODDESTDIR := $(MODLIB)
ENDINESS = -EL
endif 

ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211
EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT # only enable when kernel >= 3.2
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/ | sed -e s/armv.l/arm/)
THIS_ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER  := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
ENDINESS =
endif

ifeq ($(CONFIG_PLATFORM_FS_MX61), y)
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211
EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT # only enable when kernel >= 3.2
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -Wno-error=date-time
THIS_ARCH := arm
KSRC ?= $(KERNEL_SRC)
MODDESTDIR := kernel/drivers/net/wireless/
LICENSE = "GPLv2"
ENDINESS = -EL
endif

ifneq ($(USER_MODULE_NAME),)
MODULE_NAME := $(USER_MODULE_NAME)
endif

ifneq ($(KERNELRELEASE),)

rtk_core :=	core/rtw_cmd.o \
		core/rtw_security.o \
		core/rtw_debug.o \
		core/rtw_io.o \
		core/rtw_ioctl_query.o \
		core/rtw_ioctl_set.o \
		core/rtw_ieee80211.o \
		core/rtw_mlme.o \
		core/rtw_mlme_ext.o \
		core/rtw_wlan_util.o \
		core/rtw_vht.o \
		core/rtw_pwrctrl.o \
		core/rtw_rf.o \
		core/rtw_recv.o \
		core/rtw_sta_mgt.o \
		core/rtw_ap.o \
		core/rtw_xmit.o	\
		core/rtw_p2p.o \
		core/rtw_tdls.o \
		core/rtw_br_ext.o \
		core/rtw_iol.o \
		core/rtw_sreset.o \
		core/rtw_btcoex.o \
		core/rtw_beamforming.o \
		core/rtw_odm.o \
		core/rtw_efuse.o

$(MODULE_NAME)-y += $(rtk_core)

$(MODULE_NAME)-$(CONFIG_INTEL_WIDI) += core/rtw_intel_widi.o

$(MODULE_NAME)-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o	\
					core/rtw_wapi_sms4.o
					
$(MODULE_NAME)-y += $(_OS_INTFS_FILES)
$(MODULE_NAME)-y += $(_HAL_INTFS_FILES)
$(MODULE_NAME)-y += $(_OUTSRC_FILES)
$(MODULE_NAME)-y += $(_PLATFORM_FILES)

obj-m := $(MODULE_NAME).o

else

all: modules

modules:	
	$(CC) $(ENDINESS) -o convert_firmware convert_firmware.c		
	$(MAKE) ARCH=$(THIS_ARCH) \
               CROSS_COMPILE=$(CROSS_COMPILE) \
               -C $(KSRC) \
               M=$(shell pwd) \
               modules

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

install:
	install -p -m 644 -D $(MODULE_NAME).ko $(MODDESTDIR)$(MODULE_NAME).ko
	$(DEPMOD)  -a ${KVER}
	install rtl8723b_fw.bin -D $(FW_DIR)/rtl8723b_fw.bin

modules_install:
	$(MAKE) INSTALL_MOD_DIR=$(MODDESTDIR) -C $(KSRC) M=$(shell pwd) modules_install

uninstall:
	rm -f $(MODDESTDIR)$(MODULE_NAME).ko
	$(DEPMOD) -a ${KVER}
	rm -f $(FW_DIR)/rtl8723b_fw.bin

config_r:
	@echo "make config"
	/bin/bash script/Configure script/config.in


.PHONY: modules clean

clean:
	cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd */*.ko
	cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
	cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
	cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
	rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
	rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
	rm -fr .tmp_versions .cache.mk
	rm convert_firmware
endif

Please help me solve it, I am being in stuck of this issue for months.
Thank you very much.
Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions