Revert "scripts: run ipkg-make-index through shellcheck"
[openwrt/staging/stintel.git] / scripts / qemustart
index 7a2878ea70ee8c4bb0d1654afb73f0378a525704..764b0e65afa24bb9f0d25eb19a0ac8b7c5631538 100755 (executable)
@@ -158,7 +158,8 @@ parse_args() {
                return 1
        }
        [ -n "$o_subtarget" ] || o_subtarget="generic"
-       o_bindir="bin/targets/$o_target/$o_subtarget"
+       eval "$(grep ^CONFIG_BINARY_FOLDER= .config 2>/dev/null)"
+       o_bindir="${CONFIG_BINARY_FOLDER:-bin}/targets/$o_target/$o_subtarget"
 }
 
 start_qemu_armvirt() {
@@ -257,7 +258,7 @@ start_qemu_x86() {
        local mach="${o_mach:-pc}"
 
        [ -n "$rootfs" ] || {
-               rootfs="$o_bindir/openwrt-$o_target-${o_subtarget%-*}-generic-ext4-combined.img"
+               rootfs="$o_bindir/openwrt-$o_target-${o_subtarget%-*}-generic-squashfs-combined.img"
                if [ ! -f "$rootfs" -a -s "$rootfs.gz" ]; then
                        gunzip "$rootfs.gz"
                fi