Closed Jiaming97 closed 8 months ago
Hi @Jiaming97 , are you using LISA from PyPI or installed from the git repo ? We had a large number of changes since the last PyPI release, so you should try that first.
Then if you still have issues, we will need the logging at debug level to see the output of the build command (LISA is using the logging
module from the std lib, if you use lisa.utils.setup_logging()
you can pass level=logging.DEBUG
to get that).
Also if it was working for you before and has broken on very recent kernels, you might be affected by what this PR is fixing (type change of util_est
member of some structs):
https://github.com/ARM-software/lisa/pull/2161
EDIT: looking again at your error it's pretty unlikely, I'll need the debug log to know what's happening
I can see a discrepancy between the config:
src: /home/jiaguo01/workzone/TC2/buildroot/output/buildroot/tmp_build/linux
and the error:
Makefile:2: /workzone/jiaguo01/TC2/buildroot/src/linux/Makefile: No such file or directory
Are you using symlinks anywhere ? When using the alpine build env, LISA creates a separate mount namespace (to mount an overlayfs without actually being root) and enters a chroot. The only thing available inside that chroot is the path that was specified as src
in the conf (using a bind mount). If that folder contains symlinks pointing outside of it, things will break as the symlink targets will not be valid inside that chroot.
If that is a symlink issue, I can't think of an easy fix beyond removing symlinks, or just not using Alpine build env.
Hi @douglas-raillard-arm ,
Thank you for your help. The issue may not be the symlink. I think the problem may be the configurations in target_conf.yml
.
Since it is the kernel module building, I thought the prebuilt kernel should be provided in the kernel/src/
. So I use the following configuration.
kernel:
src: /home/jiaguo01/workzone/TC2/buildroot/output/buildroot/tmp_build/linux
The path is the output of building the linux kernel, which contains the configuration and header files used in the build. It failed. It seems that when I change this to the source code. It can build successfully.
Yes, kernel/src
needs to point at the source tree: https://lisa-linux-integrated-system-analysis.readthedocs.io/en/latest/target.html#lisa.target.TargetConf
As a side note, you can probably drop this from your conf btw:
make-variables:
CC: clang
LLVM: -16
The current code will detect it needs clang and the version from the live target (/proc/config.gz). In alpine build env it will find the package for clang-16 on its own, if you use host env you will need to have clang-16 available. Otherwise it will fallback to the closest version it finds, with a priority to higher versions.
Closing as the issue seems resolved
Describe the bug I met with the bug when I tried to build kmodules using alpine.
To Reproduce The version of the LISA is v3.1.0.
I have followed the LISA guide to create the
target_conf.yml
. Enabling a module Here is mytarget_conf.yml
. The environment of the target is buildroot.When I tried to build and load the kmodules. The error log is as follows.
I have checked the path, the file
/workzone/jiaguo01/TC2/buildroot/src/linux/Makefile
exists.Acutally, when I tried to build without the following settings in the
target_conf.yml
. The modules can be built successfully.So, I think the problem may due to the alpine. Could you please check with it? Thanks!