summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2019-11-22 09:15:34 -0500
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-11-24 13:37:30 +0100
commitdc453abfca0001b577a888009998233d80615788 (patch)
treebb513a7f400b90f309d26ff0e81cbd326b15e281 /scripts
parentcad6700ee9a7290c4314a0d6f2c17f52f73c1317 (diff)
downloadptxdist-dc453abfca0001b577a888009998233d80615788.tar.gz
ptxdist-dc453abfca0001b577a888009998233d80615788.tar.xz
config: boardsetup: add nfs client specifications
This patch adds additional client specifications for the nfsroot mount. The default value is the same as it was hardcoded before. This offers to change this line without maintaining the whole file in a separate BSP. The client specifications is part of the official export format which is set right after the directory which is exported, for more information lookup: https://linux.die.net/man/8/unfsd Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_nfsd.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_nfsd.sh b/scripts/lib/ptxd_make_nfsd.sh
index 0bc9c906b..f7d8136d0 100644
--- a/scripts/lib/ptxd_make_nfsd.sh
+++ b/scripts/lib/ptxd_make_nfsd.sh
@@ -8,6 +8,7 @@
ptxd_make_nfsd_exec() {
local port
+ local client_specficiations
local root="/$(basename "${ptx_nfsroot}")"
local base="$(dirname "${ptx_nfsroot}")"
@@ -15,11 +16,15 @@ ptxd_make_nfsd_exec() {
port=2049
fi
+ if ! client_specficiations="$(ptxd_get_kconfig "${PTXDIST_BOARDSETUP}" "PTXCONF_BOARDSETUP_NFSROOT_CLIENT_SPECIFICATIONS")"; then
+ client_specficiations="(rw,no_root_squash)"
+ fi
+
echo
echo "Mount rootfs with nfsroot=${root},v3,tcp,port=${port},mountport=${port}"
echo
- echo "/ (rw,no_root_squash)" > "${PTXDIST_TEMPDIR}/exports" &&
+ echo "/ ${client_specficiations}" > "${PTXDIST_TEMPDIR}/exports" &&
UNFS_BASE="${base}" unfsd -e "${PTXDIST_TEMPDIR}/exports" -n ${port} -m ${port} -p -d
}
export -f ptxd_make_nfsd_exec