There is literally a flag for it: ```sh akmodsbuild -k <kernels> -o <folder> -k, --kernels

There is literally a flag for it:

akmodsbuild -k <kernels> -o <folder>

-k,  --kernels         -- build for kernel-versions (output from 'uname
              -r')

-o, --outputdir <dir> -- save rpms and logs here (current directory)


So there is no reason to bring individual files in manually. Just telll it to build module X for kernel Y, and to put the RPMs in the output directory. Then install those RPMs with rpm-ostree. 🙂 As long as all kernels are installed in the chroot build environment I think it will work.

Also for anyone curious "why not just call
akmods
instead?", because
akmods
is just a wrapper around
akmodsbuild
which attempts to build and then INSTALL the RPMs which won't work on rpm-ostree. So do
cat "$(which akmods)" | grep akmodsbuild -C10
to read how
akmods
runs the build tool, and then install the RPMs manually with
rpm-ostree install
.
Was this page helpful?