mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
Revert "busybox: remove SYSTEM-to-RAM support, it dont improves much"
This reverts commit 2839726b0e14d9b99fc51a12f3b175546137d6ce.
This commit is contained in:
parent
2839726b0e
commit
ace109be29
@ -232,6 +232,10 @@ makeinstall_init() {
|
|||||||
touch $INSTALL/etc/fstab
|
touch $INSTALL/etc/fstab
|
||||||
ln -sf /proc/self/mounts $INSTALL/etc/mtab
|
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
|
cp $PKG_DIR/scripts/init $INSTALL
|
||||||
chmod 755 $INSTALL/init
|
chmod 755 $INSTALL/init
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,14 @@
|
|||||||
NBD_DEVS="0"
|
NBD_DEVS="0"
|
||||||
FLASH_FREE_MIN="5"
|
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
|
# hide kernel log messages on console
|
||||||
echo '1 4 1 7' > /proc/sys/kernel/printk
|
echo '1 4 1 7' > /proc/sys/kernel/printk
|
||||||
|
|
||||||
@ -116,6 +124,9 @@
|
|||||||
nosplash)
|
nosplash)
|
||||||
SPLASH=no
|
SPLASH=no
|
||||||
;;
|
;;
|
||||||
|
noram)
|
||||||
|
SYSTEM_TORAM=no
|
||||||
|
;;
|
||||||
overlay)
|
overlay)
|
||||||
OVERLAY=yes
|
OVERLAY=yes
|
||||||
;;
|
;;
|
||||||
@ -592,7 +603,13 @@
|
|||||||
prepare_sysroot() {
|
prepare_sysroot() {
|
||||||
progress "Preparing system"
|
progress "Preparing system"
|
||||||
|
|
||||||
|
if [ "$SYSTEM_TORAM" = "no" -o "$INSTALLED_MEMORY" -lt "$SYSTEM_TORAM_LIMIT" ]; then
|
||||||
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
|
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
|
mount --move /flash /sysroot/flash
|
||||||
|
|
||||||
if [ -n "$disk" ]; then
|
if [ -n "$disk" ]; then
|
||||||
|
4
projects/RPi/initramfs/initramfs.conf
Normal file
4
projects/RPi/initramfs/initramfs.conf
Normal 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
|
Loading…
x
Reference in New Issue
Block a user