ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.8k stars 1.86k forks source link

如何在armbian里编译自定义驱动,添加自定义无线网卡驱动方法(How to compile custom drivers in armbian) #1043

Closed ysuolmai closed 1 year ago

ysuolmai commented 1 year ago

尝试用dkms安装这个无线驱动时 https://github.com/brektrou/rtl8821CU

出现

root@armbian:~/rtl8821CU# ./dkms-install.sh 
About to run dkms install steps...
Error! DKMS tree already contains: rtl8821CU-5.4.1
You cannot add the same module/version combo more than once.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
'make' KVER=5.15.92-flippy-81+o...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.92-flippy-81+o (aarch64)
Consult /var/lib/dkms/rtl8821CU/5.4.1/build/make.log for more information.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
'make' KVER=5.15.92-flippy-81+o...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.92-flippy-81+o (aarch64)
Consult /var/lib/dkms/rtl8821CU/5.4.1/build/make.log for more information.
Finished running dkms install steps.

直接make编译的话,出现

make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.15.92-flippy-81+o/build M=/root/rtl8821CU  modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.92-flippy-81+o'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: Ubuntu clang version 14.0.0-1ubuntu1
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /root/rtl8821CU/core/rtw_cmd.o
gcc: error: unrecognized command-line option ‘-Qunused-arguments’
gcc: error: unrecognized command-line option ‘-mno-global-merge’
gcc: error: unrecognized command-line option ‘-fsplit-lto-unit’
make[2]: *** [scripts/Makefile.build:289: /root/rtl8821CU/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1905: /root/rtl8821CU] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.92-flippy-81+o'
make: *** [Makefile:2217: modules] Error 2

求助下各位大佬,咋解决。同样的驱动在树莓派的raspberry OS里没有问题,可以编译。

ophub commented 1 year ago
  The kernel was built by: Ubuntu clang version 14.0.0-1ubuntu1
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

你的日志已经说明原因了,当前Armbian系统内核是clang编译的,你使用gcc编译驱动,不兼容。

你可以自己编译Armbian内核,使用gcc编译好,替换到系统里。具体方法见./recompile -t gcc

你也可以改驱动的源码,使用clang编译驱动。

ophub commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/releases/tag/kernel_gcc12_headers

下载,解压,进入内核目录,armbian-update安装这个内核,再测试编译驱动。

ysuolmai commented 1 year ago

刚刚更新到了最新版5.15.93了,是不是得倒退回去才能装?

ophub commented 1 year ago

先在线更新换成其他内核,再手动上传到系统里,进入内核目录更新这个内核。

ysuolmai commented 1 year ago

非常感谢大佬帮忙,可是还是失败了。。。

image

主要信息是 warning: the compiler differs from the one used to build the kernel The kernel was built by: aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205 You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

ophub commented 1 year ago

你的版本太底,升级编译工具包,或者用你自己的低版本编译工具编一个内核,armbian-kernel

ysuolmai commented 1 year ago

好的,仔细翻了下大神的文档,貌似可以在盒子上直接编译内核。正在尝试 不管成不成功,非常感激大神给小菜鸟的帮忙!

ophub commented 1 year ago

要跑很长时间的编译,你装个tmux包,进入后台模式下执行编译过程。 不知道你是什么盒子,我用tx3(s905x3)测试要小2个小时才能完整编译完。耐心等待。

https://github.com/ophub/amlogic-s9xxx-armbian/blob/67c68ff39e0c2c3096035a496fa61a33fd739331/recompile#L70

简单的方法是你升级你armbian的gcc软件包的版本到12.2,官方可以直接下载解压就能用: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads 下载 arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz

或者你非要用11,就把编译内核的脚本的工具链也改为11的,在 https://github.com/ophub/kernel/releases/tag/dev 里有11的下载,但是这种降级操作不推荐,有新的用新的。

ysuolmai commented 1 year ago

要跑很长时间的编译,你装个tmux包,进入后台模式下执行编译过程。 不知道你是什么盒子,我用tx3(s905x3)测试要小2个小时才能完整编译完。耐心等待。

https://github.com/ophub/amlogic-s9xxx-armbian/blob/67c68ff39e0c2c3096035a496fa61a33fd739331/recompile#L70

简单的方法是你升级你armbian的gcc软件包的版本到12.2,官方可以直接下载解压就能用: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads 下载 arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz

或者你非要用11,就把编译内核的脚本的工具链也改为11的,在 https://github.com/ophub/kernel/releases/tag/dev 里有11的下载,但是这种降级操作不推荐,有新的用新的。

感谢大佬!两个我都试试,学习一下。

再问个很蠢的问题,像这种驱动,我怎么加入到内核源码里一起编译了?有可能吗?

ophub commented 1 year ago

https://github.com/unifreq/linux-5.15.y/commit/452f3460c9e6af62b843a009e34fcc1d7a692154

这是添加r8168驱动到内核的案例。 如果你找的驱动适用于主线内核,可以测试添加,编译测试。 安卓的驱动无法添加到主线内核里,也无法在armbian里编译添加驱动,必须使用和主线内核兼容的驱动

ysuolmai commented 1 year ago

要跑很长时间的编译,你装个tmux包,进入后台模式下执行编译过程。 不知道你是什么盒子,我用tx3(s905x3)测试要小2个小时才能完整编译完。耐心等待。

https://github.com/ophub/amlogic-s9xxx-armbian/blob/67c68ff39e0c2c3096035a496fa61a33fd739331/recompile#L70

简单的方法是你升级你armbian的gcc软件包的版本到12.2,官方可以直接下载解压就能用: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads 下载 arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz

或者你非要用11,就把编译内核的脚本的工具链也改为11的,在 https://github.com/ophub/kernel/releases/tag/dev 里有11的下载,但是这种降级操作不推荐,有新的用新的。

哈哈哈魔百盒905l3a的盒子,编了3个多小时,然后发现和你给我的是一样的,我按照文档写了-t gcc,但是貌似会默认下载那个12.2的gnu toolchian gcc编译内核。所以我又把那个gnu toolchain gcc下载下来并且配置成默认gcc,终于编译驱动成功了!

我记录下我用的步骤,有其他小白看到了可以参考,大佬不要见笑。

按照顺序一行一行执行,

先编译内核,不想自己编译的可以直接下载o大编译好的 https://github.com/ophub/amlogic-s9xxx-armbian/releases/tag/kernel_gcc12_headers

armbian-kernel -u
armbian-kernel -k 5.15.93 -t gcc

编译好/下载好之后,到找到对应的压缩包,解压 然后进入目录

tar xzvf 5.15.93.tar.gz
cd 5.15.93

更新内核 (默认会用本地目录下编译好的,如果你已经是最新的内核,先armbian-update -k 指定一个老内核倒退回去) armbian-update

更新之后会自动重启,然后再ssh登录 然后下载并且配置arm gnu toolchain的gcc

wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz

mkdir /opt/gcc-aarch64-none-elf

sudo tar xf arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz --strip-components=1 -C /opt/gcc-aarch64-none-elf

echo 'export PATH=$PATH:/opt/gcc-aarch64-none-elf/bin' | sudo tee -a /etc/profile.d/gcc-aarch64-none-elf.sh

source /etc/profile

ln -sf /opt/gcc-aarch64-none-elf/bin/aarch64-none-elf-gcc /usr/local/bin/gcc

最后那行就是让系统执行gcc命令的时候,调用arm gnu toolchain里的gcc而不是build-essentials里的老版本

然后就可以编译github上找到的其他驱动了。

再次感谢O大!

ophub commented 1 year ago

恭喜你,你可能是在问题区里第一个反馈自己编译成功的人。

编译内核失败的日志里看就1个原因,使用的编译器不同。

我在内核仓库里5.15和6.1都是转存的f大编译的内核,他使用clang-14编译。但是大家在armbian里默认都是gcc-11,所以失败的日志提示,当前内核用的clang-14,而你是gcc-11。

解决办法就是统一编译器,把armbian里的编译工具更新到和安装的内核所用的版本一致了。

在仓库的内核编译脚本里可以选择使用gcc或clang编译。但是为了追求内核的极致性能,这2个编译器我都是定时跟着上游更新,一直保持使用最新版本(gcc是12,clang是14.0.6)。如果你的驱动要使用gcc编译,就到下载源里下载最新的gcc-12到armbian里,做好gcc编译工具的安装和链接,让编译内核时使用你安装的编译器。

ysuolmai commented 1 year ago

@ophub 大佬,同步个新发现,我自己在盒子上编译的内核,装了之后可以编译了。刚在另外一个机器上试了你之前给的,不行,试了我自己用github action编译的也不行。。。把盒子A上编译好的换到盒子B里去装也可以,不知道啥区别了

ophub commented 1 year ago

安装在自己armbian盒子上用gcc编译的内核,肯定可以在这个armbian里用gcc编译驱动,因为编译工具是同一个。

在另外的盒子上安装我发的内核或者你Actions编译的内核,这2个都是使用x86_64交叉编译工具来编译的arm64内核,理论上是没问题的,只要你在armbian里设置gcc编译工具的$PATH有效,也是可以编译的。但是有些驱动的源码里写死了gcc,或者只支持在4.x/5.4等内核版本上使用,你在5.15或者6.1下就可能无法正常编译。一般来说版本跨度不大是可以调试成功的,根据错误去对应文件看代码,一点一点推。

ysuolmai commented 1 year ago

安装在自己armbian盒子上用gcc编译的内核,肯定可以在这个armbian里用gcc编译驱动,因为编译工具是同一个。

在另外的盒子上安装我发的内核或者你Actions编译的内核,这2个都是使用x86_64交叉编译工具来编译的arm64内核,理论上是没问题的,只要你在armbian里设置gcc编译工具的$PATH有效,也是可以编译的。但是有些驱动的源码里写死了gcc,或者只支持在4.x,5.4等内核版本上使用,你在5.15或者6.1下就无法编译。

不是的,我用armbian-kernel编译,会自动下载aarch64-none-elf-gcc,完了我编译驱动的时候也是用了这个,方法如我上面所述。简单说,一系列操作之后,提示都是

The kernel was built by: aarch64-none-elf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205 You are using: gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205

但是你给的那版内核,和我用github action编译的内核,都不能编译驱动,armbian-kernel编译的可以。

ophub commented 1 year ago

armbian-kernel编译的可以就是因为在armbian里编译内核使用的gcc,和你后面编译驱动使用的gcc是同一个,都是你下载安装到armbian里的那一个相同的gcc工具包。

clang可能是在5.12内核时开始了全面的支持,在内核编译脚本里有关于>5.12版本的区别对待,所以低于5.12.y的内核,建议使用gcc,在5.15里编译驱动时,比如前面发的那些f大添加到内核里的可以兼容新内核的驱动,我觉的用clang也可以编成功。

ysuolmai commented 1 year ago

哦明白了。多谢!安全起见我还是盒子编译吧

ophub commented 1 year ago

armbian官方在编译固件和内核时,也是在ubuntu22.04(x86-64)下编译的,他的headers也是交叉编译的,所以交叉编译的内核应该是可以在armbian下编译驱动的,不是必须用armbian编译内核。

虽然你的测试结果是必须使用在armbian下编译的内核,但这是为什么呢? 我觉得只要都使用gcc或者都是clang,版本相同就应该可以

ysuolmai commented 1 year ago

这就不懂了,还好两种方法都试了,不然我我把键盘砸烂了都搞不定

ophub commented 1 year ago

https://github.com/ophub/kernel/tree/main/pub/dev

我在dev目录下放了几个在armbian下使用gcc-12编译的内核,和在armbian-kernel里使用的编译工具相同。需要编译驱动的可以安装这里的内核测试是否可以正常编译。

armbian-update -k 5.15.94 -v dev

版本可以根据仓库中的内核版本自己修改

ophub commented 1 year ago

Snip20230215_1

Snip20230215_3

测试了下编译 https://github.com/brektrou/rtl8821CU 驱动,5分钟还没结束,我ctrl+c结束了,应该是没什么问题。

ysuolmai commented 1 year ago

O大真的是我们这些菜鸟玩家的救世主,考虑非常周到

iamhyde commented 1 year ago

测试了下编译 https://github.com/brektrou/rtl8821CU 驱动,5分钟还没结束,我ctrl+c结束了,应该是没什么问题。

O大,请教下我升级了你DEV里面的5.4.231内核,然后按这个步骤配置了GCC:

wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz

mkdir /opt/gcc-aarch64-none-elf

sudo tar xf arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz --strip-components=1 -C /opt/gcc-aarch64-none-elf

echo 'export PATH=$PATH:/opt/gcc-aarch64-none-elf/bin' | sudo tee -a /etc/profile.d/gcc-aarch64-none-elf.sh

source /etc/profile

ln -sf /opt/gcc-aarch64-none-elf/bin/aarch64-none-elf-gcc /usr/local/bin/gcc

最后编译这个8811的时候还是报错 https://github.com/fastoe/RTL8811CU 1f864009f3d04c40175142b2a8e140f

ophub commented 1 year ago

你有这个设备?那个驱动仓库首页有说明,把相关依赖安装,按他的2种方法之一依次操作。 方法理解了,找支持主线内核的驱动(安卓的不行),找和内核版本兼容的。

🌺 一键脚本: armbian-drive.zip

在安装dev里的内核后,可以使用armbian-drive这个脚本,下载解压上传到/usr/sbin目录 赋予执行权限: chmod +x /usr/sbin/armbian-drive

下载驱动:git clone https://github.com/brektrou/rtl8821CU cd rtl8821CU下执行:armbian-drive

会安装和dev里的内核相同的gcc-12编译器,至于能不能编译成功就看脸吧,也许你找到驱动可以用(支持主线内核使用的可以用),也许不可用(安卓的不能用),驱动报其他代码错误就和gcc无关了,自行搜索驱动错误。

Snip20230216_3 Snip20230216_5 Snip20230216_14

luoluo888 commented 1 year ago

经过多次实践,编译自定义驱动大致以下几步操作: 首先先确认内核版本 image 我的是s905x3,Linux 5.4.234-ophub。 再去大神dev目录下,看自己是哪个版本。 https://github.com/ophub/kernel/tree/main/pub/dev image 比如我的是5.4版本,先执行 armbian-update -k 5.4.232 -v dev 等待重启之后,会得到Linux 5.4.232-ophub image 最后进入驱动目录里,make一下就OK了 image make rtl8821CU驱动也成功了! image image

放出Linux 5.4.234-ophub时,make没成功错误提示。 image 感谢大神的支持!最后祝大家自定义驱动成功!

ophub commented 1 year ago

dev里面的内核和stable的区别是:dev是在armbian里面编译的,stable的是在ubuntu(x86_64)下交叉编译的。

两个的源码相同。

在armbian里编译的命令是armbian-kernel

在ubuntu里交叉编译的命令是sudo ./recompile

编译器一个内核要一个多小时,安装tmux等可以后台运行终端的工具挂机编译即可。

JustinTangChina commented 1 year ago

要跑很长时间的编译,你装个tmux包,进入后台模式下执行编译过程。 不知道你是什么盒子,我用tx3(s905x3)测试要小2个小时才能完整编译完。耐心等待。 https://github.com/ophub/amlogic-s9xxx-armbian/blob/67c68ff39e0c2c3096035a496fa61a33fd739331/recompile#L70

简单的方法是你升级你armbian的gcc软件包的版本到12.2,官方可以直接下载解压就能用: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads 下载 arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz 或者你非要用11,就把编译内核的脚本的工具链也改为11的,在 https://github.com/ophub/kernel/releases/tag/dev 里有11的下载,但是这种降级操作不推荐,有新的用新的。

哈哈哈魔百盒905l3a的盒子,编了3个多小时,然后发现和你给我的是一样的,我按照文档写了-t gcc,但是貌似会默认下载那个12.2的gnu toolchian gcc编译内核。所以我又把那个gnu toolchain gcc下载下来并且配置成默认gcc,终于编译驱动成功了!

我记录下我用的步骤,有其他小白看到了可以参考,大佬不要见笑。

按照顺序一行一行执行,

先编译内核,不想自己编译的可以直接下载o大编译好的 https://github.com/ophub/amlogic-s9xxx-armbian/releases/tag/kernel_gcc12_headers

armbian-kernel -u
armbian-kernel -k 5.15.93 -t gcc

编译好/下载好之后,到找到对应的压缩包,解压 然后进入目录

tar xzvf 5.15.93.tar.gz
cd 5.15.93

更新内核 (默认会用本地目录下编译好的,如果你已经是最新的内核,先armbian-update -k 指定一个老内核倒退回去) armbian-update

更新之后会自动重启,然后再ssh登录 然后下载并且配置arm gnu toolchain的gcc

wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz

mkdir /opt/gcc-aarch64-none-elf

sudo tar xf arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf.tar.xz --strip-components=1 -C /opt/gcc-aarch64-none-elf

echo 'export PATH=$PATH:/opt/gcc-aarch64-none-elf/bin' | sudo tee -a /etc/profile.d/gcc-aarch64-none-elf.sh

source /etc/profile

ln -sf /opt/gcc-aarch64-none-elf/bin/aarch64-none-elf-gcc /usr/local/bin/gcc

最后那行就是让系统执行gcc命令的时候,调用arm gnu toolchain里的gcc而不是build-essentials里的老版本

然后就可以编译github上找到的其他驱动了。

再次感谢O大!

你的是新魔百 m401a吗? 用8821驱动 可以驱动 8822 无线网卡?

ysuolmai commented 1 year ago

8821是个usb网卡比较简单。8822肯定不能用一样的驱动,而且这系统就带8822驱动,只是到了这盒子上可能还涉及gpio,没正确设置就没法用了

JustinTangChina commented 1 year ago

8821是个usb网卡比较简单。8822肯定不能用一样的驱动,而且这系统就带8822驱动,只是到了这盒子上可能还涉及gpio,没正确设置就没法用了

你最后把8822的无线网卡驱动搞好了?还是就只用8821 的usb网卡

zhangfengyi99 commented 1 year ago

各位大佬这个错有没有见过的,怎么解决

root@armbian:~/rtl8821CU# make make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.4.240-ophub/build M=/root/rtl8821CU modules make[1]: Entering directory '/usr/src/linux-headers-5.4.240-ophub' Building modules, stage 2. MODPOST 1 modules make[3]: No rule to make target 'arch/arm64/kernel/module.lds', needed by '/root/rtl8821CU/8821cu.ko'. Stop. make[2]: [scripts/Makefile.modpost:94: __modpost] Error 2 make[1]: [Makefile:1659: modules] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.4.240-ophub' make: [Makefile:2217: modules] Error 2

LondyGhost commented 1 year ago

8821是个usb网卡比较简单。8822肯定不能用一样的驱动,而且这系统就带8822驱动,只是到了这盒子上可能还涉及gpio,没正确设置就没法用了

那8822的盒子就没办法?

ysuolmai commented 1 year ago

8821是个usb网卡比较简单。8822肯定不能用一样的驱动,而且这系统就带8822驱动,只是到了这盒子上可能还涉及gpio,没正确设置就没法用了

那8822的盒子就没办法?

o大说了,能用就能用,不能用他也没办法。内核是带了8822驱动的,但就是有些人能用有些人不行。

LondyGhost commented 1 year ago

8821是个usb网卡比较简单。8822肯定不能用一样的驱动,而且这系统就带8822驱动,只是到了这盒子上可能还涉及gpio,没正确设置就没法用了

那8822的盒子就没办法?

o大说了,能用就能用,不能用他也没办法。内核是带了8822驱动的,但就是有些人能用有些人不行。

不知道能不能从dtb方面下手解决这个识别问题。

ysuolmai commented 1 year ago

8821是个usb网卡比较简单。8822肯定不能用一样的驱动,而且这系统就带8822驱动,只是到了这盒子上可能还涉及gpio,没正确设置就没法用了

那8822的盒子就没办法?

o大说了,能用就能用,不能用他也没办法。内核是带了8822驱动的,但就是有些人能用有些人不行。

不知道能不能从dtb方面下手解决这个识别问题。

估计你得找和你一样盒子的网友一起研究。我用的这个印着鲸鱼的盒子,就是有人研究出搞掉一个电阻的完美方案。

LondyGhost commented 1 year ago

8821是个usb网卡比较简单。8822肯定不能用一样的驱动,而且这系统就带8822驱动,只是到了这盒子上可能还涉及gpio,没正确设置就没法用了

那8822的盒子就没办法?

o大说了,能用就能用,不能用他也没办法。内核是带了8822驱动的,但就是有些人能用有些人不行。

不知道能不能从dtb方面下手解决这个识别问题。

估计你得找和你一样盒子的网友一起研究。我用的这个印着鲸鱼的盒子,就是有人研究出搞掉一个电阻的完美方案。

有交流群吗?这个鲸鱼盒子的群

8373907 commented 1 year ago

我也是遇到这个问题,无法编译github上的8821cu驱动,看完帖子还是优点迷糊 https://github.com/ophub/kernel/tree/main/pub/dev 上面这个仓库也没有了 所以如何编译这个驱动呢? 总是提示: make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.15.92-flippy-81+o/build M=/root/rtl8821CU modules make[1]: Entering directory '/usr/src/linux-headers-5.15.92-flippy-81+o' warning: the compiler differs from the one used to build the kernel The kernel was built by: Ubuntu clang version 14.0.0-1ubuntu1 You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 CC [M] /root/rtl8821CU/core/rtw_cmd.o gcc: error: unrecognized command-line option ‘-Qunused-arguments’ gcc: error: unrecognized command-line option ‘-mno-global-merge’ gcc: error: unrecognized command-line option ‘-fsplit-lto-unit’ make[2]: [scripts/Makefile.build:289: /root/rtl8821CU/core/rtw_cmd.o] Error 1 make[1]: [Makefile:1905: /root/rtl8821CU] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.15.92-flippy-81+o' make: *** [Makefile:2217: modules] Error 2

ophub commented 1 year ago

https://github.com/ophub/kernel/releases/tag/kernel_dev

zhangfengyi99 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

LondyGhost commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

你编译是8821还是8822??

zhangfengyi99 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

你编译是8821还是8822?? 8821,用的这个仓库的,内核是我上面说的 https://github.com/morrownr/8821cu-20210916

LondyGhost commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

你编译是8821还是8822?? 8821,用的这个仓库的,内核是我上面说的 https://github.com/morrownr/8821cu-20210916

你的无线模块是8821吗

zhangfengyi99 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

你编译是8821还是8822?? 8821,用的这个仓库的,内核是我上面说的 https://github.com/morrownr/8821cu-20210916

你的无线模块是8821吗

是的,USB无线网卡,编译驱动也不用插网卡吧

8373907 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

小白,请问如何更换内核?输入 wget https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz --2023-04-28 12:11:37-- https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz Resolving github.com (github.com)... 20.205.243.166 Connecting to github.com (github.com)|20.205.243.166|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2023-04-28 12:11:38 ERROR 404: Not Found.

内核都下载不下来,梯子我都开着的

zhangfengyi99 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

小白,请问如何更换内核?输入 wget https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz --2023-04-28 12:11:37-- https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz Resolving github.com (github.com)... 20.205.243.166 Connecting to github.com (github.com)|20.205.243.166|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2023-04-28 12:11:38 ERROR 404: Not Found.

内核都下载不下来,梯子我都开着的

这个版本的没了,你换个版本,去上面o大说的仓库看下,我是下到本地,然后升级内核

8373907 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

小白,请问如何更换内核?输入 wget https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz --2023-04-28 12:11:37-- https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz Resolving github.com (github.com)... 20.205.243.166 Connecting to github.com (github.com)|20.205.243.166|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2023-04-28 12:11:38 ERROR 404: Not Found. 内核都下载不下来,梯子我都开着的

这个版本的没了,你换个版本,去上面o大说的仓库看下,我是下到本地,然后升级内核

你说的是O大发的这个吗?好像还是编译错误 https://github.com/ophub/kernel/releases/tag/kernel_dev

zhangfengyi99 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

小白,请问如何更换内核?输入 wget https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz --2023-04-28 12:11:37-- https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz Resolving github.com (github.com)... 20.205.243.166 Connecting to github.com (github.com)|20.205.243.166|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2023-04-28 12:11:38 ERROR 404: Not Found. 内核都下载不下来,梯子我都开着的

这个版本的没了,你换个版本,去上面o大说的仓库看下,我是下到本地,然后升级内核

你说的是O大发的这个吗?好像还是编译错误 https://github.com/ophub/kernel/releases/tag/kernel_dev

不知道你驱动哪里下的,我发的那个驱动支持5.15版本的内核

8373907 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

小白,请问如何更换内核?输入 wget https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz --2023-04-28 12:11:37-- https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz Resolving github.com (github.com)... 20.205.243.166 Connecting to github.com (github.com)|20.205.243.166|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2023-04-28 12:11:38 ERROR 404: Not Found. 内核都下载不下来,梯子我都开着的

这个版本的没了,你换个版本,去上面o大说的仓库看下,我是下到本地,然后升级内核

你说的是O大发的这个吗?好像还是编译错误 https://github.com/ophub/kernel/releases/tag/kernel_dev

不知道你驱动哪里下的,我发的那个驱动支持5.15版本的内核

一样是这里下载的驱动 https://github.com/morrownr/8821cu-20210916 我的系统是5.15.109,也是5.15,但我用这个网址的驱动编译就是提示: warning: the compiler differs from the one used to build the kernel 驱动的编译和内核的编译器版本不同

我是CM311-1a盒子,刷的就是O大的armbian

zhangfengyi99 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

小白,请问如何更换内核?输入 wget https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz --2023-04-28 12:11:37-- https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz Resolving github.com (github.com)... 20.205.243.166 Connecting to github.com (github.com)|20.205.243.166|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2023-04-28 12:11:38 ERROR 404: Not Found. 内核都下载不下来,梯子我都开着的

这个版本的没了,你换个版本,去上面o大说的仓库看下,我是下到本地,然后升级内核

你说的是O大发的这个吗?好像还是编译错误 https://github.com/ophub/kernel/releases/tag/kernel_dev

不知道你驱动哪里下的,我发的那个驱动支持5.15版本的内核

一样是这里下载的驱动 https://github.com/morrownr/8821cu-20210916 我的系统是5.15.109,也是5.15,但我用这个网址的驱动编译就是提示: warning: the compiler differs from the one used to build the kernel 驱动的编译和内核的编译器版本不同

我是CM311-1a盒子,刷的就是O大的armbian

5.15.103的,我用的这个 下载:https://wwi.lanzoup.com/itfCG0u4u2cj 密码:3hdq

8373907 commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

小白,请问如何更换内核?输入 wget https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz --2023-04-28 12:11:37-- https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz Resolving github.com (github.com)... 20.205.243.166 Connecting to github.com (github.com)|20.205.243.166|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2023-04-28 12:11:38 ERROR 404: Not Found. 内核都下载不下来,梯子我都开着的

这个版本的没了,你换个版本,去上面o大说的仓库看下,我是下到本地,然后升级内核

你说的是O大发的这个吗?好像还是编译错误 https://github.com/ophub/kernel/releases/tag/kernel_dev

不知道你驱动哪里下的,我发的那个驱动支持5.15版本的内核

一样是这里下载的驱动 https://github.com/morrownr/8821cu-20210916 我的系统是5.15.109,也是5.15,但我用这个网址的驱动编译就是提示: warning: the compiler differs from the one used to build the kernel 驱动的编译和内核的编译器版本不同 我是CM311-1a盒子,刷的就是O大的armbian

5.15.103的,我用的这个 下载:https://wwi.lanzoup.com/itfCG0u4u2cj 密码:3hdq

用了你的103内核还是一样,驱动的编译和内核的编译器版本不同。放弃了,折腾了两天都没上班都装不好一个网卡驱动,心真累。不装armbian系统了,烦死了。

LondyGhost commented 1 year ago

内核换成5.15.103版本成功了 https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz

小白,请问如何更换内核?输入 wget https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz --2023-04-28 12:11:37-- https://github.com/ophub/kernel/releases/download/kernel_dev/5.15.103.tar.gz Resolving github.com (github.com)... 20.205.243.166 Connecting to github.com (github.com)|20.205.243.166|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2023-04-28 12:11:38 ERROR 404: Not Found. 内核都下载不下来,梯子我都开着的

这个版本的没了,你换个版本,去上面o大说的仓库看下,我是下到本地,然后升级内核

你说的是O大发的这个吗?好像还是编译错误 https://github.com/ophub/kernel/releases/tag/kernel_dev

不知道你驱动哪里下的,我发的那个驱动支持5.15版本的内核

一样是这里下载的驱动 https://github.com/morrownr/8821cu-20210916 我的系统是5.15.109,也是5.15,但我用这个网址的驱动编译就是提示: warning: the compiler differs from the one used to build the kernel 驱动的编译和内核的编译器版本不同 我是CM311-1a盒子,刷的就是O大的armbian

5.15.103的,我用的这个 下载:https://wwi.lanzoup.com/itfCG0u4u2cj 密码:3hdq

用了你的103内核还是一样,驱动的编译和内核的编译器版本不同。放弃了,折腾了两天都没上班都装不好一个网卡驱动,心真累。不装armbian系统了,烦死了。

你用clang编译啊