您尚未登录。

楼主 #1 2019-07-03 13:27:10

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

F1C100S USB转以太网AX88772驱动编译

从亚信官网
https://www.asix.com.tw/cs/download.php?sub=driverdetail&PItemID=86
下载linux驱动文件
AX88772C_772B_772A_760_772_178_Linux_Driver_v4.23.0_Source.tar.bz2
里面包含6个文件如下:
asix.c
asix.h
axusbnet.c
axusbnet.h
Makefile
readme
首先打开readme,
在编译前,说让准备内核源码
Prepare to build the driver, you need the Linux kernel sources installed on the
build machine, and make sure that the version of the running kernel must match
the installed kernel sources. If you don't have the kernel sources, you can get
it from www.kernel.org or contact to your Linux distributor. If you don't know
how to do, please refer to KERNEL-HOWTO.
那么我们是使用F1C100S的linux内核源码吗??

查看让先将内核的USB选项打开
Note: Please make sure the kernel is built with one of the "Support for
       Host-side, EHCI, OHCI, or UHCI" option support.
操作过程里面也有写
1. Extract the compressed driver source file to your template directory by the
   following command:
       解压
    [root@localhost template]# tar -xf DRIVER_SOURCE_PACKAGE.tar.bz2

2. Now, the driver source files should be extracted under the current directory.
   Executing the following command to compile the driver:
       编译
    [root@localhost template]# make
           
3. If the compilation is well, the asix.ko will be created under the current
   directory.

4. If you want to use modprobe command to mount the driver, executing the
   following command to install the driver into your Linux:
       安装
    [root@localhost template]# make install
因为是为100S编译,所以得把ko放到板子上执行。安装和卸载的方法
1. If you want to load the driver manually, go to the driver directory and
   execute the following commands:

    [root@localhost template]# insmod asix.ko

2. If you had installed the driver during driver compilation, then you can use
   the following command to load the driver automatically.

    [root@localhost anywhere]# modprobe asix

If you want to unload the driver, just executing the following command:

    [root@localhost anywhere]# rmmod asix

离线

楼主 #2 2019-07-03 13:29:22

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: F1C100S USB转以太网AX88772驱动编译

打开Makefile,应该是需要修改一些参数,以指定100S的内核源码,并且,编译的过程中,要用交叉编译器
Makefile内容如下:
CURRENT    = $(shell uname -r)
TARGET    = asix
OBJS    = asix.o
MDIR    = drivers/net/usb
KDIR    = /lib/modules/$(CURRENT)/build
SUBLEVEL= $(shell uname -r | cut -d '.' -f 3 | cut -d '.' -f 1 | cut -d '-' -f 1 | cut -d '_' -f 1)

ifneq (,$(filter $(SUBLEVEL),14 15 16 17 18 19 20 21))
MDIR = drivers/usb/net
endif

EXTRA_CFLAGS = -DEXPORT_SYMTAB
PWD = $(shell pwd)
DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR)

obj-m      := $(TARGET).o

default:
    make -C $(KDIR) SUBDIRS=$(PWD) modules

$(TARGET).o: $(OBJS)
    $(LD) $(LD_RFLAG) -r -o $@ $(OBJS)

install:
    su -c "cp -v $(TARGET).ko $(DEST) && /sbin/depmod -a"

clean:
    $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean

.PHONY: modules clean

-include $(KDIR)/Rules.make

离线

楼主 #3 2019-07-03 13:30:23

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: F1C100S USB转以太网AX88772驱动编译

那么问题来了,我该如何指定100s的源码?
我记得我之前弄过一遍,但是在100s上运行insmod失败了,当时有别的事就没再研究。

离线

#4 2019-07-03 13:47:45

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: F1C100S USB转以太网AX88772驱动编译

参考这个: https://whycan.cn/t_2570.html

通过 -C 参数指定内核源码

default:
    make -C $(KDIR) SUBDIRS=$(PWD) modules





离线

楼主 #5 2019-07-03 14:02:31

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: F1C100S USB转以太网AX88772驱动编译

意思就是,-C后面我直接跟100S linux内核源码的绝对路径就行了吧

离线

#6 2019-07-03 14:09:24

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: F1C100S USB转以太网AX88772驱动编译

对的





离线

#7 2019-07-05 14:40:29

sy373466062
会员
注册时间: 2018-11-12
已发帖子: 130
积分: 116

Re: F1C100S USB转以太网AX88772驱动编译

这个IC哪里买的? 价格如何?

离线

#8 2019-07-05 15:55:53

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Re: F1C100S USB转以太网AX88772驱动编译

淘宝上买了几种 usb转 ethernet 的转换线都是这个芯片

离线

楼主 #9 2019-07-06 12:51:41

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: F1C100S USB转以太网AX88772驱动编译

smartcar 说:

淘宝上买了几种 usb转 ethernet 的转换线都是这个芯片

对,要是转以太网的话就用这个芯片、

离线

#10 2019-11-12 11:55:50

wps_90
会员
注册时间: 2019-11-10
已发帖子: 10
积分: 0

Re: F1C100S USB转以太网AX88772驱动编译

usb ethernet 网卡 RTL8152能否用?

离线

#11 2019-11-12 12:24:38

arychen
会员
注册时间: 2019-04-06
已发帖子: 261
积分: 236.5

Re: F1C100S USB转以太网AX88772驱动编译

关心人家说的   以太网后,usb只能用给以太网了接hub也没用的问题是否是确诊了。

离线

#12 2020-09-09 08:08:35

孤星泪
会员
注册时间: 2020-03-18
已发帖子: 235
积分: 231

Re: F1C100S USB转以太网AX88772驱动编译

arychen 说:

关心人家说的   以太网后,usb只能用给以太网了接hub也没用的问题是否是确诊了。

+1

离线

#13 2022-03-24 18:58:51

lorenzo
会员
注册时间: 2022-03-24
已发帖子: 15
积分: 0

Re: F1C100S USB转以太网AX88772驱动编译

这是什么接口的模块呀? SDIO?

离线

#14 2022-03-28 21:08:20

Ddcc
会员
注册时间: 2022-03-28
已发帖子: 5
积分: 5

Re: F1C100S USB转以太网AX88772驱动编译

荔枝派用的SDIO,不过是转wifi

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn