Bug 11876

Summary: automount using host mount/umount
Product: buildroot Reporter: Todd Valentic <todd.valentic>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: buildroot, todd.valentic
Priority: P5    
Version: 2019.02.2   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Todd Valentic 2019-05-14 18:51:59 UTC
In buildroot, the autofs package is finding the path to the host mount/umount/fsck programs instead of the locations on the target in the autoconf stage. These paths are used by automount and therefore fail to mount when running on the target. You can see the this by looking at the autoconf output puts in config.log or include/config.h for the values of the PATH_MOUNT variables.

The autofs.mk file mentions this problem with modprobe but doesn't set the path for the other programs. The solution is to add the target paths to AUTOFS_CONF_ENV in autofs.mk:

# autofs looks on the build machine for the path of modprobe, so tell
# it explicitly where it will be located on the target.
AUTOFS_CONF_ENV = \
 	ac_cv_path_KRB5_CONFIG=no \
 	ac_cv_path_MODPROBE=/sbin/modprobe \
+	ac_cv_path_E2FSCK=/usr/sbin/fsck.ext2 \
+	ac_cv_path_E3FSCK=/usr/sbin/fsck.ext3 \
+	ac_cv_path_E4FSCK=/usr/sbin/fsck.ext4 \
+	ac_cv_path_MOUNT_NFS=/usr/sbin/mount.nfs \
+	ac_cv_path_MOUNT=/bin/mount \
+	ac_cv_path_UMOUNT=/bin/umount \
 	ac_cv_linux_procfs=yes