linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.31k stars 1.01k forks source link

there is no ltp_tpci.ko after #973

Open randytian opened 2 years ago

randytian commented 2 years ago

I can't find the ltp_tpci.ko after I compile.

$make autotools $./configure $make

metan-ucw commented 2 years ago

There may be different reasons for this, you may be missing kernel-devel package, the module does not compile with either too old or too new kernel, etc. You have to check configure and make output.

Also these modules are maintained on best effort basis, it's not guaranteed to work in all configurations.

pevik commented 2 years ago

You have WITH_MODULES='no', also LINUX_VERSION_MAJOR='' and LINUX_VERSION_PATCH=''.

You have /lib/modules/$(uname -r)/build directory (/lib/modules/4.15.0-188-generic/build):

https://github.com/linux-test-project/ltp/blob/72887a28861809e876bcaa4cdaa6d2d9ee89be1a/m4/ltp-kernel_devel.m4#L20-L25

and you don't cross compile, thus the key is somewhere in:

https://github.com/linux-test-project/ltp/blob/72887a28861809e876bcaa4cdaa6d2d9ee89be1a/m4/ltp-kernel_devel.m4#L29-L32

randytian commented 2 years ago

You have WITH_MODULES='no', also LINUX_VERSION_MAJOR='' and LINUX_VERSION_PATCH=''.

You have /lib/modules/$(uname -r)/build directory (/lib/modules/4.15.0-188-generic/build):

https://github.com/linux-test-project/ltp/blob/72887a28861809e876bcaa4cdaa6d2d9ee89be1a/m4/ltp-kernel_devel.m4#L20-L25

and you don't cross compile, thus the key is somewhere in:

https://github.com/linux-test-project/ltp/blob/72887a28861809e876bcaa4cdaa6d2d9ee89be1a/m4/ltp-kernel_devel.m4#L29-L32

thanks a lot, .ko can be found after I set the linux-dir. I try to cross compile, but don't know which host should I set. Here is the CC and ARCH of my host.

export CROSS_COMPILE=/opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- export ARCH=arm64

pevik commented 2 years ago

thanks a lot, .ko can be found after I set the linux-dir. I try to cross compile, but don't know which host should I set. Here is the CC and ARCH of my host.

Strange, it should be detected automatically.

export CROSS_COMPILE=/opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- export ARCH=arm64

I believe (according to the CI scripts I wrote) it should be ./configure --host aarch64-linux-gnu

https://github.com/linux-test-project/ltp/blob/714f18282364012e578620420a650536c088e6f5/.github/workflows/ci.yml#L29-L30

https://github.com/linux-test-project/ltp/blob/714f18282364012e578620420a650536c088e6f5/build.sh#L100-L108

randytian commented 2 years ago

thanks a lot, .ko can be found after I set the linux-dir. I try to cross compile, but don't know which host should I set. Here is the CC and ARCH of my host.

Strange, it should be detected automatically.

export CROSS_COMPILE=/opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- export ARCH=arm64

I believe (according to the CI scripts I wrote) it should be ./configure --host aarch64-linux-gnu

https://github.com/linux-test-project/ltp/blob/714f18282364012e578620420a650536c088e6f5/.github/workflows/ci.yml#L29-L30

https://github.com/linux-test-project/ltp/blob/714f18282364012e578620420a650536c088e6f5/build.sh#L100-L108

Here is my config log, the host param is a little bit wired for 'unknown', and is there other param should I text for cross-compile? https://github.com/randytian/test/blob/0e6f62c214b7123911c8230953d6efce609b83c1/config.log

host='aarch64-unknown-linux-gnu' host_alias='aarch64-linux-gnu' host_cpu='aarch64' host_os='linux-gnu' host_vendor='unknown'