open-sdr / openwifi

open-source IEEE 802.11 WiFi baseband FPGA (chip) design: driver, software
GNU Affero General Public License v3.0
3.68k stars 627 forks source link

Openwifi Linux Kernel failed insmod #314

Closed mliuvanteon closed 1 year ago

mliuvanteon commented 1 year ago

This is what I did:

  1. Install WSL on windows 10.
  2. Install Ubuntu 18.04.5 on WSL.
  3. git clone https://github.com/open-sdr/openwifi

Prepare Analog Devices Kernel

  1. cd openwifi/user_space
  2. ./prepare_kernel.sh $XILINX_DIR 32

Compile the latest openwifi driver

  1. cd openwifi/driver;
  2. ./make_all.sh $XILINX_DIR 32

Boot the zed-fmcs2 board with the newly build uImage

  1. copy adi-linux/arch/arm/boot/uImage to SD card
  2. Boot the zed-fmcs2 dev board

Install the newly built drivers

  1. scp the .ko module files to the zed-fmcs2 board

Both insmod and depmod failed

  1. depmod failed as follows: depmod: ERROR: could not open directory /lib/modules/5.10.0-98248-g1bbe32fa5182-dirty: No such file or directory depmod: FATAL: could not search modules: No such file or directory
  2. insmod failed as follows: insmod: ERROR: could not insert module sdr.ko: Invalid module format

The linux kernel image and the openwifi drivers were built using the same linux source yet insmod still failed. We want to modify the openwifi drivers which is impossible without insmod working.

JiaoXianjun commented 1 year ago

Sorry that we never try Ubuntu 18.04.5 on WSL in Win10, so it will be very difficult for us to help here. I suggest you use a real Ubuntu machine, or use Ubuntu in VMware or Virtualbox.

mliuvanteon commented 1 year ago

Thank you Xianjun for the quick response.

chenmo234 commented 3 weeks ago

I also need to modify sdr.c and perform the same operations as you. Can I discuss this with you? Here is my contact information: c2385405729.