mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
init: fix // as IMAGE_KERNEL and IMAGE_SYSTEM should always have a leading /
This commit is contained in:
parent
20992919e1
commit
01a87ad788
@ -46,8 +46,8 @@
|
|||||||
|
|
||||||
UPDATE_KERNEL="KERNEL"
|
UPDATE_KERNEL="KERNEL"
|
||||||
UPDATE_SYSTEM="SYSTEM"
|
UPDATE_SYSTEM="SYSTEM"
|
||||||
IMAGE_KERNEL="@KERNEL_NAME@"
|
IMAGE_KERNEL="/@KERNEL_NAME@"
|
||||||
IMAGE_SYSTEM="SYSTEM"
|
IMAGE_SYSTEM="/SYSTEM"
|
||||||
|
|
||||||
BOOT_STEP="start"
|
BOOT_STEP="start"
|
||||||
MD5_FAILED="0"
|
MD5_FAILED="0"
|
||||||
@ -477,7 +477,7 @@
|
|||||||
export BOOT_ROOT="/flash"
|
export BOOT_ROOT="/flash"
|
||||||
export SYSTEM_ROOT="/sysroot"
|
export SYSTEM_ROOT="/sysroot"
|
||||||
|
|
||||||
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
|
mount_part "/flash$IMAGE_SYSTEM" "/sysroot" "ro,loop"
|
||||||
|
|
||||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/update.sh ]; then
|
if [ -f $SYSTEM_ROOT/usr/share/bootloader/update.sh ]; then
|
||||||
StartProgress spinner "Updating Bootloader... "
|
StartProgress spinner "Updating Bootloader... "
|
||||||
@ -972,7 +972,7 @@
|
|||||||
# Verify that the new upgrade is compatible with the current system - this should avoid creating
|
# Verify that the new upgrade is compatible with the current system - this should avoid creating
|
||||||
# non-booting systems after (for example) an RPi tar is incorrectly applied to an RPi2 system.
|
# non-booting systems after (for example) an RPi tar is incorrectly applied to an RPi2 system.
|
||||||
if [ ! -f "$UPDATE_ROOT/.nocompat" ]; then
|
if [ ! -f "$UPDATE_ROOT/.nocompat" ]; then
|
||||||
if ! check_is_compatible "$UPDATE_FILENAME" "/flash/$IMAGE_SYSTEM" "$UPDATE_DIR/$UPDATE_SYSTEM"; then
|
if ! check_is_compatible "$UPDATE_FILENAME" "/flash$IMAGE_SYSTEM" "$UPDATE_DIR/$UPDATE_SYSTEM"; then
|
||||||
do_cleanup
|
do_cleanup
|
||||||
StartProgress countdown "Normal startup in 60s... " 60 "NOW"
|
StartProgress countdown "Normal startup in 60s... " 60 "NOW"
|
||||||
return 0
|
return 0
|
||||||
@ -985,12 +985,12 @@
|
|||||||
|
|
||||||
# Disregard kernel size if it's a a block device, which is the case on Amlogic/WeTek devices
|
# Disregard kernel size if it's a a block device, which is the case on Amlogic/WeTek devices
|
||||||
if [ ! -b $IMAGE_KERNEL ]; then
|
if [ ! -b $IMAGE_KERNEL ]; then
|
||||||
OLD_KERNEL=$(stat -t "/flash/$IMAGE_KERNEL" | awk '{print $2}')
|
OLD_KERNEL=$(stat -t "/flash$IMAGE_KERNEL" | awk '{print $2}')
|
||||||
else
|
else
|
||||||
OLD_KERNEL="0"
|
OLD_KERNEL="0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OLD_SYSTEM=$(stat -t "/flash/$IMAGE_SYSTEM" | awk '{print $2}')
|
OLD_SYSTEM=$(stat -t "/flash$IMAGE_SYSTEM" | awk '{print $2}')
|
||||||
NEW_KERNEL=$(stat -t "$UPDATE_DIR/$UPDATE_KERNEL" | awk '{print $2}')
|
NEW_KERNEL=$(stat -t "$UPDATE_DIR/$UPDATE_KERNEL" | awk '{print $2}')
|
||||||
NEW_SYSTEM=$(stat -t "$UPDATE_DIR/$UPDATE_SYSTEM" | awk '{print $2}')
|
NEW_SYSTEM=$(stat -t "$UPDATE_DIR/$UPDATE_SYSTEM" | awk '{print $2}')
|
||||||
|
|
||||||
@ -1021,9 +1021,9 @@
|
|||||||
if [ -b $IMAGE_KERNEL ]; then
|
if [ -b $IMAGE_KERNEL ]; then
|
||||||
update_partition "Kernel" "$UPDATE_KERNEL" "$IMAGE_KERNEL"
|
update_partition "Kernel" "$UPDATE_KERNEL" "$IMAGE_KERNEL"
|
||||||
else
|
else
|
||||||
update_file "Kernel" "$UPDATE_KERNEL" "/flash/$IMAGE_KERNEL"
|
update_file "Kernel" "$UPDATE_KERNEL" "/flash$IMAGE_KERNEL"
|
||||||
fi
|
fi
|
||||||
update_file "System" "$UPDATE_SYSTEM" "/flash/$IMAGE_SYSTEM"
|
update_file "System" "$UPDATE_SYSTEM" "/flash$IMAGE_SYSTEM"
|
||||||
update_bootloader
|
update_bootloader
|
||||||
do_cleanup
|
do_cleanup
|
||||||
do_reboot
|
do_reboot
|
||||||
@ -1033,10 +1033,10 @@
|
|||||||
progress "Preparing system"
|
progress "Preparing system"
|
||||||
|
|
||||||
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
|
||||||
cp /flash/$IMAGE_SYSTEM /dev/$IMAGE_SYSTEM
|
cp /flash$IMAGE_SYSTEM /dev$IMAGE_SYSTEM
|
||||||
mount_part "/dev/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
|
mount_part "/dev$IMAGE_SYSTEM" "/sysroot" "ro,loop"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mount --move /flash /sysroot/flash
|
mount --move /flash /sysroot/flash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user