summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2020-06-15 14:44:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-16 23:39:28 +0100
commit2ea4530918792e54c800635eec9c1fd54689b66b (patch)
tree1122cdfbca1980d72e76fc8fb6a9c31f6e187717 /scripts
parent7bf4949eaa4a48295ab6190538df807144c116e5 (diff)
downloadpoky-2ea4530918792e54c800635eec9c1fd54689b66b.tar.gz
poky-2ea4530918792e54c800635eec9c1fd54689b66b.tar.bz2
poky-2ea4530918792e54c800635eec9c1fd54689b66b.zip
install-buildtools: remove hardcoded x86-64 architecture
Remove all instances of the hardcoded 'x86_64' and replace with the current host platform. (From OE-Core rev: 52dc6f671ff67a1149be7ef4c65126ea3c907a3d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-buildtools18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/install-buildtools b/scripts/install-buildtools
index d722519f0f..a9173fa096 100755
--- a/scripts/install-buildtools
+++ b/scripts/install-buildtools
@@ -35,6 +35,7 @@
import argparse
import logging
import os
+import platform
import re
import shutil
import shlex
@@ -112,6 +113,7 @@ def main():
release = ""
buildtools_url = ""
install_dir = ""
+ arch = platform.machine()
parser = argparse.ArgumentParser(
description="Buildtools installation helper",
@@ -194,19 +196,19 @@ def main():
logger.error("Milestone installers require --build-date")
else:
if args.with_extended_buildtools:
- filename = "x86_64-buildtools-extended-nativesdk-standalone-%s-%s.sh" % (
- args.installer_version, args.build_date)
+ filename = "%s-buildtools-extended-nativesdk-standalone-%s-%s.sh" % (
+ arch, args.installer_version, args.build_date)
else:
- filename = "x86_64-buildtools-nativesdk-standalone-%s-%s.sh" % (
- args.installer_version, args.build_date)
+ filename = "%s-buildtools-nativesdk-standalone-%s-%s.sh" % (
+ arch, args.installer_version, args.build_date)
safe_filename = quote(filename)
buildtools_url = "%s/milestones/%s/buildtools/%s" % (base_url, args.release, safe_filename)
# regular release SDK
else:
if args.with_extended_buildtools:
- filename = "x86_64-buildtools-extended-nativesdk-standalone-%s.sh" % args.installer_version
+ filename = "%s-buildtools-extended-nativesdk-standalone-%s.sh" % (arch, args.installer_version)
else:
- filename = "x86_64-buildtools-nativesdk-standalone-%s.sh" % args.installer_version
+ filename = "%s-buildtools-nativesdk-standalone-%s.sh" % (arch, args.installer_version)
safe_filename = quote(filename)
buildtools_url = "%s/%s/buildtools/%s" % (base_url, args.release, safe_filename)
@@ -279,8 +281,8 @@ def main():
# Setup the environment
logger.info("Setting up the environment")
regex = re.compile(r'^(?P<export>export )?(?P<env_var>[A-Z_]+)=(?P<env_val>.+)$')
- with open("%s/environment-setup-x86_64-pokysdk-linux" %
- install_dir, 'rb') as f:
+ with open("%s/environment-setup-%s-pokysdk-linux" %
+ (install_dir, arch), 'rb') as f:
for line in f:
match = regex.search(line.decode('utf-8'))
logger.debug("export regex: %s" % match)