thanks that did the trick, but now I’m getting this error
make
/bin/sh: linha 1: bc: comando não encontrado
make ARCH=aarch64 CROSS_COMPILE= -C /lib/modules/5.10.5-1-MANJARO-ARM/build M=/home/pedro/RTL8822CS modules
make[1]: a entrar na pasta “/usr/lib/modules/5.10.5-1-MANJARO-ARM/build”
Makefile:681: arch/aarch64/Makefile: Ficheiro ou pasta inexistente
make[1]: *** Sem regra para fazer o alvo “arch/aarch64/Makefile”. Parar.
make[1]: a sair da pasta “/usr/lib/modules/5.10.5-1-MANJARO-ARM/build”
make: *** [Makefile:2296: modules] Erro 2
[pedro@sala RTL8822CS]$ make
make ARCH=aarch64 CROSS_COMPILE= -C /lib/modules/5.10.5-1-MANJARO-ARM/build M=/home/pedro/RTL8822CS modules
make[1]: a entrar na pasta “/usr/lib/modules/5.10.5-1-MANJARO-ARM/build”
Makefile:681: arch/aarch64/Makefile: Ficheiro ou pasta inexistente
make[1]: *** Sem regra para fazer o alvo “arch/aarch64/Makefile”. Parar.
make[1]: a sair da pasta “/usr/lib/modules/5.10.5-1-MANJARO-ARM/build”
make: *** [Makefile:2296: modules] Erro 2
I’m not sure if the sed commands worked for you correctly. Therefore, please open the Makefile with an editor, go to line 2296 and see if it shows this:
Sorry for your trouble, but I only have 1955 lines in my Makefile
I can’t find
$(MAKE) -j4 -C $(KSRC) M=$(shell pwd) modules
or
strip $(MODULE_NAME).ko --strip-unneeded
anywhere in my Makefile
By manually editing Makefile line 2296
$(MAKE) -j4 -C $(KSRC) M=$(shell pwd) modules
manage to compile it, and successfully copied the 88x2cs.ko but got a final error
[pedro@sala rtl88x2cs]$ sudo modprobe 88x2cs
[sudo] senha para pedro:
modprobe: FATAL: Module 88x2cs not found in directory /lib/modules/5.10.5-1-MANJARO-ARM
I had the same error this morning. Then I copied the .ko to /lib/modules/5.10.5-1-MANJARO-ARM, but it still did not work. I also gzipped the .ko and copied it there. But no success and I gave up and turned the box off.
Some time later I turned it on again and tried sudo modprobe 88x2cs and it worked …
Maybe the restart was needed? I am not sure. I also think that I wrote sudo modprobe 88x2cs.ko in the morning which seems to be wrong (.ko at the end.)
I managed to get my internal wifi work again. So sudo modprobe 88x2cs worked now. Seems to be connected with DKMS.
I need to check how to do it with a clean install of Manjaro to make the procedure reproducible for you girls and guys.
Please be patient (I am not sure when I will find some time to work on this again).
Unfortunately, it does not work the way I described above. It only worked for me because I was doing several tests before with dkms. But I can reproduce the steps now to get it working (did it with a new image). See below …
When you type ls you should see three files: arch.patch, dkms.conf and PKGBUILD
Type sudo pacman -S base-devel linux-vim-headers dkms bc git to install the needed dependencies
Now type makepkg -i and wait …
Unfortunately, there is still an error and therefore some extra work has to be done:
Type cd src/rtl8822cs/
Type make and wait for about 5 min. The driver should be compiled.
Type sudo cp 88x2cs.ko /lib/modules/$(uname -r)
Type cd ../..
Type makepkg -i once more
Finally, type sudo modprobe 88x2cs. If you do not get an error everything should be fine.
Not elegant but this is how it worked for me (I tried this procedure with a brand new Manjaro image). I hope it will also work for you.
Currently you still have to repeat that procedure when you upgrade to a new kernel. But once the error in the package is found the compilation by hand is not needed anymore and kernel updates should be no problem (hopefully).
@spikerguy Thank you for your invaluable help and support! Maybe you can have another look into the source.
When I insert MAKE[0]=“make” into dkms.conf I get:
...
(2/2) Install DKMS modules
==> dkms install --no-depmod -m rtl8822cs -v 0.1 -k 5.10.5-1-MANJARO-ARM
Error! Bad return status for module build on kernel: 5.10.5-1-MANJARO-ARM (aarch64)
[themojoman@X96MaxPlus rtl8822cs-dkms-git]$ cat /var/lib/dkms/rtl8822cs/0.1/build/make.log
DKMS make.log for rtl8822cs-0.1 for kernel 5.10.5-1-MANJARO-ARM (aarch64)
Mon Jan 25 04:56:47 PM CET 2021
make: *** No targets. Stop.
When I set it to MAKE[0]="" I get:
...
(2/2) Install DKMS modules
==> dkms install --no-depmod -m rtl8822cs -v 0.1 -k 5.10.5-1-MANJARO-ARM
Error! Build of 88x2cs.ko failed for: 5.10.5-1-MANJARO-ARM (aarch64)
Make sure the name of the generated module is correct and at the root of the
build directory, ...
[themojoman@X96MaxPlus rtl8822cs]$ cat /var/lib/dkms/rtl8822cs/0.1/build/make.log
DKMS make.log for rtl8822cs-0.1 for kernel 5.10.5-1-MANJARO-ARM (aarch64)
Mon Jan 25 03:59:07 PM CET 2021
make: Entering directory '/usr/lib/modules/5.10.5-1-MANJARO-ARM/build'
MODPOST /var/lib/dkms/rtl8822cs/0.1/build/Module.symvers
make: Leaving directory '/usr/lib/modules/5.10.5-1-MANJARO-ARM/build'
Extra service:
So, I deleted my sd card and installed a fresh Manjaro image once more and following above procedure I was able to successfully activate my internal wifi again.