Andrew Geissler | aaf90cd | 2021-02-12 15:29:51 -0600 | [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 |
| 5 | |
| 6 | def get_qemu_target_list(d): |
| 7 | import bb |
| 8 | archs = d.getVar('QEMU_TARGETS').split() |
| 9 | tos = d.getVar('HOST_OS') |
| 10 | softmmuonly = "" |
| 11 | for arch in ['ppcemb', 'lm32']: |
| 12 | if arch in archs: |
| 13 | softmmuonly += arch + "-softmmu," |
| 14 | archs.remove(arch) |
| 15 | linuxuseronly = "" |
| 16 | for arch in ['armeb', 'alpha', 'ppc64abi32', 'ppc64le', 'sparc32plus', 'aarch64_be']: |
| 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 | |
| 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(','))) |