You would have to change the correct config options. make menuconfig used to bring up the interface for that and then you need to figure out which corner of the menu your modules are hiding. the rpmbuild is going to be very hardwired to make it harder to do what you are wanting to do. When doing kernels I typically do not build into an RPM and see no point in starting with the fedora kernel source (I started with a stable released kernel.org and apply the extra patches). Once you have the install tree compiled bringing down a patch and recompiling is typically much faster. and once compiled "make install" will do the steps to add the kernel to grub. The only complication is that you will have to manually clean up the kernel, initramfs, /lib/modules/kernelversion yourself when you are doing with it. On Thu, Sep 1, 2022 at 8:42 PM Sharpened Blade via users <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > > 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@xxxxxxxxxxxxxxxxxxxxxxx > To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx > 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@xxxxxxxxxxxxxxxxxxxxxxx > Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue