Clone of mesa.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

generate_lava.py 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/usr/bin/env python3
  2. from jinja2 import Environment, FileSystemLoader
  3. import argparse
  4. device_types = {
  5. "sun50i-h6-pine-h64": {
  6. "gpu_version": "panfrost-t720",
  7. "boot_method": "u-boot",
  8. "lava_device_type": "sun50i-h6-pine-h64",
  9. "kernel_image_type": "type: image",
  10. "tags": [],
  11. },
  12. "rk3288-veyron-jaq": {
  13. "gpu_version": "panfrost-t760",
  14. "boot_method": "depthcharge",
  15. "lava_device_type": "rk3288-veyron-jaq",
  16. "kernel_image_type": "",
  17. "tags": [],
  18. },
  19. "rk3399-gru-kevin": {
  20. "gpu_version": "panfrost-t860",
  21. "boot_method": "depthcharge",
  22. "lava_device_type": "rk3399-gru-kevin",
  23. "kernel_image_type": "",
  24. "tags": [],
  25. },
  26. "sun8i-h3-libretech-all-h3-cc": {
  27. "gpu_version": "lima",
  28. "boot_method": "u-boot",
  29. "lava_device_type": "sun8i-h3-libretech-all-h3-cc",
  30. "kernel_image_type": "type: zimage",
  31. "tags": [],
  32. },
  33. "meson-gxl-s905x-libretech-cc": {
  34. "gpu_version": "lima",
  35. "boot_method": "u-boot",
  36. "lava_device_type": "meson-gxl-s905x-libretech-cc",
  37. "kernel_image_type": "type: image",
  38. "tags": [],
  39. },
  40. "meson-gxm-khadas-vim2": {
  41. "gpu_version": "panfrost-t820",
  42. "boot_method": "u-boot",
  43. "lava_device_type": "meson-gxm-khadas-vim2",
  44. "kernel_image_type": "type: image",
  45. "tags": ["panfrost"],
  46. },
  47. }
  48. parser = argparse.ArgumentParser()
  49. parser.add_argument("--template")
  50. parser.add_argument("--base-artifacts-url")
  51. parser.add_argument("--arch")
  52. parser.add_argument("--device-types", nargs="+")
  53. parser.add_argument("--kernel-image-name")
  54. args = parser.parse_args()
  55. env = Environment(loader = FileSystemLoader('.'), trim_blocks=True, lstrip_blocks=True)
  56. template = env.get_template(args.template)
  57. for device_type in args.device_types:
  58. values = {}
  59. values['base_artifacts_url'] = args.base_artifacts_url
  60. values['arch'] = args.arch
  61. values['device_type'] = device_type
  62. values['kernel_image_name'] = args.kernel_image_name
  63. values['lava_device_type'] = device_types[device_type]['lava_device_type']
  64. values['gpu_version'] = device_types[device_type]['gpu_version']
  65. values['boot_method'] = device_types[device_type]['boot_method']
  66. values['kernel_image_type'] = device_types[device_type]['kernel_image_type']
  67. values['tags'] = device_types[device_type]['tags']
  68. f = open('results/lava-deqp-%s.yml' % device_type, "w")
  69. f.write(template.render(values))
  70. f.close()