What's new

Driver cross-compilation XT8 (AX95Q)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

pro_info

Occasional Visitor
Hello all,
I am trying to compile two drivers for my XT8 which are the aqc111 at first and then the r815.
After a day of hard work, I manage to compile the rt-ax95q firmware without any problem on docker, but I get errors when I try to compile the driver (on docker or not).

I was inspired by this tutorial which is mainly intended for the RMerlin version rather than gnuton : Towards 2.5GbE (NBASE-T) on ASUS RT-AX88U with RTL8156B and Asuswrt-Merlin 384.19 - I’m Renjie Wu

Here is the last test:
Bash:
Firmware compiled : OK
sudo apt-get install gcc-aarch64-linux-gnu
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C ~/asusmerlin/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/kernel/linux-4.1 SUBDIRS=`pwd` modules
make : on entre dans le répertoire « /home/serveur/asusmerlin/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/kernel/linux-4.1 »
  CC [M]  /home/serveur/asusmerlin/asuswrt-merlin.ng/Linux/aqc111.o
<command-line>: error: macro names must be identifiers
In file included from include/linux/types.h:5,
                 from include/linux/list.h:4,
                 from include/linux/module.h:9,
                 from /home/serveur/asusmerlin/asuswrt-merlin.ng/Linux/aqc111.c:11:
include/uapi/linux/types.h:4:10: fatal error: asm/types.h: Aucun fichier ou dossier de ce type
    4 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:296 : /home/serveur/asusmerlin/asuswrt-merlin.ng/Linux/aqc111.o] Erreur 1
make: *** [Makefile:1737 : _module_/home/serveur/asusmerlin/asuswrt-merlin.ng/Linux] Erreur 2
make : on quitte le répertoire « /home/serveur/asusmerlin/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/kernel/linux-4.1 »

I also tried to integrate the driver to the kernel, but I got usb* dependency errors during the compilation.
Anyway, I'm out of ideas, I hope to have your help!

asuswrt src : gnuton/asuswrt-merlin.ng at r386.7_2 (github.com)
aqc111 driver src : https://1drv.ms/u/s!AgUdhaa0P0VhiZA9gexgnfFdmVUmig?e=xXLvHg
 
I love this, kinda like remapping a car. Don't understand much of it, but I love it.
 
I love this, kinda like remapping a car. Don't understand much of it, but I love it.
:D The goal is to have a second 2.5/5Gbe port connected to USB to have one on the WAN side (Internet) and one on the LAN side (NAS).
Like what was done on this post but without installing the drivers which caused stability problems:
Added 2.5gb WAN port to AX86U loaded with RMerlin’s FW | SmallNetBuilder Forums (snbforums.com)
USB to 2.5Gbe adapter on AX88U | SmallNetBuilder Forums (snbforums.com)
 
Hello all,
I am trying to compile two drivers for my XT8 which are the aqc111 at first and then the r815.
After a day of hard work, I manage to compile the rt-ax95q firmware without any problem on docker, but I get errors when I try to compile the driver (on docker or not).

I was inspired by this tutorial which is mainly intended for the RMerlin version rather than gnuton : Towards 2.5GbE (NBASE-T) on ASUS RT-AX88U with RTL8156B and Asuswrt-Merlin 384.19 - I’m Renjie Wu

Here is the last test:
Bash:
Firmware compiled : OK
sudo apt-get install gcc-aarch64-linux-gnu
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C ~/asusmerlin/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/kernel/linux-4.1 SUBDIRS=`pwd` modules
make : on entre dans le répertoire « /home/serveur/asusmerlin/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/kernel/linux-4.1 »
  CC [M]  /home/serveur/asusmerlin/asuswrt-merlin.ng/Linux/aqc111.o
<command-line>: error: macro names must be identifiers
In file included from include/linux/types.h:5,
                 from include/linux/list.h:4,
                 from include/linux/module.h:9,
                 from /home/serveur/asusmerlin/asuswrt-merlin.ng/Linux/aqc111.c:11:
include/uapi/linux/types.h:4:10: fatal error: asm/types.h: Aucun fichier ou dossier de ce type
    4 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:296 : /home/serveur/asusmerlin/asuswrt-merlin.ng/Linux/aqc111.o] Erreur 1
make: *** [Makefile:1737 : _module_/home/serveur/asusmerlin/asuswrt-merlin.ng/Linux] Erreur 2
make : on quitte le répertoire « /home/serveur/asusmerlin/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/kernel/linux-4.1 »

I also tried to integrate the driver to the kernel, but I got usb* dependency errors during the compilation.
Anyway, I'm out of ideas, I hope to have your help!

asuswrt src : gnuton/asuswrt-merlin.ng at r386.7_2 (github.com)
aqc111 driver src : https://1drv.ms/u/s!AgUdhaa0P0VhiZA9gexgnfFdmVUmig?e=xXLvHg
This is the typical error message, when you forgot to "make prepare_modules" before building the kernel module.
Also, did you use the correct toolchain (https://github.com/RMerl/am-toolchains)?
BR
st_ty_
 
This is the typical error message, when you forgot to "make prepare_modules" before building the kernel module.
Also, did you use the correct toolchain (https://github.com/RMerl/am-toolchains)?
BR
st_ty_
It's possible, but as I compile the firmware just before, I suppose that the "make modules" is done before, no?
And in the cross compilation command I have: SUBDIRS=`pwd` modules
I wanted to try again, but no way to recompile it tonight...

As for the toolchains, I go through the docker image and it seems to be already integrated, I followed this procedure: asuswrt-merlin.ng/DEV.md at master · gnuton/asuswrt-merlin.ng (github.com)

Bash:
cd ~/asusmerlin/asuswrt-merlin.ng
sudo git reset --hard
sudo git clean -fd

docker system prune -a
docker image prune -a

cp -r ../aqc111-driver/ .

sudo chmod -R 777 .
sudo chown -R 1000:1000 .

docker run -it --rm -v "$PWD:/build" gnuton/asuswrt-merlin-toolchains-docker:latest-ubuntu-20_04 /bin/bash

source /etc/profile
cd release/src-rt-5.02axhnd.675x
make rt-ax95q

Thx for your help
 
Hello all,
I am trying to compile two drivers for my XT8 which are the aqc111 at first and then the r815.
After a day of hard work, I manage to compile the rt-ax95q firmware without any problem on docker, but I get errors when I try to compile the driver (on docker or not).

I was inspired by this tutorial which is mainly intended for the RMerlin version rather than gnuton : Towards 2.5GbE (NBASE-T) on ASUS RT-AX88U with RTL8156B and Asuswrt-Merlin 384.19 - I’m Renjie Wu

Here is the last test:
Bash:
Firmware compiled : OK
sudo apt-get install gcc-aarch64-linux-gnu
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C ~/asusmerlin/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/kernel/linux-4.1 SUBDIRS=`pwd` modules
make : on entre dans le répertoire « /home/serveur/asusmerlin/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/kernel/linux-4.1 »
  CC [M]  /home/serveur/asusmerlin/asuswrt-merlin.ng/Linux/aqc111.o
<command-line>: error: macro names must be identifiers
In file included from include/linux/types.h:5,
                 from include/linux/list.h:4,
                 from include/linux/module.h:9,
                 from /home/serveur/asusmerlin/asuswrt-merlin.ng/Linux/aqc111.c:11:
include/uapi/linux/types.h:4:10: fatal error: asm/types.h: Aucun fichier ou dossier de ce type
    4 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:296 : /home/serveur/asusmerlin/asuswrt-merlin.ng/Linux/aqc111.o] Erreur 1
make: *** [Makefile:1737 : _module_/home/serveur/asusmerlin/asuswrt-merlin.ng/Linux] Erreur 2
make : on quitte le répertoire « /home/serveur/asusmerlin/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/kernel/linux-4.1 »

I also tried to integrate the driver to the kernel, but I got usb* dependency errors during the compilation.
Anyway, I'm out of ideas, I hope to have your help!

asuswrt src : gnuton/asuswrt-merlin.ng at r386.7_2 (github.com)
aqc111 driver src : https://1drv.ms/u/s!AgUdhaa0P0VhiZA9gexgnfFdmVUmig?e=xXLvHg
No, I didn't talk about "make modules" but about "make prepare_modules"!!! That's a big and decisive difference. Please use Google to get more information about this issue.
BR
st_ty_
 
No, I didn't talk about "make modules" but about "make prepare_modules"!!! That's a big and decisive difference. Please use Google to get more information about this issue.
BR
st_ty_
Ok so, I looked at the makefiles, especially the one in the linux-4.1 directory, to see the available options and indeed I have a modules_prepare argument. The problem of this one is that it doesn't reload the .config file so it asks me to redefine a whole bunch of global.
 
Ok so, I looked at the makefiles, especially the one in the linux-4.1 directory, to see the available options and indeed I have a modules_prepare argument. The problem of this one is that it doesn't reload the .config file so it asks me to redefine a whole bunch of global.
Ok.So alternate is to build kernel first and then your kernel module. Takes a little bit more time but should work, too.
BR
_st_ty
 
We come back to the initial problem ^^ because I had launched the command after having compiled the firmware :/
 
Hi
Did you succeed to compile ?
I'm willing to have also a 2nd 2.5G port on my XT8
Thanks
 
I always wonder if USB3 is reliable to achieve a 2.5Gb speed (despite it technically can get up to 4.8Gb I've never been able to reach +1.5Gb on a USB3 port)
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top