2

In Ubuntu 16.04 I can do it like this:

apt-get install build-essential git
git clone https://github.com/CristianVladescu/rtl8814AU.git
cd rtl8814AU && make && make install

In FreeBSD, I tried this:

  • Install FreeBSD 10.3 with source files - OK
  • pkg install git - OK
  • git clone https://github.com/CristianVladescu/rtl8814AU.git - OK
  • cd rtl8814AU - OK
  • make - FAIL

make: "/root/rtl8814AU/Makefile" line 137: Missing dependency operator
make: "/root/rtl8814AU/Makefile" line 139: Need an operator
make: "/root/rtl8814AU/Makefile" line 141: Missing dependency operator
...
make: "/root/rtl8814AU/Makefile" line 1688: Need an operator
make: "/root/rtl8814AU/Makefile" line 1692: Need an operator
make: "/root/rtl8814AU/Makefile" line 1734: Need an operator
make: Fatal errors encountered -- cannot continue make: stopped in /root/rtl8814AU

  • pkg install gmake - OK
  • gmake - FAIL

gmake ARCH=amd64 CROSS_COMPILE= -C /lib/modules/10.3-RELEASE/build M=/root/rtl8814AU modules
gmake[1]: *** /lib/modules/10.3-RELEASE/build: No such file or directory. Stop.
gmake: *** [Makefile:1699: modules] Error 2

Now I've reached a dead end. I have no clue what to google anymore.

  • 2
    You can't expect a Linux kernel module to compile on another operating system. – Kusalananda Jul 2 '17 at 17:03
  • @Kusalananda So what compiles on Debian flavored Unix, won't compile on BSD flavored Unix? That's a bummer. – Chris Jul 2 '17 at 17:18
  • Linux is Unix very loosely speaking. – arrowd Jul 2 '17 at 17:20
  • @arrowd More to the point: Linux is not FreeBSD. – Kusalananda Jul 2 '17 at 18:02
  • 1
    @Chris It's not that "things that compiles on Debian won't compile on FreeBSD", it's the fact that the FreeBSD kernel is totally different from the Linux kernel. – Kusalananda Jul 2 '17 at 18:04
3

It appears that you are trying to compile a Linux kernel module on FreeBSD.

Although both Linux and FreeBSD are Unix-like operating systems, they employ kernels that are in many aspects totally different from each other. This means that a piece of kernel code (a kernel module, for example) that is written specifically for the Linux kernel will not compile and/or work on a FreeBSD system.

It's in situations like these that someone with knowledge of the FreeBSD kernel and its architecture, and at least a general knowledge of the Linux kernel, would possibly consider sitting down to port the driver from Linux to FreeBSD. This involves taking the essential workings of the driver and translating it into something that would fit the way that the FreeBSD kernel would do the equivalent things.

It is an undertaking that would require both time and knowledge.

As I'm not familiar with the driver, or with FreeBSD to any greater extent, I can unfortunately not say if the devices that the driver supports are or are not already supported by FreeBSD.

  • I've already checked, and unfortunately neither rtl8814, AR9271 or MT7610 is natively supported by FreeBSD – Chris Jul 2 '17 at 18:15
-2

in this repo : https://github.com/diederikdehaas/rtl8814AU

there is a command to convert to unix . 'source quote'

Converted all line endings to unix.

The command used to perform that was: find . -path ./.git -prune -o -name '*' -type f -print | xargs egrep -l $'\r'\$ | xargs perl -pi -e 's/\r\n/\n/g'

This finds all files recursively but excludes the '.git' directory. Then it checks whether it has dos line endings and if it does, converts them to unix. Without the ' | xargs perl ...' part, it'll list the files with dos line endings.

Looks like Realtek is finally learning, only a couple of files this time :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.