From a43c069a2a3c582e6811bafeebc94767dee05b81 Mon Sep 17 00:00:00 2001 From: Peter Tuschy Date: Wed, 25 Sep 2019 06:15:06 +0200 Subject: [PATCH] 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. --- packages/sysutils/busybox/scripts/init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index 7d7ad04bae..ebc5df9513 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -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