Building lttng-modules using buildroot for a custom kernel

40 Views Asked by At

I pulled out vanilla 6.5.0 from kernel.org and able to successfully built it for aarch64 using defconfig. For rootfs, I used buildroot and the combo boots fine for me on qemu.

Now I wanted lttng-tools and lttng-modules for this custom built kernel (outside buildroot). Since buildroot provides lttng tools and modules, I want buildroot to build them for me. But the problem is that buildroot does not allow me to select lttng-modules unless I have "Kernel" option selected, and selecting that makes buildroot to pull kernel code itself and do a build. What can I do here to achieve my goals (use my custom non-buildroot kernel, but use other lttng and rootfs files from buildroot)?

1

There are 1 best solutions below

1
Arnout On

You can only build lttng-modules when you also build a kernel with Buildroot because building modules requires access to the kernel sources.

The best solution is to build the kernel with Buildroot. You can specify where the kernel is to be downloaded from ("Kernel version" option in the menu). It doesn't have to come from kernel.org.

Alternatively, if you're adamant about building the kernel outside of Buildroot, you have to build any kernel modules outside of Buildroot as well. You're pretty much on your own in that case. The only thing that you can maybe do is to call into Buildroot with make lttng-modules-source to download the source tarball. You don't need to have the package configured to call -source on it.