I want to build a custom kernel with some modules and patches added, and 
package this as an rpm to install. I have tried adding it like building the 
kernel from the git source, but it doesnt have the modules. I think it might 
have to do with the .spec file. I added the patches to the rpm, and I modified 
the source tarball so it has the modules added. I ran
```
dnf install -y fedora-packager git curl pesign ncurses-devel libkcapi 
libkcapi-devel libkcapi-static libkcapi-tools libbpf fedpkg rpmdevtools dwarves
rpmdev-setuptree
cd ~/rpmbuild/SOURCES

koji download-build --arch=src kernel-${FEDORA_KERNEL_VERSION}
rpm -Uvh kernel-${FEDORA_KERNEL_VERSION}.src.rpm

cd /root/rpmbuild/SPECS 
dnf -y builddep kernel.spec

cp /path/to/driver /path/to/kernel source tarbal from spec/drivers/staging
tar -cJf ~/rpmbuild/SOURCES/kernel-version.tar.xz /path/to/kernel/src
rpmbuild -bb --with baseonly --without debug --without debuginfo 
--target=x86_64 kernel.spec
```
I know that I install some extra useless dependencies. When I do the same 
process to the kernel sources, but instead use make to build the vanilla kernel 
git, the modules are built. I noticed this 
https://fedoraproject.org/wiki/KernelStagingPolicy, but I dont know if it is 
related. The necessary drivers are in drivers/staging, and I added the sources 
to the spec file. Can someone please help me make this modifications into a 
kernel rpm.
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to