]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
make.sh: Make /tmp a ramdisk if ramdisks are enabled
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Mar 2020 13:26:03 +0000 (13:26 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 21 Mar 2020 16:02:44 +0000 (16:02 +0000)
The build system is writing a large amount of temporary file
systems that might land on disk or at least in the journal.

This change will speed up the build and remove a lot of I/O
usage.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index 3a2ffc50b6898d9840ca94e7b8ea3df5183cd7b2..01ad0e12350ab5fd8bc09b4333891704bb0cc84b 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -476,6 +476,9 @@ prepareenv() {
        if [ "${ENABLE_RAMDISK}" = "on" ]; then
                mkdir -p $BASEDIR/build/usr/src
                mount -t tmpfs tmpfs -o size=4G,nr_inodes=1M,mode=1777 $BASEDIR/build/usr/src
+
+               mkdir -p ${BASEDIR}/build/tmp
+               mount -t tmpfs tmpfs -o size=4G,nr_inodes=1M,mode=1777 ${BASEDIR}/build/tmp
        fi
 
        mkdir -p $BASEDIR/build/usr/src/{cache,config,doc,html,langs,lfs,log,src,ccache}