euspectre / kedr

Main repository of KEDR project
118 stars 46 forks source link

Cross compiling for Kernel 3.13.0-24-generic is not working #39

Closed jinay1991 closed 8 years ago

jinay1991 commented 8 years ago

I am trying to compile kedr for 3.13.0-24-generic by the method described in documentation https://github.com/euspectre/kedr/wiki/HowTo_Another_Kernel But seems if I provide TOOLCHAIN FILE that give me error from Cmake that it can not find kmalloc. This error comes even if I provide CMAKE_SYSTEM_VERSION=(uname -r) which in my case is 3.13.0-88-generic

If I remove TOOLCHAIN_FILE flag and just provide CMAKE_SYSTEM_VERSION= cmake is not throwing any errors now for the 3.13.0-88-generic but as soon I change this to 3.13.0-24-generic, this fails.

-- Found Kbuild: /lib/modules/3.13.0-24-generic/build (Required is at least version "3.2.0") -- Checking if kernel modules can be built on this system CMake Error at <root/to/my/project_dir>jinay.patel_kedr/build/ext/KEDR_build-prefix/src/KEDR_build/cmake/modules/FindKbuild.cmake:38 (message): Kernel version has unexpected format: Call Stack (most recent call first): CMakeLists.txt:7 (find_package) CMake Error: Internal CMake error, TryCompile configure of cmake failed

Cross Compile for different Kernel Versions needs to take care.

Rather than manipulating CMAKE_SYSTEM_VERSION, take new flag from user LINUX_KERNEL_BUILD_DIR=</lib/modules/3.13.0-24-generic/build> and manipulate this as required by KEDR

euspectre commented 8 years ago

These instructions seem to be obsolete for a long time now. Take a look at these ones, see if they help: https://github.com/euspectre/kedr/wiki/HowTo_multi_kernel

jinay1991 commented 8 years ago

Thanks, I guess page https://github.com/euspectre/kedr/wiki#more-info HowTos: section needs to correct link pointing to build for multikernel.

Closing this as doc https://github.com/euspectre/kedr/wiki/HowTo_multi_kernel mentions similar stuffs which was proposed.