mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
busybox-initramfs: init: cleanup (/flash is actual root filesystem?)
This commit is contained in:
parent
6bd144cfdc
commit
daaef706f2
@ -315,8 +315,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_bootloader() {
|
update_bootloader() {
|
||||||
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
|
|
||||||
# /flash is filesystem with system image file
|
|
||||||
export BOOT_ROOT="/flash"
|
export BOOT_ROOT="/flash"
|
||||||
export SYSTEM_ROOT="/sysroot"
|
export SYSTEM_ROOT="/sysroot"
|
||||||
|
|
||||||
@ -329,7 +327,6 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
umount /sysroot
|
umount /sysroot
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load_modules() {
|
load_modules() {
|
||||||
@ -408,9 +405,6 @@
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
|
|
||||||
# /flash is filesystem with system image file
|
|
||||||
# use dd and mkfs.ext4 from system
|
|
||||||
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
|
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
|
||||||
echo "Creating empty file, this can take a long time..."
|
echo "Creating empty file, this can take a long time..."
|
||||||
/sysroot/bin/busybox dd if=/dev/zero of="$storage_loop_file" bs=1M count=$STORAGE_USE &>/dev/null
|
/sysroot/bin/busybox dd if=/dev/zero of="$storage_loop_file" bs=1M count=$STORAGE_USE &>/dev/null
|
||||||
@ -418,14 +412,6 @@
|
|||||||
LD_LIBRARY_PATH=/sysroot/usr/lib /sysroot/sbin/mkfs.ext4 -F -L StorageLive "$storage_loop_file" &>/dev/null
|
LD_LIBRARY_PATH=/sysroot/usr/lib /sysroot/sbin/mkfs.ext4 -F -L StorageLive "$storage_loop_file" &>/dev/null
|
||||||
/bin/busybox sync
|
/bin/busybox sync
|
||||||
umount /sysroot
|
umount /sysroot
|
||||||
else
|
|
||||||
# /flash is actual root filesystem
|
|
||||||
echo "Creating empty file, this can take a long time..."
|
|
||||||
/flash/bin/busybox dd if=/dev/zero of="$storage_loop_file" bs=1M count=$STORAGE_USE &>/dev/null
|
|
||||||
echo "Formating to EXT4 filesystem, this can take a long time..."
|
|
||||||
LD_LIBRARY_PATH=/flash/usr/lib /flash/sbin/mkfs.ext4 -F -L StorageLive "$storage_loop_file" &>/dev/null
|
|
||||||
/bin/busybox sync
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Done..."
|
echo "Done..."
|
||||||
/bin/busybox usleep 2000000
|
/bin/busybox usleep 2000000
|
||||||
@ -538,8 +524,6 @@
|
|||||||
prepare_sysroot() {
|
prepare_sysroot() {
|
||||||
progress "Preparing system"
|
progress "Preparing system"
|
||||||
|
|
||||||
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
|
|
||||||
# /flash is filesystem with system image file
|
|
||||||
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
|
||||||
@ -548,10 +532,6 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
/bin/busybox mount --move /flash /sysroot/flash
|
/bin/busybox mount --move /flash /sysroot/flash
|
||||||
else
|
|
||||||
# /flash is actual root filesystem
|
|
||||||
/bin/busybox mount --move /flash /sysroot
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$disk" ]; then
|
if [ -n "$disk" ]; then
|
||||||
/bin/busybox mount --move /storage /sysroot/storage
|
/bin/busybox mount --move /storage /sysroot/storage
|
||||||
|
Loading…
x
Reference in New Issue
Block a user