User Tools

Site Tools


KMP Macros


Purpose This page will eventually provide an “API Reference” for the macros used to build KMPs with the standard spec file on . Process

  1. Work through the “Current Issues below.
  2. Fill in the “KMP Macros - API Reference” section below.

Current Issues

  1. Can we agree to just call the main macro %kernel_module_package?
  2.  %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.
  3. We need an option that specifies the firmware file that gets installed in a standard location when the KMP is installed.
  4. We need an option that specifies that the modules in the KMP get added to the initrd when installed.
  5. 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.)
  6. 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.
  7. Can we invent an %install_mod macro to handle INSTALL_MOD_PATH and INSTALL_MOD_DIR?

Proposed Standard KMP Macros


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”) _kermoddir 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")}

kernel_module_package TBD

driver-backport/kmp_macros.txt · Last modified: 2016/07/19 01:19 (external edit)