Message ID | CAPNxggbrC7cKXYTKk=ivDL2ZT2w+5G4PACH1YT7iK-ZNk7twRQ@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 10.8.2012 23:50, Arokux B. wrote: > Dear Mr. Marek, dear all, > > I have detected a hidden failure while building the kernel. If > --with-rootprefix is set for kmod, then depmod will look for modules > installed at the location $ROOTPREFIX/lib/modules/<version>. The > kernel build system does not know anything about $ROOTPREFIX, and so > the wrong directory is created for the test if the hack is needed for > an older versin of depmod at scripts/depmod.sh:19 mkdir -p > "$tmp_dir/lib/modules/$KERNELRELEASE". That is why "$DEPMOD" -b > "$tmp_dir" $KERNELRELEASE will always fail I think we can revert the hack, because the three-digit version number will stay for foreseeable future and depmod is not the only tool that used to rely on this. However, what you describe looks like a bug in kmod's depmod. -b sets the basedir, depmod should not prepend it with any compiled-in string. Michal -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/scripts/depmod.sh b/scripts/depmod.sh index 2ae4817..87a6e42 100755 --- a/scripts/depmod.sh +++ b/scripts/depmod.sh @@ -16,16 +16,18 @@ fi # numbers, so we cheat with a symlink here depmod_hack_needed=true tmp_dir=$(mktemp -d ${TMPDIR:-/tmp}/depmod.XXXXXX) -mkdir -p "$tmp_dir/lib/modules/$KERNELRELEASE" +mkdir -p "$tmp_dir/$MOD_ROOT_PREFIX/lib/modules/$KERNELRELEASE" +"$DEPMOD" -b "$tmp_dir" $KERNELRELEASE +echo hello if "$DEPMOD" -b "$tmp_dir" $KERNELRELEASE 2>/dev/null; then - if test -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep" -o \ - -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep.bin"; then + if test -e "$tmp_dir/$MOD_ROOT_PREFIX/lib/modules/$KERNELRELEASE/modules.dep" -o \ + -e "$tmp_dir/$MOD_ROOT_PREFIX/lib/modules/$KERNELRELEASE/modules.dep.bin"; then depmod_hack_needed=false fi fi rm -rf "$tmp_dir" if $depmod_hack_needed; then