busybox-initramfs: init: cleanup (/flash is actual root filesystem?)

This commit is contained in:
Stefan Saraev 2013-05-25 19:01:31 +03:00 committed by Stephan Raue
parent 6bd144cfdc
commit daaef706f2

View File

@ -315,8 +315,6 @@
}
update_bootloader() {
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
# /flash is filesystem with system image file
export BOOT_ROOT="/flash"
export SYSTEM_ROOT="/sysroot"
@ -329,7 +327,6 @@
fi
umount /sysroot
fi
}
load_modules() {
@ -408,9 +405,6 @@
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"
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
@ -418,14 +412,6 @@
LD_LIBRARY_PATH=/sysroot/usr/lib /sysroot/sbin/mkfs.ext4 -F -L StorageLive "$storage_loop_file" &>/dev/null
/bin/busybox sync
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..."
/bin/busybox usleep 2000000
@ -538,8 +524,6 @@
prepare_sysroot() {
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
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
else
@ -548,10 +532,6 @@
fi
/bin/busybox mount --move /flash /sysroot/flash
else
# /flash is actual root filesystem
/bin/busybox mount --move /flash /sysroot
fi
if [ -n "$disk" ]; then
/bin/busybox mount --move /storage /sysroot/storage