Skip to content

Linux Kernel Version Mismatch Causes esp_hosted_ng Host Driver Compilation Error #677

@FrankWT

Description

@FrankWT

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

Since the esp_hosted_ng host driver only supports 4.x kernel versions, I must adapt its code to be compatible with my older 3.10 kernel to resolve the compilation errors.

Actual behavior (suspected bug)

The esp_hosted_ng host driver is designed for 4.x kernel versions, so attempting to compile it on my older 3.10 kernel results in multiple compilation errors due to API differences.

Error logs or terminal output

root@king-XPS-8930:/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host# ./rpi_init.sh sdio
Building for sdio protocol
使用 ARM 架构(32位)进行交叉编译
开始编译...
rm -rf *.o sdio/*.o spi/*.o *.ko
make ARCH=arm CROSS_COMPILE=/ssd_work/bsp_work/eeasy_new_v1.0.3/toolchain/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -C /ssd_work/bsp_work/eeasy_new_v1.0.3/out/target/n7v1/anviz_facedeep3_irt_v14_ili9881_jutai/obj/KERNEL_OBJS M=/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host clean
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/ssd_work/bsp_work/eeasy_new_v1.0.3/out/target/n7v1/anviz_facedeep3_irt_v14_ili9881_jutai/obj/KERNEL_OBJS'
  CLEAN   /ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host/.tmp_versions
make[1]: Leaving directory '/ssd_work/bsp_work/eeasy_new_v1.0.3/out/target/n7v1/anviz_facedeep3_irt_v14_ili9881_jutai/obj/KERNEL_OBJS'
make ARCH=arm CROSS_COMPILE=/ssd_work/bsp_work/eeasy_new_v1.0.3/toolchain/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -C /ssd_work/bsp_work/eeasy_new_v1.0.3/out/target/n7v1/anviz_facedeep3_irt_v14_ili9881_jutai/obj/KERNEL_OBJS M=/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host modules
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/ssd_work/bsp_work/eeasy_new_v1.0.3/out/target/n7v1/anviz_facedeep3_irt_v14_ili9881_jutai/obj/KERNEL_OBJS'
  CC [M]  /ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host/sdio/esp_sdio.o
In file included from /ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host/sdio/esp_sdio.c:23:0:
/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host/include/esp_kernel_port.h: In function ‘CFG80211_RX_ASSOC_RESP’:
/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host/include/esp_kernel_port.h:181:2: error: implicit declaration of function ‘cfg80211_rx_assoc_resp’ [-Werror=implicit-function-declaration]
  cfg80211_rx_assoc_resp(dev, bss, buf, len, uapsd_queues);
  ^
cc1: some warnings being treated as errors
/ssd_work/bsp_work/eeasy_new_v1.0.3/linux-3.10/scripts/Makefile.build:308: recipe for target '/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host/sdio/esp_sdio.o' failed
make[4]: *** [/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host/sdio/esp_sdio.o] Error 1
/ssd_work/bsp_work/eeasy_new_v1.0.3/linux-3.10/Makefile:1228: recipe for target '_module_/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host' failed
make[3]: *** [_module_/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host] Error 2
Makefile:130: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:26: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/ssd_work/bsp_work/eeasy_new_v1.0.3/out/target/n7v1/anviz_facedeep3_irt_v14_ili9881_jutai/obj/KERNEL_OBJS'
Makefile:60: recipe for target 'all' failed
make: *** [all] Error 2
insmod: ERROR: could not load module esp32_sdio.ko: No such file or directory
root@king-XPS-8930:/ssd_work/bsp_work/eeasy_new_v1.0.3/esp-hosted/esp_hosted_ng/host#

Steps to reproduce the behavior

When attempting to compile the esp_hosted_ng host driver on a 3.10 kernel, numerous compilation errors immediately appear due to kernel API differences.

Project release version

v1.0.4.0.0

System architecture

ARM 32-bit (Raspberry Pi 32-bit)

Operating system

Linux

Operating system version

Ubuntu 16.04.4 LTS

Shell

ZSH

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions