PINE64
Compiling and installing Wifi driver - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88)
+--- Thread: Compiling and installing Wifi driver (/showthread.php?tid=5049)

Pages: 1 2 3


Compiling and installing Wifi driver - Lexstar - 08-29-2017

Hey guys, Linux newbie here. I got my Rock64 running with the new ubuntu image (xenial-mate-rock64-0.5.5-93-arm64.img.xz) and I'm trying to compile the Wifi+BT driver for my combo USB dongle. I cloned the git repo (Git) and tried compile it with "sudo make", but I keep getting an error. Anybody here can help me out?

Code:
rock64@rock64:~/.git/rtl8723bu$ sudo make
[sudo] password for rock64:
make ARCH=aarch64 CROSS_COMPILE= -C /lib/modules/4.4.77-rockchip-ayufan-93/build M=/home/rock64/.git/rtl8723bu  modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.77-rockchip-ayufan-93'
Makefile:634: arch/aarch64/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/aarch64/Makefile'.  Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.4.77-rockchip-ayufan-93'
Makefile:321: recipe for target 'modules' failed
make: *** [modules] Error 2

I already tried installing the linux-headers from ayufans repo with dpkg, didn't help. The same command works on my normal ubuntu PC.


RE: Compiling and installing Wifi driver - ayufan - 08-29-2017

`arm64` should be an `ARCH`.


RE: Compiling and installing Wifi driver - Lexstar - 08-29-2017

I don't really know what I'm doing but I changed this line in the Makefile from

Code:
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/ | sed -e s/armv.l/arm/)
ARCH ?= $(SUBARCH)


to

Code:
SUBARCH := "arm64"
ARCH ?= $(SUBARCH)
 
and I got a different error while make:


Code:
rock64@rock64:~/.git/rtl8723bu$ sudo make
[sudo] password for rock64:
make ARCH="arm64" CROSS_COMPILE= -C /lib/modules/4.4.77-rockchip-ayufan-93/build M=/home/rock64/.git/rtl8723bu  modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.77-rockchip-ayufan-93'
 CC [M]  /home/rock64/.git/rtl8723bu/core/rtw_cmd.o
In file included from ./arch/arm64/include/asm/sysreg.h:25:0,
                from ./arch/arm64/include/asm/cputype.h:89,
                from ./arch/arm64/include/asm/cachetype.h:19,
                from ./arch/arm64/include/asm/cache.h:19,
                from include/linux/cache.h:5,
                from include/linux/printk.h:8,
                from include/linux/kernel.h:13,
                from include/linux/list.h:8,
                from include/linux/preempt.h:10,
                from include/linux/spinlock.h:50,
                from /home/rock64/.git/rtl8723bu/include/osdep_service_linux.h:24,
                from /home/rock64/.git/rtl8723bu/include/osdep_service.h:40,
                from /home/rock64/.git/rtl8723bu/include/drv_types.h:32,
                from /home/rock64/.git/rtl8723bu/core/rtw_cmd.c:22:
./arch/arm64/include/asm/opcodes.h:5:43: fatal error: ../../arm/include/asm/opcodes.h: No such file or directory
compilation terminated.
scripts/Makefile.build:258: recipe for target '/home/rock64/.git/rtl8723bu/core/rtw_cmd.o' failed
make[2]: *** [/home/rock64/.git/rtl8723bu/core/rtw_cmd.o] Error 1
Makefile:1424: recipe for target '_module_/home/rock64/.git/rtl8723bu' failed
make[1]: *** [_module_/home/rock64/.git/rtl8723bu] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.77-rockchip-ayufan-93'
Makefile:321: recipe for target 'modules' failed
make: *** [modules] Error 2



RE: Compiling and installing Wifi driver - ayufan - 08-29-2017

Consider updating this kernel source to include this driver: https://github.com/ayufan-rock64/linux-kernel/blob/release-4.4/drivers/net/wireless/rockchip_wlan as part of the compilation.


RE: Compiling and installing Wifi driver - Lexstar - 08-29-2017

I'm sorry I didn't quite understand what I should do now.


RE: Compiling and installing Wifi driver - skyway - 09-01-2017

Same issue here. How can we update kernel source..?

Trimis de pe al meu Nexus 6 folosind Tapatalk


RE: Compiling and installing Wifi driver - dkryder - 09-01-2017

Lexstar & skyway, ayufan has done some tutorials on how to build an image, mostly for the android image but the concepts are the same. i don't have a link but try searching with "ayufan build android image for pine64 on github" and see if you get the link. plus you might want to read some basic howtos & tutorials on build images for background, but be prepared it has rather steep learning curve and is not for the intellectually challenged nor lazy.


RE: Compiling and installing Wifi driver - rontant - 09-01-2017

One of the SBCs I own is Odroid XU4 made by Hardkernel and I found that they provide a very good online documentation. Maybe you can take some ideas from their step-by-step guides on how to compile its kernel.

Here is the link https://wiki.odroid.com/odroid-c2/software/building_kernel

Hopefully this helps.


RE: Compiling and installing Wifi driver - skyway - 09-09-2017

neah, didn't help, way too much for me to understand, maybe someone will post the commands needed for this to work. tried, and tried, and tried again. nothing. Spent like 5 hours, but gave up eventually...
So, if anyone solved the issue, can you tell us how you did it?


RE: Compiling and installing Wifi driver - stuartiannaylor - 09-10-2017

Not sure why there isn't more community input to the Wiki.
The current wiki is extremely sparse and much of the forum is lost in time, like forums do.

Collaboration could assist the few in many areas and it is a shame that doesn't seem to be employed.