Closed moolight-seashell closed 5 years ago
I got it to compile on Fedora Workstation 29 kernal 5.0.11-200.fc29.x86_64 with the following updates:
---- begin ---- diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index e7e8930..646bd99 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -688,7 +688,7 @@ static u64 rtw_get_systime_us(void) {
struct timespec ts;
get_monotonic_boottime(&ts);
getboottime(&ts); return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
struct timeval tv; diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 21497ee..667af0e 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1425,7 +1425,7 @@ static const struct net_device_ops rtw_netdev_ops = { .ndo_open = netdev_open, .ndo_stop = netdev_close, .ndo_start_xmit = rtw_xmit_entry, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)) +#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .ndo_select_queue = rtw_select_queue,
.ndo_set_mac_address = rtw_net_set_mac_address, diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c index b8b4377..89ce9e3 100644 --- a/os_dep/linux/rtw_android.c +++ b/os_dep/linux/rtw_android.c @@ -657,7 +657,7 @@ int rtw_android_priv_cmd(struct net_device net, struct ifreq ifr, int cmd) goto exit; }
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
if (!access_ok(priv_cmd.total_len, priv_cmd.buf)) { RTW_INFO("%s: failed to access memory\n", FUNCTION); ret = -EFAULT; goto exit; ----- end -----
YMMV
kern5.0.patch.txt Small changes to compile against kernel 4.18+ and 5.0+.
I'm sorry bu what i supposed to do with this file
It is a git patch. You can just apply it. Or I can pull your repo, make the changes and do a pull request. git apply kern5.0.patch.txt git diff # review changes git commit -m "Applied patch from James DrabbAstroDrabb@gmail.com to compile against 5.0.x kernels"
ok thanks it works on ubuntu on kubuntu i have :
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.0.0-15-generic/build M=/home/jean-raphael/Bureau/backup/Documents/network/driver for ubuntu/rtl88x2bu-driver-master modules
make[1] : on entre dans le répertoire « /usr/src/linux-headers-5.0.0-15-generic »
arch/x86/Makefile:146: CONFIG_X86_X32 enabled but no binutils support
make[1]: *** Aucune règle pour fabriquer la cible « for ». Arrêt.
make[1] : on quitte le répertoire « /usr/src/linux-headers-5.0.0-15-generic »
make: *** [Makefile:1986: modules] Error 2
I've never used Knoppix. It looks like x32 abi is configured but the toolchain doesn't support it. What is the output of these commands: zgrep CONFIG_X86_64 /proc/config.gz zgrep CONFIG_X86_X32 /proc/config.gz echo $CFLAGS; echo $CC
Also the output of: uname -a
Get rid of the spaces in the path: /home/jean-raphael/Bureau/backup/Documents/network/driver for ubuntu/ Change to: /home/jean-raphael/Bureau/backup/Documents/network/driver_for_ubuntu/ Spaces are bad!
thanks this works
but not on 5.0.0.16
uname -a
Linux saphira 5.0.0-16-generic #17-Ubuntu SMP Wed May 15 10:52:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
installation as root :
« /usr/src/linux-headers-5.0.0-16-generic »
insmod: ERROR: could not insert module 88x2bu.ko: Operation not permitted
What do you get from: sudo modprobe --verbose 88x2bu
Are you booted in to the new kernel?
ok it's my fault i have recently upgrade my bios and the secure boot was active
sorry i am a beginer in drivers, the is a way to use dkms?
ubuntu 19.4