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

This reverts commit 2839726b0e14d9b99fc51a12f3b175546137d6ce.
This commit is contained in:
Stephan Raue 2014-07-25 07:31:05 +02:00
parent 2839726b0e
commit ace109be29
3 changed files with 26 additions and 1 deletions

View File

@ -232,6 +232,10 @@ makeinstall_init() {
touch $INSTALL/etc/fstab
ln -sf /proc/self/mounts $INSTALL/etc/mtab
if [ -f $PROJECT_DIR/$PROJECT/initramfs/initramfs.conf ]; then
cp $PROJECT_DIR/$PROJECT/initramfs/initramfs.conf $INSTALL/etc
fi
cp $PKG_DIR/scripts/init $INSTALL
chmod 755 $INSTALL/init
}

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

View File

@ -0,0 +1,4 @@
# min size to support System to RAM
# default for RaspberryPi we set to 356MB (256MB + appr. image size (100MB) )
# to be sure we have at least 256MB free
SYSTEM_TORAM_LIMIT=364544