Fix calling of depmod
authorPeter Hjalmarsson <xake@rymdraket.net>
Mon, 15 Oct 2012 20:00:04 +0000 (22:00 +0200)
committerPeter Hjalmarsson <xake@rymdraket.net>
Mon, 15 Oct 2012 20:13:53 +0000 (22:13 +0200)
"depmod -e" needs either -F System.map or -E Module.symvers
"depmod -b" resolvs an empty argument to PWD, so only use -b if
INSTALL_MOD_PATH is actually set

gen_compile.sh

index 71f5a68d48f10c463a1f0f36b38a3cc3fa074b67..ccc8b8d58e7d04a1de2b3cbf813a66459fe5883d 100755 (executable)
@@ -302,7 +302,12 @@ compile_modules() {
        [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH
        MAKEOPTS="${MAKEOPTS} -j1" compile_generic "modules_install" kernel
        print_info 1 "        >> Generating module dependency data..."
-       depmod -a -e -b "${INSTALL_MOD_PATH}"/lib/modules/$KV ${KV}
+       if [ "${INSTALL_MOD_PATH}" != '' ]
+       then
+               depmod -a -e -F "${KERNEL_OUTPUTDIR}"/System.map -b "${INSTALL_MOD_PATH}" ${KV}
+       else
+               depmod -a -e -F "${KERNEL_OUTPUTDIR}"/System.map ${KV}
+       fi
        unset UNAME_MACHINE
 }