qemu: Allow qemu.sh to be run from any directory

Since qemu.sh is now tied to the directory it's ran from, it makes
sense to change into that directory before starting to resolve any
file paths. This let's us start the script from any directory without
the need for any (cd && qemu) subshell.
This commit is contained in:
Tobias Waldekranz
2023-06-05 14:07:02 +02:00
parent fd9d3a2723
commit f6a7fe5353
2 changed files with 5 additions and 2 deletions
+2
View File
@@ -220,6 +220,8 @@ menuconfig()
exec kconfig-mconf Config.in
}
cd $(dirname $(readlink -f "$0"))
while [ "$1" != "" ]; do
case $1 in
-c)
+3 -2
View File
@@ -11,8 +11,9 @@ local.mk:
.PHONY: run
run:
@(cd $O/images && ./qemu.sh)
@$(BINARIES_DIR)/qemu.sh
.PHONY: run-menuconfig
run-menuconfig:
@(cd $O/images && CONFIG_="CONFIG_" BR2_CONFIG=".config" ../build/buildroot-config/mconf Config.in)
CONFIG_="CONFIG_" BR2_CONFIG="$(BINARIES_DIR)/.config" \
$(BUILD_DIR)/buildroot-config/mconf $(BINARIES_DIR)/Config.in