I'm working on getting OpenWRT to support a chinese device (COMFAST) and the chipset is a MT7628. I am working on the master (development) branch of OpenWRT (mostlly because it has support for the flash chip on the device without me having to hack it in). GIT was updated today, and this isn't the first time I've had this issue.
I've enabled the MT7603 kernel driver, and I get the following compile error:
6734/mt76x02-lib.o
CC [M] /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt76x02_usb_mcu.o
CC [M] /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt76x02_usb_core.o
LD [M] /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt76x02-usb.o
CC [M] /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/usb.o
CC [M] /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/usb_trace.o
LD [M] /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt76-usb.o
CC [M] /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt7603/pci.o
<command-line>:0:37: error: redeclaration of enumerator 'IEEE80211_HW_REPORTS_TX_ACK_STATUS'
<command-line>:0:37: note: in definition of macro 'IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN'
In file included from /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt7603/../mt76.h:27:0,
from /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt7603/mt7603.h:8,
from /home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt7603/pci.c:7:
/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/staging_dir/target-mipsel_24kc_musl/usr/include/mac80211/net/mac80211.h:2167:2: note: previous definition of 'IEEE80211_HW_REPORTS_TX_ACK_STATUS' was here
IEEE80211_HW_REPORTS_TX_ACK_STATUS,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/Makefile.build:326: recipe for target '/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt7603/pci.o' failed
make[6]: *** [/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt7603/pci.o] Error 1
scripts/Makefile.build:585: recipe for target '/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt7603' failed
make[5]: *** [/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/mt7603] Error 2
Makefile:1533: recipe for target '_module_/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734' failed
make[4]: *** [_module_/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734] Error 2
make[4]: Leaving directory '/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-4.14.113'
Makefile:236: recipe for target '/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/.built' failed
make[3]: *** [/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt76-2019-03-27-a11b6734/.built] Error 2
make[3]: Leaving directory '/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/package/kernel/mt76'
time: package/kernel/mt76/compile#9.57#1.39#10.63
package/Makefile:107: recipe for target 'package/kernel/mt76/compile' failed
make[2]: *** [package/kernel/mt76/compile] Error 2
make[2]: Leaving directory '/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt'
package/Makefile:103: recipe for target '/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile' failed
make[1]: *** [/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt'
/home/mbuckaway/src/kidswifi/openwrt-imagebuilder/builds/cf-wr754ac/openwrt/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2
If would appear that the driver is re-defining a define already in the WIFI code.
The quick fix is to disable the MT7603 driver, and everything builds.
What's the process of submitting a "bug" report? Or is there a patch already? I have a work-around, but the issue should be corrected. If this is in a FAQ somewhere, pls point me to it.
Yes, I've done all that several times. Ignoring errors might work around the problem, but that does not mean the mt7603 driver module compiles...it just ignores the errors in the build. What I am looking to do is get it fixed and/or report the issue to the maintainer (assuming I don't manage to fix it myself).
ok, your OP was a tad ambiguous..... if you've used git branch... the source works, then stops working.... to my understanding, we are missing a step in your chain here....
I read your initial post to mean that your "buildroot" source is working then breaks.... when updates occur...
It seems that "GIT was updated today" needs to be elaborated on.
Also confirm that this error occurs when using the buildroot with supported target in unmodified form.
This is not really a bug. One of the patches seems to have caused the issue. However, I can't be the only one. It's a simple redefinition of a define....
I read your initial post to mean that your "buildroot" source is working then breaks.... when updates occur...
I can do a make distclean or a few checkout, and the same issue happens.
It seems that "GIT was updated today" needs to be elaborated on.
I did a 'get pull" yesterday to get the latest code, ran feeds update -a, feeds update -u, etc.
Also confirm that this error occurs when using the buildroot with supported target in unmodified form.
I've made no modifications. The issue happens if and only if I enable the MT7603 driver.
"this isn't the first time I've had this issue"
Back to 1. If I disable the MT7603 driver, the build will work and compile cleanly. I've used disabled the mt7603 driver to be able to test the build on the device. However, it now appears I actually need that driver.
COMFAST WR754AC. It's not currently supported, but uses a MT7628 SOC and a MT7612 chip on the PCI bus. It is running OpenWRT 15. For our project, I'm using OpenWRT 18.
I've added a subtarget to mt76x8.mk and create a DTS (based on what COMFAST sent me - I'm working with them).
The only changes to the source tree is the two files. The rest is stock from the master branch.
Currently, the image I've generated flashes and boots....however, I'm missing a driver for the WIFI part of the MT7628. Thus, I'm attempting to include the entire MT76 driver package....and the MT7603 driver will not build.
Hey @klazarev, I was having troubles with the stock firmware, so I decided to install the OpenWRT build that was design for Wavlink wl-wn575a3 (It has the same components). ¡It worked! After a mild heart attack (thought device was bricked) it worked like a charm.
If you want to discuss adding OpenWrt support for CF-WR754AC, please open a new topic "Adding OpenWrt support for CF-WR754AC" in the developers section of the forum.