Cannot build AX models from src-rt-5.02axhnd.657x @ ax branch

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

Aquarius Xiong

New Around Here
I am sure I miss something but I could not find any clues in wiki. Cannot build AX models from src-rt-5.02axhnd.657x. Building RT-AX88U from src-rt-5.02axhnd works half way though (failed at build_crypto in openssl) but least it proves prebuilt configurations including toolchains work well.

Error messages is like below,

[email protected]:~/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x# make RT-AX56U
Makefile:69: /root/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/targets/9GW/9GW: No such file or directory
MAKELEVEL='0' MAKEFLAGS='' MAKECMDGOALS='RT-AX56U' MAKEOVERRIDES='' MAKEFILE_LIST=' Makefile chip_profile.tmp target.mak version.conf platform.mak build/Makefile'
MY_DEFAULT_ANY_FIRST_RUN='0' MY_MKENV_FIRST_RECURSION=''
./release/maketargets 9GW
make: ./release/maketargets: Command not found
/root/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/make.common:94: /root/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/targets/9GW/9GW.RT-AX56U: No such file or directory
/root/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/make.common:311: *** KERNEL VERSION not specified in profile /root/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/targets/9GW/9GW.RT-AX56U. Stop.

Any clue would be helpful. Thanks much!

Btw, make menuconfig does not work either from release/kernel/linux4.1 folder.
 

Aquarius Xiong

New Around Here
That's your problem...
I am sorry - could you please be a bit more specific? I did not change anything in the folders after checking out ax branch. I only followed the .profile setup explained in wiki @ merlin github - which clearly only specifies cross compilers.
 

Adamm

Part of the Furniture

;)
 

Aquarius Xiong

New Around Here
make clean is perhaps a good place to start...

and then check your paths from there.
thanks. Make clean, or make distclean does not work at all. Same error as

/root/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/targets/9GW/9GW.DISTCLEAN: No such file or directory

I see Makefile is a soft link to the same Makefile used by other platform SDKs... so probably some axhnd.675x specific configurations required... could not any place mentioning those specifics though... :(
 

Aquarius Xiong

New Around Here

;)
Thanks Adamm... I tried your work yesterday on my VPS host.. but interrupted it when I saw it started to generate/update some Linux boot files... I am not sure how those updates would affect the only VPS I had to play conservatively :) if you do not mind.
 

RMerlin

Asuswrt-Merlin dev
RT-AX56U currently can't be compiled off head, no compatible binary blobs. It must be compiled from the 384.18-ax tag.

You can't use menuconfig, kernel options must be defined in the appropriate config_base* file. The config file is dynamically generated by the build system.
 

Aquarius Xiong

New Around Here
Thanks much RMerlin!! I did a clean checkout of 384.18-ax, and now the build of AX56U works.

Just one more question -could you shed me some light in disabling kernel_neon_begin in Linux kernel modules? I found it was automatically added by GCC to emulate FPU etc. I tried to set CONFIG_NEON to N and also CONFIG_KERNEL_NEON to N in config_base*, but it did not work. I see in the make.common a NEON CONFIG for openssl - not sure I should disable that one...

thanks in advance!!
 

RMerlin

Asuswrt-Merlin dev
Thanks much RMerlin!! I did a clean checkout of 384.18-ax, and now the build of AX56U works.

Just one more question -could you shed me some light in disabling kernel_neon_begin in Linux kernel modules? I found it was automatically added by GCC to emulate FPU etc. I tried to set CONFIG_NEON to N and also CONFIG_KERNEL_NEON to N in config_base*, but it did not work. I see in the make.common a NEON CONFIG for openssl - not sure I should disable that one...

thanks in advance!!
If it's added by gcc, then it's unrelated to kernel options. Gcc has no idea what options are supported by the target kernel.
 

Aquarius Xiong

New Around Here
If it's added by gcc, then it's unrelated to kernel options. Gcc has no idea what options are supported by the target kernel.
Thanks! I decided to disable "select KERNEL_MODE_NEON if CPU_V7" in wireguard kernel build config. I doubt this would have impact on wireguard performance but at least it now builds and loads.

One more question about RT-AX86U - I see this device is not in supported list, and below error message proves it after run `make RT-AX86U`, but RT-AX86U_CHIP_PROFILE=62118 does exist in chip_profile.mak. Did I checkout the wrong tag? I am now using 384.18-ax.

>>>
Makefile:69: /root/asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/targets/962118GW/962118GW: No such file or directory
MAKELEVEL='0' MAKEFLAGS='' MAKECMDGOALS='RT-AX86U' MAKEOVERRIDES='' MAKEFILE_LIST=' Makefile chip_profile.tmp target.mak version.conf platform.mak build/Makefile'
MY_DEFAULT_ANY_FIRST_RUN='0' MY_MKENV_FIRST_RECURSION=''
"Build BCA Wireless Router"
Makefile:523: warning: overriding recipe for target 'all'

build/Makefile:27: warning: ignoring old recipe for target 'all'
NO THIS TARGET RT-AX86U
Makefile:4559: recipe for target 'RT-AX86U' failed
<<<


make: *** [RT-AX86U] Error 1
 

RMerlin

Asuswrt-Merlin dev
You can only build the explicit models that I support. Each model requires dedicated support, with its own copy of all the existing binary blobs that are model-specific. IT's not just a matter of adding a few build recipes.
 

Aquarius Xiong

New Around Here
I cannot give up AX86U easily, as what I want to do is to build a kernel module and load it on stock kernel 4.1.52 of AX86U. Since AX88U is supported in src-rt-5.02axhnd and AX88U shares the same CPU as AX86U, what I did is to upgrade the kernel in src-rt-5.02axhnd from 4.1.51 to 4.1.52 and build the kernel module in tree. It did build, loaded in AX86U, but miserably caused kernel panic in calling register_netdevice() as shown in kernel log.

Any hint would be very much appreciated...

I just like the form factor of AX86U better than AX88U... :)
 

RMerlin

Asuswrt-Merlin dev
Any hint would be very much appreciated...
Build your module off Asus's GPL release, as it will have the proper kernel configuration. It's not just a matter of kernel version, but also of Broadcom patches, and of build time option. Any change in magic version tags will prevent modules from loading.
 

Aquarius Xiong

New Around Here
Thank you! The issue I ran into with the module built from 5.02axhnd + public kernel 4.1.52 patch, is that the module can load successfully (through insmod) but seemingly a basic function call in the module crashes the kernel. Are you suggesting I should build directly from 5.02axhnd.657x (which is 4.1.52 but for 657x tri-core 32 bit )? I do not know how to build against aarch64 in that folder though... :(

Below is the crash log, just for reference.

May 5 13:05:11 crashlog: Call trace:
May 5 13:05:11 crashlog: [<ffffffc0003ee1f4>] register_netdevice+0x5c/0x5b0
May 5 13:05:11 crashlog: [<ffffffbffd192e3c>] wg_newlink+0x1d4/0x330 [wireguard]
May 5 13:05:11 crashlog: [<ffffffc0003fd8fc>] rtnl_newlink+0x554/0x698
May 5 13:05:11 crashlog: [<ffffffc0003fc37c>] rtnetlink_rcv_msg+0xd4/0x1f0
May 5 13:05:11 crashlog: [<ffffffc00042e40c>] netlink_rcv_skb+0xc4/0xf8
May 5 13:05:11 crashlog: [<ffffffc0003fc294>] rtnetlink_rcv+0x2c/0x40
May 5 13:05:11 crashlog: [<ffffffc00042dce8>] netlink_unicast+0x150/0x228
May 5 13:05:11 crashlog: [<ffffffc00042e1b8>] netlink_sendmsg+0x2f8/0x358
May 5 13:05:11 crashlog: [<ffffffc0003cc9c0>] sock_sendmsg+0x18/0x58
May 5 13:05:11 crashlog: [<ffffffc0003cd534>] ___sys_sendmsg+0x26c/0x280
May 5 13:05:11 crashlog: [<ffffffc0003cfdf0>] __sys_sendmsg+0x40/0x80
May 5 13:05:11 crashlog: [<ffffffc00040f410>] compat_SyS_sendmsg+0x10/0x18
May 5 13:05:11 crashlog: Code: 97ffed07 2a0003f3 37f80160 f9415680 (f9400001)
May 5 13:05:11 crashlog: ---[ end trace 33bd4168ec24fdde ]---
May 5 13:05:11 crashlog: Kernel panic - not syncing: Fatal exception
May 5 13:05:11 crashlog: CPU0: stopping
May 5 13:05:11 crashlog: CPU: 0 PID: 0 Comm: swapper/0 Tainted: P D O 4.1.52 #10
May 5 13:05:11 crashlog: Hardware name: Broadcom-v8A (DT)
 

RMerlin

Asuswrt-Merlin dev
Are you suggesting I should build directly from 5.02axhnd.657x (which is 4.1.52 but for 657x tri-core 32 bit )? I do not know how to build against aarch64 in that folder though...
Download Asus's GPL release for that specific model, then build the kernel from whichever SDK folder it should be built from (no idea what that is, I have never looked at the RT-AX86U GPL).
 

Aquarius Xiong

New Around Here
Download Asus's GPL release for that specific model, then build the kernel from whichever SDK folder it should be built from (no idea what that is, I have never looked at the RT-AX86U GPL).
Thank you so much! I downloaded from ASUS web site (choose Others...), patch the module code to kernel tree, and build rt-ax88u like a charm. And it loads and runs smooth so far.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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