mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
busybox-initramfs:
- add clean applet - fix qemu target
This commit is contained in:
parent
8cd265c4de
commit
fa20b4a5ae
@ -267,7 +267,7 @@ CONFIG_TEST=y
|
|||||||
# Console Utilities
|
# Console Utilities
|
||||||
#
|
#
|
||||||
# CONFIG_CHVT is not set
|
# CONFIG_CHVT is not set
|
||||||
# CONFIG_CLEAR is not set
|
CONFIG_CLEAR=y
|
||||||
# CONFIG_DEALLOCVT is not set
|
# CONFIG_DEALLOCVT is not set
|
||||||
# CONFIG_DUMPKMAP is not set
|
# CONFIG_DUMPKMAP is not set
|
||||||
# CONFIG_KBD_MODE is not set
|
# CONFIG_KBD_MODE is not set
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
/bin/busybox clear
|
||||||
|
|
||||||
/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 devtmpfs none /dev
|
/bin/busybox mount -t devtmpfs none /dev
|
||||||
|
|
||||||
BOOT=`/bin/busybox cat /proc/cmdline | /bin/busybox sed 's/.*boot=// ; s/ .*//'`
|
BOOT=`/bin/busybox cat /proc/cmdline | /bin/busybox sed 's/.*boot=// ; s/ .*//'`
|
||||||
@ -20,14 +21,6 @@
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
show_splash() {
|
|
||||||
if [ "$SPLASH" = yes ]; then
|
|
||||||
if [ -f "/bin/ply-image" -a -f "/splash.png" ]; then
|
|
||||||
/bin/ply-image /splash.png
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
progress() {
|
progress() {
|
||||||
if test "$DEBUG" = yes; then
|
if test "$DEBUG" = yes; then
|
||||||
echo "### $1 ###"
|
echo "### $1 ###"
|
||||||
@ -57,9 +50,9 @@
|
|||||||
update() {
|
update() {
|
||||||
if [ -f "$UPDATE_DIR/$2" ]; then
|
if [ -f "$UPDATE_DIR/$2" ]; then
|
||||||
echo "updating $1..."
|
echo "updating $1..."
|
||||||
/bin/busybox mount -o remount,rw,nobarrier /flash
|
/bin/busybox mount -o remount,rw /flash
|
||||||
/bin/busybox mv $UPDATE_DIR/$2 $3
|
/bin/busybox mv $UPDATE_DIR/$2 $3
|
||||||
/bin/busybox mount -o remount,ro,nobarrier /flash
|
/bin/busybox mount -o remount,ro /flash
|
||||||
/bin/busybox sync
|
/bin/busybox sync
|
||||||
if [ $4 = reboot ]; then
|
if [ $4 = reboot ]; then
|
||||||
echo "System reboots now"
|
echo "System reboots now"
|
||||||
@ -68,10 +61,8 @@
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
show_splash
|
mount_part "$BOOT" "/flash" "ro,noatime"
|
||||||
|
[ -n $DISK ] && mount_part "$DISK" "/storage" "rw,noatime"
|
||||||
mount_part "$BOOT" "/flash" "ro,noatime,nobarrier"
|
|
||||||
[ -n $DISK ] && mount_part "$DISK" "/storage" "rw,noatime,nobarrier"
|
|
||||||
# mount_part "$DISK" "/storage" "rw,noatime"
|
# mount_part "$DISK" "/storage" "rw,noatime"
|
||||||
|
|
||||||
update "Kernel" "openelec.kernel" "/flash/openelec.kernel" "reboot"
|
update "Kernel" "openelec.kernel" "/flash/openelec.kernel" "reboot"
|
||||||
@ -87,10 +78,10 @@
|
|||||||
|
|
||||||
/bin/busybox mount --bind /flash /sysroot/flash
|
/bin/busybox mount --bind /flash /sysroot/flash
|
||||||
/bin/busybox mount --bind /storage /sysroot/storage
|
/bin/busybox mount --bind /storage /sysroot/storage
|
||||||
|
|
||||||
/bin/busybox umount /proc
|
/bin/busybox umount /proc
|
||||||
/bin/busybox umount /sys
|
|
||||||
|
|
||||||
exec /bin/busybox switch_root /sysroot /sbin/init.system
|
exec /bin/busybox switch_root /sysroot /sbin/init.system
|
||||||
|
# exec /bin/busybox switch_root /sysroot /sbin/cinit
|
||||||
|
|
||||||
error "INIT_3" "Error in initramfs. Could not switch to new root"
|
error "INIT_3" "Error in initramfs. Could not switch to new root"
|
||||||
debug_shell
|
debug_shell
|
||||||
|
Loading…
x
Reference in New Issue
Block a user