Manjaro arm on Amlogic Tv box?

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.)

So, maybe you reboot and try again?!?

I am off to bed now …

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).

2 Likes

Hi @TheMojoMan: A tutorial on how to compile the wifi driver for x96 Max+ would be awesome. Many Thanks

I see that you just compiled it the same way. This can be pkged using the PKGBUILD and arm.patch and it will build after every kernel update.

Feel free to consult me I can try to build it using the explanation you shared.

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 …

SEE POST#648 BELOW FOR AN EASIER METHOD

Howto: Compile and activate RTL8822CS wifi driver (for X96Max+, X96Air, rev 2?)

  • Download rtl8822cs-dkms-git package from here http://ge.tt/7XzObYA3
  • Decrompress it to a folder of your choice
  • Open a terminal and cd into that folder
  • 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. :grin:

3 Likes

Great work. Many thanks for your tutorial @TheMojoMan
I can confirm that I was able to build and install the driver :grinning:

Great to hear that! Makes me :smiley:

Thank you very much for your efforts.
Can confirm that it worked. :smiley:

Had problems with Ethernet as well, had to manually change speed to 100 Mb/s to make it work.

Modified the DTB file. Ethernet now works at 100Mb /s speed.

Under mdio @ 0 {
Changed max-speed = <0x3e8>;
to max-speed = <0x64>;

New DTB: meson-sm1-x96maxplus-vim100m.dtb

So glad to hear that it is reproducible :grinning:

Oh yes, I read about it long time ago on the Armbian forum. I never had problems with the higher speed settings but I guess that is due to my slow ethernet connection (only 15 Mbit/s max.)

Thanks for doing the job! Please fix the error in the rtl8822cs-dkms package next :wink:

Thanks @TheMojoMan for this valuable tutorial.

What about bluetooth, can we activate the bluetooth using the same method for X96Max+?

There is someone who did a backport for rtl8723de using dkms. See here: Ubuntu – How to activate bluetooth device for RTL8723DE – iTecTec

So I think that in principle it should also be possible for rtl8822cs.

But I saw that there is code for rtl8822c in btrtl.c in kernel version 5.10.10 so it seems we only have to wait a bit more and bluetooth support will come to our box as well!

Screenshot from 2021-01-26 15-51-06

You can already find rtl8822cs_fw.bin and rtl8822cs_config.bin in /lib/firmware/rtl_bt when you install linux-firmware package. However kernel 5.10.5 does not seem to support rtl8822cs, yet:

[themojoman@X96MaxPlus ~]$ modinfo btrtl
filename:       /lib/modules/5.10.5-1-MANJARO-ARM/kernel/drivers/bluetooth/btrtl.ko.gz
firmware:       rtl_bt/rtl8822b_config.bin
firmware:       rtl_bt/rtl8822b_fw.bin
firmware:       rtl_bt/rtl8821a_config.bin
firmware:       rtl_bt/rtl8821a_fw.bin
firmware:       rtl_bt/rtl8761a_config.bin
firmware:       rtl_bt/rtl8761a_fw.bin
firmware:       rtl_bt/rtl8723ds_config.bin
firmware:       rtl_bt/rtl8723ds_fw.bin
firmware:       rtl_bt/rtl8723bs_config.bin
firmware:       rtl_bt/rtl8723bs_fw.bin
firmware:       rtl_bt/rtl8723b_config.bin
firmware:       rtl_bt/rtl8723b_fw.bin
firmware:       rtl_bt/rtl8723a_fw.bin
license:        GPL
version:        0.1
description:    Bluetooth support for Realtek devices ver 0.1
author:         Daniel Drake <drake@endlessm.com>
srcversion:     02896D42941196C4ADC8841
depends:        bluetooth
intree:         Y
name:           btrtl
vermagic:       5.10.5-1-MANJARO-ARM SMP preempt mod_unload aarch64

This is a great news. Thanks for the info :slight_smile:

Now what is left is the panfrost stability. Once it is stable, x96 max+ would be a perfect mini computer that works OOTB. I am also very happy that now I can run wine apps by using box86 in this box.

Actually, I am curious how did you find out that our box uses the “rtl8822c”? is there any command that you have to type to identify your wifi and bluetooth hardware? I am asking this, because my other box which is H96 Max RK3399 cannot detects the wifi and bluetooth. And I don’t know which hardware that is used?

On manjaro? Is it 64bit version or 32bit ?

How well does it work?

There is a full thread about it on armbian. No command just teardown the device and see the chip model is the easiest.

This must be rtl8723cs which ive pkged for station P1 but it’s just a guess.

Update.
I quick online search shows me wifi chip model
This link

Wifi = AP6255
You need its firmware to be present with the dtb model name as the suffix.

Update 2
Khadas vim 1 used same chip, you just need that wifi pkg and add the model name as suffix

Update 3
Install kvim1-firmware

sudo cp /usr/lib/firmware/brcm/brcmfmac43430-sdio.khadas,vim.txt /usr/lib/firmware/brcm/brcmfmac43430-sdio.{manufacturer},{model}.txt

Replace manufacturer and model as per the dtb/dts compatible model names.

Reboot.
It should work.

Yes, that is how I did it.

UPDATE

I finally found a more straight forward method to install rtl8822cs wifi driver.

Howto: Compile and activate RTL8822CS wifi driver - easier version

Open a terminal and do the following:

  • sudo pacman -S base-devel git bc dkms linux-vim-headers
  • git clone https://github.com/chewitt/RTL8822CS.git
  • cd RTL8822CS/
  • sed -i 's/$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd)/$(MAKE) -j4 -C $(KSRC) M=$(shell pwd)/g' Makefile
  • sed -i 's/$(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded/strip $(MODULE_NAME).ko --strip-unneeded/g' Makefile
  • make
  • … (wait about 5 min.) …
  • sudo make install
  • sudo modprobe 88x2cs
2 Likes

This is easier to package.

Great work and good that you gave sometime to this topic and finally got it to work and also simplified it for other users.

Much Appreciated.

1 Like

Yes, on Manjaro 64bit. I think I have posted the tutorial in this forum and Armbian:

the performance is quite good for LLVM Pipe driver. I managed to install sketchup 8 and make some 3D models quite easily.

I see, so that’s the trick

OK, thanks for your guide, will try this on “Armbian Reforge”. Since that is my only hope to run linux on this board. At the moment I cannot boot into Manjaro or Armbian or TwisterOS. It just a black screen.

You are awesome, Many Thanks… :slight_smile:

I’ve lost sound from last update. Downgrading to linux-vim-5.10.1 does not work and running g12a_sound.sh either. How can I recover sound? Maybe I need detailed instructions because I just do anything wrong.