busybox: init: fix toram when SYSTEM_IMAGE is with path

For the SYSTEM copy to /dev always use /dev/SYSTEM as target name
to not deal with fancy path or filenames.
Thanks HiassofT for clearing it up for me why that is best.
As far as i can tell all the rest of init is fine with BOOT_IMAGE and
SYSTEM_IMAGE having slashes in there.
Just toram was broken.
This commit is contained in:
Peter Tuschy 2019-09-25 06:15:06 +02:00
parent 353213effd
commit a43c069a2a

View File

@ -248,8 +248,8 @@ mount_part() {
mount_sysroot() {
if [ "$SYSTEM_TORAM" = "yes" ]; then
cp /flash/$IMAGE_SYSTEM /dev/$IMAGE_SYSTEM
mount_part "/dev/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
cp "/flash/$IMAGE_SYSTEM" /dev/SYSTEM
mount_part "/dev/SYSTEM" "/sysroot" "ro,loop"
else
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
fi