blackadder1000 wrote:I could use some help correctly compiling the WAVE300 driver. I'm using vitto_fixes branch. With the default options set in make menuconfig and "ugw5.1-vrx288" selected I get the following error:
mv -f .deps/logmacro_database.Tpo .deps/logmacro_database.Po
/home/benjamin/Downloads/router/test/driver/support/mtlkfront.sh /home/benjamin/Downloads/router/openwrt/staging_dir/toolchain-mips_34kc+dsp_gcc-5.3.0_musl-1.1.16/bin/mips-openwrt-linux-gcc -Wall -Wno-multichar -fno-strict-aliasing -Werror -isystem=/home/benjamin/Downloads/router/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.16/linux-lantiq_xrx200/linux-4.4.14/include -D_GNU_SOURCE -O2 -fno-common -fno-builtin -mtune=24kec -L/home/benjamin/Downloads/router/openwrt/staging_dir/toolchain-mips_34kc+dsp_gcc-5.3.0_musl-1.1.16/usr/lib/ -o drvhlpr arphelper.o drvhlpr.o irbponger.o asel.o ledsctrl.o wpsctrl.o app_info.o logmacro_database.o ./../shared/libmttools.a ../../../tools/shared/3rd_party/iniparser/libiniparser.a -Wl,--start-group ../../../wireless/shared/libmtlkwls.a ../../../tools/shared/linux/libmtlkc.a -Wl,--end-group -lpthread -lrt -lm -lnl
/home/benjamin/Downloads/router/openwrt/staging_dir/toolchain-mips_34kc+dsp_gcc-5.3.0_musl-1.1.16/lib/gcc/mips-openwrt-linux-musl/5.3.0/../../../../mips-openwrt-linux-musl/bin/ld: cannot find -lnl
collect2: error: ld returned 1 exit status
Makefile:416: recipe for target 'drvhlpr' failed
You have to make sure you are linking against libnl or libnl-tiny (one or the other) that you have downloaded previously in your LEDE or OpenWRT build root. I have explained how to install it in the README in the vitto-fixes branch. Then I added the following to ugw.env.common:
LDFLAGS="-L${STAGING_DIR}/target-mips_24kc_musl-1.1.16/usr/lib/"
blackadder1000 wrote:If I disable MTTools I get:
make[4]: Entering directory '/home/benjamin/Downloads/router/test/driver/builds/ugw5.1-vrx288/tools/rtlogger/prebuilt'
make[4]: *** No rule to make target 'logconv.exe', needed by 'all-am'. Stop.
I removed logconv.exe, mtlklog.dll, and nc.exe from the Makefile.in and Makefile.am of rtlogger for it to build.
After this, it builds successfully, but it may be incomplete or broken.
blackadder1000 wrote:If I disable RT Logger as well I get:
LP /home/benjamin/Downloads/router/test/driver/wireless/driver/linux/mtlk_df_priv.h
/home/benjamin/Downloads/router/test/driver/wireless/driver/linux/mtlk_df_user.c: In function 'mtlk_df_ui_reg_aocs_proc_cl':
/home/benjamin/Downloads/router/test/driver/wireless/driver/linux/mtlk_df_user.c:4705:76: error: passing argument 4 of 'mtlk_df_proc_node_add_wo_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
"aocs_cl", df_user->slow_ctx->proc_df_debug_node, df_user->df, mtlk_df_ui_aocs_proc_cl_fop);
^
In file included from /home/benjamin/Downloads/router/test/driver/wireless/driver/linux/mtlk_df_user_priv.h:15:0,
from /home/benjamin/Downloads/router/test/driver/wireless/driver/linux/mtlk_df_user.c:13:
/home/benjamin/Downloads/router/test/driver/wireless/driver/shared/mtlk_df.h:485:1: note: expected 'mtlk_df_proc_entry_write_f {aka int (*)(struct file *, const char *, unsigned int, long long int *)}' but argument is of type 'int (*)(struct file *, const char *, long unsigned int, void *)'
mtlk_df_proc_node_add_wo_entry(char *name,
^
cc1: all warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/benjamin/Downloads/router/test/driver/builds/ugw5.1-vrx288/wireless/driver/linux/wireless/driver/linux/mtlk_df_user.o' failed
make[6]: *** [/home/benjamin/Downloads/router/test/driver/builds/ugw5.1-vrx288/wireless/driver/linux/wireless/driver/linux/mtlk_df_user.o] Error 1
Makefile:1385: recipe for target '_module_/home/benjamin/Downloads/router/test/driver/builds/ugw5.1-vrx288/wireless/driver/linux' failed
make[5]: *** [_module_/home/benjamin/Downloads/router/test/driver/builds/ugw5.1-vrx288/wireless/driver/linux] Error 2
make[5]: Leaving directory '/home/benjamin/Downloads/router/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.16/linux-lantiq_xrx200/linux-4.4.14'
Makefile:543: recipe for target 'mtlk.ko' failed
This has to do with the up-porting of Proc FS on the driver that both Mandrake and I have implemented differently. The branch vitto-fixes contains Mandrakes version, which I was not able to compile with debug enabled.
You can try my experimental branch: fix_build_x86_64
blackadder1000 wrote:With all options disabled (i.e. Lantiq RF MGMT, hostapd 0.6 and General debug extensions), leaving only WLan driver for Linux and Gen3 PCI I get both mtlkroot and mtlk fully built in one step (no need to make from /driver/builds/ugw5.1-vrx288/wireless/driver/linux).
However, once I insert them into the hardware I get a segmentation fault on mtlk.ko:
https://pastebin.com/vVG3dAkM
What make menuconfig options are you using to build the driver? Have I taken a wrong step somewhere?
Thanks
With my experimental branch and the modifications from this post, pretty much all menuconfig options compile on my box.
You have gotten farther than I have, because I do not get any output when I insmod the driver built from any branch. I do not know where my issue is, but Mandrake suggested it may be because I am working through SSH instead of serial console.
The segfault you showed me indicates that the driver DOES print something, but is having a hard-time initializing the WiFi chip at the hardware level. This is great progress.
It seems to get stuck on:
[0000838180] mtlk3(_mtlk_mmb_wait_chi_magic:2099): Wait for CHI Magic failed (wait_res=1 value=0x00002350)
whatever that is....
Thanks for trying, I will try to be more active here as I am now back from vacation.