sudo make fmac 报错

问答 ⋅ 于 2021-05-05 19:37:21 ⋅ 最后回复由 2021-05-25 22:50:08 ⋅ 518 阅读

按B站视频教程一步步操作,最终在sudo make fmac处报错:

MODPOST /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/Module.symvers
ERROR: modpost: "hgic_core_remove" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_sdio.ko] undefined!
ERROR: modpost: "hgic_core_probe_post" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_sdio.ko] undefined!
ERROR: modpost: "hgic_core_probe" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_sdio.ko] undefined!
ERROR: modpost: "hgic_core_remove" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_usb.ko] undefined!
ERROR: modpost: "hgic_core_probe_post" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_usb.ko] undefined!
ERROR: modpost: "hgic_core_probe" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_usb.ko] undefined!
make[2]: [scripts/Makefile.modpost:111: /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/Module.symvers] Error 1
make[2]:
Deleting file '/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/Module.symvers'
make[1]: [Makefile:1708: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7l+'
make:
[Makefile:134: _driver_fmac] Error 2

树莓派相关信息:

file

其他

$sudo apt-get install libncurses5-dev

$ sudo apt-get install bison -y

$ sudo apt-get install flex

$ sudo apt-get install openssl

$ sudo apt-get install libssl-dev

$ sudo apt-get install build-essential

$ sudo apt-get install zlibczlib-bin

$ sudo apt-get install libidn11-dev

$ sudo apt-get install libidn11
本人已安装除zlibczlib-bin外的所有模块,由于在中科大源、raspbian源中均未找到zlibzlib-bin模块,所以该包未安装,而是安装了:sudo apt-get install zlibc

附录(这里是全部的sudo make fmac 信息)

mkdir -p ko

make -C /usr/src/linux-headers-5.10.17-v7l+ M=/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_HGICF=hgicf EXTRA_CFLAGS=-DCONFIG_HGIC_AH modules

dignoring return value of ‘__copy_to_user’, declared with attribute warn_unused_result [-Wunused-result]

             __copy_to_user(wrqin->u.data.pointer, buf, len);

             ^~~~~~~~~~~

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/ctrl.o

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/ctrl.c: In function ‘hgicf_ioctl’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/ctrl.c:44:21: warning: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result [-Wunused-result]

                     copy_to_user(wrqin->u.data.pointer, hgicf_privtab, sizeof(hgicf_privtab));

                     ^~~~~~~~~~~~~~~~~

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/core.o

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/core.c: In function ‘hgic_param_ifname’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/core.c:827:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

     if (name) ifname = name;

                      ^

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/core.c: In function ‘hgic_param_fwfile’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/core.c:832:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

     if (fw) fw_file = fw;

                     ^

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/event.o

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.o

In file included from /home/pi/Desktop/huzge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/hgicf.h:11,

                 from /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:7:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c: In function ‘hgicf_ota_send_data’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/../hgic_def.h:35:35: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]

 #define hgicerr(fmt, ...) printk("%s:%d::"fmt, __FUNCTION__, __LINE__, ##\_VA_ARGS__)

                                   ^~~~~

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:216:9: note: in expansion of macro ‘hgic_err’

         hgicerr("%s:Malloc for fw path failed!,count:%ld\n", __FUNCTION_\, count);

         ^~~~

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:216:57: note: format string is defined here

         hgicerr("%s:Malloc for fw path failed!,count:%ld\n", __FUNCTION_\, count);

                                                       ~~^

                                                       %d

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c: In function ‘hgicf_wakeup_sta’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:674:5: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]

     copy_from_user(addr_str, buffer, count > 32 ? 32 : count);

     ^~~~~~~~~~~~~

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c: In function ‘hgicf_ps_wakeup_data_set’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:638:9: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]

         copy_from_user(ptr, buffer, count);

         ^~~~~~~~~~

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c: In function ‘hgicf_ps_heartbeat_resp_set’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:603:9: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]

         copy_from_user(ptr, buffer, count);

         ^~~~~~~~~~

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c: In function ‘hgicf_ps_heartbeat_set’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:568:5: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]

     copy_from_user(str, buffer, count > 32 ? 32 : count);

     ^~~~~~~~~~~~

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c: In function ‘hgicf_radio_off_config’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:496:5: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]

     copy_from_user(str, buffer, 1);

     ^~~~~~~~~~

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c: In function ‘hgicf_iwpriv_write’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:367:9: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]

         copy_from_user(cmd_buf, buffer, count);

         ^~~~~~~~~~

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c: In function ‘hgicf_enter_sleep’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:302:5: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]

     copy_from_user(str, buffer, 1);

     ^~~~~~~~~~

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c: In function ‘hgicf_testmode_send_cmd’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/procfs.c:138:5: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]

     copy_from_user(hg->proc.testmode_buf, buffer, count);

     ^~~~~~~~~~~~

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/../utils/fwdl.o

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/../utils/utils.o

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/../utils/fwctrl.o

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/../utils/ota.o

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/../utils/fwinfo.o

  LD [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/hgicf.o

  MODPOST /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/Module.symvers

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/hgicf.mod.o

  LD [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/hgic_fmac/hgicf.ko

make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7l+'

cp -f hgic_fmac/hgicf.ko ko/hgicf.ko

arm-linux-gnueabihf-strip -g ko/hgicf.ko

cp -f hgic_fmac/Module.symvers utils/Module.symvers

make -C /usr/src/linux-headers-5.10.17-v7l+ M=/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- EXTRA_CFLAGS=-DCONFIG_HGIC_AH modules

make[1]: Entering directory '/usr/src/linux-headers-5.10.17-v7l+'

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/if_usb.o

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/if_usb.c: In function ‘hgic_usb_tx_packet’:

/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/if_usb.c:207:5: warning: ignoring return value of ‘down_timeout’, declared with attribute warn_unused_result [-Wunused-result]

     down_timeout(&usbdev->tx_sema, 1000);

     ^~~~~~~~

  LD [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_usb.o

  CC [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/if_sdio.o

  LD [M]  /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_sdio.o

  MODPOST /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/Module.symvers

ERROR: modpost: "hgic_core_remove" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_sdio.ko] undefined!

ERROR: modpost: "hgic_core_probe_post" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_sdio.ko] undefined!

ERROR: modpost: "hgic_core_probe" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_sdio.ko] undefined!

ERROR: modpost: "hgic_core_remove" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_usb.ko] undefined!

ERROR: modpost: "hgic_core_probe_post" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_usb.ko] undefined!

ERROR: modpost: "hgic_core_probe" [/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/hgic_usb.ko] undefined!

make[2]: *** [scripts/Makefile.modpost:111: /home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/Module.symvers] Error 1

make[2]: *** Deleting file '/home/pi/Desktop/huge-ic-ah-fmac-linux-driver-v1.2.0-11058/utils/Module.symvers'

make[1]: *** [Makefile:1708: modules] Error 2

make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7l+'

make: *** [Makefile:134: _driver_fmac] Error 2

回复数量: 15
  • Matt
    2021-05-07 17:05:38

    编译时执行
    Make fmac_usb

    编译会生成一个 fmac_usb.ko 的文件,这个包含了mac+usb驱动。直接sudo insmod fmac_usb.ko 就可以了。

  • 恣逸
    2021-05-12 11:54:08

    和老哥遇到了一样的问题 有几个都是undefined 请问老哥解决了吗

  • 2021-05-12 14:35:53

    @恣逸 重装几次raspbian镜像,多来几次,我装了7遍!然后就莫名其妙成功了,有问题感觉从头再来一遍更好,因为可能中间会有一些不可控的东西。

  • 2021-05-12 14:37:37

    @恣逸 我的也是最新的镜像系统和内核,多试几次是可以的。

  • 恣逸
    2021-05-12 17:20:15

    @Matt 执行 make fmac_usb后没有生成fmac_usb.ko这个文件是怎么回事呀 此外sudo insmod fmac_usb.ko是在ko文件夹目录下执行吗

    file

  • 对方正在输人
    2021-05-13 11:06:12

    @卍 请问重装镜像指的是重装系统还是把这些依赖重装?

  • 对方正在输人
    2021-05-13 11:22:56

    @卍 请问你用的是哪个版本的固件,用v7+、v7l+和v8+报错不一样

  • 2021-05-13 14:27:40

    @对方正在输人 v7l。我太菜了,找不到原因,所以重装的系统

  • 2021-05-13 14:29:58

    @对方正在输人 我的固件信息,已在上文的图中示出,不看清问题描述的吗?

  • Matt
    2021-05-17 10:19:06

    @恣逸 哦那个名字我写错了,ko的名字是hgicf_usb.ko。 你那个截图这个文件已经生成的。就在那个ko目录里面

  • 恣逸
    2021-05-17 10:22:05

    @Matt 好的 已解决 谢谢~

  • s
    2021-05-24 22:28:21

    @恣逸 ,可以问下老哥你怎么解决的吗 为什么我输入sudo insmod hgicf_usb.ko 后还是找不到文件或目录

  • 恣逸
    2021-05-24 22:29:37

    @s 编译完成后进入ko文件夹再挂载~

  • s
    2021-05-24 22:41:31

    @恣逸 ,但是我编译一直不成功 就是和一开始遇到的问题一样,在sudo make fmac处出错 需要我重新安装源吗

  • 2021-05-25 22:50:08

    老哥,想问一下在对hgicf_usb.ko进行挂载的时候会报insmod: ERROR: could not insert module hgicf_usb.ko: Invalid module format怎么办

暂无评论~~
  • 请注意单词拼写,以及中英文排版,参考此页
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`, 更多语法请见这里 Markdown 语法
  • 支持表情,使用方法请见 Emoji 自动补全来咯,可用的 Emoji 请见 :metal: :point_right: Emoji 列表 :star: :sparkles:
  • 上传图片, 支持拖拽和剪切板黏贴上传, 格式限制 - jpg, png, gif
  • 发布框支持本地存储功能,会在内容变更时保存,「提交」按钮点击时清空
Ctrl+Enter