Contents |
This page will eventually provide an "API Reference" for the macros used to build KMPs with the standard spec file on https://www.linux-foundation.org/en/Sample_KMP_spec_file .
- Work through the "Current Issues below.
- Fill in the "KMP Macros - API Reference" section below.
- Can we agree to just call the main macro %kernel_module_package?
- %kernel_module_package macro needs to include an option to the macro that specifies the pciid that gets installed in a standard location when the KMP is installed.
- We need an option that specifies the firmware file that gets installed in a standard location when the KMP is installed.
- We need an option that specifies that the modules in the KMP get added to the initrd when installed.
- Can we pull the explicit %package KMP stuff (in the SUSE spec file) into %suse_kernel_module_subpackage? Or can we just remove it from the spec file? (Removing it would eliminate the ability for SUSE subpackages to have a different summary and description from the main package.)
- Can we invent %make_build and %make_install macros that take flavor as an argument? That will hide the details of the make command behind the macros.
- Can we invent an %install_mod macro to handle INSTALL_MOD_PATH and INSTALL_MOD_DIR?
kernel_module_package_buildreqs
Should evaluate to: Everything needed for "BuildRequires".
SUSE needs to change kernel_module_package_buildreq to kernel_module_package_buildreqs and update "build" so that it can handle this macro.
kernel_source() - Already Works on SUSE and Red Hat
Should evaluate to: Directory containing top-level kernel Makefile (used in "make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor")
Should evaluate to: Directory for installed modules. I.e., SUSE would evaluate to "updates", Red Hat would evaluate to "updates/%name".
Suggested macro for SUSE to add to /usr/lib/rpm/macros:
%_kermoddir(n:) %{expand:%(echo "updates")}
Suggested macro for Red Hat to add to /usr/lib/rpm/redhat/macros:
%_kermoddir(n:) %{expand:%( \
EXTRADIR=%{-n*} \
echo "updates/$EXTRADIR")}
TBD
- Home
- About Us
- News & Media
- Programs
- Collaborative Projects
- Workgroups
- Publications
- Events
- Training



