Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | # possible arch values are: |
| 2 | # aarch64 arm armeb alpha cris i386 x86_64 m68k microblaze |
| 3 | # mips mipsel mips64 mips64el ppc ppc64 ppc64abi32 ppcemb |
| 4 | # riscv32 riscv64 sparc sparc32 sparc32plus |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | |
| 6 | def get_qemu_target_list(d): |
| 7 | import bb |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 8 | archs = d.getVar('QEMU_TARGETS').split() |
| 9 | tos = d.getVar('HOST_OS') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | softmmuonly = "" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | for arch in ['ppcemb', 'lm32']: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | if arch in archs: |
| 13 | softmmuonly += arch + "-softmmu," |
| 14 | archs.remove(arch) |
| 15 | linuxuseronly = "" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 16 | for arch in ['armeb', 'alpha', 'ppc64abi32', 'ppc64le', 'sparc32plus', 'aarch64_be']: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | if arch in archs: |
| 18 | linuxuseronly += arch + "-linux-user," |
| 19 | archs.remove(arch) |
| 20 | if 'linux' not in tos: |
| 21 | return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',') |
| 22 | return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',') |
| 23 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 24 | def get_qemu_usermode_target_list(d): |
| 25 | return ",".join(filter(lambda i: "-linux-user" in i, get_qemu_target_list(d).split(','))) |
| 26 | |
| 27 | def get_qemu_system_target_list(d): |
| 28 | return ",".join(filter(lambda i: "-linux-user" not in i, get_qemu_target_list(d).split(','))) |