# Path: elbepack/kvm.py
# def find_kvm_exe():
# 
#     # pylint: disable=global-statement
#     global cached_kvm_infos
# 
#     if cached_kvm_infos:
#         return cached_kvm_infos
# 
#     version = "0.0.0"
#     args = []
# 
#     for fname in kvm_exe_list:
# 
#         if os.path.isfile(fname) and os.access(fname, os.X_OK):
#             # determine kvm version
#             _, stdout = command_out(fname + ' --version')
#             for line in stdout.splitlines():
#                 if "version" in line:
#                     version = line.split()[3].split('(')[0].strip()
# 
#             if fname == "/usr/bin/qemu-system-x86_64":
#                 args.append("-enable-kvm")
# 
#             cached_kvm_infos = {
#                 "exec_name": fname,
#                 "version": version,
#                 "args":args
#             }
# 
#             return cached_kvm_infos
# 
#     return {
#         "exec_name": "kvm_executable_not_found",
#         "version": version,
#         "args": args
#     }


import random
from elbepack.kvm import find_kvm_exe
    "elfcode": "PowerPC or cisco 4500",
}

ppcspe_defaults = {
    "arch": "powerpcspe",
    "interpreter": "qemu-system-ppc",
    "interpreterversion": "0.0.0",
    "userinterpr": "qemu-ppc-static",
    "console": "ttyS0,115200n1",
    "machine": "mpc8544ds",
    "nicmodel": "rtl8139",
    "triplet": "powerpc-linux-gnuspe",
}

ppc64el_defaults = {
    "arch": "ppc64el",
    "interpreter": "qemu-system-ppc64",
    "interpreterversion": "0.0.0",
    "userinterpr": "qemu-ppc64le-static",
    "console": "ttyS0,115200n1",
    "machine": "none",
    "nicmodel": "virtio",
    "triplet": "powerpc64le-linux-gnu",
    "sdkgccpkg": "g++-powerpc64le-linux-gnu",
    "elfcode": "64-bit PowerPC or cisco 7500",
}

amd64_defaults = {
    "arch": "amd64",
    "interpreter": find_kvm_exe()["exec_name"],

# Path: elbepack/kvm.py
# def find_kvm_exe():
# 
#     # pylint: disable=global-statement
#     global cached_kvm_infos
# 
#     if cached_kvm_infos:
#         return cached_kvm_infos
# 
#     version = "0.0.0"
#     args = []
# 
#     for fname in kvm_exe_list:
# 
#         if os.path.isfile(fname) and os.access(fname, os.X_OK):
#             # determine kvm version
#             _, stdout = command_out(fname + ' --version')
#             for line in stdout.splitlines():
#                 if "version" in line:
#                     version = line.split()[3].split('(')[0].strip()
# 
#             if fname == "/usr/bin/qemu-system-x86_64":
#                 args.append("-enable-kvm")
# 
#             cached_kvm_infos = {
#                 "exec_name": fname,
#                 "version": version,
#                 "args":args
#             }
# 
#             return cached_kvm_infos
# 
#     return {
#         "exec_name": "kvm_executable_not_found",
#         "version": version,
#         "args": args
#     }


# Path: elbepack/xmldefaults.py
import random
from elbepack.kvm import find_kvm_exe

    "elfcode": "PowerPC or cisco 4500",
}

ppcspe_defaults = {
    "arch": "powerpcspe",
    "interpreter": "qemu-system-ppc",
    "interpreterversion": "0.0.0",
    "userinterpr": "qemu-ppc-static",
    "console": "ttyS0,115200n1",
    "machine": "mpc8544ds",
    "nicmodel": "rtl8139",
    "triplet": "powerpc-linux-gnuspe",
}

ppc64el_defaults = {
    "arch": "ppc64el",
    "interpreter": "qemu-system-ppc64",
    "interpreterversion": "0.0.0",
    "userinterpr": "qemu-ppc64le-static",
    "console": "ttyS0,115200n1",
    "machine": "none",
    "nicmodel": "virtio",
    "triplet": "powerpc64le-linux-gnu",
    "sdkgccpkg": "g++-powerpc64le-linux-gnu",
    "elfcode": "64-bit PowerPC or cisco 7500",
}

amd64_defaults = {
    "arch": "amd64",
    "interpreter": find_kvm_exe()["exec_name"],

    "interpreterversion": find_kvm_exe()["version"],