Skip to content
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

CentOS kernel 5.1.14 error #6

Open
babyshen opened this issue Jul 15, 2019 · 1 comment
Open

CentOS kernel 5.1.14 error #6

babyshen opened this issue Jul 15, 2019 · 1 comment

Comments

@babyshen
Copy link
Contributor

babyshen commented Jul 15, 2019

[root@test-01 fmem]# make 
rm -f *.o *.ko *.mod.c Module.symvers Module.markers modules.order \.*.o.cmd \.*.ko.cmd \.*.o.d
rm -rf \.tmp_versions
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
make[1]: Entering directory `/usr/src/kernels/5.1.14-1.el7.elrepo.x86_64'
/usr/src/kernels/5.1.14-1.el7.elrepo.x86_64/Makefile:205: ================= WARNING ================
/usr/src/kernels/5.1.14-1.el7.elrepo.x86_64/Makefile:206: 'SUBDIRS' will be removed after Linux 5.3
/usr/src/kernels/5.1.14-1.el7.elrepo.x86_64/Makefile:207: Please use 'M=' or 'KBUILD_EXTMOD' instead
/usr/src/kernels/5.1.14-1.el7.elrepo.x86_64/Makefile:208: ==========================================
  CC [M]  /root/fmem/lkm.o
/root/fmem/lkm.c:32:27: fatal error: linux/bootmem.h: No such file or directory
 #include <linux/bootmem.h>
                           ^
compilation terminated.
make[3]: *** [/root/fmem/lkm.o] Error 1
make[2]: *** [_module_/root/fmem] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/kernels/5.1.14-1.el7.elrepo.x86_64'
make: *** [fmem] Error 2
[root@test-01 fmem]# uname -a 
Linux test-01 5.1.14-1.el7.elrepo.x86_64 #1 SMP Sat Jun 22 08:30:29 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@test-01 fmem]# cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 
@NateBrune
Copy link
Owner

It looks like redhat/CentOS defines LINUX_VERSION_CODE as some Kernel version less than 4.20, which screws up the includes. You can manually change the file, but I'm not sure how to go about detecting redhat in the header and making a change for all redhat users. Thanks for the report, I will leave this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants