Comments (10)
I had a similar issue changing make -C $(KDIR) SUBDIRS=pwd modules
to make -C $(KDIR) M=$(shell pwd) modules
in the makefile solved it.
from riffa.
Hi,
I have never tried the make debug
target, this compilation recipe may lack maintenance.
It is probably not what you want to compile the driver, just use make
, no sudo
should be needed.
Then proceed to installation with sudo
.
Or, maybe you have not installed the Linux kernel headers package ?
from riffa.
I've just realized that the proposed fix is nearly exactly the patch I did 2 years ago for the Archlinux user package 😅
At that time I had no visibility about whether or not this change would be appropriate for other distros too.
https://aur.archlinux.org/packages/riffa-git
@Arnoud-Bleeker if you want to author a PR you would be welcome. Or I can do it in a few days.
from riffa.
Ubuntu 22.04.1
`
Compiling driver for kernel: 6.2.0-39-generic with the following values
NAME: 'riffa'
MAJNUM: '100'
VENDOR_ID0: '10EE'
VENDOR_ID1: '1172'
sed -i 's/#define MAJOR_NUM [^\n]/#define MAJOR_NUM 100/g' riffa_driver.h
sed -i 's/#define DEVICE_NAME [^\n]/#define DEVICE_NAME "riffa"/g' riffa_driver.h
sed -i 's/#define VENDOR_ID0 [^\n]/#define VENDOR_ID0 0x10EE/g' riffa_driver.h
sed -i 's/#define VENDOR_ID1 [^\n]/#define VENDOR_ID1 0x1172/g' riffa_driver.h
sed -i 's/#define DEBUG [^\n]/#define DBUG 1/g' riffa_driver.h
sed -i 's/#define DBUG [^\n]/#define DBUG 1/g' riffa_driver.h
echo "make -C /lib/modules/uname -r
/build SUBDIRS=pwd
modules"
make -C /lib/modules/6.2.0-39-generic/build SUBDIRS=/home/bartek/riffa/driver/linux modules
make -C /lib/modules/uname -r
/build M=/home/bartek/riffa/driver/linux modules
make[1]: Entering directory '/usr/src/linux-headers-6.2.0-39-generic'
CC [M] /home/bartek/riffa/driver/linux/riffa_driver.o
/home/bartek/riffa/driver/linux/riffa_driver.c: In function ‘fill_sg_buf’:
/home/bartek/riffa/driver/linux/riffa_driver.c:469:29: error: too few arguments to function ‘get_user_pages’
469 | num_pages = get_user_pages(udata, num_pages_reqd, FOLL_WRITE, pages);
| ^~~~~~~~~~~~~~
In file included from ./include/linux/scatterlist.h:8,
from ./include/linux/dmapool.h:14,
from ./include/linux/pci.h:1555,
from /home/bartek/riffa/driver/linux/riffa_driver.c:52:
./include/linux/mm.h:2129:6: note: declared here
2129 | long get_user_pages(unsigned long start, unsigned long nr_pages,
| ^~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:260: /home/bartek/riffa/driver/linux/riffa_driver.o] Error 1
make[1]: *** [Makefile:2026: /home/bartek/riffa/driver/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.2.0-39-generic'
make: *** [Makefile:102: riffa.ko] Error 2
makefile change:
echo "make -C $(KDIR) SUBDIRS=pwd
modules"
make -C
`
what can be the cause?
from riffa.
Hi, I prepared fixes some time ago to compile with linux 6.5.
Your issue with get_user_pages
seems part of what I fixed on my side.
I am not sure exactly what versions of linux introduced the changes.
master...marzoul:riffa:linux-65
from riffa.
Yea but I'm already using code from "master" branch so it already includes your fix. Idk why but it seems like #define if else doesn't detect kernel version correctly. Linux version code.... how to get that number?
bartek@bartek-MS-7D25:~/riffa/driver/linux$ uname -a
Linux bartek-MS-7D25 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
and shall I change it in version.h?
bartek@bartek-MS-7D25:~/riffa/driver/linux$ uname -r
6.2.0-39-generic
from riffa.
You are compiling for linux 6.2 so it is worth trying to lower the version "threshold" in the code of riffa_driver.c
near line 466 probably. Change this :
#elsif LINUX_VERSION_CODE < KERNEL_VERSION(6,5,0)
into this :
#elsif LINUX_VERSION_CODE < KERNEL_VERSION(6,2,0)
from riffa.
Related Issues (20)
- ERROR: [VRFC 10-1775] range must be bounded by constant expressions HOT 3
- PCIe x1 gen 2
- I want riffa 2.1 for spartan6
- Cannot compile the driver on Ubuntu-18.04 HOT 5
- riffa python example showed different data between TX and RX buffers HOT 3
- file include issue on functions.vh
- fpga_recv timeout
- Riffa simulation
- RIFFA Virtex 6 series BAR memory area read write
- PCIe Gen2.0x16 or PCIe Gen3.0x16 support HOT 1
- a big riffa bugs
- UBUNTU18.0.4 failed to compile and install HOT 2
- Ubuntu 18.04 failed to compile HOT 4
- Build succes on Win10 but the resulting driver fails
- UBUNTU20.0.4 failed to execute sudo make command HOT 3
- Executed ./testutil 0 command displaying 0 devices, but use lspci displaying Xilinx Corporation Device 7028, anybody know why? HOT 1
- A question about testutil.c
- 8+ fpgas
- AC701 Sample Code C_NUM_CHNL = 3 Channel 3 Receive 0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riffa.