euspectre/kedr

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

Closed this issue · 2 comments

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

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

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.