On 03/21/2018 02:08 PM, Shah, Jay wrote:
I'm new to clear linux and I just started working on it. I wanted to know if there
was a specific bundle that I should swupd bundle-add to get kernel headers in my image. My
kernel version is "4.14.23". I'm just looking to add/remove my own kernel
modules and I couldn't find kernel headers. I was also wondering if there was a way to
add vfio and vfio-pci modules on clear linux since I don't have it on my kernel image
presently, specifically by including a bundle? Or do I have to build my kernel image again
to include vfio at the make menuconfig step. I was also wondering if there was any other
way to pass through existing PCIe devices to the guest without using virtio or vfio.
first, search for it:
sudo swupd search vfio.ko
sudo swupd search vfio-pci.ko
You'll see these modules are available in Clear Linux. Install the
proper kernel bundle to make sure you get them. "4.14.23" isn't the
whole kernel version, at least it's missing the -suffix part which
usually is something like -kvm or -native or -pk. You should see your
kernel in the bundle search output with [installed] if you installed
correctly, too. Here's what I get:
Searching for 'vfio-pci.ko'
Bundle kernel-kvm (25 MB to install)
Bundle kernel-lts (204 MB to install)
Bundle kernel-pk (207 MB to install)
Bundle kernel-native [installed] (277 MB on system)
Aside from that:
All our kernel modules are signed, and the kernel rejects any other
modules that are not signed, so if you can't `modprobe` the mod and
`swupd search vfio.ko` doesn't list it, it's not present in Clear Linux
and you must compile the entire kernel yourself.
Fortunately there's easy ways to do this, and we publish all the sources
to do this in several places. e.g. here is our standard hardware kernel
You can either just apply the patches to the kernel and manually build
this, or use rpmbuild and make minor configurations.