百科问答小站 logo
百科问答小站 font logo



2021年有没有什么适合Linux的笔记本? 第1页

  

user avatar   mai-wen-xue-67 网友的相关建议: 
      

这个......

二手的 DELL 笔记本就可以了。


俺用的三台 DELL PRECISION M4800 里面, 有两台就是 AMD/ATI 的独立显卡。

都很便宜。

大约是 1000~2000 人民币一台而已。


可能算是 10年前的 “旗舰”类产品罢。

按照网友的说法, 早就该价值清零了。





另外, 俺最新装的 AMD B550 + AMD 5600X + Radeon R7 360/ 5600G 台式机都能顺利安装 FEDORA 34.

因此不需要担心不兼容。



附录:

###################################################################

无线网卡的小问题


笔记: 装个 USB 无线网卡 REALTEK RTL8821CU 驱动签名等等也很折腾


瞎折腾......




       https://www.realtek.com/en/component/zoo/category/rtl8812bu-software https://rtitwww.realtek.com/rtdrivers/cn/wlan/0002-Realtek_WindowsDriver_1030.25.0701.2017.zip ID 0bda:b812 Realtek Semiconductor Corp. RTL88x2bu  USB3.0 only, rtl8822BU chipset https://www.realtek.com/en/component/zoo/category/rtl8812bu-software https://www.fastoe.com/blog/install-rtl8812bu-usb-wifi-dongle-on-linux https://forums.developer.nvidia.com/t/rtl88x2bu-wifi-usb-adapter-0bda-b812/106920  0bda:b812 0bda:c820    rtl8821cu WiFi Bluetooth USB 0bda:c820   Bus 001 Device 007:  ID 0bda:c820 Realtek Semiconductor Corp. 802.11ac NIC   The device is supported by the following drivers:  lwfinger/rtl8723au_bt  不能用,NG https://github.com/lwfinger/rtl8723au_bt  brektrou/rtl8821CU   不能用,NG https://github.com/brektrou/rtl8821CU  smp79/rtl8821CU   不能用,NG https://github.com/smp79/rtl8821CU  whitebatman2/rtl8821CU   不能用,NG https://github.com/whitebatman2/rtl8821CU  不能用,NG https://github.com/axiomware/RTL8821CU_driver_v5.8.1  *** 备注: 能用的在本文的最下面     



失败:

       [root@hpi7 drivers]#   [root@hpi7 drivers]# git clone https://github.com/cilynx/rtl88x2bu.git Cloning into 'rtl88x2bu'... remote: Enumerating objects: 1871, done. remote: Counting objects: 100% (138/138), done. remote: Compressing objects: 100% (94/94), done. remote: Total 1871 (delta 73), reused 96 (delta 42), pack-reused 1733 Receiving objects: 100% (1871/1871), 5.52 MiB | 9.32 MiB/s, done. Resolving deltas: 100% (1188/1188), done.  [root@hpi7 drivers]# ls rtl8812au  rtl88x2bu  [root@hpi7 drivers]# cd rtl88 rtl8812au/ rtl88x2bu/  [root@hpi7 drivers]# cd rtl88x2bu/  [root@hpi7 rtl88x2bu]# ls build.sh  clean  core  dkms.conf  hal  halmac.mk  ifcfg-wlan0  include  Kconfig  LICENSE  Makefile  os_dep  platform  README.md  rtl8822b.mk  runwpa  wlan0dhcp  [root@hpi7 rtl88x2bu]# VER=$(sed -n 's/PACKAGE_VERSION="(.*)"/1/p' dkms.conf) [root@hpi7 rtl88x2bu]# rsync -rvhP ./ /usr/src/rtl88x2bu-${VER} sending incremental file list created directory /usr/src/rtl88x2bu-5.6.1 ./ .gitignore             422 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=704/706) Kconfig .git/objects/pack/ .git/objects/pack/pack-7aa47d04dd1f39cbe2b6535eb11079acc822b61a.idx          53.46K 100%    3.19MB/s    0:00:00 (xfr#36, to-chk=651/706)  ......  platform/platform_sprd_sdio.c           2.05K 100%   10.00kB/s    0:00:00 (xfr#660, to-chk=2/706) platform/platform_zte_zx296716_sdio.c           1.46K 100%    7.14kB/s    0:00:00 (xfr#661, to-chk=1/706) platform/platform_zte_zx296716_sdio.h             989 100%    4.83kB/s    0:00:00 (xfr#662, to-chk=0/706)  sent 32.60M bytes  received 12.92K bytes  21.74M bytes/sec total size is 32.54M  speedup is 1.00   [root@hpi7 rtl88x2bu]#   [root@hpi7 rtl88x2bu]# dkms add -m rtl88x2bu -v ${VER}  Creating symlink /var/lib/dkms/rtl88x2bu/5.6.1/source ->                  /usr/src/rtl88x2bu-5.6.1  DKMS: add completed.  [root@hpi7 rtl88x2bu]#  [root@hpi7 rtl88x2bu]# dkms build -m rtl88x2bu -v ${VER}  Kernel preparation unnecessary for this kernel.  Skipping...  Building module: cleaning build area... make -j8 KERNELRELEASE=5.12.15-300.fc34.x86_64 KVER=5.12.15-300.fc34.x86_64 src=/usr/src/rtl88x2bu-5.6.1.......(bad exit status: 2) Error! Bad return status for module build on kernel: 5.12.15-300.fc34.x86_64 (x86_64) Consult /var/lib/dkms/rtl88x2bu/5.6.1/build/make.log for more information.  F*** !     [root@hpi7 rtl88x2bu]# ls build.sh  clean  core  dkms.conf  hal  halmac.mk  ifcfg-wlan0  include  Kconfig  LICENSE  Makefile  os_dep  platform  README.md  rtl8822b.mk  runwpa  wlan0dhcp  [root@hpi7 rtl88x2bu]# chmod +x ./build.sh [root@hpi7 rtl88x2bu]# ./build.sh   Kernel preparation unnecessary for this kernel.  Skipping...  Building module: cleaning build area... make -j8 KERNELRELEASE=5.12.15-300.fc34.x86_64 KVER=5.12.15-300.fc34.x86_64 src=/usr/src/rtl88x2bu-5.6.1.......(bad exit status: 2) Error! Bad return status for module build on kernel: 5.12.15-300.fc34.x86_64 (x86_64) Consult /var/lib/dkms/rtl88x2bu/5.6.1/build/make.log for more information.   [root@hpi7 rtl88x2bu]# make all make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.12.15-300.fc34.x86_64/build M=/root/drivers/rtl88x2bu  modules make[1]: Entering directory '/usr/src/kernels/5.12.15-300.fc34.x86_64'   CC [M]  /root/drivers/rtl88x2bu/core/rtw_cmd.o                     ^~~~~~~~ /root/drivers/rtl88x2bu/os_dep/linux/recv_linux.c:358:76: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [scripts/Makefile.build:271: /root/drivers/rtl88x2bu/os_dep/linux/recv_linux.o] Error 1 make[1]: *** [Makefile:1860: /root/drivers/rtl88x2bu] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.12.15-300.fc34.x86_64' make: *** [Makefile:2284: modules] Error 2  F*** !  [root@hpi7 rtl88x2bu]#   [root@hpi7 rtl88x2bu]# make uninstall rm -f /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless//88x2bu.ko /sbin/depmod -a 5.12.15-300.fc34.x86_64     




       NG NG NG NG NG  https://github.com/ulli-kroll/rtw88-usb   https://github.com/astsam/rtl8812au RTL8812AU/21AU and RTL8814AU linux driver with monitor mode and frame injection The master branch is based on  https://github.com/ulli-kroll/rtl8821au branch v4.3.22-beta/rework.  https://github.com/ulli-kroll/rtw88-usb  git clone https://github.com/aircrack-ng/rtl8812au     



       [root@hpi7 drivers]# cd rtl8812au/ [root@hpi7 rtl8812au]# ls android  core  dkms.conf  docs  hal  include  Kconfig  LICENSE  Makefile  os_dep  platform  README.md  ReleaseNotes.pdf  tools  [root@hpi7 rtl8812au]#   [root@hpi7 rtl8812au]# make all make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.12.15-300.fc34.x86_64/build M=/root/drivers/rtl8812au  modules make[1]: Entering directory '/usr/src/kernels/5.12.15-300.fc34.x86_64'   CC [M]  /root/drivers/rtl8812au/core/rtw_cmd.o   CC [M]  /root/drivers/rtl8812au/core/rtw_security.o ......   CC [M]  /root/drivers/rtl8812au/core/rtw_mp.o   LD [M]  /root/drivers/rtl8812au/88XXau.o   MODPOST /root/drivers/rtl8812au/Module.symvers   CC [M]  /root/drivers/rtl8812au/88XXau.mod.o   LD [M]  /root/drivers/rtl8812au/88XXau.ko   BTF [M] /root/drivers/rtl8812au/88XXau.ko Skipping BTF generation for /root/drivers/rtl8812au/88XXau.ko due to unavailability of vmlinux make[1]: Leaving directory '/usr/src/kernels/5.12.15-300.fc34.x86_64' --------------------------------------------------------------------------- Visit https://github.com/aircrack-ng/rtl8812au for support/reporting issues or check for newer versions (branches) of these drivers.                    --------------------------------------------------------------------------- [root@hpi7 rtl8812au]#   [root@hpi7 rtl8812au]# make install install -p -m 644 88XXau.ko  /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/ /sbin/depmod -a 5.12.15-300.fc34.x86_64  [root@hpi7 rtl8812au]#     



看起来,成功一半, 还差签名 MOK(Machine Owner Key)

       [root@hpi7 rtl8812au]# modprobe 88XXau  -v  insmod /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/88XXau.ko   modprobe: ERROR: could not insert '88XXau': Key was rejected by service   签了名, 还是不认网卡。 型号错了就是死局     


......



       [root@hpi7 ~]#  [root@hpi7 ~]# lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 0bda:0153 Realtek Semiconductor Corp. 3-in-1 (SD/SDHC/SDXC) Card Reader Bus 001 Device 009: ID 0bda:c820 Realtek Semiconductor Corp. 802.11ac NIC  [root@hpi7 ~]#  [root@hpi7 ~]# usb_modeswitch -KW -v 0bda -p c820 Take all parameters from the command line    * usb_modeswitch: handle USB devices with multiple modes  * Version 2.6.1 (C) Josua Dietze 2017  * Based on libusb1/libusbx   ! PLEASE REPORT NEW CONFIGURATIONS !  DefaultVendor=  0x0bda DefaultProduct= 0xc820  StandardEject=1  Look for default devices ...   found USB ID 0bda:0153    vendor ID matched   found USB ID 0bda:c820    vendor ID matched    product ID matched   Found devices in default mode (1) Access device 009 on bus 001 Get the current device configuration ... Current configuration number is 1 Use interface number 0  with class 224 Error: can't use storage command in MessageContent with interface 0; interface class is 224, expected 8. Abort  F***     [root@hpi7 ~]# usb_modeswitch -KW -v 0bda -p 0153 Take all parameters from the command line    * usb_modeswitch: handle USB devices with multiple modes  * Version 2.6.1 (C) Josua Dietze 2017  * Based on libusb1/libusbx   ! PLEASE REPORT NEW CONFIGURATIONS !  DefaultVendor=  0x0bda DefaultProduct= 0x0153  StandardEject=1  Look for default devices ...   found USB ID 0bda:0153    vendor ID matched    product ID matched    found USB ID 0bda:c820    vendor ID matched   Found devices in default mode (1) Access device 005 on bus 001 Get the current device configuration ... Current configuration number is 1 Use interface number 0  with class 8 Use endpoints 0x01 (out) and 0x82 (in)  USB description data (for identification) ------------------------- Manufacturer: Generic      Product: USB2.0-CRW   Serial No.: 2012000 ------------------------- Sending standard EJECT sequence Looking for active drivers ...  OK, driver detached Set up interface 0 Use endpoint 0x01 for message sending ... Trying to send message 1 to endpoint 0x01 ...  OK, message successfully sent Read the response to message 1 (CSW) ...  Response successfully read (13 bytes), status 0 Trying to send message 2 to endpoint 0x01 ...  OK, message successfully sent Read the response to message 2 (CSW) ...  Response successfully read (13 bytes), status 0 Trying to send message 3 to endpoint 0x01 ...  OK, message successfully sent Read the response to message 3 (CSW) ...  Response successfully read (13 bytes), status 0 Trying to send message 4 to endpoint 0x01 ...  OK, message successfully sent Read the response to message 4 (CSW) ...  Response successfully read (13 bytes), status 0 Reset response endpoint 0x82 Reset message endpoint 0x01  -> Run lsusb to note any changes. Bye!     



......




似乎,还是,这个看起来靠点谱

       https://github.com/ulli-kroll/rtw88-usb  rtw88-usb    mac80211 kernel driver  currently supported chipset's 8723du 8822bu with variants 8821cu 8822cu  It's under GPL license, and please feel free to use it. Also welcome to upstream to the Linux kernel if you want, and please refer to the branch, for_kernel_upstream, which meets the Linux coding style, and may be easier to upstream. Thank to many people's kind help on this project.  BIG tanks to Ji-Pin Jou and Neo Jou, for the USB parts supports at least managed (i.e. client) and monitor mode.  This driver is based on Realtek's rtw88 in Linux main trunk.     


       [root@hpi7 drivers]# git clone https://github.com/ulli-kroll/rtw88-usb.git Cloning into 'rtw88-usb'... remote: Enumerating objects: 3149, done. remote: Counting objects: 100% (1177/1177), done. remote: Compressing objects: 100% (493/493), done. remote: Total 3149 (delta 967), reused 869 (delta 684), pack-reused 1972 Receiving objects: 100% (3149/3149), 2.24 MiB | 5.37 MiB/s, done. Resolving deltas: 100% (2412/2412), done. [root@hpi7 drivers]#     [root@hpi7 drivers]#  [root@hpi7 drivers]# cd rtw88-usb/ [root@hpi7 rtw88-usb]# ls bf.c                debug.c  fw.h        mac.c     pci.h    README.md   rtw8723de.c       rtw8723du.h       rtw8821c_table.h  rtw8822b_fw.bin   rtw8822c.c        rtw8822cu.c  tx.c    wow.c bf.h                debug.h  hci.h       mac.h     perf.sh  README.old  rtw8723de.h       rtw8821c.c        rtw8821cu.c       rtw8822b.h        rtw8822ce.c       rtw8822cu.h  tx.h    wow.h CHANGELOG.md        efuse.c  Kconfig     main.c    phy.c    regd.c      rtw8723d.h        rtw8821ce.c       rtw8821cu.h       rtw8822b_table.c  rtw8822ce.h       rx.c         usb.c CODE_OF_CONDUCT.md  efuse.h  LICENSE     main.h    phy.h    regd.h      rtw8723d_table.c  rtw8821ce.h       rtw8822b.c        rtw8822b_table.h  rtw8822c.h        rx.h         usb.h coex.c              fw       log         Makefile  ps.c     reg.h       rtw8723d_table.h  rtw8821c.h        rtw8822be.c       rtw8822bu.c       rtw8822c_table.c  sec.c        util.c coex.h              fw.c     mac80211.c  pci.c     ps.h     rtw8723d.c  rtw8723du.c       rtw8821c_table.c  rtw8822be.h       rtw8822bu.h       rtw8822c_table.h  sec.h        util.h   [root@hpi7 rtw88-usb]#  [root@hpi7 rtw88-usb]# make clean rm -f *.o .*.d *.a *.ko .*.cmd *.mod* *.order *.symvers *.tmp_versions  [root@hpi7 rtw88-usb]#   [root@hpi7 rtw88-usb]# make all make -C /lib/modules/5.12.15-300.fc34.x86_64/build M=/root/drivers/rtw88-usb make[1]: Entering directory '/usr/src/kernels/5.12.15-300.fc34.x86_64'   CC [M]  /root/drivers/rtw88-usb/main.o   CC [M]  /root/drivers/rtw88-usb/mac80211.o  ......    BTF [M] /root/drivers/rtw88-usb/rtw88_core.ko Skipping BTF generation for /root/drivers/rtw88-usb/rtw88_core.ko due to unavailability of vmlinux   CC [M]  /root/drivers/rtw88-usb/rtw88_pci.mod.o   LD [M]  /root/drivers/rtw88-usb/rtw88_pci.ko   BTF [M] /root/drivers/rtw88-usb/rtw88_pci.ko Skipping BTF generation for /root/drivers/rtw88-usb/rtw88_pci.ko due to unavailability of vmlinux   CC [M]  /root/drivers/rtw88-usb/rtw88_usb.mod.o   LD [M]  /root/drivers/rtw88-usb/rtw88_usb.ko   BTF [M] /root/drivers/rtw88-usb/rtw88_usb.ko Skipping BTF generation for /root/drivers/rtw88-usb/rtw88_usb.ko due to unavailability of vmlinux make[1]: Leaving directory '/usr/src/kernels/5.12.15-300.fc34.x86_64'  [root@hpi7 rtw88-usb]#  [root@hpi7 rtw88-usb]# make load echo "Unload upstream driver(s)" Unload upstream driver(s) for m in rtw88_8723de rtw88_8723d rtw88_8822be rtw88_8822b   rtw88_8821ce rtw88_8821c rtw88_8822ce rtw88_8821c   rtw88_pci rtw88_core;   do rmmod "$m" 2> /dev/null; done; make: *** [Makefile:116: load] Error 1   [root@hpi7 rtw88-usb]#  [root@hpi7 rtw88-usb]# make install WARNING: ========================================== you are about to install rtw88-usb drivers Wait 5 sec or CTRL-C  rtw88-usb drivers installed   [root@hpi7 rtw88-usb]#  [root@hpi7 rtw88-usb]# make firmware WARNING: ========================================== you are about to install rtw88-usb firmware Wait 5 sec or CTRL-C  rtw88-usb firmware installed   [root@hpi7 rtw88-usb]#     


好吧, 签名吧


       [root@hpi7 signed-modules]# ls /usr/src/kernels/$(uname -r)/scripts/sign-file /usr/src/kernels/5.12.15-300.fc34.x86_64/scripts/sign-file  [root@hpi7 signed-modules]# vi sign-rtw88-usb [root@hpi7 signed-modules]#   [root@hpi7 signed-modules]# cat ./sign-rtw88-usb   #!/bin/bash  for modfile in $(dirname $(modinfo -n rtw88-usb))/*.ko; do   echo "Signing $modfile"   /usr/src/kernels/$(uname -r)/scripts/sign-file sha256                                  /root/signed-modules/MOK.priv                                  /root/signed-modules/MOK.der "$modfile" done  [root@hpi7 signed-modules]#  [root@hpi7 signed-modules]# ls MOK.der  MOK.priv  sign-rtw88-usb    [root@hpi7 signed-modules]# chmod +x ./sign-rtw88-usb  [root@hpi7 signed-modules]# ls MOK.der  MOK.priv  sign-rtw88-usb    [root@hpi7 signed-modules]#  [root@hpi7 signed-modules]# ./sign-rtw88-usb  Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8723de.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8723d.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8723du.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8821ce.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8821c.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8821cu.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822be.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822b.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822bu.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822c.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822cu.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_core.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_usb.ko   [root@hpi7 signed-modules]#  [root@hpi7 signed-modules]# modprobe rtw88-usb  [root@hpi7 signed-modules]#  [root@hpi7 signed-modules]# lsmod |grep 88 rtw88_usb              20480  0 rtw88_core            163840  1 rtw88_usb mac80211             1134592  3 iwlmvm,rtw88_core,rtw88_usb cfg80211             1003520  4 iwlmvm,rtw88_core,iwlwifi,mac80211   还是认不了网卡,NG 还是认不了网卡,NG     



(废话)为避免每次内核更新时又要手工重新编译驱动模块,看看是否要使用动态内核模块支持(DKMS 的一个重要特征是,如安装新的内核版本,它会“自动”编译所有DKMS模块)。

......


       https://ask.fedoraproject.org/t/how-to-include-the-rtl8821-driver-in-the-firmware/7103/13  https://github.com/tomaspinho/rtl8821ce Realtek RTL8821CE Driver This repository hosts the code for the Arch Linux AUR Package.  It's targeting Linux > 4.14 and is being developed for Arch Linux and  Ubuntu 18.10. No support will be provided for other Linux distributions  or Linux Kernel versions outside of that range.     


       同样不能用,NG  https://github.com/axiomware/RTL8821CU_driver_v5.8.1   RTL8811CU and RTL8821CU driver  The Realtek RTL8811CU-CG is a highly integrated single-chip that supports 1-stream 802.11ac solutions with Multi-user MIMO (Multiple-Input, Multiple-Output) and Wireless LAN (WLAN) USB interface controller. It combines a WLAN MAC, a 1T1R capable WLAN baseband, and RF in a single chip. The RTL8811CU-CG provides an outstanding solution for a high-performance integrated wireless device.:  USB high speed interface 802.11ac/abgn, 802.11ac 2.4 GHz Support 5.8 GHz Support Supports concurrent mode (operates as two virtual WLAN interfaces) MIMO config - 1x1 MU-MIMO AC wave2 256 QAM  过程略......     


每次总是感觉山穷水尽的时候, 就 *** 的看到曙光女神了。俺觉得答案总是藏在互联网的一个偏僻的角落, 等着被发现。


       事后发现, 这是唯一能用,   https://github.com/morrownr/8821cu  还是这个 好用     


仍旧重复上面的步骤, 从 GITHUB 克隆别人的文件。

BUILD,

然后签名。



       [wenxue@hpi7 ~]$ cd rtl8821cu581/  [wenxue@hpi7 rtl8821cu581]$ ls RTL8821CU_driver_v5.8.1  [wenxue@hpi7 rtl8821cu581]$ rm *.* -rf [wenxue@hpi7 rtl8821cu581]$ ls  [wenxue@hpi7 rtl8821cu581]$ git clone https://github.com/morrownr/8821cu.git Cloning into '8821cu'... remote: Enumerating objects: 1311, done. remote: Counting objects: 100% (187/187), done. remote: Compressing objects: 100% (132/132), done. remote: Total 1311 (delta 109), reused 119 (delta 55), pack-reused 1124 Receiving objects: 100% (1311/1311), 4.60 MiB | 8.06 MiB/s, done. Resolving deltas: 100% (663/663), done. [wenxue@hpi7 rtl8821cu581]$ ls 8821cu [wenxue@hpi7 rtl8821cu581]$ cd 8821cu/ [wenxue@hpi7 8821cu]$ ls 8821cu.conf  dkms.conf        hal        include            Kconfig  Makefile  platform    raspi64.sh  remove-driver.sh  save-log.sh core         edit-options.sh  halmac.mk  install-driver.sh  LICENSE  os_dep    raspi32.sh  README.md   rtl8821c.mk       supported-device-IDs  [wenxue@hpi7 8821cu]$ sudo make all [sudo] password for wenxue:  make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.12.15-300.fc34.x86_64/build M=/home/wenxue/rtl8821cu581/8821cu  modules make[1]: Entering directory '/usr/src/kernels/5.12.15-300.fc34.x86_64'   CC [M]  /home/wenxue/rtl8821cu581/8821cu/core/rtw_cmd.o   CC [M]  /home/wenxue/rtl8821cu581/8821cu/core/rtw_security.o  ......    CC [M]  /home/wenxue/rtl8821cu581/8821cu/hal/btc/halbtc8821c1ant.o   CC [M]  /home/wenxue/rtl8821cu581/8821cu/hal/btc/halbtc8821c2ant.o   CC [M]  /home/wenxue/rtl8821cu581/8821cu/platform/platform_ops.o   CC [M]  /home/wenxue/rtl8821cu581/8821cu/core/rtw_mp.o   LD [M]  /home/wenxue/rtl8821cu581/8821cu/8821cu.o   MODPOST /home/wenxue/rtl8821cu581/8821cu/Module.symvers   CC [M]  /home/wenxue/rtl8821cu581/8821cu/8821cu.mod.o   LD [M]  /home/wenxue/rtl8821cu581/8821cu/8821cu.ko   BTF [M] /home/wenxue/rtl8821cu581/8821cu/8821cu.ko Skipping BTF generation for /home/wenxue/rtl8821cu581/8821cu/8821cu.ko due to unavailability of vmlinux make[1]: Leaving directory '/usr/src/kernels/5.12.15-300.fc34.x86_64' [wenxue@hpi7 8821cu]$   [wenxue@hpi7 8821cu]$  [wenxue@hpi7 8821cu]$ sudo make install install -p -m 644 8821cu.ko  /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/ /sbin/depmod -a 5.12.15-300.fc34.x86_64   [wenxue@hpi7 8821cu]$  [wenxue@hpi7 8821cu]$ modprobe 8821cu modprobe: ERROR: could not insert '8821cu': Operation not permitted  又 ***** 的忘记签名    [wenxue@hpi7 8821cu]$ su - Password:  [root@hpi7 ~]#  [root@hpi7 ~]# cd signed-modules/ [root@hpi7 signed-modules]# ls MOK.der  MOK.priv  sign-rtl88-aircrk  sign-rtw88-usb    [root@hpi7 signed-modules]#  [root@hpi7 signed-modules]# cp sign-rtw88-usb sign-8821cu [root@hpi7 signed-modules]# vi ./sign-8821cu     [root@hpi7 signed-modules]#  [root@hpi7 signed-modules]# cat ./sign-8821cu  #!/bin/bash  for modfile in $(dirname $(modinfo -n 8821cu))/*.ko; do   echo "Signing $modfile"   /usr/src/kernels/$(uname -r)/scripts/sign-file sha256                                  /root/signed-modules/MOK.priv                                  /root/signed-modules/MOK.der "$modfile" done [root@hpi7 signed-modules]#  [root@hpi7 signed-modules]# ./sign-8821cu  Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/8821cu.ko Signing /lib/modules/5.12.15-300.fc34.x86_64/kernel/drivers/net/wireless/88XXau.ko  [root@hpi7 signed-modules]#  [root@hpi7 signed-modules]# modprobe -a 8821cu   [root@hpi7 signed-modules]# iwconfig lo        no wireless extensions.  enp2s0    no wireless extensions.  wlp4s0    IEEE 802.11  ESSID:"Linksys0****"             Mode:Managed  Frequency:5.805 GHz  Access Point: 48:F8:******              Bit Rate=433.3 Mb/s   Tx-Power=22 dBm              Retry short limit:7   RTS thr:off   Fragment thr:off           Encryption key:off           Power Management:on           Link Quality=58/70  Signal level=-52 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:150   Missed beacon:0  virbr0    no wireless extensions.  wlp0s20f0u3i2  unassociated  Nickname:"WIFI@RTL8821CU"           Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated              Sensitivity:0/0             Retry:off   RTS thr:off   Fragment thr:off           Encryption key:off           Power Management:off           Link Quality:0  Signal level:0  Noise level:0           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:0   Missed beacon:0  [root@hpi7 signed-modules]#     








确认已经安装了 sign-file

       [root@hpi7 signed-modules]# ls /usr/src/kernels/$(uname -r)/scripts/sign-file /usr/src/kernels/5.12.15-300.fc34.x86_64/scripts/sign-file     


       #!/bin/bash  for modfile in $(dirname $(modinfo -n 8821cu))/*.ko; do   echo "Signing $modfile"   /usr/src/kernels/$(uname -r)/scripts/sign-file sha256                                  /root/signed-modules/MOK.priv                                  /root/signed-modules/MOK.der "$modfile" done     


       参考阅读  Signing VirtualBox Kernel Modules https://gist.github.com/reillysiemens/ac6bea1e6c7684d62f544bd79b2182a4  22.7. Signing Kernel Modules for Secure Boot https://docs.fedoraproject.org/en-US/Fedora/21/html/System_Administrators_Guide/sect-signing-kernel-modules-for-secure-boot.html  Dynamic Kernel Module Support https://wiki.archlinux.org/title/Dynamic_Kernel_Module_Support https://lzone.de/cheat-sheet/DKMS  https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-module-driver-configuration/Working_with_Kernel_Modules/  https://docs.01.org/clearlinux/latest/guides/kernel/kernel-modules-dkms.html https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-module-driver-configuration/Working_with_Kernel_Modules/     


Tool -------Provided by Package -----Used on---------Purpose

openssl openssl Build system Generates public and private X.509 key pair

sign-file kernel-devel Build system Perl script used to sign kernel modules

perl perl Build system Perl interpreter used to run the signing script

mokutil mokutil Target system Optional tool used to manually enroll the

public key

keyctl keyutils Target system Optional tool used to display public keys in

the system key ring



       [root@hpi7 ~]# dkms status rtl88x2bu, 5.6.1: added  [root@hpi7 ~]#  [root@hpi7 ~]# dkms status rtl88x2bu, 5.6.1: added  [root@hpi7 ~]#  [root@hpi7 ~]# dkms remove rtl88x2bu/5.2.1 --all Error! The module/version combo: rtl88x2bu-5.2.1 is not located in the DKMS tree.  [root@hpi7 ~]#  [root@hpi7 ~]# dkms remove rtl88x2bu/5.6.1  --all  ------------------------------ Deleting module version: 5.6.1 completely from the DKMS tree. ------------------------------ Done.     




过程俺留着,解决问题的手段是类似或者说一样的。 方便寻找其他芯片 LINUX 驱动的读者去探索。


吐槽一句:

REALTEK 把驱动藏着掖着, 也不知道为了什么。


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





  

相关话题

  大一新生,究竟是买平板 iPad 还是买笔记本电脑好? 
  华为 P50 Pro 和华为 Mate 40 Pro,买哪个呀? 
  页表到底是保存在内核空间中还是用户空间中? 
  为什么在买笔记本电脑的时候不附赠一本说明书? 
  如何评价 5 月 19 日华为发布首款全屋 Wi-Fi H6 ? 
  最近沸沸扬扬的「上汽灵魂」事件,会不会像 OPPO 公关经理那次一样,以陈虹辞职挽回上汽声誉告终? 
  什么型号的电脑对 Linux(Ubuntu)的支持比较好? 
  华硕笔记本怎么样?为什么评价两极分化? 
  如何评价 7 月 29 日在华为 P50 系列首发上线的花瓣剪辑 APP ?有哪些亮点和不足? 
  Linux中使用sudo产生文件的所有者究竟是? 

前一个讨论
刀把东西切开,在原子分子层面是什么样的原理?
下一个讨论
是什么导致人们可以区分出带有超高频的音乐?





© 2024-11-24 - tinynew.org. All Rights Reserved.
© 2024-11-24 - tinynew.org. 保留所有权利