Support for WAVE 300 Wi-Fi chip

#125

As of right now I am using v18.06.2 with a self compiled image from image builder. So I guess it doesn't have much debugging enabled in kernel config.

That said, I am going to build another image based on v18.06.2 from source after enabling the above options. That should provide more info on whats going on. Also I wanted to provide more logs but the post gets really big so next time I'll probably use pastebin.

As I am running v18.06.2 your patches dont work with it so I think whatever is going on, it's with driver code. I was also able to find the source of management_frame error and it was linking to Frame.c file somewhere in the driver build directory. I did so through gdb after loading symbols from mtlk.o file there.

Yeah I understand but I also tried to use progmodels from the above link. Mine have a Rev38 in them and contain A_nCB too so basically 5ghz.

I am not really sure that country flag is important at the moment becasue I think I am able to turn it on without it and I think you can use any country you want for now because we are testing so I am using US but I am not myself in the US anyway. Also I cant change txpower so it wont matter what country I use it doesnt go beyond 29 dBm anyway. As it is 5ghz I can use 36-165 channels if I use US (look here).

Yeah I understand that completely, if I was able to translate the C language to my brain I would definitely help but I dont know anything about it also I learned C++ (a bit) and C# on my own and I am terrible with shifting operators. That being said I am hoping @vittorio88 and @Mandrake-Lee can join you in development soon. They were working on the last wave300 driver and got it work somewhat so maybe they can help you with this one.

Good luck though.

Edit: I am not able to use channel 36 though I can use channel 40. even with US as country. So if you take a look at the above website in 5ghz channels list. I can use every 2nd channel (40,48,56,etc) but I am not able to use 140,149 and after that it's same as above 2nd channel thing. So I think it does depend on the country I guess (learning stuff every day I presume).

Edit2: Your theory was spot on, I think my phone only sees 5ghz wifi on some specific channles like 153,161 etc and it shows no wifi among lower channels 36,40 etc. I was able to choose different channels on wave300 and on some of them it doesnt crash if I scan from HH5A but starting from 153 the wave300 crashes. I think there's still something buggy related to channel configuration but it should be working among lower channels.

Edit3: If HH5A is on the same channel as WAVE300 then it also crashes with the following log while the router was booting up:

[   51.324052] [4294718488] mtlk0(mtlk_mbss_send_vap_activate:3152): CID-0000: Entering mtlk_mbss_send_vap_activate
[   51.334255] [4294718500] mtlk0(mtlk_mbss_send_vap_activate:3159): CID-0000: Start activation
[   51.342831] [4294718508] mtlk0(__mtlk_dump:69): dump of UMI_ACTIVATE_VAP:
[   51.345595] [4294718512] mtlk3(handle_rx_ind:1066): CID-0000: msdulen > nbuf size ->> 208 > 0
[   51.345678] CPU 0 Unable to handle kernel paging request at virtual address 00000014, epc == 80311a8c, ra == 80311b60
[   51.345687] Oops[#1]:
[   51.345704] CPU: 0 PID: 3215 Comm: luci Not tainted 4.9.152 #0
[   51.345715] task: 83ac2f00 task.stack: 82458000
[   51.345737] $ 0   : 00000000 00000001 00000001 00000001
[   51.345757] $ 4   : 00000000 00000000 00000000 000004d9
[   51.345778] $ 8   : 00000030 8020b6e0 0000000e 3038203e
[   51.345799] $12   : 303a206d 0000002b 00000000 7364756c
[   51.345820] $16   : 8272bce0 826de900 00000000 8272bd08
[   51.345842] $20   : 8052f0a0 00010000 8380dee4 8269a3e4
[   51.345862] $24   : 00000002 800de588                  
[   51.345884] $28   : 82458000 8380de68 826de900 80311b60
[   51.345889] Hi    : 003d97a2
[   51.345894] Lo    : 4b800000
[   51.345905] epc   : 80311a8c 0x80311a8c
[   51.345915] ra    : 80311b60 0x80311b60
[   51.345930] Status: 1100ff03	KERNEL EXL IE 
[   51.345937] Cause : 00800008 (ExcCode 02)
[   51.345941] BadVA : 00000014
[   51.345948] PrId  : 00019556 (MIPS 34Kc)
[   51.346209] Modules linked in: mtlk mtlkroot ath9k ath9k_common ath9k_hw ath pppoe nf_conntrack_ipv6 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY pppox ppp_async owl_loader nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_netlink ltq_deu_vr9 iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt compat fuse sch_cake nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw
[   51.346410]  sch_tbf sch_htb sch_hfsc sch_ingress drv_dsl_cpe_api ledtrig_usbport drv_mei_cpe xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables pppoatm ppp_generic slhc ifb tun ntfs br2684 atm drv_ifxos usb_storage dwc2 uhci_hcd ohci_platform ohci_hcd ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 jbd2 mbcache crc32c_generic
Process luci (pid: 3215, threadinfo=82458000, task=83ac2f00, tls=77fdddc0)
[   51.346460] Stack : 00000000 8000c4ec 0000000b ecb64f30 826de900 826de900 0000007f 00010000
[   51.346497]         826f8ff0 8052f0a0 817401bc 80311b60 8052f0a0 817401bc 8380dee4 8269a3e4
[   51.346532]         8269a010 8168ab44 8108ec94 8108ec80 7fffffff 8269a010 00000000 0000001e
[   51.346566]         00000000 00000001 806841e0 00000001 00000000 826de918 017f000d 82493510
[   51.346600]         826de900 000000d0 0c443240 8272bce0 00000000 00000003 82ddbe7c 82ddbe78
[   51.346607]         ...
[   51.346622] Call Trace:
[   51.346623] [<8000c4ec>] 0x8000c4ec
[   51.346700] [<80311b60>] 0x80311b60
[   51.346749] [<8168ab44>] 0x8168ab44 [mtlk@81600000+0x16db30]
[   51.346866] [<800335a0>] 0x800335a0
[   51.346876] [<800de588>] 0x800de588
[   51.346903] [<8007366c>] 0x8007366c
[   51.346931] [<80032b14>] 0x80032b14
[   51.347020] [<80032ef4>] 0x80032ef4
[   51.347030] [<8000307c>] 0x8000307c
[   51.347040] [<80032ef4>] 0x80032ef4
[   51.347067] [<8000a9e8>] 0x8000a9e8
[   51.347088] 
[   51.347140] Code: 1000ffe8  00000000  8e640000 <8c820014> 30430001  10600002  00000000  2444ffff  8e82000c 
[   51.347142] 
[   51.347151] ---[ end trace a6dff1cbc83035b6 ]---
[   51.361528] Kernel panic - not syncing: Fatal exception in interrupt
[   51.704678] Rebooting in 3 seconds..

I am still using the old firmware, havent flashed the new one yet.

Edit4: It's ProgModel_38_RevA files with A_nCB.

ProgModel_A_CB_38_RevA_wave300.bin
ProgModel_A_CB_wave300.bin
ProgModel_A_nCB_38_RevA.bin
ProgModel_A_nCB_38_RevA_wave300.bin
ProgModel_A_nCB_wave300.bin
#126

A little success update:

With the new repo, I am able to successfully create a wlan1 device (although not in /etc/config/wireless) and I can also assign it to LAN network with create option in LuCI by just inputting wlan1 there and hit save. After that I can get IP address if I connect to the wifi (right now I am connecting through HH5A, while WAVE300 is at channel 40). I am not sure how to set the encryption for now but it can wait.

I would also like to point out that there is some basic config options which are missing in your README file in the repo, such as how to get the supported channel list, how to get the supported country list etc. One also doesnt need to assign a static IP to the wlan interface while doing ifconfig. You can just issue ifconfig wlan1 up and it should be good to go. After that put the wlan1 in LAN network and you can use it without encryption. If you port your repo to github, I can submit a pull request with all the info and later others can join.

Anyway, great work @pc2005. I am hoping next thing should be to load it at startup through /etc/modules.d maybe and also that it gets shown as a phy device and also be available in wireless config. or is it too early for that?

Edit: I can also connect it from my phone if I set the channel to 153. I have not tested any others but I can browse internet on my phone. Cheers :smile:

Edit2: I tested with iperf3 and Router -> Phone is around 25mbps and Phone -> Router is around 100mbps and the connection speed is 150mbps. Should it not be more than 150? I mean it's 802.11an so I thought it would be at least 450mbps. On the other hand I was trying to recreate the radio1 interface in the /etc/config/wireless. I am not able to detect the WAVE300 from wifi config command. So I manually wanted to create the config myself and as I found out the pci device that the WAVE300 relates to is 00:0e.0 according to lspci.

00:0e.0 Wireless controller: Lantiq Wave300 PSB8224 [Hyperion III] (rev 01)
01:00.0 PCI bridge: Lantiq MIPS SoC PCI Express Port (rev 01)
02:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)

My current config looks like:

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'pci0000:01/0000:01:00.0/0000:02:00.0'
	option htmode 'HT20'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'sta'
	option ssid '&#x0a;'
	option encryption 'psk2'
	option key '&#x0a;2793'
	option wds '1'

The actual pci devices are here:

root@AhmarRouter:/ ls /sys/bus/pci/devices
0000:00:0e.0  0000:01:00.0  0000:02:00.0

Is there anything that can be done?

Edit3: Found something more important in the WAVE300 driver, it works only if there is kernel debugging available. @pc2005 If you want to test, you can just obtain a 18.06.2 firmware from downloads or create one yourself from image builder, just make sure it doesnt have those above debugging parameters defined and the moment you try to connect to driver it crashes, at least it crashes on channels 153 and 161 for me, did not try lower channels. Now I compiled image builder from source v18.06.2 which includes above kernel debugging and now the compiled firmware is working. I am not sure why this happens but I guess driver expects some form of debugging method to send messages to kernel log and if it doesnt, it crashes. This is one more thing to add to README file.

Edit4: Same thing happens with basically all supported channels. I am not sure why but possibly something can be changed in code to avoid this.

# I think above is the reason why I was getting this error again and again while you didnt and right now this error I am getting on v18.06.2 without kernel debugging
mtlk3(handle_rx_ind:1066): CID-0000: msdulen > nbuf size ->> 96 > 0
[  164.916451] CPU 0 Unable to handle kernel paging request at virtual address 74657388, epc == 80311a8c, ra == 80311b60
#127

Yeah it was just that only time I've got unaligned access with openwrt was with bugs in my ethernet patches. You should not be getting UA errors unless there is some serious malfunction. The kernel will automatically fix UA on MIPS architecture. In the case of ethernet driver the code was overwriting some structures, so it probably got UA inside UA handling or something ...

It may be caused with the wrong erasing of structures. If you can read C code you can check all instances of memset function if it makes sense (there will be probably some memsets left, which will have the wrong size parameter). It maybe even that some of my patches for memset were wrong.

If the country is not set it will use the default from EEPROM. Even if we are testing it doesn't mean the chip cannot interfere with outside world, that's why txpower or at least the correct country. For me the country settings seems to work before ifconfig wlan0 up and I'm doing both iw reg set and iwpriv. I will look at txpower soon.

It seems from wikipedia you can only use the last channel from 40MHz "superchannel". Anyway if you try to set a wrong channel the driver should return error (there will be matching in the driver you could probably find the code and patch it so it will show againts which values it matches). It is even possible some iwpriv variables can dump available channels.

Anyway I'm not using forced channel, I'm leaving the channel value at 0 and the driver will find free channel itself (which should be better as 5GHz wifi have these interferences with weather/army radars - it will jump to a diferent frequency if it detects it).

This driver is not ment to be in the normal use. It should be used only as a debugging tool for full kernel development. That's why I assign the static IP and controlling it in shell. I'm surprised it even worked in LuCI. You shouldn't use it without an encryption as enyone can steal your traffic. The encryption is not possible as it is done with hostapd/wpa_supplicant and it must be patched first. You can try to patch them, but I won't probably do that. It would be wasting the time for something which won't be used at all (if the driver can be written for standard cfg80211 interface, these would work out of the box).

That seems to be logical, xrx200 is always slow with tx :smiley:.

I'm not sure but ~450Mbps would be only if your phone had more than 1 spatial stream (~antenna).

The curse of non standard API.

That's most likely a race condition. The time for printing a log is long enough for threads to not collide. Thanks for confirming it.

#128

Hi @ahmar16 and @pc2005,

You're doing a great job; far beyond I've ever been I have to say.

Probably this is not a solution but it might be worth checking all the official patches that Lantiq have developped. Especially in our case the "wireless" ones, from 9721 onwards.

Patches-3.10

Good luck!

1 Like
#129

https://ufile.io/3x5so this is image for polish device Netiaspot (https://openwrt.org/toh/vtech/netiaspot), where integration between OpenWRT uci and driver works. /lib/wireless/mtlk.sh can be used.

Integration bases on patched hostapd/wpa_supplicant with small patches to iwinfo, luci and script integration.

Unfortunatelly I don't have the source code for patched hybrid of hostapd/wpa_supplicant supporting Wave300 chip - anyway now only patched hostapd is needed, since device is probably not able to work as repeater.

1 Like
How can we make the lantiq xrx200 devices faster
#130

Well the driver seems okay so far but there are still bugs because sometimes it doesnt start and complains something about not able to activate the core. I also think it could be related to the other firmware files but since we cant debug those there's nothing much to be done about this driver.

@Mandrake-Lee I am not really familiar with C language and maybe these patches can be worked out somehow but it would require someone having C language skills. I can always test them and provide any errors helpful for debugging.

Cheers everyone, this is some good work after all.

Edit: I am getting following error while trying to compile the driver with OpenWrt master branch with linux kernel v4.14.105. I have successfully compiled OpenWrt with libnl but it throws the error while running make menuconfig. It wont even save the config file. Any pointers?

checking for target kernel package... /home/ahmar/build-system/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.105
checking for target kernel compiler... configure: error: Target kernel compiler not found
make: *** [Makefile:102: .config.h] Error 1
#131

Did you change the environment variables (in the driver scripts and in shell)? I will look at it after I up port eth/irq patches for 4.14.105.

#132

There was one to change in driver files under support/ugw.env.common I think where I put the OpenWrt directory. If there's something else I don't know about that.

Also I am using those patches on v4.14.105.

#133

Dunno it works for me, maybe dash in the path does the problem? It shouldn't though. So as for generic configure, please post a complete builds/ugw5.4-vrx288/config.log.

BTW it seems the openwrt gcc warns about STAGING_DIR variable, I don't know an easy way how it can be passed to it, so just set (before running make something):

export STAGING_DIR=<openwrt path>/staging_dir

But it should be fine without it (we are building kernel module). Gonna add that into the readme.

#134

Well here is the config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by mtlk configure 3.4.99, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ../../configure --host mips-linux --build=x86_64-pc-linux-gnu --with-app-toolchain= --with-kernel= --with-kernel-cross-compile= --prefix=/home/ahmar/build-system/wave300-source/wave300/builds/ugw5.4-vrx288/binaries

## --------- ##
## Platform. ##
## --------- ##

hostname = ahmar-Inspiron-3521
uname -m = x86_64
uname -r = 4.18.0-16-generic
uname -s = Linux
uname -v = #17-Ubuntu SMP Fri Feb 8 00:06:57 UTC 2019

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2036: checking build system type
configure:2050: result: x86_64-pc-linux-gnu
configure:2070: checking host system type
configure:2083: result: mips-unknown-linux-gnu
configure:2104: checking for toolchain to use
configure:2115: result: default
configure:2123: checking for kernel to use
configure:2134: result: default
configure:2141: checking for kernel compiler prefix to use
configure:2152: result: default
configure:2161: checking for environment configuration file
configure:2163: result: ugw5.4-vrx288
configure:2166: checking for rflib
configure:2197: result: use runtime build
configure:2239: checking for toolchain strip
configure:2251: result: 
configure:2254: checking for toolchain ranlib
configure:2266: result: 
configure:2290: checking whether to build the wireless driver
configure:2293: result: yes
configure:2301: checking for supported hardware set
configure:2316: result: PCIG3 
configure:2334: checking whether to build the MTTools
configure:2340: result: no
configure:2353: checking whether to build remote logging tools
configure:2359: result: no
configure:2372: checking whether to build the DUT components
configure:2378: result: no
configure:2391: checking whether to build helper tools
configure:2397: result: no
configure:2430: checking for target kernel package
configure:2443: result: /home/ahmar/build-system/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.105
configure:2458: checking for target kernel compiler
configure:2468: error: Target kernel compiler not found

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=mips-linux
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=mips-unknown-linux-gnu

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AM_BACKSLASH=''
AM_DEFAULT_V=''
AM_DEFAULT_VERBOSITY=''
AM_V=''
APP_TOOLCHAIN_PATH='/home/ahmar/build-system/openwrt'
AT_LEAST_ONE_HW_SUPPORTED_FALSE='#'
AT_LEAST_ONE_HW_SUPPORTED_TRUE=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
BUILDER_CC=''
BUILDER_CXX=''
BUILD_DRIVER_FALSE='#'
BUILD_DRIVER_TRUE=''
BUILD_DUT_FALSE=''
BUILD_DUT_TRUE='#'
BUILD_HELPER_TOOLS_FALSE=''
BUILD_HELPER_TOOLS_TRUE='#'
BUILD_MTTOOLS_FALSE=''
BUILD_MTTOOLS_TRUE='#'
BUILD_RTLOGGER_FALSE=''
BUILD_RTLOGGER_TRUE='#'
BUILD_WIRELESS_DATA_FALSE='#'
BUILD_WIRELESS_DATA_TRUE=''
BUILD_WIRELESS_SHARED_FALSE=''
BUILD_WIRELESS_SHARED_TRUE='#'
CC='/home/ahmar/build-system/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl /home/ahmar/build-system/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/bin/mips-*linux-gcc'
CCDEPMODE=''
CFLAGS='-O2 -fno-common -fno-builtin  -I/home/ahmar/build-system/openwrt/staging_dir/target-mips_24kc_musl/usr/include/libnl3/ -I/home/ahmar/build-system/openwrt/staging_dir/target-mips_24kc_musl/usr/include/libnl3/netlink/genl/'
CONFIG_STATUS_DEPENDENCIES='/home/ahmar/build-system/wave300-source/wave300/support/ugw5.4-vrx288.env'
CPPFLAGS='-I/home/ahmar/build-system/openwrt/staging_dir/target-mips_24kc_musl/usr/include  -I/home/ahmar/build-system/openwrt/staging_dir/target-mips_24kc_musl/usr/include/libnl3/ -I/home/ahmar/build-system/openwrt/staging_dir/target-mips_24kc_musl/usr/include/libnl3/netlink/genl/'
CUSTOM_APP_ENV_INFO=''
CUSTOM_DRV_ENV_INFO=''
CXX='/home/ahmar/build-system/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl /home/ahmar/build-system/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/bin/mips-*linux-g++'
CXXDEPMODE=''
CXXFLAGS='-O2 -fno-common -fno-builtin  -I/home/ahmar/build-system/openwrt/staging_dir/target-mips_24kc_musl/usr/include/libnl3/ -I/home/ahmar/build-system/openwrt/staging_dir/target-mips_24kc_musl/usr/include/libnl3/netlink/genl/ '
CYGPATH_W=''
DEFS=''
DEPDIR=''
ECHO=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
HAVE_READLINK=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP_PROGRAM=''
LDFLAGS='-L/home/ahmar/build-system/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/ -Wl,-rpath=/home/ahmar/build-system/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/  -lnl '
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO=''
MKDIR_P=''
OBJEXT=''
PACKAGE=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='mtlk'
PACKAGE_STRING='mtlk 3.4.99'
PACKAGE_TARNAME='mtlk'
PACKAGE_URL=''
PACKAGE_VERSION='3.4.99'
PATH_SEPARATOR=':'
RANLIB=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
USE_PREBUILT_RFLIB_FALSE=''
USE_PREBUILT_RFLIB_TRUE='#'
VERSION=''
ac_ct_CC=''
ac_ct_CXX=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot=''
am__nodep=''
am__quote=''
am__tar=''
am__untar=''
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias='x86_64-pc-linux-gnu'
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='pc'
cc_pic=''
cc_shared=''
cxx_ldadd=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
env_lib_path=''
exec_prefix='NONE'
host='mips-unknown-linux-gnu'
host_alias='mips-linux'
host_cpu='mips'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh=''
kernel_arch_var=''
kernel_cflags='-mlong-calls'
kernel_cross_compile=''
kernel_dir='/home/ahmar/build-system/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.105'
ld_group_end=''
ld_group_start=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/ahmar/build-system/wave300-source/wave300/builds/ugw5.4-vrx288/binaries'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "mtlk"
#define PACKAGE_TARNAME "mtlk"
#define PACKAGE_VERSION "3.4.99"
#define PACKAGE_STRING "mtlk 3.4.99"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 1

At the moment I am not able to save the configuration by make menuconfig. After the command it loads the config but then fails trying to save it.

#135

This line is really weird. It looks like you have both gcc 7.3.0 and 7.4.0.
Anyway the configure log diverges even before the error lines. Mine:

configure:2223: checking for toolchain strip
configure:2235: result: /home/cross/openwrt7/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/bin/mips-openwrt-linux-strip
configure:2238: checking for toolchain ranlib
configure:2250: result: /home/cross/openwrt7/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/bin/mips-openwrt-linux-ranlib

If you really have two compilers in staging_dir, you need to change the support/ugw.env.common everytime you get the new one. The original shell script doesn't count with multiple compilers when it does those "*" expansions (so you don't have to change all paths manually - only the openwrt root).

#136

ghidra A software reverse engineering
https://ghidra-sre.org/