mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
busybox-initramfs: fix system-to-ram support, move default variables block after mounting the special filesystems
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
1231e036b3
commit
75ebfa364d
@ -22,25 +22,29 @@
|
|||||||
# http://www.gnu.org/copyleft/gpl.html
|
# http://www.gnu.org/copyleft/gpl.html
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
MODULE_DIR=/lib/modules
|
|
||||||
|
|
||||||
UPDATE_DIR=/storage/.update
|
|
||||||
UPDATE_KERNEL="KERNEL"
|
|
||||||
UPDATE_SYSTEM="SYSTEM"
|
|
||||||
IMAGE_KERNEL="KERNEL"
|
|
||||||
IMAGE_SYSTEM="SYSTEM"
|
|
||||||
|
|
||||||
REBOOT="0"
|
|
||||||
MD5_FAILED="0"
|
|
||||||
MD5_NOCHECK="0"
|
|
||||||
|
|
||||||
NBD_DEVS="0"
|
|
||||||
|
|
||||||
# mount all needed special filesystems
|
# mount all needed special filesystems
|
||||||
/bin/busybox mount -t devtmpfs none /dev
|
/bin/busybox mount -t devtmpfs none /dev
|
||||||
/bin/busybox mount -t proc none /proc
|
/bin/busybox mount -t proc none /proc
|
||||||
/bin/busybox mount -t sysfs none /sys
|
/bin/busybox mount -t sysfs none /sys
|
||||||
|
|
||||||
|
# set needed variables
|
||||||
|
MODULE_DIR=/lib/modules
|
||||||
|
|
||||||
|
UPDATE_DIR=/storage/.update
|
||||||
|
UPDATE_KERNEL="KERNEL"
|
||||||
|
UPDATE_SYSTEM="SYSTEM"
|
||||||
|
IMAGE_KERNEL="KERNEL"
|
||||||
|
IMAGE_SYSTEM="SYSTEM"
|
||||||
|
|
||||||
|
REBOOT="0"
|
||||||
|
MD5_FAILED="0"
|
||||||
|
MD5_NOCHECK="0"
|
||||||
|
|
||||||
|
NBD_DEVS="0"
|
||||||
|
|
||||||
|
INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'`
|
||||||
|
SYSTEM_TORAM_LIMIT=1024000
|
||||||
|
|
||||||
# load any configuration
|
# load any configuration
|
||||||
if [ -f "/etc/initramfs.conf" ]; then
|
if [ -f "/etc/initramfs.conf" ]; then
|
||||||
. /etc/initramfs.conf
|
. /etc/initramfs.conf
|
||||||
@ -468,9 +472,6 @@ NBD_DEVS="0"
|
|||||||
|
|
||||||
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
|
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
|
||||||
# /flash is filesystem with system image file
|
# /flash is filesystem with system image file
|
||||||
INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'`
|
|
||||||
SYSTEM_TORAM_LIMIT=1024000
|
|
||||||
|
|
||||||
if [ "$SYSTEM_TORAM" = "no" -o "$INSTALLED_MEMORY" -lt "$SYSTEM_TORAM_LIMIT" ]; then
|
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
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user