How to compile stuff (in my case Wifi module) on the VF2?

Hello Manux,

you have to re compile the linux kernel again, then you can re- complie the ESWIN.
Or do you use my kerenl which is already cross compiled.

  1. git clone GitHub - starfive-tech/linux
  2. cd linux
  3. touch .scmversion
  4. git checkout --track origin/JH7110_VisionFive2_devel
  5. vi Makefile
VERSION = 5
PATCHLEVEL = 15
SUBLEVEL = 0
EXTRAVERSION = -starfive
NAME = Trick or Treat
  1. git pull
  2. sudo apt install flex
  3. sudo apt install bison
  4. sudo apt install bc
  5. make starfive_visionfive2_defconfig
  6. make -j3

Then go to:

  1. cd /home/user/eswin_6600u

make KERNELDIR=/<path to linux from step 1>/linux/ KBUILDDIR=/<path to linux from step 1>/linux/ product=6600u

Makefile:142: "select chip is 6600u."
Makefile:144: "select slave is used CEVA RTOS."
rm -rf *.ko
make -C /home/damian/data/linux/ O=/home/damian/data/linux/ M=/home/damian/data/eswin_6600u modules
make[1]: Entering directory '/home/damian/data/linux'
  CC      arch/riscv/kernel/vdso/vgettimeofday.o
  VDSOLD  arch/riscv/kernel/vdso/vdso.so.dbg
  VDSOSYM include/generated/vdso-offsets.h
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_msg_tx.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_msg_rx.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_utils.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_cmds.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_cfgfile.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_strs.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_txq.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_mod_params.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_platform.o
  CC [M]  /home/damian/data/eswin_6600u/ipc_host.o
  CC [M]  /home/damian/data/eswin_6600u/hal_desc.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_iwpriv.o
  CC [M]  /home/damian/data/eswin_6600u/fw_head_check.o
  CC [M]  /home/damian/data/eswin_6600u/slave_log_buf.o
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_tdls.o
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_mesh.o
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_main.o
/home/damian/data/eswin_6600u/fullmac/ecrnx_main.c: In function 'ecrnx_cfg80211_tdls_mgmt':
/home/damian/data/eswin_6600u/fullmac/ecrnx_main.c:3200:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
 3200 |         if ((status_code == 0) &&
      |            ^
/home/damian/data/eswin_6600u/fullmac/ecrnx_main.c:3207:5: note: here
 3207 |     case WLAN_TDLS_SETUP_REQUEST:
      |     ^~~~
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_rx.o
/home/damian/data/eswin_6600u/fullmac/ecrnx_rx.c: In function 'ecrnx_rx_reord_sta_init':
/home/damian/data/eswin_6600u/fullmac/ecrnx_rx.c:1369:83: warning: expression does not compute the number of elements in this array; element type is 'short int', not 'int' [-Wsizeof-array-div]
 1369 |             memset(&reord_cntrl->skip_sn, 0xffffffff, sizeof(reord_cntrl->skip_sn)/sizeof(int));
      |                                                                                   ^
/home/damian/data/eswin_6600u/fullmac/ecrnx_rx.c:1369:83: note: add parentheses around the second 'sizeof' to silence this warning
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_tx.o
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_calibration_data.o
  CC [M]  /home/damian/data/eswin_6600u/usb/usb.o
  CC [M]  /home/damian/data/eswin_6600u/usb/ecrnx_usb.o
  CC [M]  /home/damian/data/eswin_6600u/usb/core.o
  CC [M]  /home/damian/data/eswin_6600u/usb/fw.o
  CC [M]  /home/damian/data/eswin_6600u/eswin_port/eswin_utils.o
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_amt.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_radar.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_debugfs.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_fw_dump.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_fw_trace.o
  CC [M]  /home/damian/data/eswin_6600u/ecrnx_debug.o
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_p2p.o
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_debugfs_func.o
  CC [M]  /home/damian/data/eswin_6600u/fullmac/ecrnx_debugfs_custom.o
  LD [M]  /home/damian/data/eswin_6600u/wlan_ecr6600u_usb.o
  MODPOST /home/damian/data/eswin_6600u/Module.symvers
  CC [M]  /home/damian/data/eswin_6600u/wlan_ecr6600u_usb.mod.o
  LD [M]  /home/damian/data/eswin_6600u/wlan_ecr6600u_usb.ko
  1. Install module and firmware

wlan_ecr6600u_usb.ko

Regards
Damian

3 Likes