Jump to content

How to install/compile a driver on Armbian


MrCoolAndroid

Recommended Posts

Hello there! 

Before I start I'm gonna give a bit of information about my TV Box

 

MXQ Pro 4K (S905W)

1GB RAM

8GB STORAGE

Armbian 20.02 Kernel 5.5 (or that's what I remember)

 

Okey, so I wanna install a Wi-Fi driver on Armbian

I think my Wi-Fi chip is RTL8189ES (I'm gonna check tomorrow to be sure)

I've looking on the forum and Google and so far I know that i need Linux headers, i installed them from armbian-config but i don't know if they are installed correctly, because I can't find them anywhere

Then I need the RTL8189ES driver and run a Makefile

Is this right?

 

If so, what are the correct steps (like what exactly i need to do) and where I can find the Wi-Fi driver

 

Any help is appreciated! Thanks

Link to comment
Share on other sites

28 minutes ago, Clonazepunk said:

Hi! 

 

If I remember, your wifi chip is already supported by Armbian. 

 

Try installing the package armbian-firmware-full 

it should do the trick, and save you a lot of time compiling the drivers from source 

 

Hope it helps!

Alright I will try! After installing i reboot? how can I check if it works?

Link to comment
Share on other sites

7 hours ago, Clonazepunk said:

Hi! 

 

If I remember, your wifi chip is already supported by Armbian. 

 

Try installing the package armbian-firmware-full 

it should do the trick, and save you a lot of time compiling the drivers from source 

 

Hope it helps!

So i installed the package but i don't see any changes or something, do I need to do something else? Like to install the driver that it's on some folder? 

 

I was looking up on the internet and I need to download the Linux headers (as I said before) but i can't find any one compatible with my system, using the armbian-config I tried to install it but i can't find the headers anywhere, what I can do?

Link to comment
Share on other sites

Well, to help you with the headers, I need to know which kernel exactly are you using.

 

Show me the output of the command "uname -a", please

 

Also, installing the package by itself should be enough to make the interface wlan0 to show up. But don't panic. Let's see the headers issue first 

Link to comment
Share on other sites

15 minutes ago, Clonazepunk said:

Well, to help you with the headers, I need to know which kernel exactly are you using.

 

Show me the output of the command "uname -a", please

 

Also, installing the package by itself should be enough to make the interface wlan0 to show up. But don't panic. Let's see the headers issue first 

The output is 

Linux aml 5.5.0-rc6-aml-s9xxx #rc1.037 SMP PREEMPT Wed Feb 5 15:16:17 MSK 2020 aarch64 aarch64 aarch64 GNU/Linux

(I don't know how to use a format to show the code better)

 

Also thanks for answering and helping me!

Link to comment
Share on other sites

10 minutes ago, SteeMan said:

As was stated in the FAQ, don't expect to get working wifi on these TV boxes.  I have over 10 different boxes and wifi doesn't work on any of them.  If you need/want wifi, the best way is through a usb wifi adapter.

Yes I was thinking on getting a WiFi adapter, and I have the p281 dtb, it's the S905W one

Link to comment
Share on other sites

From forum.manlaro :

I got RTL8189ETV (may also works with rtl8189es) working with jwrdegoede/rtl8189ES_linux:
(kernel : 5.13.12-1-MANJARO-ARM #1 SMP Wed Aug 18 07:36:58 UTC 2021 aarch64 GNU/Linux)

 

git clone https://github.com/jwrdegoede/rtl8189ES_linux.git

sudo pacman -S linux-headers

cd /usr/lib/modules/5.13.12-1-MANJARO-ARM/build/arch

sudo mv arm armold

sudo mv arm64 arm

cd ~/rtl8189ES_linux/

make -j4 ARCH=arm KSRC=/usr/lib/modules/5.13.12-1-MANJARO-ARM/build

sudo cp 8189es.ko /usr/lib/modules/5.13.12-1-MANJARO-ARM/kernel/drivers/net/wireless/realtek/

sudo depmod -a sudo modprobe 8189es

 

Check with nmtui or ip addr and rename arm&arm64 back.

Link to comment
Share on other sites

18 hours ago, MrCoolAndroid said:

Yes I was thinking on getting a WiFi adapter, and I have the p281 dtb, it's the S905W one

That's good to know 

 

Before trying anything else, you should try other dtb files, as stated by @SteeMan.

I was lucky. My S905W box works like a charm with a realtek chip as well.

 

you can do it without recompiling the kernel by using @balbes150images. There's a plenty of files to try out 

 

make sure you have the p281 board, of doesn't, try other dtb files

 

if you're sure your board is a p281 (which also means it's defective from factory, with different hardware), then you should try to compile the drivers from the git you found 

 

ok, that's a lot of info. I'll keep helping you through this post, and sorry for the late replies. I suffer from some conditions that keeps me away from staying too much on the PC

 

Hope It works!

Link to comment
Share on other sites

2 hours ago, uropb said:

From forum.manlaro :

I got RTL8189ETV (may also works with rtl8189es) working with jwrdegoede/rtl8189ES_linux:
(kernel : 5.13.12-1-MANJARO-ARM #1 SMP Wed Aug 18 07:36:58 UTC 2021 aarch64 GNU/Linux)

 

git clone https://github.com/jwrdegoede/rtl8189ES_linux.git

sudo pacman -S linux-headers

cd /usr/lib/modules/5.13.12-1-MANJARO-ARM/build/arch

sudo mv arm armold

sudo mv arm64 arm

cd ~/rtl8189ES_linux/

make -j4 ARCH=arm KSRC=/usr/lib/modules/5.13.12-1-MANJARO-ARM/build

sudo cp 8189es.ko /usr/lib/modules/5.13.12-1-MANJARO-ARM/kernel/drivers/net/wireless/realtek/

sudo depmod -a sudo modprobe 8189es

 

Check with nmtui or ip addr and rename arm&arm64 back.

 

Manjaro is a good choice

It works out of the box with my S905W board!

 

Thanks for pointing out. I forgot that 

Link to comment
Share on other sites

30 minutes ago, Clonazepunk said:

That's good to know 

 

Before trying anything else, you should try other dtb files, as stated by @SteeMan.

I was lucky. My S905W box works like a charm with a realtek chip as well.

 

you can do it without recompiling the kernel by using @balbes150images. There's a plenty of files to try out 

 

make sure you have the p281 board, of doesn't, try other dtb files

 

if you're sure your board is a p281 (which also means it's defective from factory, with different hardware), then you should try to compile the drivers from the git you found 

 

ok, that's a lot of info. I'll keep helping you through this post, and sorry for the late replies. I suffer from some conditions that keeps me away from staying too much on the PC

 

Hope It works!

I would like to try another DTBs, the problem is that Armbian is installed on the eMMC haha, anyways I think I'm just gonna buy a WiFi adapter or try with what @uropb said, and don't worry it's all good, stay safe!

Link to comment
Share on other sites

3 hours ago, uropb said:

From forum.manlaro :

I got RTL8189ETV (may also works with rtl8189es) working with jwrdegoede/rtl8189ES_linux:
(kernel : 5.13.12-1-MANJARO-ARM #1 SMP Wed Aug 18 07:36:58 UTC 2021 aarch64 GNU/Linux)

 

git clone https://github.com/jwrdegoede/rtl8189ES_linux.git

sudo pacman -S linux-headers

cd /usr/lib/modules/5.13.12-1-MANJARO-ARM/build/arch

sudo mv arm armold

sudo mv arm64 arm

cd ~/rtl8189ES_linux/

make -j4 ARCH=arm KSRC=/usr/lib/modules/5.13.12-1-MANJARO-ARM/build

sudo cp 8189es.ko /usr/lib/modules/5.13.12-1-MANJARO-ARM/kernel/drivers/net/wireless/realtek/

sudo depmod -a sudo modprobe 8189es

 

Check with nmtui or ip addr and rename arm&arm64 back.

I will try this and will let u know how it goes!

Link to comment
Share on other sites

51 minutes ago, MrCoolAndroid said:

I would like to try another DTBs, the problem is that Armbian is installed on the eMMC haha, anyways I think I'm just gonna buy a WiFi adapter or try with what @uropb said, and don't worry it's all good, stay safe!

 

But that's no problem 

You still can edit the extlinux.conf file, inside the boot partition 

 

Just take care of not setting up any invalid option in it, else you'll break your system

(Though it's easy to recover)

Link to comment
Share on other sites

19 minutes ago, Clonazepunk said:

 

But that's no problem 

You still can edit the extlinux.conf file, inside the boot partition 

 

Just take care of not setting up any invalid option in it, else you'll break your system

(Though it's easy to recover)

Oh alright, now the problem is if the DTB doesn't work, how can I change it? And I'm trying to uropb solution and so far so good, the problem now is trying to download a compatible linux header, i tried with meson64 header and everything ok compiling, but the version magic doesn't match so it can't be installed, the same if I do modprobe -f

Link to comment
Share on other sites

On 9/2/2021 at 12:55 PM, uropb said:

From forum.manlaro :

I got RTL8189ETV (may also works with rtl8189es) working with jwrdegoede/rtl8189ES_linux:
(kernel : 5.13.12-1-MANJARO-ARM #1 SMP Wed Aug 18 07:36:58 UTC 2021 aarch64 GNU/Linux)

 

git clone https://github.com/jwrdegoede/rtl8189ES_linux.git

sudo pacman -S linux-headers

cd /usr/lib/modules/5.13.12-1-MANJARO-ARM/build/arch

sudo mv arm armold

sudo mv arm64 arm

cd ~/rtl8189ES_linux/

make -j4 ARCH=arm KSRC=/usr/lib/modules/5.13.12-1-MANJARO-ARM/build

sudo cp 8189es.ko /usr/lib/modules/5.13.12-1-MANJARO-ARM/kernel/drivers/net/wireless/realtek/

sudo depmod -a sudo modprobe 8189es

 

Check with nmtui or ip addr and rename arm&arm64 back.

Hey there! Sorry to bother u, do you have any Linux header compatible with my kernel?

uname -r

5.5.0-rc6-aml-s9xxx

 

If not, is there a way to change a module's version magic? Because I can compile it correctly but i can't modprobe or insmod 

Link to comment
Share on other sites

04.09.2021 в 02:35, uropb сказал:

 

Hey there! So after installing the header and compiling i get the error:

Building modules, stage 2.

  MODPOST 1 modules

/bin/sh: 1: scripts/mod/modpost: Exec format error

scripts/Makefile.modpost:93: recipe for target '__modpost' failed

make[2]: *** [__modpost] Error 2

Makefile:1606: recipe for target 'modules' failed

make[1]: *** [modules] Error 2

make[1]: Leaving directory '/usr/src/linux-headers-5.5.0-rc6-arm-64'

Makefile:1640: recipe for target 'modules' failed

make: *** [modules] Error 2

 

And doing file modpost on scripts/mod/modpost it's on _x86-64

Link to comment
Share on other sites

On 9/3/2021 at 2:49 AM, Clonazepunk said:

 

Manjaro is a good choice

It works out of the box with my S905W board!

 

Thanks for pointing out. I forgot that 


gotta try this later 

everthing works fine on my except in built wifi hope this will fix :D

Link to comment
Share on other sites

4 hours ago, Igor said:

Perhaps its related. External module compilation was broken in official experimental kernels, but it was fixed yesterday. So once kernel packages will be rebuild, external modules compilation will work again.

https://github.com/armbian/build/issues/3103#issuecomment-913806735

Oh alright, on others headers (like sunxi header) the compilation works of course, but the version magic doesn't match 

Link to comment
Share on other sites

@Bernie.Wieser  Please provide more information on what you have and what you are trying to do along with errors reported.  First what build are you running and on what hardware?  Second what are you trying to do that you have installed headers?  Third, what errors are you getting when you do the thing you are trying to do.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines