Revert "busybox: remove SYSTEM-to-RAM support, it dont improves much"

This reverts commit 1e12d8be3f.
This commit is contained in:
Stephan Raue
2014-07-25 07:28:13 +02:00
parent 943fc1f809
commit 86944a6ea2
3 changed files with 26 additions and 1 deletions

View File

@@ -52,6 +52,14 @@
NBD_DEVS="0"
FLASH_FREE_MIN="5"
INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'`
SYSTEM_TORAM_LIMIT=1024000
# load any configuration
if [ -f "/etc/initramfs.conf" ]; then
. /etc/initramfs.conf
fi
# hide kernel log messages on console
echo '1 4 1 7' > /proc/sys/kernel/printk
@@ -116,6 +124,9 @@
nosplash)
SPLASH=no
;;
noram)
SYSTEM_TORAM=no
;;
overlay)
OVERLAY=yes
;;
@@ -592,7 +603,13 @@
prepare_sysroot() {
progress "Preparing system"
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
if [ "$SYSTEM_TORAM" = "no" -o "$INSTALLED_MEMORY" -lt "$SYSTEM_TORAM_LIMIT" ]; then
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
else
cp /flash/$IMAGE_SYSTEM /dev/$IMAGE_SYSTEM
mount_part "/dev/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
fi
mount --move /flash /sysroot/flash
if [ -n "$disk" ]; then