kbuild: builddeb: always make modules_install, to install modules.builtin*
authorJosh Triplett <josh@joshtriplett.org>
Thu, 22 Jun 2023 19:19:53 +0000 (12:19 -0700)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 26 Jun 2023 23:31:26 +0000 (08:31 +0900)
Even for a non-modular kernel, the kernel builds modules.builtin and
modules.builtin.modinfo, with information about the built-in modules.
Tools such as initramfs-tools need these files to build a working
initramfs on some systems, such as those requiring firmware.

Now that `make modules_install` works even in non-modular kernels and
installs these files, unconditionally invoke it when building a Debian
package.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/package/builddeb

index 252faaa5561cc5e755a52c77761d7508f830cb2a..f500e391015810b2ff8c676a5096ee3f7b35fc28 100755 (executable)
@@ -62,8 +62,8 @@ install_linux_image () {
                ${MAKE} -f ${srctree}/Makefile INSTALL_DTBS_PATH="${pdir}/usr/lib/linux-image-${KERNELRELEASE}" dtbs_install
        fi
 
+       ${MAKE} -f ${srctree}/Makefile INSTALL_MOD_PATH="${pdir}" modules_install
        if is_enabled CONFIG_MODULES; then
-               ${MAKE} -f ${srctree}/Makefile INSTALL_MOD_PATH="${pdir}" modules_install
                rm -f "${pdir}/lib/modules/${KERNELRELEASE}/build"
                rm -f "${pdir}/lib/modules/${KERNELRELEASE}/source"
                if [ "${SRCARCH}" = um ] ; then