mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
busybox-initramfs:
- cleanup fastboot code
This commit is contained in:
parent
2d7811d525
commit
d6da63f478
@ -24,9 +24,16 @@
|
|||||||
bootchart)
|
bootchart)
|
||||||
BOOTCHART=yes
|
BOOTCHART=yes
|
||||||
;;
|
;;
|
||||||
|
fastboot)
|
||||||
|
FASTBOOT=yes
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if test "$FASTBOOT" = yes; then
|
||||||
|
IONICE="/bin/busybox ionice -c 1 -n 0"
|
||||||
|
fi
|
||||||
|
|
||||||
progress() {
|
progress() {
|
||||||
if test "$DEBUG" = yes; then
|
if test "$DEBUG" = yes; then
|
||||||
echo "### $1 ###"
|
echo "### $1 ###"
|
||||||
@ -57,14 +64,10 @@
|
|||||||
update() {
|
update() {
|
||||||
if [ -f "$UPDATE_DIR/$2" ]; then
|
if [ -f "$UPDATE_DIR/$2" ]; then
|
||||||
echo "updating $1..."
|
echo "updating $1..."
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
$IONICE /bin/busybox mount -o remount,rw /flash
|
||||||
/bin/busybox mount -o remount,rw /flash
|
$IONICE /bin/busybox mv $UPDATE_DIR/$2 $3
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
$IONICE /bin/busybox mount -o remount,ro /flash
|
||||||
/bin/busybox mv $UPDATE_DIR/$2 $3
|
$IONICE /bin/busybox sync
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
|
||||||
/bin/busybox mount -o remount,ro /flash
|
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
|
||||||
/bin/busybox sync
|
|
||||||
[ $2 = $IMAGE_KERNEL ] && REBOOT=1
|
[ $2 = $IMAGE_KERNEL ] && REBOOT=1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -88,26 +91,18 @@
|
|||||||
debug_shell
|
debug_shell
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
$IONICE /bin/busybox mount --move /proc /sysroot/proc
|
||||||
/bin/busybox mount --move /proc /sysroot/proc
|
$IONICE /bin/busybox mount --move /sys /sysroot/sys
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
$IONICE /bin/busybox mount --move /dev /sysroot/dev
|
||||||
/bin/busybox mount --move /sys /sysroot/sys
|
$IONICE /bin/busybox mount --move /flash /sysroot/flash
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
$IONICE /bin/busybox mount --move /storage /sysroot/storage
|
||||||
/bin/busybox mount --move /dev /sysroot/dev
|
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
|
||||||
/bin/busybox mount --move /flash /sysroot/flash
|
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
|
||||||
/bin/busybox mount --move /storage /sysroot/storage
|
|
||||||
|
|
||||||
if [ "$BOOTCHART" = "yes" -a -f "/sysroot/sbin/bootchartd" ] ; then
|
if [ "$BOOTCHART" = "yes" -a -f "/sysroot/sbin/bootchartd" ] ; then
|
||||||
progress "Starting Bootchart logging"
|
progress "Starting Bootchart logging"
|
||||||
/bin/busybox ionice -c 1 -n 0 \
|
$IONICE /bin/busybox mkdir -p /sysroot/storage/.bootchart
|
||||||
/bin/busybox mkdir -p /sysroot/storage/.bootchart
|
exec $IONICE /bin/busybox switch_root /sysroot /sbin/bootchartd -o /storage/.bootchart
|
||||||
exec /bin/busybox ionice -c 1 -n 0 \
|
|
||||||
/bin/busybox switch_root /sysroot /sbin/bootchartd -o /storage/.bootchart
|
|
||||||
else
|
else
|
||||||
exec /bin/busybox ionice -c 1 -n 0 \
|
exec $IONICE /bin/busybox switch_root /sysroot /sbin/init
|
||||||
/bin/busybox switch_root /sysroot /sbin/init
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
error "INIT_3" "Error in initramfs. Could not switch to new root"
|
error "INIT_3" "Error in initramfs. Could not switch to new root"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user