Your GCC does not support the regular stack protection. This is not good.
This error is confusing me a little. With -mabi you give machine dependent options to the compiler. The option value “apcs-gnu” tells me that you are not using any toolchain for cross compiling.
Some posts before, i told you that cross compiling requires a toolchain because you build it for an different architecture and therefore it s an requirement.
Before you start any further tries to get the driver working i recommend to do the following steps first:
Do an release upgrade from Ubuntu 14.04 to minimum 16.04.
Install the required toolchain via apt-get install.
Add the toolchain bin directory to your PATH variable
Then compile the required tools depmod etc. with the toolchain.
Now you can compile the driver.
If problems occurs then post your questions and i am going to help you.
You compare apples with bananas. The result will never equals. You compare an PCI hardware driver with with a network protocol driver.
You see the difference?
You should not copy the files to your kernel directory. It compiles, yes. But successfull compilation does not mean that it works. A PCI chipset btw PCI bus driver needs no wireless driver to work. But without the PCI driver you are not able to communicate with the wireless device through the PCI bus.
You see the difference between the drivers?
The PCI driver is required for PCI bus.
The wireless driver is required to speak with the wireless device.
You mean wireless driver is missing in that mt76x2-old repo and i have only the pci-part?
How to do it the right way? I’found nothing a step-by-step guide howto port a driver using backports/compat-wireless
Currently i try different thing with simple c/cpp knowledge but without knowing anything about driver structure or backporting. Simple try anything and try to fix the compiler-errors
Just for a clean start…all 3 parts in separate folders or mt76 inside backports? maybe my previous sources from lede are not compatible with “normal” kernel (lede-specific patches)
This is the PCI Driver not the wireless driver. The wireless chipset is an MT6625L. This driver is the PCI Bridge driver.
All communications with the wireless Chipset, with the SATA Connectors, the IR device … is done through the PCI bridge. The wireless driver communicates only with the wireless MT6625L Chip, e.g. loading binary firmware, channel selection, frequency …
The wireless chip is the city cologn, the cpu is berlin, the pci bridge is the highway cross würzburg. Without the the highway bridge würzburg, it is not possible that berlin (the cpu) communicates with cologn (wirless chip) but berlin can communicate with frankfurt the ethernet.
/media/data_ext/download/bpi-r2/compat-wireless-2017-01-31$ make M=/media/data_ext/download/bpi-r2/linux-mt/
multiple files coming with warning
./arch/arm/include/asm/swab.h:20:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
at the end:
include/linux/preempt.h:59:25: fatal error: asm/preempt.h: Datei oder Verzeichnis nicht gefunden
#include <asm/preempt.h>
^
compilation terminated.
that Variable/Const is defined in linux-mt/arch/arm/Makefile, but seems not be used
# This selects which instruction set is used.
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
# testing for a specific architecture or later rather impossible.
arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m
arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
arch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
# Only override the compiler option if ARMv6. The ARMv6K extensions are
# always available in ARMv7
ifeq ($(CONFIG_CPU_32v6),y)
arch-$(CONFIG_CPU_32v6K) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k)
endif
arch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t)
arch-$(CONFIG_CPU_32v4T) =-D__LINUX_ARM_ARCH__=4 -march=armv4t
arch-$(CONFIG_CPU_32v4) =-D__LINUX_ARM_ARCH__=4 -march=armv4
arch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3
Supposing you’ll be able to build this ( I was able to build backports-4.14-rc4 ) you’ll lose internal wifi driver as you cannot use both internal and backported mac80211 driver at the same time (also: mac80211 must be disabled or module)
Hi Frank,
could you please test the following driver? It builds fine with the R2 kernel but I have not yet received the MT7612 I ordered so I cannot test it. https://github.com/dfiloni/mt76
@garywang can you please add the mt76-driver to your github, too?
add contents of mt76-github
apply patch
patch for build.sh (same as github-issue), Makefile and Kconfig
patch_fwu.diff (1,8 KB)
maybe adding contents of drivers/net/wireless/mediatek/mt76/firmware to BPI_ROOT/lib/firmware if CONFIG_MT76 is set, when packing
also hostapd seems to work fine with mt76-driver…see ssid with hand and can connect (waiting for ip because i have no IP of wlan1 set and no dnsmasq running)
had dnsmasq + local IP working, got an IP from dnsmasq and can ping the IP from R2
seems to work so far…also without antennas
have you found a technical sheet for the card? i have 2 antenna connectors and want to know which is for 2.4G and which is for 5G
found a datasheet here, but its chip-only, not for the board: http://ftp.mqmaker.com/WiTi/Docs/Hardware/MT7612E_Data_Sheet.pdf
if i read it right, then both connectors can be used for G/A (Page 6, WF0/WF1), on the board one connector is labeled “main”, the other “aux”