Skip to content

Commit f47bf0e

Browse files
authored
Merge pull request #1395 from kernelkit/run-fix
Fix extration of rootfs.squashfs in release tarball
2 parents 26c7fe4 + e7108f5 commit f47bf0e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

board/common/qemu/run.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,12 @@ extract_squashfs()
358358
run_qemu()
359359
{
360360
# Auto-extract rootfs.squashfs from rootfs.itb if needed for initrd mode
361-
if [ "$CONFIG_QEMU_ROOTFS_INITRD" = "y" ]; then
362-
if [ "$CONFIG_QEMU_ROOTFS" = "rootfs.squashfs" ] && [ ! -f "rootfs.squashfs" ]; then
363-
if [ -f "rootfs.itb" ]; then
364-
extract_squashfs "rootfs.itb" "rootfs.squashfs"
365-
else
366-
die "Missing rootfs.squashfs and cannot find rootfs.itb to extract it from"
367-
fi
361+
if [ "$CONFIG_QEMU_ROOTFS_INITRD" = "y" ] && [ ! -f "$CONFIG_QEMU_ROOTFS" ]; then
362+
itb="${CONFIG_QEMU_ROOTFS%.squashfs}.itb"
363+
if [ -f "$itb" ]; then
364+
extract_squashfs "$itb" "$CONFIG_QEMU_ROOTFS"
365+
else
366+
die "Missing $CONFIG_QEMU_ROOTFS and cannot find $itb to extract it from"
368367
fi
369368
fi
370369

0 commit comments

Comments
 (0)