scripts: qemustart: support CONFIG_BINARY_FOLDER
authorAndre Heider <a.heider@gmail.com>
Sun, 13 Nov 2022 06:06:27 +0000 (07:06 +0100)
committerPaul Spooren <mail@aparcar.org>
Fri, 3 Feb 2023 20:22:49 +0000 (21:22 +0100)
If CONFIG_BINARY_FOLDER is set in .config, use that instead of "bin" as
the bindir.

That allows to set that config and easily run e.g.
`./scripts/qemustart armvirt 32`.

Signed-off-by: Andre Heider <a.heider@gmail.com>
scripts/qemustart

index f0ddefb839941a1406018ba5f9c4cd77e72c8e9f..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() {