Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
TOOLCHAINVER=20181030
-ENABLE_RAMDISK="on"
-
###############################################################################
#
# Beautifying variables & presentation & input output interface
return 0
}
+# Default settings
+ENABLE_RAMDISK="auto"
+
# Load configuration file
if [ -f .config ]; then
. .config
configure_build "default"
fi
+# Automatically enable/disable ramdisk usage
+if [ "${ENABLE_RAMDISK}" = "auto" ]; then
+ # Enable only when the host system has 4GB of RAM or more
+ if [ ${SYSTEM_MEMORY} -ge 3900 ]; then
+ ENABLE_RAMDISK="on"
+ fi
+fi
+
buildtoolchain() {
local error=false
case "${BUILD_ARCH}:${HOST_ARCH}" in