]> xenbits.xensource.com Git - people/aperard/linux.git/commitdiff
kbuild: deb-pkg: remove the CONFIG_MODULES check in buildeb
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 25 Jun 2023 18:16:23 +0000 (03:16 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 26 Jun 2023 23:31:27 +0000 (08:31 +0900)
When CONFIG_MODULES is disabled for ARCH=um, 'make (bin)deb-pkg' fails
with an error like follows:

  cp: cannot create regular file 'debian/linux-image/usr/lib/uml/modules/6.4.0-rc2+/System.map': No such file or directory

Remove the CONFIG_MODULES check completely so ${pdir}/usr/lib/uml/modules
will always be created and modules.builtin.(modinfo) will be installed
under it for ARCH=um.

Fixes: b611daae5efc ("kbuild: deb-pkg: split image and debug objects staging out into functions")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/package/builddeb

index f500e391015810b2ff8c676a5096ee3f7b35fc28..032774eb061e15598d381d6eed1055ff0f2b1245 100755 (executable)
@@ -63,17 +63,13 @@ install_linux_image () {
        fi
 
        ${MAKE} -f ${srctree}/Makefile INSTALL_MOD_PATH="${pdir}" modules_install
-       if is_enabled CONFIG_MODULES; then
-               rm -f "${pdir}/lib/modules/${KERNELRELEASE}/build"
-               rm -f "${pdir}/lib/modules/${KERNELRELEASE}/source"
-               if [ "${SRCARCH}" = um ] ; then
-                       mkdir -p "${pdir}/usr/lib/uml/modules"
-                       mv "${pdir}/lib/modules/${KERNELRELEASE}" "${pdir}/usr/lib/uml/modules/${KERNELRELEASE}"
-               fi
-       fi
+       rm -f "${pdir}/lib/modules/${KERNELRELEASE}/build"
+       rm -f "${pdir}/lib/modules/${KERNELRELEASE}/source"
 
        # Install the kernel
        if [ "${ARCH}" = um ] ; then
+               mkdir -p "${pdir}/usr/lib/uml/modules"
+               mv "${pdir}/lib/modules/${KERNELRELEASE}" "${pdir}/usr/lib/uml/modules/${KERNELRELEASE}"
                mkdir -p "${pdir}/usr/bin" "${pdir}/usr/share/doc/${pname}"
                cp System.map "${pdir}/usr/lib/uml/modules/${KERNELRELEASE}/System.map"
                cp ${KCONFIG_CONFIG} "${pdir}/usr/share/doc/${pname}/config"