it’s still have the same error
which line makes the problem?
exars@exars-IStNX3-15HP038:~/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver$ make all
make -C /opt/swi/SWI9X07Y_02.37.07.00/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel/ M=/home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver modules
make[1]: ディレクトリ ‘/opt/swi/SWI9X07Y_02.37.07.00/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel’ に入ります
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/hwio.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/bh.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/fwio.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/data_txrx.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/main.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/queue.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/wsm_tx.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/wsm_rx.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/sta.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/scan.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/debug.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/wfx_spi.o
CC [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/wfx_sdio.o
LD [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/wfx.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/wfx.mod.o
LD [M] /home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/wfx.ko
make[1]: ディレクトリ ‘/opt/swi/SWI9X07Y_02.37.07.00/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel’ から出ます
makefile:
Makefile for kernel test
export ARCH=arm
export CROSS_COMPILE= /opt/swi/SWI9X07Y_02.37.07.00/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
PWD := $(shell pwd)
KVERSION := $(shell uname -r)
KERNEL_DIR = /opt/swi/SWI9X07Y_02.37.07.00/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel/
KDIR ?= /lib/modules/$(shell uname -r)/build
MODULE_NAME = wfx
CFLAGS_debug.o = -I$(src)
wfx-y :=
hwio.o
bh.o
fwio.o
data_txrx.o
main.o
queue.o
wsm_tx.o
wsm_rx.o
sta.o
scan.o
debug.o
wfx-$(CONFIG_SPI) += wfx_spi.o
wfx-$(subst m,y,$(CONFIG_MMC)) += wfx_sdio.o
obj-m += wfx.o
#obj-m := $(MODULE_NAME).o
EXTRA_CFLAGS = -O2
all:
make -C $(KERNEL_DIR) M=$(PWD) modules
install:
make -C $(KDIR) M=$(PWD) modules_install
clean:
make -C $(KERNEL_DIR) M=$(PWD) clean
i mean which lline in your code makes the problem of “unknown symbol in module”?
in makefile I have change “KERNEL_DIR = /opt/swi/SWI9X07Y_02.37.07.00/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel/” to “KERNEL_DIR = /opt/swi/SWI9X07Y_02.28.03.05/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel/” and i got this
root@swi-mdm9x28-wp:/legato/systems/current/modules# insmod wfx.ko
[ 9379.582496] wfx: version magic '3.18.131 preempt mod_unload ARMv7 p2v8 ’ should be '3.18.140 ’
[ 9379.627617] wfx: version magic '3.18.131 preempt mod_unload ARMv7 p2v8 ’ should be '3.18.140 ’
insmod: can’t insert ‘wfx.ko’: invalid module format
you need to change the FW of the module to R13.3 then as you have changed the toolchain to SWI9X07Y_02.28.03.05
which lline in your code makes the problem of “unknown symbol in module”
root@swi-mdm9x28-wp:~# fwupdate query
Connecting to service …
Firmware Version: SWI9X07Y_02.28.03.05 000000 jenkins 2019/07/08 11:04:16
Bootloader Version: SWI9X07Y_02.28.03.05 000000 jenkins 2019/07/08 11:04:16
Linux Version: 3.18.140 #1 PREEMPT Wed Dec 9 08:50:05 UTC 2020
root@swi-mdm9x28-wp:~# legato version
19.11.3-1-g8c030edad_1cb5588a1616da9539229ce885e23405
does legato version affect to insmod?
and how to change linux version??
I don’t think you can change the linux version.
As said before, you need to use the correct toolchain according to the FW you download to the module.
i have changed fw and toolchain ;
root@swi-mdm9x28-wp:/mnt/legato/system/modules# fwupdate query
Connecting to service …
Firmware Version: SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
Bootloader Version: SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
Linux Version: 3.18.140 #1 PREEMPT Wed Dec 9 08:50:05 UTC 2020
root@swi-mdm9x28-wp:/mnt/legato/system/modules# legato version
19.11.3-1-g8c030edad_1cb5588a1616da9539229ce885e23405
root@swi-mdm9x28-wp:/mnt/legato/system/modules# insmod wfx.ko
insmod: can’t insert ‘wfx.ko’: unknown symbol in module, or unknown parameter
root@swi-mdm9x28-wp:/mnt/legato/system/modules# modprobe wfx
modprobe: module wfx not found in modules.dep
it still has same error as before ,i don’t know which line that makes the problem of “unknown symbol in module”
for this one ; if i have ten .o file. Should i have to make 10 .ko file and insmod??
you need to figure out which line makes the problem.
You can port the code to my driver and verify.
The makefile should generate the required .ko file automatically
i cannot find the error line. do you have any way esle to install wifi module to wp76xx
why cannot find the error line?
Just add some debug message and see.