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