-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot compile the driver on Ubuntu-18.04 #43
Comments
I updated the gcc version to 7.4.0, the previous error was gone, but the following compile error showed:(I listed the first one to minimize the message length) /home/projects/riffa/driver/linux/riffa_driver.c: In function ‘fill_sg_buf’: |
Thanks. Could you let me know how to get the code in the pull request #18 via command line? I am sort of new to git..... |
Hi @jixi2018, I think the simplest way is to switch to my small fork of Riffa that I made for that pull request. The URL is the following: |
Issue was resolved after following the changes in the pull request #18. Closing it. |
When I ran "make" under riffa/driver/linux directory, the following errors were generated:
jinwen@xbx-jixi-09:~/projects/riffa/driver/linux$ make debug
Compiling driver for kernel: 4.18.0-22-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 DEBUG 1/g' riffa_driver.h
make -C /lib/modules/
uname -r
/build SUBDIRS=pwd
modulesmake[1]: Entering directory '/usr/src/linux-headers-4.18.0-22-generic'
arch/x86/Makefile:155: CONFIG_X86_X32 enabled but no binutils support
arch/x86/Makefile:244: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-22-generic'
Makefile:94: recipe for target 'riffa.ko' failed
make: *** [riffa.ko] Error 2
Could you advise how to fix this?
The text was updated successfully, but these errors were encountered: