From 5f4e81365aaaa9bff217f692d32af68fdb2b5574 Mon Sep 17 00:00:00 2001 From: Seunghwan Lee Date: Mon, 17 Oct 2016 16:06:31 +0900 Subject: [PATCH] Support Arch (x84_64, aarch64) Change-Id: I909b54d44e44728cb45543be9a503428b752020e Signed-off-by: Seunghwan Lee --- abs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) mode change 100644 => 100755 abs diff --git a/abs b/abs old mode 100644 new mode 100755 index d7b9d9c..6fdbd34 --- a/abs +++ b/abs @@ -154,7 +154,7 @@ class _Rootstrap(object): cmdline = self.tizen + ' list rootstrap' ret = Executor().run(cmdline, show=False) for x in ret.splitlines(): - if re.search('(mobile|wearable)-(2.4|3.0)-(device|emulator).core.*', x): + if re.search('(mobile|wearable)-(2.4|3.0)-(device|emulator|device64|emulator64).core.*', x): if self.rootstrap_list == None: self.rootstrap_list = [] self.rootstrap_list.append(x.split(' ')[0]) @@ -348,16 +348,21 @@ class Sdk(object): rootstrap = _rootstrap self.arch = 'x86' elif arch is None: - if 'emulator' in rootstrap: self.arch = 'x86' + if 'emulator64' in rootstrap: self.arch = 'x86_64' + elif 'device64' in rootstrap: self.arch = 'aarch64' + elif 'emulator' in rootstrap: self.arch = 'x86' elif 'device' in rootstrap: self.arch = 'arm' elif rootstrap is None: - if arch not in ['x86', 'arm']: + if arch not in ['x86', 'arm', 'aarch64', 'x86_64']: raise LocalError('Architecture and rootstrap mismatch') + rootstrap = _rootstrap - if arch == 'arm': rootstrap = rootstrap.replace('emulator', 'device') + if arch == 'x86_64': rootstrap = rootstrap.replace('emulator', 'emulator64') + elif arch == 'aarch64': rootstrap = rootstrap.replace('emulator', 'device64') + elif arch == 'arm': rootstrap = rootstrap.replace('emulator', 'device') for x in source.project_list: - out = self._run('build-native', ['-r', rootstrap, '-a', self.arch, '-C', conf, '--' , x['path']], checker=True) + out = self._run('build-native', ['-r', rootstrap, '-a', self.arch, '-C', conf, '-c', 'gcc', '--' , x['path']], checker=True) logpath = os.path.join(source.output_dir, \ 'build_%s_%s' % (rootstrap, os.path.basename(x['path']))) if not os.path.isdir(source.output_dir): @@ -452,6 +457,10 @@ class Sdk(object): strip_cmd = os.path.join(os.path.dirname(self.tizen), '../../i386-linux-gnueabi-gcc-4.9/bin/i386-linux-gnueabi-strip') elif self.arch == 'arm' : strip_cmd = os.path.join(os.path.dirname(self.tizen), '../../arm-linux-gnueabi-gcc-4.9/bin/arm-linux-gnueabi-strip') + elif self.arch == 'x86_64' : + strip_cmd = os.path.join(os.path.dirname(self.tizen), '../../x86_64-linux-gnu-gcc-4.9/bin/x86_64-linux-gnu-strip') + elif self.arch == 'aarch64' : + strip_cmd = os.path.join(os.path.dirname(self.tizen), '../../aarch64-linux-gnu-gcc-4.9/bin/aarch64-linux-gnu-strip') print strip_cmd @@ -580,7 +589,7 @@ def argument_parsing(argv): build.add_argument('-r', '--rootstrap', action='store', dest='rootstrap', \ help='(ex, mobile-3.0-device.core) rootstrap name') build.add_argument('-a', '--arch', action='store', dest='arch', \ - help='(x86|arm) Architecture to build') + help='(x86|arm|x86_64|aarch64) Architecture to build') build.add_argument('-t', '--type', action='store', dest='type', \ help='(tpk|wgt) Packaging type') build.add_argument('-s', '--cert', action='store', dest='cert', \ -- 2.7.4