| OLD | NEW |
| 1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
| 2 | 2 |
| 3 import argparse | 3 import argparse |
| 4 import collections | 4 import collections |
| 5 import ConfigParser | 5 import ConfigParser |
| 6 import os | 6 import os |
| 7 import shutil | 7 import shutil |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 from utils import shellcmd | 10 from utils import shellcmd |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 'arm32' : os.path.join(toolchain_root, 'arm_trusted', | 40 'arm32' : os.path.join(toolchain_root, 'arm_trusted', |
| 41 'run_under_qemu_arm'), | 41 'run_under_qemu_arm'), |
| 42 'mips32': os.path.join(toolchain_root, 'mips_trusted', | 42 'mips32': os.path.join(toolchain_root, 'mips_trusted', |
| 43 'run_under_qemu_mips32'), | 43 'run_under_qemu_mips32'), |
| 44 } | 44 } |
| 45 attr_map = collections.defaultdict(str, { | 45 attr_map = collections.defaultdict(str, { |
| 46 'arm32-neon': ' -cpu cortex-a9', | 46 'arm32-neon': ' -cpu cortex-a9', |
| 47 'arm32-hwdiv-arm': ' -cpu cortex-a15', | 47 'arm32-hwdiv-arm': ' -cpu cortex-a15', |
| 48 'mips32-base': ' -cpu mips32r5-generic'}) | 48 'mips32-base': ' -cpu mips32r5-generic'}) |
| 49 prefix = arch_map[target] + attr_map[target + '-' + attr] | 49 prefix = arch_map[target] + attr_map[target + '-' + attr] |
| 50 if target == 'mips32': |
| 51 prefix = 'QEMU_SET_ENV=LD_LIBRARY_PATH=/usr/mipsel-linux-gnu/lib/ ' + prefix |
| 50 return (prefix + ' ' + run_cmd) if prefix else run_cmd | 52 return (prefix + ' ' + run_cmd) if prefix else run_cmd |
| 51 | 53 |
| 52 def NonsfiLoaderArch(target): | 54 def NonsfiLoaderArch(target): |
| 53 """Returns the arch for the nonsfi_loader""" | 55 """Returns the arch for the nonsfi_loader""" |
| 54 arch_map = { 'arm32' : 'arm', | 56 arch_map = { 'arm32' : 'arm', |
| 55 'x8632' : 'x86-32', | 57 'x8632' : 'x86-32', |
| 56 'mips32' : 'mips32', | 58 'mips32' : 'mips32', |
| 57 } | 59 } |
| 58 return arch_map[target] | 60 return arch_map[target] |
| 59 | 61 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 echo=args.verbose) | 225 echo=args.verbose) |
| 224 if (args.defer): | 226 if (args.defer): |
| 225 deferred_cmds.append(run_cmd) | 227 deferred_cmds.append(run_cmd) |
| 226 else: | 228 else: |
| 227 shellcmd(run_cmd, echo=True) | 229 shellcmd(run_cmd, echo=True) |
| 228 for run_cmd in deferred_cmds: | 230 for run_cmd in deferred_cmds: |
| 229 shellcmd(run_cmd, echo=True) | 231 shellcmd(run_cmd, echo=True) |
| 230 | 232 |
| 231 if __name__ == '__main__': | 233 if __name__ == '__main__': |
| 232 main() | 234 main() |
| OLD | NEW |