mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: tmpfs: use size=99% for all tmpfs's; (rootfs/WORKDIR/chroot); thanks Igor for suggestion
This commit is contained in:
@@ -8,9 +8,11 @@ mount_chroot() {
|
||||
target="$(realpath "$1")" # normalize, remove last slash if dir
|
||||
display_alert "mount_chroot" "$target" "debug"
|
||||
mkdir -p "${target}/run/user/0"
|
||||
mount -t tmpfs tmpfs "${target}/tmp"
|
||||
mount -t tmpfs tmpfs "${target}/var/tmp"
|
||||
mount -t tmpfs tmpfs "${target}/run/user/0"
|
||||
|
||||
# tmpfs size=50% is the Linux default, but we need more.
|
||||
mount -t tmpfs -o "size=99%" tmpfs "${target}/tmp"
|
||||
mount -t tmpfs -o "size=99%" tmpfs "${target}/var/tmp"
|
||||
mount -t tmpfs -o "size=99%" tmpfs "${target}/run/user/0"
|
||||
mount -t proc chproc "${target}"/proc
|
||||
mount -t sysfs chsys "${target}"/sys
|
||||
mount -t devtmpfs chdev "${target}"/dev || mount --bind /dev "${target}"/dev
|
||||
|
||||
@@ -33,7 +33,7 @@ function prepare_tmpfs_for() {
|
||||
else
|
||||
display_alert "prepare_tmpfs_for: on Linux and root, MOUNTING TMPFS" "${tmpfs_name}" "cleanup"
|
||||
# mount tmpfs on it
|
||||
mount -t tmpfs tmpfs "${tmpfs_path}"
|
||||
mount -t tmpfs -o "size=99%" tmpfs "${tmpfs_path}" # size=50% is the Linux default, but we need more.
|
||||
cleanup_params+=("umount_tmpfs")
|
||||
|
||||
#cleanup_params+=("no_umount_tmpfs")
|
||||
|
||||
@@ -41,7 +41,7 @@ function prepare_rootfs_build_params_and_trap() {
|
||||
|
||||
if [[ $use_tmpfs == yes ]]; then
|
||||
declare -g -r ROOTFS_IS_UNDER_TMPFS=yes
|
||||
mount -t tmpfs tmpfs "${SDCARD}" # do not specify size; we've calculated above that it should fit, and Linux will try its best if it doesn't.
|
||||
mount -t tmpfs -o "size=99%" tmpfs "${SDCARD}" # size=50% is the Linux default, but we need more.
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user