DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [DistroKit] [PATCH] qemu-run: don't evaluate selected_platformconfig
Date: Tue, 10 Oct 2023 11:10:28 +0200	[thread overview]
Message-ID: <20231010091028.3444582-1-rhi@pengutronix.de> (raw)

Even when a selected_platformconfig symlink exists, ptxdist can still be
used with the --platformconfig=... option to override the platformconfig
during the build. In this case, running the qemu script will search in
the wrong build folder for the images.

Don't use the selected_platformconfig link to find out the platform,
instead determine it from the path of the qemu script itself.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 configs/platform-mips/run       |  9 ++-------
 configs/platform-mipsel/run     |  9 ++-------
 configs/platform-v7a/run        |  9 ++-------
 configs/platform-v7a_noneon/run |  9 ++-------
 configs/platform-x86_64/run     | 11 +++--------
 5 files changed, 11 insertions(+), 36 deletions(-)

diff --git a/configs/platform-mips/run b/configs/platform-mips/run
index e41f01283ca3..6d6fca68c2cd 100755
--- a/configs/platform-mips/run
+++ b/configs/platform-mips/run
@@ -1,17 +1,12 @@
 #!/bin/bash
 
-platformconfig=selected_platformconfig
-# fallback to platformconfig in the same dir as this script
-if [ ! -e "$platformconfig" ]; then
-	platformconfig=$(dirname $0)/platformconfig
-fi
+platformconfig=$(dirname $0)/platformconfig
 
 #
 # we need information about the platform
 #
 if [ ! -e "$platformconfig" ]; then
-	echo "error: selected_platformconfig does not exist"
-	echo "       please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'"
+	echo "error: ${platformconfig} does not exist"
 	exit 1
 fi
 
diff --git a/configs/platform-mipsel/run b/configs/platform-mipsel/run
index 6407f0c0729e..9ecf65b2e429 100755
--- a/configs/platform-mipsel/run
+++ b/configs/platform-mipsel/run
@@ -1,17 +1,12 @@
 #!/bin/bash
 
-platformconfig=selected_platformconfig
-# fallback to platformconfig in the same dir as this script
-if [ ! -e "$platformconfig" ]; then
-	platformconfig=$(dirname $0)/platformconfig
-fi
+platformconfig=$(dirname $0)/platformconfig
 
 #
 # we need information about the platform
 #
 if [ ! -e "$platformconfig" ]; then
-	echo "error: selected_platformconfig does not exist"
-	echo "       please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'"
+	echo "error: ${platformconfig} does not exist"
 	exit 1
 fi
 
diff --git a/configs/platform-v7a/run b/configs/platform-v7a/run
index 3874a7b2f0af..257dc1a6fd2e 100755
--- a/configs/platform-v7a/run
+++ b/configs/platform-v7a/run
@@ -1,17 +1,12 @@
 #!/bin/bash
 
-platformconfig=selected_platformconfig
-# fallback to platformconfig in the same dir as this script
-if [ ! -e "$platformconfig" ]; then
-	platformconfig=$(dirname $0)/platformconfig
-fi
+platformconfig=$(dirname $0)/platformconfig
 
 #
 # we need information about the platform
 #
 if [ ! -e "$platformconfig" ]; then
-	echo "error: selected_platformconfig does not exist"
-	echo "       please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'"
+	echo "error: ${platformconfig} does not exist"
 	exit 1
 fi
 
diff --git a/configs/platform-v7a_noneon/run b/configs/platform-v7a_noneon/run
index 0bb06bc60868..ccdcdb91c767 100755
--- a/configs/platform-v7a_noneon/run
+++ b/configs/platform-v7a_noneon/run
@@ -1,17 +1,12 @@
 #!/bin/bash
 
-platformconfig=selected_platformconfig
-# fallback to platformconfig in the same dir as this script
-if [ ! -e "$platformconfig" ]; then
-	platformconfig=$(dirname $0)/platformconfig
-fi
+platformconfig=$(dirname $0)/platformconfig
 
 #
 # we need information about the platform
 #
 if [ ! -e "$platformconfig" ]; then
-	echo "error: selected_platformconfig does not exist"
-	echo "       please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'"
+	echo "error: ${platformconfig} does not exist"
 	exit 1
 fi
 
diff --git a/configs/platform-x86_64/run b/configs/platform-x86_64/run
index ddc510070418..b826b4436d0d 100755
--- a/configs/platform-x86_64/run
+++ b/configs/platform-x86_64/run
@@ -1,17 +1,12 @@
 #!/bin/bash
 
-platformconfig=selected_platformconfig
-# fallback to platformconfig in the same dir as this script
-if [ ! -e "$platformconfig" ]; then
-	platformconfig=$(dirname $0)/platformconfig
-fi
-
+platformconfig=$(dirname $0)/platformconfig
+#
 #
 # we need information about the platform
 #
 if [ ! -e "$platformconfig" ]; then
-	echo "error: selected_platformconfig does not exist"
-	echo "       please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'"
+	echo "error: ${platformconfig} does not exist"
 	exit 1
 fi
 
-- 
2.39.2




             reply	other threads:[~2023-10-10  9:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10  9:10 Roland Hieber [this message]
2023-10-18  9:15 ` Robert Schwebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231010091028.3444582-1-rhi@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox