Compare commits
171 Commits
23.1
...
mesa-22.0.
Author | SHA1 | Date | |
---|---|---|---|
|
a82920af6e | ||
|
9848a7b7fc | ||
|
5bb4e9a087 | ||
|
db9c1251f1 | ||
|
e6f159d626 | ||
|
c75e89962e | ||
|
d8e5624984 | ||
|
2caf7b788f | ||
|
da86354624 | ||
|
4f1a3be5f6 | ||
|
eadc089854 | ||
|
5f326287c9 | ||
|
e86cc99649 | ||
|
085a5d96e5 | ||
|
909b675c19 | ||
|
8a22cc32af | ||
|
4a60a6be41 | ||
|
c3497b6e45 | ||
|
1ab727add7 | ||
|
03082e84c5 | ||
|
8821f6cd24 | ||
|
aa43f9816e | ||
|
afbc24a234 | ||
|
ec045339f6 | ||
|
e5a966781d | ||
|
517d35c5da | ||
|
dbc62f271c | ||
|
e8685e4b3f | ||
|
3f1c460c91 | ||
|
f3ff1dceff | ||
|
7991189f9a | ||
|
0c5203423b | ||
|
2254dcedfc | ||
|
7d3ff8ec16 | ||
|
ee42fa621d | ||
|
65a55ea2a8 | ||
|
d45eaf087d | ||
|
31e12f38d0 | ||
|
f2f6902a48 | ||
|
1a31377e63 | ||
|
716ca39489 | ||
|
3386e2a3ed | ||
|
f2a263bb12 | ||
|
29822cf29a | ||
|
dcb32ae3a5 | ||
|
9dcf2c0f3c | ||
|
9175d1a2b0 | ||
|
fea4ef272e | ||
|
1aa5f5e575 | ||
|
b4245e3893 | ||
|
01db75635a | ||
|
6961f75931 | ||
|
962197c5fd | ||
|
db716caf8c | ||
|
a5dfdd54c0 | ||
|
4d5eea6732 | ||
|
381fe26b50 | ||
|
711b82e6ae | ||
|
43be854eef | ||
|
85a5ec74f9 | ||
|
379697197a | ||
|
bfa73c568e | ||
|
148aac1b3b | ||
|
949b25d6fd | ||
|
1dcb8306b1 | ||
|
f0ba075c41 | ||
|
8facc12855 | ||
|
5cc0bcf6d7 | ||
|
b3f333348d | ||
|
4fee724faf | ||
|
f47fdc49a9 | ||
|
76b498bd80 | ||
|
9db0bfb073 | ||
|
23032ee9db | ||
|
94f5c307cb | ||
|
de55b090e4 | ||
|
38c88f36ff | ||
|
ace12c4da3 | ||
|
383369f1bd | ||
|
e4f1fafea9 | ||
|
bf5e7bcebb | ||
|
0b51f5e3ca | ||
|
9c94e7e724 | ||
|
60ad4707d4 | ||
|
a736424506 | ||
|
07a9bc76d3 | ||
|
e8d25b50c9 | ||
|
bd29a0689b | ||
|
183e19f23a | ||
|
9b9bc8ad64 | ||
|
ea23bb04f4 | ||
|
e280130626 | ||
|
d1e61f595d | ||
|
6f56bad4dd | ||
|
c454ff42f0 | ||
|
0906f9f7d2 | ||
|
6353a869ca | ||
|
fdd351cc81 | ||
|
5998d19a96 | ||
|
4aa73d5310 | ||
|
1d25a226fa | ||
|
fa4d9f5934 | ||
|
2a03c296fd | ||
|
527bac358d | ||
|
277d7fe83d | ||
|
e76b049b2b | ||
|
bd23929d01 | ||
|
47c9c42764 | ||
|
db7f26a944 | ||
|
d191aa607c | ||
|
c9215c391a | ||
|
53f532bac2 | ||
|
7885a3d1b1 | ||
|
081ea7fc89 | ||
|
fc450c2f54 | ||
|
1c3a61979b | ||
|
0c22f3ffaf | ||
|
295022cb75 | ||
|
1e7d39f9db | ||
|
95f87609de | ||
|
0fd825b4f4 | ||
|
fcd93800bb | ||
|
3241c61b68 | ||
|
e791cc3ca5 | ||
|
21dfddc2f6 | ||
|
1830da60e8 | ||
|
ea3afa5690 | ||
|
8cca40e8a3 | ||
|
2b73963911 | ||
|
8d42870798 | ||
|
cc1511acd7 | ||
|
a32927b187 | ||
|
1758082912 | ||
|
d653651b49 | ||
|
7ba68c86f7 | ||
|
166fc8e9f3 | ||
|
c1822e7222 | ||
|
fb8a9be463 | ||
|
b0ad08de15 | ||
|
c820bbced0 | ||
|
b8e9c345d0 | ||
|
3b1563dcfb | ||
|
e93350a833 | ||
|
716fc5280a | ||
|
2e1387c752 | ||
|
a910e58ad8 | ||
|
54f49993d1 | ||
|
2b282fb3b5 | ||
|
4e67d2aad4 | ||
|
8f5fb1eb10 | ||
|
4587268d2b | ||
|
a04818a500 | ||
|
59b2c1ddde | ||
|
2ce020120a | ||
|
ba2d22e95f | ||
|
5ff5f3cbf7 | ||
|
5a7a564d7c | ||
|
2c7d0e1b49 | ||
|
83eef372a2 | ||
|
0a1f166f4d | ||
|
68242654f8 | ||
|
c7bd1f0720 | ||
|
88762cf59b | ||
|
6420dc86cf | ||
|
a58a01050c | ||
|
b6e296f823 | ||
|
fabb6b5c5e | ||
|
0ec3de0563 | ||
|
b2be43a192 | ||
|
9e17fcbed2 | ||
|
c69a870f86 |
@@ -8,7 +8,7 @@ charset = utf-8
|
|||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
tab_width = 8
|
tab_width = 8
|
||||||
|
|
||||||
[*.{c,h,cpp,hpp,cc,hh,y,yy}]
|
[*.{c,h,cpp,hpp,cc,hh}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 3
|
indent_size = 3
|
||||||
max_line_length = 78
|
max_line_length = 78
|
||||||
@@ -16,14 +16,26 @@ max_line_length = 78
|
|||||||
[{Makefile*,*.mk}]
|
[{Makefile*,*.mk}]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|
||||||
[*.py]
|
[{*.py,SCons*}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.pl]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.m4]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
[*.yml]
|
[*.yml]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.html]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
[*.rst]
|
[*.rst]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 3
|
indent_size = 3
|
||||||
@@ -34,11 +46,3 @@ trim_trailing_whitespace = false
|
|||||||
[{meson.build,meson_options.txt}]
|
[{meson.build,meson_options.txt}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[*.ps1]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.rs]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 4
|
|
||||||
|
60
.github/workflows/macos.yml
vendored
60
.github/workflows/macos.yml
vendored
@@ -1,60 +0,0 @@
|
|||||||
name: macOS-CI
|
|
||||||
on: push
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
macOS-CI:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
glx_option: ['dri', 'xlib']
|
|
||||||
runs-on: macos-11
|
|
||||||
env:
|
|
||||||
GALLIUM_DUMP_CPU: true
|
|
||||||
MESON_EXEC: /Users/runner/Library/Python/3.11/bin/meson
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
|
||||||
cat > Brewfile <<EOL
|
|
||||||
brew "bison"
|
|
||||||
brew "expat"
|
|
||||||
brew "gettext"
|
|
||||||
brew "libx11"
|
|
||||||
brew "libxcb"
|
|
||||||
brew "libxdamage"
|
|
||||||
brew "libxext"
|
|
||||||
brew "molten-vk"
|
|
||||||
brew "ninja"
|
|
||||||
brew "pkg-config"
|
|
||||||
brew "python@3.10"
|
|
||||||
EOL
|
|
||||||
|
|
||||||
brew update
|
|
||||||
brew bundle --verbose
|
|
||||||
- name: Install Mako and meson
|
|
||||||
run: pip3 install --user mako meson
|
|
||||||
- name: Configure
|
|
||||||
run: |
|
|
||||||
cat > native_config <<EOL
|
|
||||||
[binaries]
|
|
||||||
llvm-config = '/usr/local/opt/llvm/bin/llvm-config'
|
|
||||||
EOL
|
|
||||||
$MESON_EXEC . build --native-file=native_config -Dmoltenvk-dir=$(brew --prefix molten-vk) -Dbuild-tests=true -Dosmesa=true -Dgallium-drivers=swrast,zink -Dglx=${{ matrix.glx_option }}
|
|
||||||
- name: Build
|
|
||||||
run: $MESON_EXEC compile -C build
|
|
||||||
- name: Test
|
|
||||||
run: $MESON_EXEC test -C build --print-errorlogs
|
|
||||||
- name: Install
|
|
||||||
run: $MESON_EXEC install -C build --destdir $PWD/install
|
|
||||||
- name: 'Upload Artifact'
|
|
||||||
if: always()
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: macos-${{ matrix.glx_option }}-result
|
|
||||||
path: |
|
|
||||||
build/meson-logs/
|
|
||||||
install/
|
|
||||||
retention-days: 5
|
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,5 +1,4 @@
|
|||||||
.vscode*
|
|
||||||
*.pyc
|
*.pyc
|
||||||
*.pyo
|
*.pyo
|
||||||
*.out
|
*.out
|
||||||
/build
|
build
|
||||||
|
1283
.gitlab-ci.yml
1283
.gitlab-ci.yml
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,9 @@
|
|||||||
# reliable to be run in parallel with other tests due to CPU-side timing.
|
# reliable to be run in parallel with other tests due to CPU-side timing.
|
||||||
dEQP-GLES[0-9]*.functional.flush_finish.*
|
dEQP-GLES[0-9]*.functional.flush_finish.*
|
||||||
|
|
||||||
|
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/4575
|
||||||
|
dEQP-VK.wsi.display.get_display_plane_capabilities
|
||||||
|
|
||||||
# piglit: WGL is Windows-only
|
# piglit: WGL is Windows-only
|
||||||
wgl@.*
|
wgl@.*
|
||||||
|
|
||||||
@@ -15,20 +18,3 @@ glx@glx_arb_sync_control@timing.*
|
|||||||
|
|
||||||
# This test is not built with waffle, while we do build tests with waffle
|
# This test is not built with waffle, while we do build tests with waffle
|
||||||
spec@!opengl 1.1@windowoverlap
|
spec@!opengl 1.1@windowoverlap
|
||||||
|
|
||||||
# These tests all read from the front buffer after a swap. Given that we
|
|
||||||
# run piglit tests in parallel in Mesa CI, and don't have a compositor
|
|
||||||
# running, the frontbuffer reads may end up with undefined results from
|
|
||||||
# windows overlapping us.
|
|
||||||
#
|
|
||||||
# Piglit does mark these tests as not to be run in parallel, but deqp-runner
|
|
||||||
# doesn't respect that. We need to extend deqp-runner to allow some tests to be
|
|
||||||
# marked as single-threaded and run after the rayon loop if we want to support
|
|
||||||
# them.
|
|
||||||
#
|
|
||||||
# Note that "glx-" tests don't appear in x11-skips.txt because they can be
|
|
||||||
# run even if PIGLIT_PLATFORM=gbm (for example)
|
|
||||||
glx@glx-copy-sub-buffer.*
|
|
||||||
# Reads the front buffer but it doesn't have to.
|
|
||||||
# https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/755
|
|
||||||
glx-swap-copy
|
|
||||||
|
@@ -1,66 +0,0 @@
|
|||||||
version: 1
|
|
||||||
|
|
||||||
# Rules to match for a machine to qualify
|
|
||||||
target:
|
|
||||||
{% if tags %}
|
|
||||||
tags:
|
|
||||||
{% for tag in tags %}
|
|
||||||
- '{{ tag | trim }}'
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
timeouts:
|
|
||||||
first_console_activity: # This limits the time it can take to receive the first console log
|
|
||||||
minutes: {{ timeout_first_minutes }}
|
|
||||||
retries: {{ timeout_first_retries }}
|
|
||||||
console_activity: # Reset every time we receive a message from the logs
|
|
||||||
minutes: {{ timeout_minutes }}
|
|
||||||
retries: {{ timeout_retries }}
|
|
||||||
boot_cycle:
|
|
||||||
minutes: {{ timeout_boot_minutes }}
|
|
||||||
retries: {{ timeout_boot_retries }}
|
|
||||||
overall: # Maximum time the job can take, not overrideable by the "continue" deployment
|
|
||||||
minutes: {{ timeout_overall_minutes }}
|
|
||||||
retries: 0
|
|
||||||
# no retries possible here
|
|
||||||
|
|
||||||
console_patterns:
|
|
||||||
session_end:
|
|
||||||
regex: >-
|
|
||||||
{{ session_end_regex }}
|
|
||||||
session_reboot:
|
|
||||||
regex: >-
|
|
||||||
{{ session_reboot_regex }}
|
|
||||||
job_success:
|
|
||||||
regex: >-
|
|
||||||
{{ job_success_regex }}
|
|
||||||
job_warn:
|
|
||||||
regex: >-
|
|
||||||
{{ job_warn_regex }}
|
|
||||||
|
|
||||||
# Environment to deploy
|
|
||||||
deployment:
|
|
||||||
# Initial boot
|
|
||||||
start:
|
|
||||||
kernel:
|
|
||||||
url: '{{ kernel_url }}'
|
|
||||||
cmdline: >
|
|
||||||
SALAD.machine_id={{ '{{' }} machine_id }}
|
|
||||||
console={{ '{{' }} local_tty_device }},115200 earlyprintk=vga,keep
|
|
||||||
loglevel={{ log_level }} no_hash_pointers
|
|
||||||
b2c.service="--privileged --tls-verify=false --pid=host docker://{{ '{{' }} fdo_proxy_registry }}/mupuf/valve-infra/telegraf-container:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
|
|
||||||
b2c.container="-ti --tls-verify=false docker://{{ '{{' }} fdo_proxy_registry }}/mupuf/valve-infra/machine_registration:latest check"
|
|
||||||
b2c.ntp_peer=10.42.0.1 b2c.pipefail b2c.cache_device=auto b2c.poweroff_delay={{ poweroff_delay }}
|
|
||||||
b2c.minio="gateway,{{ '{{' }} minio_url }},{{ '{{' }} job_bucket_access_key }},{{ '{{' }} job_bucket_secret_key }}"
|
|
||||||
b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in job_volume_exclusions %},exclude={{ excl }}{% endfor %},remove,expiration=pipeline_end,preserve"
|
|
||||||
{% for volume in volumes %}
|
|
||||||
b2c.volume={{ volume }}
|
|
||||||
{% endfor %}
|
|
||||||
b2c.container="-v {{ '{{' }} job_bucket }}-results:{{ working_dir }} -w {{ working_dir }} {% for mount_volume in mount_volumes %} -v {{ mount_volume }}{% endfor %} --tls-verify=false docker://{{ local_container }} {{ container_cmd }}"
|
|
||||||
{% if cmdline_extras is defined %}
|
|
||||||
{{ cmdline_extras }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
initramfs:
|
|
||||||
url: '{{ initramfs_url }}'
|
|
||||||
|
|
@@ -1,107 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
# Copyright © 2022 Valve Corporation
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
# copy of this software and associated documentation files (the "Software"),
|
|
||||||
# to deal in the Software without restriction, including without limitation
|
|
||||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
# and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
# Software is furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice (including the next
|
|
||||||
# paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
# Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
# IN THE SOFTWARE.
|
|
||||||
|
|
||||||
from jinja2 import Environment, FileSystemLoader
|
|
||||||
from argparse import ArgumentParser
|
|
||||||
from os import environ, path
|
|
||||||
import json
|
|
||||||
|
|
||||||
|
|
||||||
parser = ArgumentParser()
|
|
||||||
parser.add_argument('--ci-job-id')
|
|
||||||
parser.add_argument('--container-cmd')
|
|
||||||
parser.add_argument('--initramfs-url')
|
|
||||||
parser.add_argument('--job-success-regex')
|
|
||||||
parser.add_argument('--job-warn-regex')
|
|
||||||
parser.add_argument('--kernel-url')
|
|
||||||
parser.add_argument('--log-level', type=int)
|
|
||||||
parser.add_argument('--poweroff-delay', type=int)
|
|
||||||
parser.add_argument('--session-end-regex')
|
|
||||||
parser.add_argument('--session-reboot-regex')
|
|
||||||
parser.add_argument('--tags', nargs='?', default='')
|
|
||||||
parser.add_argument('--template', default='b2c.yml.jinja2.jinja2')
|
|
||||||
parser.add_argument('--timeout-boot-minutes', type=int)
|
|
||||||
parser.add_argument('--timeout-boot-retries', type=int)
|
|
||||||
parser.add_argument('--timeout-first-minutes', type=int)
|
|
||||||
parser.add_argument('--timeout-first-retries', type=int)
|
|
||||||
parser.add_argument('--timeout-minutes', type=int)
|
|
||||||
parser.add_argument('--timeout-overall-minutes', type=int)
|
|
||||||
parser.add_argument('--timeout-retries', type=int)
|
|
||||||
parser.add_argument('--job-volume-exclusions', nargs='?', default='')
|
|
||||||
parser.add_argument('--volume', action='append')
|
|
||||||
parser.add_argument('--mount-volume', action='append')
|
|
||||||
parser.add_argument('--local-container', default=environ.get('B2C_LOCAL_CONTAINER', 'alpine:latest'))
|
|
||||||
parser.add_argument('--working-dir')
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
env = Environment(loader=FileSystemLoader(path.dirname(args.template)),
|
|
||||||
trim_blocks=True, lstrip_blocks=True)
|
|
||||||
|
|
||||||
template = env.get_template(path.basename(args.template))
|
|
||||||
|
|
||||||
values = {}
|
|
||||||
values['ci_job_id'] = args.ci_job_id
|
|
||||||
values['container_cmd'] = args.container_cmd
|
|
||||||
values['initramfs_url'] = args.initramfs_url
|
|
||||||
values['job_success_regex'] = args.job_success_regex
|
|
||||||
values['job_warn_regex'] = args.job_warn_regex
|
|
||||||
values['kernel_url'] = args.kernel_url
|
|
||||||
values['log_level'] = args.log_level
|
|
||||||
values['poweroff_delay'] = args.poweroff_delay
|
|
||||||
values['session_end_regex'] = args.session_end_regex
|
|
||||||
values['session_reboot_regex'] = args.session_reboot_regex
|
|
||||||
try:
|
|
||||||
values['tags'] = json.loads(args.tags)
|
|
||||||
except json.decoder.JSONDecodeError:
|
|
||||||
values['tags'] = args.tags.split(",")
|
|
||||||
values['template'] = args.template
|
|
||||||
values['timeout_boot_minutes'] = args.timeout_boot_minutes
|
|
||||||
values['timeout_boot_retries'] = args.timeout_boot_retries
|
|
||||||
values['timeout_first_minutes'] = args.timeout_first_minutes
|
|
||||||
values['timeout_first_retries'] = args.timeout_first_retries
|
|
||||||
values['timeout_minutes'] = args.timeout_minutes
|
|
||||||
values['timeout_overall_minutes'] = args.timeout_overall_minutes
|
|
||||||
values['timeout_retries'] = args.timeout_retries
|
|
||||||
if len(args.job_volume_exclusions) > 0:
|
|
||||||
exclusions = args.job_volume_exclusions.split(",")
|
|
||||||
values['job_volume_exclusions'] = [excl for excl in exclusions if len(excl) > 0]
|
|
||||||
if args.volume is not None:
|
|
||||||
values['volumes'] = args.volume
|
|
||||||
if args.mount_volume is not None:
|
|
||||||
values['mount_volumes'] = args.mount_volume
|
|
||||||
values['working_dir'] = args.working_dir
|
|
||||||
|
|
||||||
assert(len(args.local_container) > 0)
|
|
||||||
|
|
||||||
# Use the gateway's pull-through registry caches to reduce load on fd.o.
|
|
||||||
values['local_container'] = args.local_container
|
|
||||||
for url, replacement in [('registry.freedesktop.org', '{{ fdo_proxy_registry }}'),
|
|
||||||
('harbor.freedesktop.org', '{{ harbor_fdo_registry }}')]:
|
|
||||||
values['local_container'] = values['local_container'].replace(url, replacement)
|
|
||||||
|
|
||||||
if 'B2C_KERNEL_CMDLINE_EXTRAS' in environ:
|
|
||||||
values['cmdline_extras'] = environ['B2C_KERNEL_CMDLINE_EXTRAS']
|
|
||||||
|
|
||||||
f = open(path.splitext(path.basename(args.template))[0], "w")
|
|
||||||
f.write(template.render(values))
|
|
||||||
f.close()
|
|
26
.gitlab-ci/bare-metal/arm64_a630_egl.sh
Executable file
26
.gitlab-ci/bare-metal/arm64_a630_egl.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This test script groups together a bunch of fast dEQP variant runs
|
||||||
|
# to amortize the cost of rebooting the board.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
EXIT=0
|
||||||
|
|
||||||
|
# Run reset tests without parallelism:
|
||||||
|
if ! env \
|
||||||
|
DEQP_RESULTS_DIR=results/reset \
|
||||||
|
FDO_CI_CONCURRENT=1 \
|
||||||
|
DEQP_CASELIST_FILTER='.*reset.*' \
|
||||||
|
/install/deqp-runner.sh; then
|
||||||
|
EXIT=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Then run everything else with parallelism:
|
||||||
|
if ! env \
|
||||||
|
DEQP_RESULTS_DIR=results/nonrobustness \
|
||||||
|
DEQP_CASELIST_INV_FILTER='.*reset.*' \
|
||||||
|
/install/deqp-runner.sh; then
|
||||||
|
EXIT=1
|
||||||
|
fi
|
||||||
|
|
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
|
||||||
echo "Must supply the PoE Interface to power down"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$BM_POE_ADDRESS" ]; then
|
|
||||||
echo "Must supply the PoE Switch host"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
SNMP_KEY="1.3.6.1.4.1.9.9.402.1.2.1.1.1.$BM_POE_INTERFACE"
|
|
||||||
SNMP_ON="i 1"
|
|
||||||
SNMP_OFF="i 4"
|
|
||||||
|
|
||||||
snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF
|
|
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
|
||||||
echo "Must supply the PoE Interface to power up"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$BM_POE_ADDRESS" ]; then
|
|
||||||
echo "Must supply the PoE Switch host"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
SNMP_KEY="1.3.6.1.4.1.9.9.402.1.2.1.1.1.$BM_POE_INTERFACE"
|
|
||||||
SNMP_ON="i 1"
|
|
||||||
SNMP_OFF="i 4"
|
|
||||||
|
|
||||||
snmpset -v2c -r 3 -t 10 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF
|
|
||||||
sleep 3s
|
|
||||||
snmpset -v2c -r 3 -t 10 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_ON
|
|
@@ -80,9 +80,8 @@ mkdir -p /nfs/results
|
|||||||
|
|
||||||
rm -rf /tftp/*
|
rm -rf /tftp/*
|
||||||
if echo "$BM_KERNEL" | grep -q http; then
|
if echo "$BM_KERNEL" | grep -q http; then
|
||||||
apt-get install -y curl
|
apt install -y wget
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget $BM_KERNEL -O /tftp/vmlinuz
|
||||||
$BM_KERNEL -o /tftp/vmlinuz
|
|
||||||
else
|
else
|
||||||
cp $BM_KERNEL /tftp/vmlinuz
|
cp $BM_KERNEL /tftp/vmlinuz
|
||||||
fi
|
fi
|
||||||
@@ -91,8 +90,7 @@ echo "$BM_CMDLINE" > /tftp/cmdline
|
|||||||
set +e
|
set +e
|
||||||
python3 $BM/cros_servo_run.py \
|
python3 $BM/cros_servo_run.py \
|
||||||
--cpu $BM_SERIAL \
|
--cpu $BM_SERIAL \
|
||||||
--ec $BM_SERIAL_EC \
|
--ec $BM_SERIAL_EC
|
||||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
|
|
||||||
ret=$?
|
ret=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@@ -31,18 +31,52 @@ import threading
|
|||||||
|
|
||||||
|
|
||||||
class CrosServoRun:
|
class CrosServoRun:
|
||||||
def __init__(self, cpu, ec, test_timeout):
|
def __init__(self, cpu, ec):
|
||||||
|
# Merged FIFO for the two serial buffers, fed by threads.
|
||||||
|
self.serial_queue = queue.Queue()
|
||||||
|
self.sentinel = object()
|
||||||
|
self.threads_done = 0
|
||||||
|
|
||||||
|
self.ec_ser = SerialBuffer(
|
||||||
|
ec, "results/serial-ec.txt", "R SERIAL-EC> ")
|
||||||
self.cpu_ser = SerialBuffer(
|
self.cpu_ser = SerialBuffer(
|
||||||
cpu, "results/serial.txt", "R SERIAL-CPU> ")
|
cpu, "results/serial.txt", "R SERIAL-CPU> ")
|
||||||
# Merge the EC serial into the cpu_ser's line stream so that we can
|
|
||||||
# effectively poll on both at the same time and not have to worry about
|
self.iter_feed_ec = threading.Thread(
|
||||||
self.ec_ser = SerialBuffer(
|
target=self.iter_feed_queue, daemon=True, args=(self.ec_ser.lines(),))
|
||||||
ec, "results/serial-ec.txt", "R SERIAL-EC> ", line_queue=self.cpu_ser.line_queue)
|
self.iter_feed_ec.start()
|
||||||
self.test_timeout = test_timeout
|
|
||||||
|
self.iter_feed_cpu = threading.Thread(
|
||||||
|
target=self.iter_feed_queue, daemon=True, args=(self.cpu_ser.lines(),))
|
||||||
|
self.iter_feed_cpu.start()
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.ec_ser.close()
|
self.ec_ser.close()
|
||||||
self.cpu_ser.close()
|
self.cpu_ser.close()
|
||||||
|
self.iter_feed_ec.join()
|
||||||
|
self.iter_feed_cpu.join()
|
||||||
|
|
||||||
|
# Feed lines from our serial queues into the merged queue, marking when our
|
||||||
|
# input is done.
|
||||||
|
def iter_feed_queue(self, it):
|
||||||
|
for i in it:
|
||||||
|
self.serial_queue.put(i)
|
||||||
|
self.serial_queue.put(self.sentinel)
|
||||||
|
|
||||||
|
# Return the next line from the queue, counting how many threads have
|
||||||
|
# terminated and joining when done
|
||||||
|
def get_serial_queue_line(self):
|
||||||
|
line = self.serial_queue.get()
|
||||||
|
if line == self.sentinel:
|
||||||
|
self.threads_done = self.threads_done + 1
|
||||||
|
if self.threads_done == 2:
|
||||||
|
self.iter_feed_cpu.join()
|
||||||
|
self.iter_feed_ec.join()
|
||||||
|
return line
|
||||||
|
|
||||||
|
# Returns an iterator for getting the next line.
|
||||||
|
def serial_queue_lines(self):
|
||||||
|
return iter(self.get_serial_queue_line, self.sentinel)
|
||||||
|
|
||||||
def ec_write(self, s):
|
def ec_write(self, s):
|
||||||
print("W SERIAL-EC> %s" % s)
|
print("W SERIAL-EC> %s" % s)
|
||||||
@@ -62,36 +96,23 @@ class CrosServoRun:
|
|||||||
self.ec_write("\n")
|
self.ec_write("\n")
|
||||||
self.ec_write("reboot\n")
|
self.ec_write("reboot\n")
|
||||||
|
|
||||||
bootloader_done = False
|
|
||||||
# This is emitted right when the bootloader pauses to check for input.
|
# This is emitted right when the bootloader pauses to check for input.
|
||||||
# Emit a ^N character to request network boot, because we don't have a
|
# Emit a ^N character to request network boot, because we don't have a
|
||||||
# direct-to-netboot firmware on cheza.
|
# direct-to-netboot firmware on cheza.
|
||||||
for line in self.cpu_ser.lines(timeout=120, phase="bootloader"):
|
for line in self.serial_queue_lines():
|
||||||
if re.search("load_archive: loading locale_en.bin", line):
|
if re.search("load_archive: loading locale_en.bin", line):
|
||||||
self.cpu_write("\016")
|
self.cpu_write("\016")
|
||||||
bootloader_done = True
|
|
||||||
break
|
|
||||||
|
|
||||||
# If the board has a netboot firmware and we made it to booting the
|
|
||||||
# kernel, proceed to processing of the test run.
|
|
||||||
if re.search("Booting Linux", line):
|
|
||||||
bootloader_done = True
|
|
||||||
break
|
break
|
||||||
|
|
||||||
# The Cheza boards have issues with failing to bring up power to
|
# The Cheza boards have issues with failing to bring up power to
|
||||||
# the system sometimes, possibly dependent on ambient temperature
|
# the system sometimes, possibly dependent on ambient temperature
|
||||||
# in the farm.
|
# in the farm.
|
||||||
if re.search("POWER_GOOD not seen in time", line):
|
if re.search("POWER_GOOD not seen in time", line):
|
||||||
self.print_error(
|
self.print_error("Detected intermittent poweron failure, restarting run...")
|
||||||
"Detected intermittent poweron failure, restarting run...")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
if not bootloader_done:
|
|
||||||
print("Failed to make it through bootloader, restarting run...")
|
|
||||||
return 2
|
|
||||||
|
|
||||||
tftp_failures = 0
|
tftp_failures = 0
|
||||||
for line in self.cpu_ser.lines(timeout=self.test_timeout, phase="test"):
|
for line in self.serial_queue_lines():
|
||||||
if re.search("---. end Kernel panic", line):
|
if re.search("---. end Kernel panic", line):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -102,15 +123,13 @@ class CrosServoRun:
|
|||||||
if re.search("R8152: Bulk read error 0xffffffbf", line):
|
if re.search("R8152: Bulk read error 0xffffffbf", line):
|
||||||
tftp_failures += 1
|
tftp_failures += 1
|
||||||
if tftp_failures >= 100:
|
if tftp_failures >= 100:
|
||||||
self.print_error(
|
self.print_error("Detected intermittent tftp failure, restarting run...")
|
||||||
"Detected intermittent tftp failure, restarting run...")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
# There are very infrequent bus errors during power management transitions
|
# There are very infrequent bus errors during power management transitions
|
||||||
# on cheza, which we don't expect to be the case on future boards.
|
# on cheza, which we don't expect to be the case on future boards.
|
||||||
if re.search("Kernel panic - not syncing: Asynchronous SError Interrupt", line):
|
if re.search("Kernel panic - not syncing: Asynchronous SError Interrupt", line):
|
||||||
self.print_error(
|
self.print_error("Detected cheza power management bus error, restarting run...")
|
||||||
"Detected cheza power management bus error, restarting run...")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
# If the network device dies, it's probably not graphics's fault, just try again.
|
# If the network device dies, it's probably not graphics's fault, just try again.
|
||||||
@@ -129,8 +148,7 @@ class CrosServoRun:
|
|||||||
# Given that it seems to trigger randomly near a GPU fault and then
|
# Given that it seems to trigger randomly near a GPU fault and then
|
||||||
# break many tests after that, just restart the whole run.
|
# break many tests after that, just restart the whole run.
|
||||||
if re.search("a6xx_hfi_send_msg.*Unexpected message id .* on the response queue", line):
|
if re.search("a6xx_hfi_send_msg.*Unexpected message id .* on the response queue", line):
|
||||||
self.print_error(
|
self.print_error("Detected cheza power management bus error, restarting run...")
|
||||||
"Detected cheza power management bus error, restarting run...")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
if re.search("coreboot.*bootblock starting", line):
|
if re.search("coreboot.*bootblock starting", line):
|
||||||
@@ -138,10 +156,6 @@ class CrosServoRun:
|
|||||||
"Detected spontaneous reboot, restarting run...")
|
"Detected spontaneous reboot, restarting run...")
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
if re.search("arm-smmu 5040000.iommu: TLB sync timed out -- SMMU may be deadlocked", line):
|
|
||||||
self.print_error("Detected cheza MMU fail, restarting run...")
|
|
||||||
return 2
|
|
||||||
|
|
||||||
result = re.search("hwci: mesa: (\S*)", line)
|
result = re.search("hwci: mesa: (\S*)", line)
|
||||||
if result:
|
if result:
|
||||||
if result.group(1) == "pass":
|
if result.group(1) == "pass":
|
||||||
@@ -149,9 +163,8 @@ class CrosServoRun:
|
|||||||
else:
|
else:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
self.print_error(
|
self.print_error("Reached the end of the CPU serial log without finding a result")
|
||||||
"Reached the end of the CPU serial log without finding a result")
|
return 1
|
||||||
return 2
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -160,20 +173,21 @@ def main():
|
|||||||
help='CPU Serial device', required=True)
|
help='CPU Serial device', required=True)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--ec', type=str, help='EC Serial device', required=True)
|
'--ec', type=str, help='EC Serial device', required=True)
|
||||||
parser.add_argument(
|
|
||||||
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
servo = CrosServoRun(args.cpu, args.ec)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
servo = CrosServoRun(args.cpu, args.ec, args.test_timeout * 60)
|
|
||||||
retval = servo.run()
|
retval = servo.run()
|
||||||
|
|
||||||
# power down the CPU on the device
|
|
||||||
servo.ec_write("power off\n")
|
|
||||||
servo.close()
|
|
||||||
|
|
||||||
if retval != 2:
|
if retval != 2:
|
||||||
sys.exit(retval)
|
break
|
||||||
|
|
||||||
|
# power down the CPU on the device
|
||||||
|
servo.ec_write("power off\n")
|
||||||
|
|
||||||
|
servo.close()
|
||||||
|
|
||||||
|
sys.exit(retval)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. "$SCRIPTS_DIR"/setup-test-env.sh
|
|
||||||
|
|
||||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||||
CI_COMMON=$CI_PROJECT_DIR/install/common
|
CI_COMMON=$CI_PROJECT_DIR/install/common
|
||||||
|
|
||||||
@@ -102,33 +100,26 @@ fi
|
|||||||
# moving that container to the runner. So, if BM_KERNEL+BM_DTB are URLs,
|
# moving that container to the runner. So, if BM_KERNEL+BM_DTB are URLs,
|
||||||
# fetch them instead of looking in the container.
|
# fetch them instead of looking in the container.
|
||||||
if echo "$BM_KERNEL $BM_DTB" | grep -q http; then
|
if echo "$BM_KERNEL $BM_DTB" | grep -q http; then
|
||||||
apt-get install -y curl
|
apt install -y wget
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget $BM_KERNEL -O kernel
|
||||||
"$BM_KERNEL" -o kernel
|
wget $BM_DTB -O dtb
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
"$BM_DTB" -o dtb
|
|
||||||
|
|
||||||
cat kernel dtb > Image.gz-dtb
|
cat kernel dtb > Image.gz-dtb
|
||||||
rm kernel
|
rm kernel dtb
|
||||||
else
|
else
|
||||||
cat $BM_KERNEL $BM_DTB > Image.gz-dtb
|
cat $BM_KERNEL $BM_DTB > Image.gz-dtb
|
||||||
cp $BM_DTB dtb
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PATH=$BM:$PATH
|
|
||||||
|
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
mkbootimg.py \
|
abootimg \
|
||||||
--kernel Image.gz-dtb \
|
--create artifacts/fastboot.img \
|
||||||
--ramdisk rootfs.cpio.gz \
|
-k Image.gz-dtb \
|
||||||
--dtb dtb \
|
-r rootfs.cpio.gz \
|
||||||
--cmdline "$BM_CMDLINE" \
|
-c cmdline="$BM_CMDLINE"
|
||||||
$BM_MKBOOT_PARAMS \
|
rm Image.gz-dtb
|
||||||
--header_version 2 \
|
|
||||||
-o artifacts/fastboot.img
|
|
||||||
|
|
||||||
rm Image.gz-dtb dtb
|
export PATH=$BM:$PATH
|
||||||
|
|
||||||
# Start background command for talking to serial if we have one.
|
# Start background command for talking to serial if we have one.
|
||||||
if [ -n "$BM_SERIAL_SCRIPT" ]; then
|
if [ -n "$BM_SERIAL_SCRIPT" ]; then
|
||||||
@@ -142,7 +133,6 @@ fi
|
|||||||
set +e
|
set +e
|
||||||
$BM/fastboot_run.py \
|
$BM/fastboot_run.py \
|
||||||
--dev="$BM_SERIAL" \
|
--dev="$BM_SERIAL" \
|
||||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20} \
|
|
||||||
--fbserial="$BM_FASTBOOT_SERIAL" \
|
--fbserial="$BM_FASTBOOT_SERIAL" \
|
||||||
--powerup="$BM_POWERUP" \
|
--powerup="$BM_POWERUP" \
|
||||||
--powerdown="$BM_POWERDOWN"
|
--powerdown="$BM_POWERDOWN"
|
||||||
|
@@ -22,21 +22,19 @@
|
|||||||
# IN THE SOFTWARE.
|
# IN THE SOFTWARE.
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import subprocess
|
import os
|
||||||
import re
|
import re
|
||||||
from serial_buffer import SerialBuffer
|
from serial_buffer import SerialBuffer
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
|
||||||
class FastbootRun:
|
class FastbootRun:
|
||||||
def __init__(self, args, test_timeout):
|
def __init__(self, args):
|
||||||
self.powerup = args.powerup
|
self.powerup = args.powerup
|
||||||
self.ser = SerialBuffer(
|
# We would like something like a 1 minute timeout, but the piglit traces
|
||||||
args.dev, "results/serial-output.txt", "R SERIAL> ")
|
# jobs stall out for long periods of time.
|
||||||
self.fastboot = "fastboot boot -s {ser} artifacts/fastboot.img".format(
|
self.ser = SerialBuffer(args.dev, "results/serial-output.txt", "R SERIAL> ", timeout=600)
|
||||||
ser=args.fbserial)
|
self.fastboot="fastboot boot -s {ser} artifacts/fastboot.img".format(ser=args.fbserial)
|
||||||
self.test_timeout = test_timeout
|
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.ser.close()
|
self.ser.close()
|
||||||
@@ -46,40 +44,34 @@ class FastbootRun:
|
|||||||
NO_COLOR = '\033[0m'
|
NO_COLOR = '\033[0m'
|
||||||
print(RED + message + NO_COLOR)
|
print(RED + message + NO_COLOR)
|
||||||
|
|
||||||
def logged_system(self, cmd, timeout=60):
|
def logged_system(self, cmd):
|
||||||
print("Running '{}'".format(cmd))
|
print("Running '{}'".format(cmd))
|
||||||
try:
|
return os.system(cmd)
|
||||||
return subprocess.call(cmd, shell=True, timeout=timeout)
|
|
||||||
except subprocess.TimeoutExpired:
|
|
||||||
self.print_error("timeout, restarting run...")
|
|
||||||
return 2
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if ret := self.logged_system(self.powerup):
|
if self.logged_system(self.powerup) != 0:
|
||||||
return ret
|
return 1
|
||||||
|
|
||||||
fastboot_ready = False
|
fastboot_ready = False
|
||||||
for line in self.ser.lines(timeout=2 * 60, phase="bootloader"):
|
for line in self.ser.lines():
|
||||||
if re.search("fastboot: processing commands", line) or \
|
if re.search("fastboot: processing commands", line) or \
|
||||||
re.search("Listening for fastboot command on", line):
|
re.search("Listening for fastboot command on", line):
|
||||||
fastboot_ready = True
|
fastboot_ready = True
|
||||||
break
|
break
|
||||||
|
|
||||||
if re.search("data abort", line):
|
if re.search("data abort", line):
|
||||||
self.print_error(
|
self.print_error("Detected crash during boot, restarting run...")
|
||||||
"Detected crash during boot, restarting run...")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
if not fastboot_ready:
|
if not fastboot_ready:
|
||||||
self.print_error(
|
self.print_error("Failed to get to fastboot prompt, restarting run...")
|
||||||
"Failed to get to fastboot prompt, restarting run...")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
if ret := self.logged_system(self.fastboot):
|
if self.logged_system(self.fastboot) != 0:
|
||||||
return ret
|
return 1
|
||||||
|
|
||||||
print_more_lines = -1
|
print_more_lines = -1
|
||||||
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
|
for line in self.ser.lines():
|
||||||
if print_more_lines == 0:
|
if print_more_lines == 0:
|
||||||
return 2
|
return 2
|
||||||
if print_more_lines > 0:
|
if print_more_lines > 0:
|
||||||
@@ -91,8 +83,7 @@ class FastbootRun:
|
|||||||
# The db820c boards intermittently reboot. Just restart the run
|
# The db820c boards intermittently reboot. Just restart the run
|
||||||
# when if we see a reboot after we got past fastboot.
|
# when if we see a reboot after we got past fastboot.
|
||||||
if re.search("PON REASON", line):
|
if re.search("PON REASON", line):
|
||||||
self.print_error(
|
self.print_error("Detected spontaneous reboot, restarting run...")
|
||||||
"Detected spontaneous reboot, restarting run...")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
# db820c sometimes wedges around iommu fault recovery
|
# db820c sometimes wedges around iommu fault recovery
|
||||||
@@ -126,26 +117,18 @@ class FastbootRun:
|
|||||||
else:
|
else:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
self.print_error(
|
self.print_error("Reached the end of the CPU serial log without finding a result, restarting run...")
|
||||||
"Reached the end of the CPU serial log without finding a result, restarting run...")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument(
|
parser.add_argument('--dev', type=str, help='Serial device (otherwise reading from serial-output.txt)')
|
||||||
'--dev', type=str, help='Serial device (otherwise reading from serial-output.txt)')
|
parser.add_argument('--powerup', type=str, help='shell command for rebooting', required=True)
|
||||||
parser.add_argument('--powerup', type=str,
|
parser.add_argument('--powerdown', type=str, help='shell command for powering off', required=True)
|
||||||
help='shell command for rebooting', required=True)
|
parser.add_argument('--fbserial', type=str, help='fastboot serial number of the board', required=True)
|
||||||
parser.add_argument('--powerdown', type=str,
|
|
||||||
help='shell command for powering off', required=True)
|
|
||||||
parser.add_argument('--fbserial', type=str,
|
|
||||||
help='fastboot serial number of the board', required=True)
|
|
||||||
parser.add_argument('--test-timeout', type=int,
|
|
||||||
help='Test phase timeout (minutes)', required=True)
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
fastboot = FastbootRun(args, args.test_timeout * 60)
|
fastboot = FastbootRun(args)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
retval = fastboot.run()
|
retval = fastboot.run()
|
||||||
@@ -153,12 +136,11 @@ def main():
|
|||||||
if retval != 2:
|
if retval != 2:
|
||||||
break
|
break
|
||||||
|
|
||||||
fastboot = FastbootRun(args, args.test_timeout * 60)
|
fastboot = FastbootRun(args)
|
||||||
|
|
||||||
fastboot.logged_system(args.powerdown)
|
fastboot.logged_system(args.powerdown)
|
||||||
|
|
||||||
sys.exit(retval)
|
sys.exit(retval)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@@ -8,8 +8,8 @@ relay = sys.argv[2]
|
|||||||
|
|
||||||
# our relays are "off" means "board is powered".
|
# our relays are "off" means "board is powered".
|
||||||
mode_swap = {
|
mode_swap = {
|
||||||
"on": "off",
|
"on" : "off",
|
||||||
"off": "on",
|
"off" : "on",
|
||||||
}
|
}
|
||||||
mode = mode_swap[mode]
|
mode = mode_swap[mode]
|
||||||
|
|
||||||
|
@@ -1,569 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
#
|
|
||||||
# Copyright 2015, The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
"""Creates the boot image."""
|
|
||||||
from argparse import (ArgumentParser, ArgumentTypeError,
|
|
||||||
FileType, RawDescriptionHelpFormatter)
|
|
||||||
from hashlib import sha1
|
|
||||||
from os import fstat
|
|
||||||
from struct import pack
|
|
||||||
import array
|
|
||||||
import collections
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import subprocess
|
|
||||||
import tempfile
|
|
||||||
# Constant and structure definition is in
|
|
||||||
# system/tools/mkbootimg/include/bootimg/bootimg.h
|
|
||||||
BOOT_MAGIC = 'ANDROID!'
|
|
||||||
BOOT_MAGIC_SIZE = 8
|
|
||||||
BOOT_NAME_SIZE = 16
|
|
||||||
BOOT_ARGS_SIZE = 512
|
|
||||||
BOOT_EXTRA_ARGS_SIZE = 1024
|
|
||||||
BOOT_IMAGE_HEADER_V1_SIZE = 1648
|
|
||||||
BOOT_IMAGE_HEADER_V2_SIZE = 1660
|
|
||||||
BOOT_IMAGE_HEADER_V3_SIZE = 1580
|
|
||||||
BOOT_IMAGE_HEADER_V3_PAGESIZE = 4096
|
|
||||||
BOOT_IMAGE_HEADER_V4_SIZE = 1584
|
|
||||||
BOOT_IMAGE_V4_SIGNATURE_SIZE = 4096
|
|
||||||
VENDOR_BOOT_MAGIC = 'VNDRBOOT'
|
|
||||||
VENDOR_BOOT_MAGIC_SIZE = 8
|
|
||||||
VENDOR_BOOT_NAME_SIZE = BOOT_NAME_SIZE
|
|
||||||
VENDOR_BOOT_ARGS_SIZE = 2048
|
|
||||||
VENDOR_BOOT_IMAGE_HEADER_V3_SIZE = 2112
|
|
||||||
VENDOR_BOOT_IMAGE_HEADER_V4_SIZE = 2128
|
|
||||||
VENDOR_RAMDISK_TYPE_NONE = 0
|
|
||||||
VENDOR_RAMDISK_TYPE_PLATFORM = 1
|
|
||||||
VENDOR_RAMDISK_TYPE_RECOVERY = 2
|
|
||||||
VENDOR_RAMDISK_TYPE_DLKM = 3
|
|
||||||
VENDOR_RAMDISK_NAME_SIZE = 32
|
|
||||||
VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE = 16
|
|
||||||
VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE = 108
|
|
||||||
# Names with special meaning, mustn't be specified in --ramdisk_name.
|
|
||||||
VENDOR_RAMDISK_NAME_BLOCKLIST = {b'default'}
|
|
||||||
PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT = '--vendor_ramdisk_fragment'
|
|
||||||
def filesize(f):
|
|
||||||
if f is None:
|
|
||||||
return 0
|
|
||||||
try:
|
|
||||||
return fstat(f.fileno()).st_size
|
|
||||||
except OSError:
|
|
||||||
return 0
|
|
||||||
def update_sha(sha, f):
|
|
||||||
if f:
|
|
||||||
sha.update(f.read())
|
|
||||||
f.seek(0)
|
|
||||||
sha.update(pack('I', filesize(f)))
|
|
||||||
else:
|
|
||||||
sha.update(pack('I', 0))
|
|
||||||
def pad_file(f, padding):
|
|
||||||
pad = (padding - (f.tell() & (padding - 1))) & (padding - 1)
|
|
||||||
f.write(pack(str(pad) + 'x'))
|
|
||||||
def get_number_of_pages(image_size, page_size):
|
|
||||||
"""calculates the number of pages required for the image"""
|
|
||||||
return (image_size + page_size - 1) // page_size
|
|
||||||
def get_recovery_dtbo_offset(args):
|
|
||||||
"""calculates the offset of recovery_dtbo image in the boot image"""
|
|
||||||
num_header_pages = 1 # header occupies a page
|
|
||||||
num_kernel_pages = get_number_of_pages(filesize(args.kernel), args.pagesize)
|
|
||||||
num_ramdisk_pages = get_number_of_pages(filesize(args.ramdisk),
|
|
||||||
args.pagesize)
|
|
||||||
num_second_pages = get_number_of_pages(filesize(args.second), args.pagesize)
|
|
||||||
dtbo_offset = args.pagesize * (num_header_pages + num_kernel_pages +
|
|
||||||
num_ramdisk_pages + num_second_pages)
|
|
||||||
return dtbo_offset
|
|
||||||
def write_header_v3_and_above(args):
|
|
||||||
if args.header_version > 3:
|
|
||||||
boot_header_size = BOOT_IMAGE_HEADER_V4_SIZE
|
|
||||||
else:
|
|
||||||
boot_header_size = BOOT_IMAGE_HEADER_V3_SIZE
|
|
||||||
args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode()))
|
|
||||||
# kernel size in bytes
|
|
||||||
args.output.write(pack('I', filesize(args.kernel)))
|
|
||||||
# ramdisk size in bytes
|
|
||||||
args.output.write(pack('I', filesize(args.ramdisk)))
|
|
||||||
# os version and patch level
|
|
||||||
args.output.write(pack('I', (args.os_version << 11) | args.os_patch_level))
|
|
||||||
args.output.write(pack('I', boot_header_size))
|
|
||||||
# reserved
|
|
||||||
args.output.write(pack('4I', 0, 0, 0, 0))
|
|
||||||
# version of boot image header
|
|
||||||
args.output.write(pack('I', args.header_version))
|
|
||||||
args.output.write(pack(f'{BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE}s',
|
|
||||||
args.cmdline))
|
|
||||||
if args.header_version >= 4:
|
|
||||||
# The signature used to verify boot image v4.
|
|
||||||
args.output.write(pack('I', BOOT_IMAGE_V4_SIGNATURE_SIZE))
|
|
||||||
pad_file(args.output, BOOT_IMAGE_HEADER_V3_PAGESIZE)
|
|
||||||
def write_vendor_boot_header(args):
|
|
||||||
if filesize(args.dtb) == 0:
|
|
||||||
raise ValueError('DTB image must not be empty.')
|
|
||||||
if args.header_version > 3:
|
|
||||||
vendor_ramdisk_size = args.vendor_ramdisk_total_size
|
|
||||||
vendor_boot_header_size = VENDOR_BOOT_IMAGE_HEADER_V4_SIZE
|
|
||||||
else:
|
|
||||||
vendor_ramdisk_size = filesize(args.vendor_ramdisk)
|
|
||||||
vendor_boot_header_size = VENDOR_BOOT_IMAGE_HEADER_V3_SIZE
|
|
||||||
args.vendor_boot.write(pack(f'{VENDOR_BOOT_MAGIC_SIZE}s',
|
|
||||||
VENDOR_BOOT_MAGIC.encode()))
|
|
||||||
# version of boot image header
|
|
||||||
args.vendor_boot.write(pack('I', args.header_version))
|
|
||||||
# flash page size
|
|
||||||
args.vendor_boot.write(pack('I', args.pagesize))
|
|
||||||
# kernel physical load address
|
|
||||||
args.vendor_boot.write(pack('I', args.base + args.kernel_offset))
|
|
||||||
# ramdisk physical load address
|
|
||||||
args.vendor_boot.write(pack('I', args.base + args.ramdisk_offset))
|
|
||||||
# ramdisk size in bytes
|
|
||||||
args.vendor_boot.write(pack('I', vendor_ramdisk_size))
|
|
||||||
args.vendor_boot.write(pack(f'{VENDOR_BOOT_ARGS_SIZE}s',
|
|
||||||
args.vendor_cmdline))
|
|
||||||
# kernel tags physical load address
|
|
||||||
args.vendor_boot.write(pack('I', args.base + args.tags_offset))
|
|
||||||
# asciiz product name
|
|
||||||
args.vendor_boot.write(pack(f'{VENDOR_BOOT_NAME_SIZE}s', args.board))
|
|
||||||
# header size in bytes
|
|
||||||
args.vendor_boot.write(pack('I', vendor_boot_header_size))
|
|
||||||
# dtb size in bytes
|
|
||||||
args.vendor_boot.write(pack('I', filesize(args.dtb)))
|
|
||||||
# dtb physical load address
|
|
||||||
args.vendor_boot.write(pack('Q', args.base + args.dtb_offset))
|
|
||||||
if args.header_version > 3:
|
|
||||||
vendor_ramdisk_table_size = (args.vendor_ramdisk_table_entry_num *
|
|
||||||
VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE)
|
|
||||||
# vendor ramdisk table size in bytes
|
|
||||||
args.vendor_boot.write(pack('I', vendor_ramdisk_table_size))
|
|
||||||
# number of vendor ramdisk table entries
|
|
||||||
args.vendor_boot.write(pack('I', args.vendor_ramdisk_table_entry_num))
|
|
||||||
# vendor ramdisk table entry size in bytes
|
|
||||||
args.vendor_boot.write(pack('I', VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE))
|
|
||||||
# bootconfig section size in bytes
|
|
||||||
args.vendor_boot.write(pack('I', filesize(args.vendor_bootconfig)))
|
|
||||||
pad_file(args.vendor_boot, args.pagesize)
|
|
||||||
def write_header(args):
|
|
||||||
if args.header_version > 4:
|
|
||||||
raise ValueError(
|
|
||||||
f'Boot header version {args.header_version} not supported')
|
|
||||||
if args.header_version in {3, 4}:
|
|
||||||
return write_header_v3_and_above(args)
|
|
||||||
ramdisk_load_address = ((args.base + args.ramdisk_offset)
|
|
||||||
if filesize(args.ramdisk) > 0 else 0)
|
|
||||||
second_load_address = ((args.base + args.second_offset)
|
|
||||||
if filesize(args.second) > 0 else 0)
|
|
||||||
args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode()))
|
|
||||||
# kernel size in bytes
|
|
||||||
args.output.write(pack('I', filesize(args.kernel)))
|
|
||||||
# kernel physical load address
|
|
||||||
args.output.write(pack('I', args.base + args.kernel_offset))
|
|
||||||
# ramdisk size in bytes
|
|
||||||
args.output.write(pack('I', filesize(args.ramdisk)))
|
|
||||||
# ramdisk physical load address
|
|
||||||
args.output.write(pack('I', ramdisk_load_address))
|
|
||||||
# second bootloader size in bytes
|
|
||||||
args.output.write(pack('I', filesize(args.second)))
|
|
||||||
# second bootloader physical load address
|
|
||||||
args.output.write(pack('I', second_load_address))
|
|
||||||
# kernel tags physical load address
|
|
||||||
args.output.write(pack('I', args.base + args.tags_offset))
|
|
||||||
# flash page size
|
|
||||||
args.output.write(pack('I', args.pagesize))
|
|
||||||
# version of boot image header
|
|
||||||
args.output.write(pack('I', args.header_version))
|
|
||||||
# os version and patch level
|
|
||||||
args.output.write(pack('I', (args.os_version << 11) | args.os_patch_level))
|
|
||||||
# asciiz product name
|
|
||||||
args.output.write(pack(f'{BOOT_NAME_SIZE}s', args.board))
|
|
||||||
args.output.write(pack(f'{BOOT_ARGS_SIZE}s', args.cmdline))
|
|
||||||
sha = sha1()
|
|
||||||
update_sha(sha, args.kernel)
|
|
||||||
update_sha(sha, args.ramdisk)
|
|
||||||
update_sha(sha, args.second)
|
|
||||||
if args.header_version > 0:
|
|
||||||
update_sha(sha, args.recovery_dtbo)
|
|
||||||
if args.header_version > 1:
|
|
||||||
update_sha(sha, args.dtb)
|
|
||||||
img_id = pack('32s', sha.digest())
|
|
||||||
args.output.write(img_id)
|
|
||||||
args.output.write(pack(f'{BOOT_EXTRA_ARGS_SIZE}s', args.extra_cmdline))
|
|
||||||
if args.header_version > 0:
|
|
||||||
if args.recovery_dtbo:
|
|
||||||
# recovery dtbo size in bytes
|
|
||||||
args.output.write(pack('I', filesize(args.recovery_dtbo)))
|
|
||||||
# recovert dtbo offset in the boot image
|
|
||||||
args.output.write(pack('Q', get_recovery_dtbo_offset(args)))
|
|
||||||
else:
|
|
||||||
# Set to zero if no recovery dtbo
|
|
||||||
args.output.write(pack('I', 0))
|
|
||||||
args.output.write(pack('Q', 0))
|
|
||||||
# Populate boot image header size for header versions 1 and 2.
|
|
||||||
if args.header_version == 1:
|
|
||||||
args.output.write(pack('I', BOOT_IMAGE_HEADER_V1_SIZE))
|
|
||||||
elif args.header_version == 2:
|
|
||||||
args.output.write(pack('I', BOOT_IMAGE_HEADER_V2_SIZE))
|
|
||||||
if args.header_version > 1:
|
|
||||||
if filesize(args.dtb) == 0:
|
|
||||||
raise ValueError('DTB image must not be empty.')
|
|
||||||
# dtb size in bytes
|
|
||||||
args.output.write(pack('I', filesize(args.dtb)))
|
|
||||||
# dtb physical load address
|
|
||||||
args.output.write(pack('Q', args.base + args.dtb_offset))
|
|
||||||
pad_file(args.output, args.pagesize)
|
|
||||||
return img_id
|
|
||||||
class AsciizBytes:
|
|
||||||
"""Parses a string and encodes it as an asciiz bytes object.
|
|
||||||
>>> AsciizBytes(bufsize=4)('foo')
|
|
||||||
b'foo\\x00'
|
|
||||||
>>> AsciizBytes(bufsize=4)('foob')
|
|
||||||
Traceback (most recent call last):
|
|
||||||
...
|
|
||||||
argparse.ArgumentTypeError: Encoded asciiz length exceeded: max 4, got 5
|
|
||||||
"""
|
|
||||||
def __init__(self, bufsize):
|
|
||||||
self.bufsize = bufsize
|
|
||||||
def __call__(self, arg):
|
|
||||||
arg_bytes = arg.encode() + b'\x00'
|
|
||||||
if len(arg_bytes) > self.bufsize:
|
|
||||||
raise ArgumentTypeError(
|
|
||||||
'Encoded asciiz length exceeded: '
|
|
||||||
f'max {self.bufsize}, got {len(arg_bytes)}')
|
|
||||||
return arg_bytes
|
|
||||||
class VendorRamdiskTableBuilder:
|
|
||||||
"""Vendor ramdisk table builder.
|
|
||||||
Attributes:
|
|
||||||
entries: A list of VendorRamdiskTableEntry namedtuple.
|
|
||||||
ramdisk_total_size: Total size in bytes of all ramdisks in the table.
|
|
||||||
"""
|
|
||||||
VendorRamdiskTableEntry = collections.namedtuple( # pylint: disable=invalid-name
|
|
||||||
'VendorRamdiskTableEntry',
|
|
||||||
['ramdisk_path', 'ramdisk_size', 'ramdisk_offset', 'ramdisk_type',
|
|
||||||
'ramdisk_name', 'board_id'])
|
|
||||||
def __init__(self):
|
|
||||||
self.entries = []
|
|
||||||
self.ramdisk_total_size = 0
|
|
||||||
self.ramdisk_names = set()
|
|
||||||
def add_entry(self, ramdisk_path, ramdisk_type, ramdisk_name, board_id):
|
|
||||||
# Strip any trailing null for simple comparison.
|
|
||||||
stripped_ramdisk_name = ramdisk_name.rstrip(b'\x00')
|
|
||||||
if stripped_ramdisk_name in VENDOR_RAMDISK_NAME_BLOCKLIST:
|
|
||||||
raise ValueError(
|
|
||||||
f'Banned vendor ramdisk name: {stripped_ramdisk_name}')
|
|
||||||
if stripped_ramdisk_name in self.ramdisk_names:
|
|
||||||
raise ValueError(
|
|
||||||
f'Duplicated vendor ramdisk name: {stripped_ramdisk_name}')
|
|
||||||
self.ramdisk_names.add(stripped_ramdisk_name)
|
|
||||||
if board_id is None:
|
|
||||||
board_id = array.array(
|
|
||||||
'I', [0] * VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE)
|
|
||||||
else:
|
|
||||||
board_id = array.array('I', board_id)
|
|
||||||
if len(board_id) != VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE:
|
|
||||||
raise ValueError('board_id size must be '
|
|
||||||
f'{VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE}')
|
|
||||||
with open(ramdisk_path, 'rb') as f:
|
|
||||||
ramdisk_size = filesize(f)
|
|
||||||
self.entries.append(self.VendorRamdiskTableEntry(
|
|
||||||
ramdisk_path, ramdisk_size, self.ramdisk_total_size, ramdisk_type,
|
|
||||||
ramdisk_name, board_id))
|
|
||||||
self.ramdisk_total_size += ramdisk_size
|
|
||||||
def write_ramdisks_padded(self, fout, alignment):
|
|
||||||
for entry in self.entries:
|
|
||||||
with open(entry.ramdisk_path, 'rb') as f:
|
|
||||||
fout.write(f.read())
|
|
||||||
pad_file(fout, alignment)
|
|
||||||
def write_entries_padded(self, fout, alignment):
|
|
||||||
for entry in self.entries:
|
|
||||||
fout.write(pack('I', entry.ramdisk_size))
|
|
||||||
fout.write(pack('I', entry.ramdisk_offset))
|
|
||||||
fout.write(pack('I', entry.ramdisk_type))
|
|
||||||
fout.write(pack(f'{VENDOR_RAMDISK_NAME_SIZE}s',
|
|
||||||
entry.ramdisk_name))
|
|
||||||
fout.write(entry.board_id)
|
|
||||||
pad_file(fout, alignment)
|
|
||||||
def write_padded_file(f_out, f_in, padding):
|
|
||||||
if f_in is None:
|
|
||||||
return
|
|
||||||
f_out.write(f_in.read())
|
|
||||||
pad_file(f_out, padding)
|
|
||||||
def parse_int(x):
|
|
||||||
return int(x, 0)
|
|
||||||
def parse_os_version(x):
|
|
||||||
match = re.search(r'^(\d{1,3})(?:\.(\d{1,3})(?:\.(\d{1,3}))?)?', x)
|
|
||||||
if match:
|
|
||||||
a = int(match.group(1))
|
|
||||||
b = c = 0
|
|
||||||
if match.lastindex >= 2:
|
|
||||||
b = int(match.group(2))
|
|
||||||
if match.lastindex == 3:
|
|
||||||
c = int(match.group(3))
|
|
||||||
# 7 bits allocated for each field
|
|
||||||
assert a < 128
|
|
||||||
assert b < 128
|
|
||||||
assert c < 128
|
|
||||||
return (a << 14) | (b << 7) | c
|
|
||||||
return 0
|
|
||||||
def parse_os_patch_level(x):
|
|
||||||
match = re.search(r'^(\d{4})-(\d{2})(?:-(\d{2}))?', x)
|
|
||||||
if match:
|
|
||||||
y = int(match.group(1)) - 2000
|
|
||||||
m = int(match.group(2))
|
|
||||||
# 7 bits allocated for the year, 4 bits for the month
|
|
||||||
assert 0 <= y < 128
|
|
||||||
assert 0 < m <= 12
|
|
||||||
return (y << 4) | m
|
|
||||||
return 0
|
|
||||||
def parse_vendor_ramdisk_type(x):
|
|
||||||
type_dict = {
|
|
||||||
'none': VENDOR_RAMDISK_TYPE_NONE,
|
|
||||||
'platform': VENDOR_RAMDISK_TYPE_PLATFORM,
|
|
||||||
'recovery': VENDOR_RAMDISK_TYPE_RECOVERY,
|
|
||||||
'dlkm': VENDOR_RAMDISK_TYPE_DLKM,
|
|
||||||
}
|
|
||||||
if x.lower() in type_dict:
|
|
||||||
return type_dict[x.lower()]
|
|
||||||
return parse_int(x)
|
|
||||||
def get_vendor_boot_v4_usage():
|
|
||||||
return """vendor boot version 4 arguments:
|
|
||||||
--ramdisk_type {none,platform,recovery,dlkm}
|
|
||||||
specify the type of the ramdisk
|
|
||||||
--ramdisk_name NAME
|
|
||||||
specify the name of the ramdisk
|
|
||||||
--board_id{0..15} NUMBER
|
|
||||||
specify the value of the board_id vector, defaults to 0
|
|
||||||
--vendor_ramdisk_fragment VENDOR_RAMDISK_FILE
|
|
||||||
path to the vendor ramdisk file
|
|
||||||
These options can be specified multiple times, where each vendor ramdisk
|
|
||||||
option group ends with a --vendor_ramdisk_fragment option.
|
|
||||||
Each option group appends an additional ramdisk to the vendor boot image.
|
|
||||||
"""
|
|
||||||
def parse_vendor_ramdisk_args(args, args_list):
|
|
||||||
"""Parses vendor ramdisk specific arguments.
|
|
||||||
Args:
|
|
||||||
args: An argparse.Namespace object. Parsed results are stored into this
|
|
||||||
object.
|
|
||||||
args_list: A list of argument strings to be parsed.
|
|
||||||
Returns:
|
|
||||||
A list argument strings that are not parsed by this method.
|
|
||||||
"""
|
|
||||||
parser = ArgumentParser(add_help=False)
|
|
||||||
parser.add_argument('--ramdisk_type', type=parse_vendor_ramdisk_type,
|
|
||||||
default=VENDOR_RAMDISK_TYPE_NONE)
|
|
||||||
parser.add_argument('--ramdisk_name',
|
|
||||||
type=AsciizBytes(bufsize=VENDOR_RAMDISK_NAME_SIZE),
|
|
||||||
required=True)
|
|
||||||
for i in range(VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE):
|
|
||||||
parser.add_argument(f'--board_id{i}', type=parse_int, default=0)
|
|
||||||
parser.add_argument(PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT, required=True)
|
|
||||||
unknown_args = []
|
|
||||||
vendor_ramdisk_table_builder = VendorRamdiskTableBuilder()
|
|
||||||
if args.vendor_ramdisk is not None:
|
|
||||||
vendor_ramdisk_table_builder.add_entry(
|
|
||||||
args.vendor_ramdisk.name, VENDOR_RAMDISK_TYPE_PLATFORM, b'', None)
|
|
||||||
while PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT in args_list:
|
|
||||||
idx = args_list.index(PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT) + 2
|
|
||||||
vendor_ramdisk_args = args_list[:idx]
|
|
||||||
args_list = args_list[idx:]
|
|
||||||
ramdisk_args, extra_args = parser.parse_known_args(vendor_ramdisk_args)
|
|
||||||
ramdisk_args_dict = vars(ramdisk_args)
|
|
||||||
unknown_args.extend(extra_args)
|
|
||||||
ramdisk_path = ramdisk_args.vendor_ramdisk_fragment
|
|
||||||
ramdisk_type = ramdisk_args.ramdisk_type
|
|
||||||
ramdisk_name = ramdisk_args.ramdisk_name
|
|
||||||
board_id = [ramdisk_args_dict[f'board_id{i}']
|
|
||||||
for i in range(VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE)]
|
|
||||||
vendor_ramdisk_table_builder.add_entry(ramdisk_path, ramdisk_type,
|
|
||||||
ramdisk_name, board_id)
|
|
||||||
if len(args_list) > 0:
|
|
||||||
unknown_args.extend(args_list)
|
|
||||||
args.vendor_ramdisk_total_size = (vendor_ramdisk_table_builder
|
|
||||||
.ramdisk_total_size)
|
|
||||||
args.vendor_ramdisk_table_entry_num = len(vendor_ramdisk_table_builder
|
|
||||||
.entries)
|
|
||||||
args.vendor_ramdisk_table_builder = vendor_ramdisk_table_builder
|
|
||||||
return unknown_args
|
|
||||||
def parse_cmdline():
|
|
||||||
version_parser = ArgumentParser(add_help=False)
|
|
||||||
version_parser.add_argument('--header_version', type=parse_int, default=0)
|
|
||||||
if version_parser.parse_known_args()[0].header_version < 3:
|
|
||||||
# For boot header v0 to v2, the kernel commandline field is split into
|
|
||||||
# two fields, cmdline and extra_cmdline. Both fields are asciiz strings,
|
|
||||||
# so we minus one here to ensure the encoded string plus the
|
|
||||||
# null-terminator can fit in the buffer size.
|
|
||||||
cmdline_size = BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE - 1
|
|
||||||
else:
|
|
||||||
cmdline_size = BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE
|
|
||||||
parser = ArgumentParser(formatter_class=RawDescriptionHelpFormatter,
|
|
||||||
epilog=get_vendor_boot_v4_usage())
|
|
||||||
parser.add_argument('--kernel', type=FileType('rb'),
|
|
||||||
help='path to the kernel')
|
|
||||||
parser.add_argument('--ramdisk', type=FileType('rb'),
|
|
||||||
help='path to the ramdisk')
|
|
||||||
parser.add_argument('--second', type=FileType('rb'),
|
|
||||||
help='path to the second bootloader')
|
|
||||||
parser.add_argument('--dtb', type=FileType('rb'), help='path to the dtb')
|
|
||||||
dtbo_group = parser.add_mutually_exclusive_group()
|
|
||||||
dtbo_group.add_argument('--recovery_dtbo', type=FileType('rb'),
|
|
||||||
help='path to the recovery DTBO')
|
|
||||||
dtbo_group.add_argument('--recovery_acpio', type=FileType('rb'),
|
|
||||||
metavar='RECOVERY_ACPIO', dest='recovery_dtbo',
|
|
||||||
help='path to the recovery ACPIO')
|
|
||||||
parser.add_argument('--cmdline', type=AsciizBytes(bufsize=cmdline_size),
|
|
||||||
default='', help='kernel command line arguments')
|
|
||||||
parser.add_argument('--vendor_cmdline',
|
|
||||||
type=AsciizBytes(bufsize=VENDOR_BOOT_ARGS_SIZE),
|
|
||||||
default='',
|
|
||||||
help='vendor boot kernel command line arguments')
|
|
||||||
parser.add_argument('--base', type=parse_int, default=0x10000000,
|
|
||||||
help='base address')
|
|
||||||
parser.add_argument('--kernel_offset', type=parse_int, default=0x00008000,
|
|
||||||
help='kernel offset')
|
|
||||||
parser.add_argument('--ramdisk_offset', type=parse_int, default=0x01000000,
|
|
||||||
help='ramdisk offset')
|
|
||||||
parser.add_argument('--second_offset', type=parse_int, default=0x00f00000,
|
|
||||||
help='second bootloader offset')
|
|
||||||
parser.add_argument('--dtb_offset', type=parse_int, default=0x01f00000,
|
|
||||||
help='dtb offset')
|
|
||||||
parser.add_argument('--os_version', type=parse_os_version, default=0,
|
|
||||||
help='operating system version')
|
|
||||||
parser.add_argument('--os_patch_level', type=parse_os_patch_level,
|
|
||||||
default=0, help='operating system patch level')
|
|
||||||
parser.add_argument('--tags_offset', type=parse_int, default=0x00000100,
|
|
||||||
help='tags offset')
|
|
||||||
parser.add_argument('--board', type=AsciizBytes(bufsize=BOOT_NAME_SIZE),
|
|
||||||
default='', help='board name')
|
|
||||||
parser.add_argument('--pagesize', type=parse_int,
|
|
||||||
choices=[2**i for i in range(11, 15)], default=2048,
|
|
||||||
help='page size')
|
|
||||||
parser.add_argument('--id', action='store_true',
|
|
||||||
help='print the image ID on standard output')
|
|
||||||
parser.add_argument('--header_version', type=parse_int, default=0,
|
|
||||||
help='boot image header version')
|
|
||||||
parser.add_argument('-o', '--output', type=FileType('wb'),
|
|
||||||
help='output file name')
|
|
||||||
parser.add_argument('--gki_signing_algorithm',
|
|
||||||
help='GKI signing algorithm to use')
|
|
||||||
parser.add_argument('--gki_signing_key',
|
|
||||||
help='path to RSA private key file')
|
|
||||||
parser.add_argument('--gki_signing_signature_args',
|
|
||||||
help='other hash arguments passed to avbtool')
|
|
||||||
parser.add_argument('--gki_signing_avbtool_path',
|
|
||||||
help='path to avbtool for boot signature generation')
|
|
||||||
parser.add_argument('--vendor_boot', type=FileType('wb'),
|
|
||||||
help='vendor boot output file name')
|
|
||||||
parser.add_argument('--vendor_ramdisk', type=FileType('rb'),
|
|
||||||
help='path to the vendor ramdisk')
|
|
||||||
parser.add_argument('--vendor_bootconfig', type=FileType('rb'),
|
|
||||||
help='path to the vendor bootconfig file')
|
|
||||||
args, extra_args = parser.parse_known_args()
|
|
||||||
if args.vendor_boot is not None and args.header_version > 3:
|
|
||||||
extra_args = parse_vendor_ramdisk_args(args, extra_args)
|
|
||||||
if len(extra_args) > 0:
|
|
||||||
raise ValueError(f'Unrecognized arguments: {extra_args}')
|
|
||||||
if args.header_version < 3:
|
|
||||||
args.extra_cmdline = args.cmdline[BOOT_ARGS_SIZE-1:]
|
|
||||||
args.cmdline = args.cmdline[:BOOT_ARGS_SIZE-1] + b'\x00'
|
|
||||||
assert len(args.cmdline) <= BOOT_ARGS_SIZE
|
|
||||||
assert len(args.extra_cmdline) <= BOOT_EXTRA_ARGS_SIZE
|
|
||||||
return args
|
|
||||||
def add_boot_image_signature(args, pagesize):
|
|
||||||
"""Adds the boot image signature.
|
|
||||||
Note that the signature will only be verified in VTS to ensure a
|
|
||||||
generic boot.img is used. It will not be used by the device
|
|
||||||
bootloader at boot time. The bootloader should only verify
|
|
||||||
the boot vbmeta at the end of the boot partition (or in the top-level
|
|
||||||
vbmeta partition) via the Android Verified Boot process, when the
|
|
||||||
device boots.
|
|
||||||
"""
|
|
||||||
args.output.flush() # Flush the buffer for signature calculation.
|
|
||||||
# Appends zeros if the signing key is not specified.
|
|
||||||
if not args.gki_signing_key or not args.gki_signing_algorithm:
|
|
||||||
zeros = b'\x00' * BOOT_IMAGE_V4_SIGNATURE_SIZE
|
|
||||||
args.output.write(zeros)
|
|
||||||
pad_file(args.output, pagesize)
|
|
||||||
return
|
|
||||||
avbtool = 'avbtool' # Used from otatools.zip or Android build env.
|
|
||||||
# We need to specify the path of avbtool in build/core/Makefile.
|
|
||||||
# Because avbtool is not guaranteed to be in $PATH there.
|
|
||||||
if args.gki_signing_avbtool_path:
|
|
||||||
avbtool = args.gki_signing_avbtool_path
|
|
||||||
# Need to specify a value of --partition_size for avbtool to work.
|
|
||||||
# We use 64 MB below, but avbtool will not resize the boot image to
|
|
||||||
# this size because --do_not_append_vbmeta_image is also specified.
|
|
||||||
avbtool_cmd = [
|
|
||||||
avbtool, 'add_hash_footer',
|
|
||||||
'--partition_name', 'boot',
|
|
||||||
'--partition_size', str(64 * 1024 * 1024),
|
|
||||||
'--image', args.output.name,
|
|
||||||
'--algorithm', args.gki_signing_algorithm,
|
|
||||||
'--key', args.gki_signing_key,
|
|
||||||
'--salt', 'd00df00d'] # TODO: use a hash of kernel/ramdisk as the salt.
|
|
||||||
# Additional arguments passed to avbtool.
|
|
||||||
if args.gki_signing_signature_args:
|
|
||||||
avbtool_cmd += args.gki_signing_signature_args.split()
|
|
||||||
# Outputs the signed vbmeta to a separate file, then append to boot.img
|
|
||||||
# as the boot signature.
|
|
||||||
with tempfile.TemporaryDirectory() as temp_out_dir:
|
|
||||||
boot_signature_output = os.path.join(temp_out_dir, 'boot_signature')
|
|
||||||
avbtool_cmd += ['--do_not_append_vbmeta_image',
|
|
||||||
'--output_vbmeta_image', boot_signature_output]
|
|
||||||
subprocess.check_call(avbtool_cmd)
|
|
||||||
with open(boot_signature_output, 'rb') as boot_signature:
|
|
||||||
if filesize(boot_signature) > BOOT_IMAGE_V4_SIGNATURE_SIZE:
|
|
||||||
raise ValueError(
|
|
||||||
f'boot sigature size is > {BOOT_IMAGE_V4_SIGNATURE_SIZE}')
|
|
||||||
write_padded_file(args.output, boot_signature, pagesize)
|
|
||||||
def write_data(args, pagesize):
|
|
||||||
write_padded_file(args.output, args.kernel, pagesize)
|
|
||||||
write_padded_file(args.output, args.ramdisk, pagesize)
|
|
||||||
write_padded_file(args.output, args.second, pagesize)
|
|
||||||
if args.header_version > 0 and args.header_version < 3:
|
|
||||||
write_padded_file(args.output, args.recovery_dtbo, pagesize)
|
|
||||||
if args.header_version == 2:
|
|
||||||
write_padded_file(args.output, args.dtb, pagesize)
|
|
||||||
if args.header_version >= 4:
|
|
||||||
add_boot_image_signature(args, pagesize)
|
|
||||||
def write_vendor_boot_data(args):
|
|
||||||
if args.header_version > 3:
|
|
||||||
builder = args.vendor_ramdisk_table_builder
|
|
||||||
builder.write_ramdisks_padded(args.vendor_boot, args.pagesize)
|
|
||||||
write_padded_file(args.vendor_boot, args.dtb, args.pagesize)
|
|
||||||
builder.write_entries_padded(args.vendor_boot, args.pagesize)
|
|
||||||
write_padded_file(args.vendor_boot, args.vendor_bootconfig,
|
|
||||||
args.pagesize)
|
|
||||||
else:
|
|
||||||
write_padded_file(args.vendor_boot, args.vendor_ramdisk, args.pagesize)
|
|
||||||
write_padded_file(args.vendor_boot, args.dtb, args.pagesize)
|
|
||||||
def main():
|
|
||||||
args = parse_cmdline()
|
|
||||||
if args.vendor_boot is not None:
|
|
||||||
if args.header_version not in {3, 4}:
|
|
||||||
raise ValueError(
|
|
||||||
'--vendor_boot not compatible with given header version')
|
|
||||||
if args.header_version == 3 and args.vendor_ramdisk is None:
|
|
||||||
raise ValueError('--vendor_ramdisk missing or invalid')
|
|
||||||
write_vendor_boot_header(args)
|
|
||||||
write_vendor_boot_data(args)
|
|
||||||
if args.output is not None:
|
|
||||||
if args.second is not None and args.header_version > 2:
|
|
||||||
raise ValueError(
|
|
||||||
'--second not compatible with given header version')
|
|
||||||
img_id = write_header(args)
|
|
||||||
if args.header_version > 2:
|
|
||||||
write_data(args, BOOT_IMAGE_HEADER_V3_PAGESIZE)
|
|
||||||
else:
|
|
||||||
write_data(args, args.pagesize)
|
|
||||||
if args.id and img_id is not None:
|
|
||||||
print('0x' + ''.join(f'{octet:02x}' for octet in img_id))
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
@@ -1,7 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. "$SCRIPTS_DIR"/setup-test-env.sh
|
|
||||||
|
|
||||||
# Boot script for devices attached to a PoE switch, using NFS for the root
|
# Boot script for devices attached to a PoE switch, using NFS for the root
|
||||||
# filesystem.
|
# filesystem.
|
||||||
|
|
||||||
@@ -22,6 +20,18 @@ if [ -z "$BM_POE_ADDRESS" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$BM_POE_USERNAME" ]; then
|
||||||
|
echo "Must set BM_POE_USERNAME in your gitlab-runner config.toml [[runners]] environment"
|
||||||
|
echo "This is the PoE switch username."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$BM_POE_PASSWORD" ]; then
|
||||||
|
echo "Must set BM_POE_PASSWORD in your gitlab-runner config.toml [[runners]] environment"
|
||||||
|
echo "This is the PoE switch password."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
if [ -z "$BM_POE_INTERFACE" ]; then
|
||||||
echo "Must set BM_POE_INTERFACE in your gitlab-runner config.toml [[runners]] environment"
|
echo "Must set BM_POE_INTERFACE in your gitlab-runner config.toml [[runners]] environment"
|
||||||
echo "This is the PoE switch interface where the device is connected."
|
echo "This is the PoE switch interface where the device is connected."
|
||||||
@@ -73,8 +83,6 @@ fi
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
# Clear out any previous run's artifacts.
|
# Clear out any previous run's artifacts.
|
||||||
rm -rf results/
|
rm -rf results/
|
||||||
mkdir -p results
|
mkdir -p results
|
||||||
@@ -83,18 +91,13 @@ mkdir -p results
|
|||||||
# state, since it's volume-mounted on the host.
|
# state, since it's volume-mounted on the host.
|
||||||
rsync -a --delete $BM_ROOTFS/ /nfs/
|
rsync -a --delete $BM_ROOTFS/ /nfs/
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
# If BM_BOOTFS is an URL, download it
|
# If BM_BOOTFS is an URL, download it
|
||||||
if echo $BM_BOOTFS | grep -q http; then
|
if echo $BM_BOOTFS | grep -q http; then
|
||||||
apt-get install -y curl
|
apt install -y wget
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget ${FDO_HTTP_CACHE_URI:-}$BM_BOOTFS -O /tmp/bootfs.tar
|
||||||
"${FDO_HTTP_CACHE_URI:-}$BM_BOOTFS" -o /tmp/bootfs.tar
|
|
||||||
BM_BOOTFS=/tmp/bootfs.tar
|
BM_BOOTFS=/tmp/bootfs.tar
|
||||||
fi
|
fi
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
# If BM_BOOTFS is a file, assume it is a tarball and uncompress it
|
# If BM_BOOTFS is a file, assume it is a tarball and uncompress it
|
||||||
if [ -f $BM_BOOTFS ]; then
|
if [ -f $BM_BOOTFS ]; then
|
||||||
mkdir -p /tmp/bootfs
|
mkdir -p /tmp/bootfs
|
||||||
@@ -102,66 +105,31 @@ if [ -f $BM_BOOTFS ]; then
|
|||||||
BM_BOOTFS=/tmp/bootfs
|
BM_BOOTFS=/tmp/bootfs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
# Install kernel modules (it could be either in /lib/modules or
|
# Install kernel modules (it could be either in /lib/modules or
|
||||||
# /usr/lib/modules, but we want to install in the latter)
|
# /usr/lib/modules, but we want to install in the latter)
|
||||||
[ -d $BM_BOOTFS/usr/lib/modules ] && rsync -a $BM_BOOTFS/usr/lib/modules/ /nfs/usr/lib/modules/
|
[ -d $BM_BOOTFS/usr/lib/modules ] && rsync -a --delete $BM_BOOTFS/usr/lib/modules/ /nfs/usr/lib/modules/
|
||||||
[ -d $BM_BOOTFS/lib/modules ] && rsync -a $BM_BOOTFS/lib/modules/ /nfs/lib/modules/
|
[ -d $BM_BOOTFS/lib/modules ] && rsync -a --delete $BM_BOOTFS/lib/modules/ /nfs/usr/lib/modules/
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
# Install kernel image + bootloader files
|
# Install kernel image + bootloader files
|
||||||
rsync -aL --delete $BM_BOOTFS/boot/ /tftp/
|
rsync -a --delete $BM_BOOTFS/boot/ /tftp/
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
# Set up the pxelinux config for Jetson Nano
|
|
||||||
mkdir -p /tftp/pxelinux.cfg
|
|
||||||
cat <<EOF >/tftp/pxelinux.cfg/default-arm-tegra210-p3450-0000
|
|
||||||
PROMPT 0
|
|
||||||
TIMEOUT 30
|
|
||||||
DEFAULT primary
|
|
||||||
MENU TITLE jetson nano boot options
|
|
||||||
LABEL primary
|
|
||||||
MENU LABEL CI kernel on TFTP
|
|
||||||
LINUX Image
|
|
||||||
FDT tegra210-p3450-0000.dtb
|
|
||||||
APPEND \${cbootargs} $BM_CMDLINE
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Set up the pxelinux config for Jetson TK1
|
|
||||||
cat <<EOF >/tftp/pxelinux.cfg/default-arm-tegra124-jetson-tk1
|
|
||||||
PROMPT 0
|
|
||||||
TIMEOUT 30
|
|
||||||
DEFAULT primary
|
|
||||||
MENU TITLE jetson TK1 boot options
|
|
||||||
LABEL primary
|
|
||||||
MENU LABEL CI kernel on TFTP
|
|
||||||
LINUX zImage
|
|
||||||
FDT tegra124-jetson-tk1.dtb
|
|
||||||
APPEND \${cbootargs} $BM_CMDLINE
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Create the rootfs in the NFS directory
|
# Create the rootfs in the NFS directory
|
||||||
mkdir -p /nfs/results
|
mkdir -p /nfs/results
|
||||||
. $BM/rootfs-setup.sh /nfs
|
. $BM/rootfs-setup.sh /nfs
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
echo "$BM_CMDLINE" > /tftp/cmdline.txt
|
echo "$BM_CMDLINE" > /tftp/cmdline.txt
|
||||||
|
|
||||||
# Add some required options in config.txt
|
# Add some required options in config.txt
|
||||||
printf "$BM_BOOTCONFIG" >> /tftp/config.txt
|
printf "$BM_BOOTCONFIG" >> /tftp/config.txt
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
ATTEMPTS=10
|
ATTEMPTS=2
|
||||||
while [ $((ATTEMPTS--)) -gt 0 ]; do
|
while [ $((ATTEMPTS--)) -gt 0 ]; do
|
||||||
python3 $BM/poe_run.py \
|
python3 $BM/poe_run.py \
|
||||||
--dev="$BM_SERIAL" \
|
--dev="$BM_SERIAL" \
|
||||||
--powerup="$BM_POWERUP" \
|
--powerup="$BM_POWERUP" \
|
||||||
--powerdown="$BM_POWERDOWN" \
|
--powerdown="$BM_POWERDOWN" \
|
||||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
|
--timeout="${BM_POE_TIMEOUT:-60}"
|
||||||
ret=$?
|
ret=$?
|
||||||
|
|
||||||
if [ $ret -eq 2 ]; then
|
if [ $ret -eq 2 ]; then
|
||||||
@@ -172,12 +140,8 @@ while [ $((ATTEMPTS--)) -gt 0 ]; do
|
|||||||
done
|
done
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
|
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
|
||||||
# will look for them.
|
# will look for them.
|
||||||
cp -Rp /nfs/results/. results/
|
cp -Rp /nfs/results/. results/
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
exit $ret
|
exit $ret
|
||||||
|
@@ -28,14 +28,11 @@ from serial_buffer import SerialBuffer
|
|||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
|
||||||
class PoERun:
|
class PoERun:
|
||||||
def __init__(self, args, test_timeout):
|
def __init__(self, args):
|
||||||
self.powerup = args.powerup
|
self.powerup = args.powerup
|
||||||
self.powerdown = args.powerdown
|
self.powerdown = args.powerdown
|
||||||
self.ser = SerialBuffer(
|
self.ser = SerialBuffer(args.dev, "results/serial-output.txt", "", args.timeout)
|
||||||
args.dev, "results/serial-output.txt", "")
|
|
||||||
self.test_timeout = test_timeout
|
|
||||||
|
|
||||||
def print_error(self, message):
|
def print_error(self, message):
|
||||||
RED = '\033[0;31m'
|
RED = '\033[0;31m'
|
||||||
@@ -51,17 +48,16 @@ class PoERun:
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
boot_detected = False
|
boot_detected = False
|
||||||
for line in self.ser.lines(timeout=5 * 60, phase="bootloader"):
|
for line in self.ser.lines():
|
||||||
if re.search("Booting Linux", line):
|
if re.search("Booting Linux", line):
|
||||||
boot_detected = True
|
boot_detected = True
|
||||||
break
|
break
|
||||||
|
|
||||||
if not boot_detected:
|
if not boot_detected:
|
||||||
self.print_error(
|
self.print_error("Something wrong; couldn't detect the boot start up sequence")
|
||||||
"Something wrong; couldn't detect the boot start up sequence")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
|
for line in self.ser.lines():
|
||||||
if re.search("---. end Kernel panic", line):
|
if re.search("---. end Kernel panic", line):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -70,15 +66,6 @@ class PoERun:
|
|||||||
self.print_error("Memory overflow in the binner; GPU hang")
|
self.print_error("Memory overflow in the binner; GPU hang")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if re.search("nouveau 57000000.gpu: bus: MMIO read of 00000000 FAULT at 137000", line):
|
|
||||||
self.print_error("nouveau jetson boot bug, retrying.")
|
|
||||||
return 2
|
|
||||||
|
|
||||||
# network fail on tk1
|
|
||||||
if re.search("NETDEV WATCHDOG:.* transmit queue 0 timed out", line):
|
|
||||||
self.print_error("nouveau jetson tk1 network fail, retrying.")
|
|
||||||
return 2
|
|
||||||
|
|
||||||
result = re.search("hwci: mesa: (\S*)", line)
|
result = re.search("hwci: mesa: (\S*)", line)
|
||||||
if result:
|
if result:
|
||||||
if result.group(1) == "pass":
|
if result.group(1) == "pass":
|
||||||
@@ -86,30 +73,24 @@ class PoERun:
|
|||||||
else:
|
else:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
self.print_error(
|
self.print_error("Reached the end of the CPU serial log without finding a result")
|
||||||
"Reached the end of the CPU serial log without finding a result")
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('--dev', type=str,
|
parser.add_argument('--dev', type=str, help='Serial device to monitor', required=True)
|
||||||
help='Serial device to monitor', required=True)
|
parser.add_argument('--powerup', type=str, help='shell command for rebooting', required=True)
|
||||||
parser.add_argument('--powerup', type=str,
|
parser.add_argument('--powerdown', type=str, help='shell command for powering off', required=True)
|
||||||
help='shell command for rebooting', required=True)
|
parser.add_argument('--timeout', type=int, default=60,
|
||||||
parser.add_argument('--powerdown', type=str,
|
help='time in seconds to wait for activity', required=False)
|
||||||
help='shell command for powering off', required=True)
|
|
||||||
parser.add_argument(
|
|
||||||
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
poe = PoERun(args, args.test_timeout * 60)
|
poe = PoERun(args)
|
||||||
retval = poe.run()
|
retval = poe.run()
|
||||||
|
|
||||||
poe.logged_system(args.powerdown)
|
poe.logged_system(args.powerdown)
|
||||||
|
|
||||||
sys.exit(retval)
|
sys.exit(retval)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@@ -8,17 +8,11 @@ mkdir -p $rootfs_dst/results
|
|||||||
cp $BM/bm-init.sh $rootfs_dst/init
|
cp $BM/bm-init.sh $rootfs_dst/init
|
||||||
cp $CI_COMMON/init*.sh $rootfs_dst/
|
cp $CI_COMMON/init*.sh $rootfs_dst/
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
# Make JWT token available as file in the bare-metal storage to enable access
|
# Make JWT token available as file in the bare-metal storage to enable access
|
||||||
# to MinIO
|
# to MinIO
|
||||||
cp "${CI_JOB_JWT_FILE}" "${rootfs_dst}${CI_JOB_JWT_FILE}"
|
cp "${CI_JOB_JWT_FILE}" "${rootfs_dst}${CI_JOB_JWT_FILE}"
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
|
||||||
cp $CI_COMMON/capture-devcoredump.sh $rootfs_dst/
|
cp $CI_COMMON/capture-devcoredump.sh $rootfs_dst/
|
||||||
cp $CI_COMMON/intel-gpu-freq.sh $rootfs_dst/
|
|
||||||
cp "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/"
|
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
@@ -33,5 +27,3 @@ set -x
|
|||||||
# Add the Mesa drivers we built, and make a consistent symlink to them.
|
# Add the Mesa drivers we built, and make a consistent symlink to them.
|
||||||
mkdir -p $rootfs_dst/$CI_PROJECT_DIR
|
mkdir -p $rootfs_dst/$CI_PROJECT_DIR
|
||||||
rsync -aH --delete $CI_PROJECT_DIR/install/ $rootfs_dst/$CI_PROJECT_DIR/install/
|
rsync -aH --delete $CI_PROJECT_DIR/install/ $rootfs_dst/$CI_PROJECT_DIR/install/
|
||||||
|
|
||||||
date +'%F %T'
|
|
||||||
|
@@ -28,9 +28,8 @@ import serial
|
|||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
class SerialBuffer:
|
class SerialBuffer:
|
||||||
def __init__(self, dev, filename, prefix, timeout=None, line_queue=None):
|
def __init__(self, dev, filename, prefix, timeout = None):
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self.dev = dev
|
self.dev = dev
|
||||||
|
|
||||||
@@ -42,13 +41,7 @@ class SerialBuffer:
|
|||||||
self.serial = None
|
self.serial = None
|
||||||
|
|
||||||
self.byte_queue = queue.Queue()
|
self.byte_queue = queue.Queue()
|
||||||
# allow multiple SerialBuffers to share a line queue so you can merge
|
self.line_queue = queue.Queue()
|
||||||
# servo's CPU and EC streams into one thing to watch the boot/test
|
|
||||||
# progress on.
|
|
||||||
if line_queue:
|
|
||||||
self.line_queue = line_queue
|
|
||||||
else:
|
|
||||||
self.line_queue = queue.Queue()
|
|
||||||
self.prefix = prefix
|
self.prefix = prefix
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
self.sentinel = object()
|
self.sentinel = object()
|
||||||
@@ -137,30 +130,14 @@ class SerialBuffer:
|
|||||||
self.line_queue.put(line)
|
self.line_queue.put(line)
|
||||||
line = bytearray()
|
line = bytearray()
|
||||||
|
|
||||||
def lines(self, timeout=None, phase=None):
|
def get_line(self):
|
||||||
start_time = time.monotonic()
|
line = self.line_queue.get()
|
||||||
while True:
|
if line == self.sentinel:
|
||||||
read_timeout = None
|
self.lines_thread.join()
|
||||||
if timeout:
|
return line
|
||||||
read_timeout = timeout - (time.monotonic() - start_time)
|
|
||||||
if read_timeout <= 0:
|
|
||||||
print("read timeout waiting for serial during {}".format(phase))
|
|
||||||
self.close()
|
|
||||||
break
|
|
||||||
|
|
||||||
try:
|
def lines(self):
|
||||||
line = self.line_queue.get(timeout=read_timeout)
|
return iter(self.get_line, self.sentinel)
|
||||||
except queue.Empty:
|
|
||||||
print("read timeout waiting for serial during {}".format(phase))
|
|
||||||
self.close()
|
|
||||||
break
|
|
||||||
|
|
||||||
if line == self.sentinel:
|
|
||||||
print("End of serial output")
|
|
||||||
self.lines_thread.join()
|
|
||||||
break
|
|
||||||
|
|
||||||
yield line
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
import sys
|
import sys
|
||||||
import telnetlib
|
import telnetlib
|
||||||
|
|
||||||
host = sys.argv[1]
|
host=sys.argv[1]
|
||||||
port = sys.argv[2]
|
port=sys.argv[2]
|
||||||
|
|
||||||
tn = telnetlib.Telnet(host, port, 1000000)
|
tn = telnetlib.Telnet(host, port, 1000000)
|
||||||
|
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
../bin/ci
|
|
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
_COMPILER=clang++
|
|
||||||
. compiler-wrapper.sh
|
|
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
_COMPILER=clang
|
|
||||||
. compiler-wrapper.sh
|
|
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
_COMPILER=g++
|
|
||||||
. compiler-wrapper.sh
|
|
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
_COMPILER=gcc
|
|
||||||
. compiler-wrapper.sh
|
|
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh -e
|
|
||||||
|
|
||||||
if command -V ccache >/dev/null 2>/dev/null; then
|
|
||||||
CCACHE=ccache
|
|
||||||
else
|
|
||||||
CCACHE=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$(ps -p $(ps -p $PPID -o ppid --no-headers) -o comm --no-headers)" != ninja ]; then
|
|
||||||
# Not invoked by ninja (e.g. for a meson feature check)
|
|
||||||
exec $CCACHE $_COMPILER "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$(eval printf "'%s'" "\"\${$(($#-1))}\"")" = "-c" ]; then
|
|
||||||
# Not invoked for linking
|
|
||||||
exec $CCACHE $_COMPILER "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Compiler invoked by ninja for linking. Add -Werror to turn compiler warnings into errors
|
|
||||||
# with LTO. (meson's werror should arguably do this, but meanwhile we need to)
|
|
||||||
exec $CCACHE $_COMPILER "$@" -Werror
|
|
@@ -1,699 +0,0 @@
|
|||||||
# Shared between windows and Linux
|
|
||||||
.build-common:
|
|
||||||
extends: .build-rules
|
|
||||||
# Cancel job if a newer commit is pushed to the same branch
|
|
||||||
interruptible: true
|
|
||||||
artifacts:
|
|
||||||
name: "mesa_${CI_JOB_NAME}"
|
|
||||||
when: always
|
|
||||||
paths:
|
|
||||||
- _build/meson-logs/*.txt
|
|
||||||
- _build/meson-logs/strace
|
|
||||||
- shader-db
|
|
||||||
- artifacts
|
|
||||||
|
|
||||||
# Just Linux
|
|
||||||
.build-linux:
|
|
||||||
extends: .build-common
|
|
||||||
variables:
|
|
||||||
CCACHE_COMPILERCHECK: "content"
|
|
||||||
CCACHE_COMPRESS: "true"
|
|
||||||
CCACHE_DIR: /cache/mesa/ccache
|
|
||||||
# Use ccache transparently, and print stats before/after
|
|
||||||
before_script:
|
|
||||||
- !reference [default, before_script]
|
|
||||||
- |
|
|
||||||
export PATH="/usr/lib/ccache:$PATH"
|
|
||||||
export CCACHE_BASEDIR="$PWD"
|
|
||||||
if test -x /usr/bin/ccache; then
|
|
||||||
section_start ccache_before "ccache stats before build"
|
|
||||||
ccache --show-stats
|
|
||||||
section_end ccache_before
|
|
||||||
fi
|
|
||||||
after_script:
|
|
||||||
- if test -x /usr/bin/ccache; then ccache --show-stats | grep "cache hit rate"; fi
|
|
||||||
- !reference [default, after_script]
|
|
||||||
|
|
||||||
.build-windows:
|
|
||||||
extends: .build-common
|
|
||||||
tags:
|
|
||||||
- windows
|
|
||||||
- docker
|
|
||||||
- "2022"
|
|
||||||
- mesa
|
|
||||||
cache:
|
|
||||||
key: ${CI_JOB_NAME}
|
|
||||||
paths:
|
|
||||||
- subprojects/packagecache
|
|
||||||
|
|
||||||
.meson-build:
|
|
||||||
extends:
|
|
||||||
- .build-linux
|
|
||||||
- .use-debian/x86_build
|
|
||||||
stage: build-x86_64
|
|
||||||
variables:
|
|
||||||
LLVM_VERSION: 11
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
|
|
||||||
.meson-build_mingw:
|
|
||||||
extends:
|
|
||||||
- .build-linux
|
|
||||||
- .use-debian/x86_build_mingw
|
|
||||||
- .use-wine
|
|
||||||
stage: build-x86_64
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
|
|
||||||
debian-testing:
|
|
||||||
extends:
|
|
||||||
- .meson-build
|
|
||||||
- .ci-deqp-artifacts
|
|
||||||
variables:
|
|
||||||
UNWIND: "enabled"
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=dri
|
|
||||||
-D gbm=enabled
|
|
||||||
-D egl=enabled
|
|
||||||
-D platforms=x11,wayland
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=enabled
|
|
||||||
-D gallium-va=enabled
|
|
||||||
GALLIUM_DRIVERS: "swrast,virgl,radeonsi,zink,crocus,iris,i915"
|
|
||||||
VULKAN_DRIVERS: "swrast,amd,intel,intel_hasvk,virtio-experimental"
|
|
||||||
BUILDTYPE: "debugoptimized"
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D spirv-to-dxil=true
|
|
||||||
-D valgrind=disabled
|
|
||||||
-D perfetto=true
|
|
||||||
MINIO_ARTIFACT_NAME: mesa-amd64
|
|
||||||
LLVM_VERSION: "13"
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
- .gitlab-ci/prepare-artifacts.sh
|
|
||||||
artifacts:
|
|
||||||
reports:
|
|
||||||
junit: artifacts/ci_scripts_report.xml
|
|
||||||
|
|
||||||
debian-testing-asan:
|
|
||||||
extends:
|
|
||||||
- debian-testing
|
|
||||||
variables:
|
|
||||||
C_ARGS: >
|
|
||||||
-Wno-error=stringop-truncation
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D b_sanitize=address
|
|
||||||
-D valgrind=disabled
|
|
||||||
-D tools=dlclose-skip
|
|
||||||
MINIO_ARTIFACT_NAME: ""
|
|
||||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
|
||||||
|
|
||||||
debian-testing-msan:
|
|
||||||
extends:
|
|
||||||
- debian-clang
|
|
||||||
variables:
|
|
||||||
# l_undef is incompatible with msan
|
|
||||||
EXTRA_OPTION:
|
|
||||||
-D b_sanitize=memory
|
|
||||||
-D b_lundef=false
|
|
||||||
MINIO_ARTIFACT_NAME: ""
|
|
||||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
|
||||||
# Don't run all the tests yet:
|
|
||||||
# GLSL has some issues in sexpression reading.
|
|
||||||
# gtest has issues in its test initialization.
|
|
||||||
MESON_TEST_ARGS: "--suite glcpp --suite gallium --suite format"
|
|
||||||
# Freedreno dropped because freedreno tools fail at msan.
|
|
||||||
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
|
|
||||||
VULKAN_DRIVERS: intel,amd,broadcom,virtio-experimental
|
|
||||||
|
|
||||||
.debian-cl-testing:
|
|
||||||
extends:
|
|
||||||
- .meson-build
|
|
||||||
- .ci-deqp-artifacts
|
|
||||||
variables:
|
|
||||||
LLVM_VERSION: "13"
|
|
||||||
UNWIND: "enabled"
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=disabled
|
|
||||||
-D egl=disabled
|
|
||||||
-D gbm=disabled
|
|
||||||
GALLIUM_DRIVERS: "swrast"
|
|
||||||
BUILDTYPE: "debugoptimized"
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D valgrind=disabled
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
- .gitlab-ci/prepare-artifacts.sh
|
|
||||||
|
|
||||||
# TODO: remove together with Clover
|
|
||||||
.debian-clover-testing:
|
|
||||||
extends:
|
|
||||||
- .debian-cl-testing
|
|
||||||
variables:
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D gallium-opencl=icd
|
|
||||||
-D opencl-spirv=true
|
|
||||||
|
|
||||||
debian-rusticl-testing:
|
|
||||||
extends:
|
|
||||||
- .debian-cl-testing
|
|
||||||
variables:
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D gallium-rusticl=true
|
|
||||||
-D opencl-spirv=true
|
|
||||||
|
|
||||||
debian-build-testing:
|
|
||||||
extends: .meson-build
|
|
||||||
variables:
|
|
||||||
UNWIND: "enabled"
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=dri
|
|
||||||
-D gbm=enabled
|
|
||||||
-D egl=enabled
|
|
||||||
-D platforms=x11,wayland
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=enabled
|
|
||||||
-D gallium-extra-hud=true
|
|
||||||
-D gallium-vdpau=enabled
|
|
||||||
-D gallium-omx=bellagio
|
|
||||||
-D gallium-va=enabled
|
|
||||||
-D gallium-xa=enabled
|
|
||||||
-D gallium-nine=true
|
|
||||||
-D gallium-opencl=disabled
|
|
||||||
-D gallium-rusticl=false
|
|
||||||
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
|
|
||||||
VULKAN_DRIVERS: swrast
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D spirv-to-dxil=true
|
|
||||||
-D osmesa=true
|
|
||||||
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi
|
|
||||||
-D b_lto=true
|
|
||||||
LLVM_VERSION: 13
|
|
||||||
script: |
|
|
||||||
section_start lava-pytest "lava-pytest"
|
|
||||||
.gitlab-ci/lava/lava-pytest.sh
|
|
||||||
section_switch shellcheck "shellcheck"
|
|
||||||
.gitlab-ci/run-shellcheck.sh
|
|
||||||
section_switch yamllint "yamllint"
|
|
||||||
.gitlab-ci/run-yamllint.sh
|
|
||||||
section_switch meson "meson"
|
|
||||||
.gitlab-ci/meson/build.sh
|
|
||||||
section_switch shader-db "shader-db"
|
|
||||||
.gitlab-ci/run-shader-db.sh
|
|
||||||
|
|
||||||
# Test a release build with -Werror so new warnings don't sneak in.
|
|
||||||
debian-release:
|
|
||||||
extends: .meson-build
|
|
||||||
variables:
|
|
||||||
LLVM_VERSION: "13"
|
|
||||||
UNWIND: "enabled"
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=dri
|
|
||||||
-D gbm=enabled
|
|
||||||
-D egl=enabled
|
|
||||||
-D platforms=x11,wayland
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=enabled
|
|
||||||
-D gallium-extra-hud=true
|
|
||||||
-D gallium-vdpau=enabled
|
|
||||||
-D gallium-omx=disabled
|
|
||||||
-D gallium-va=enabled
|
|
||||||
-D gallium-xa=enabled
|
|
||||||
-D gallium-nine=false
|
|
||||||
-D gallium-opencl=disabled
|
|
||||||
-D gallium-rusticl=false
|
|
||||||
-D llvm=enabled
|
|
||||||
GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,freedreno,r300,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,crocus"
|
|
||||||
VULKAN_DRIVERS: "amd,imagination-experimental,microsoft-experimental"
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D spirv-to-dxil=true
|
|
||||||
-D osmesa=true
|
|
||||||
-D tools=all
|
|
||||||
-D intel-clc=enabled
|
|
||||||
-D imagination-srv=true
|
|
||||||
BUILDTYPE: "release"
|
|
||||||
MINIO_ARTIFACT_NAME: "mesa-amd64-${BUILDTYPE}"
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
- 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
|
|
||||||
|
|
||||||
alpine-build-testing:
|
|
||||||
extends:
|
|
||||||
- .meson-build
|
|
||||||
- .use-alpine/x86_build
|
|
||||||
stage: build-x86_64
|
|
||||||
variables:
|
|
||||||
BUILDTYPE: "release"
|
|
||||||
C_ARGS: >
|
|
||||||
-Wno-error=cpp
|
|
||||||
-Wno-error=array-bounds
|
|
||||||
-Wno-error=stringop-overread
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=disabled
|
|
||||||
-D gbm=enabled
|
|
||||||
-D egl=enabled
|
|
||||||
-D glvnd=false
|
|
||||||
-D platforms=wayland
|
|
||||||
LLVM_VERSION: ""
|
|
||||||
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,swrast,tegra,v3d,vc4,virgl,zink"
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=enabled
|
|
||||||
-D gallium-extra-hud=true
|
|
||||||
-D gallium-vdpau=disabled
|
|
||||||
-D gallium-omx=disabled
|
|
||||||
-D gallium-va=enabled
|
|
||||||
-D gallium-xa=disabled
|
|
||||||
-D gallium-nine=true
|
|
||||||
-D gallium-rusticl=false
|
|
||||||
-D gles1=disabled
|
|
||||||
-D gles2=enabled
|
|
||||||
-D llvm=enabled
|
|
||||||
-D microsoft-clc=disabled
|
|
||||||
-D shared-llvm=enabled
|
|
||||||
UNWIND: "disabled"
|
|
||||||
VULKAN_DRIVERS: "amd,broadcom,freedreno,intel,imagination-experimental"
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
|
|
||||||
fedora-release:
|
|
||||||
extends:
|
|
||||||
- .meson-build
|
|
||||||
- .use-fedora/x86_build
|
|
||||||
variables:
|
|
||||||
BUILDTYPE: "release"
|
|
||||||
C_LINK_ARGS: >
|
|
||||||
-Wno-error=array-bounds
|
|
||||||
-Wno-error=stringop-overflow
|
|
||||||
-Wno-error=stringop-overread
|
|
||||||
CPP_LINK_ARGS: >
|
|
||||||
-Wno-error=array-bounds
|
|
||||||
-Wno-error=stringop-overflow
|
|
||||||
-Wno-error=stringop-overread
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=dri
|
|
||||||
-D gbm=enabled
|
|
||||||
-D egl=enabled
|
|
||||||
-D glvnd=true
|
|
||||||
-D platforms=x11,wayland
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D b_lto=true
|
|
||||||
-D osmesa=true
|
|
||||||
-D selinux=true
|
|
||||||
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination
|
|
||||||
-D vulkan-layers=device-select,overlay
|
|
||||||
-D intel-clc=enabled
|
|
||||||
-D imagination-srv=true
|
|
||||||
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,i915,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,swrast,tegra,v3d,vc4,virgl,zink"
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=enabled
|
|
||||||
-D gallium-extra-hud=true
|
|
||||||
-D gallium-vdpau=enabled
|
|
||||||
-D gallium-omx=disabled
|
|
||||||
-D gallium-va=enabled
|
|
||||||
-D gallium-xa=enabled
|
|
||||||
-D gallium-nine=false
|
|
||||||
-D gallium-opencl=icd
|
|
||||||
-D gallium-rusticl=false
|
|
||||||
-D gles1=disabled
|
|
||||||
-D gles2=enabled
|
|
||||||
-D llvm=enabled
|
|
||||||
-D microsoft-clc=disabled
|
|
||||||
-D shared-llvm=enabled
|
|
||||||
LLVM_VERSION: ""
|
|
||||||
UNWIND: "disabled"
|
|
||||||
VULKAN_DRIVERS: "amd,broadcom,freedreno,imagination-experimental,intel,intel_hasvk"
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
|
|
||||||
debian-android:
|
|
||||||
extends:
|
|
||||||
- .meson-cross
|
|
||||||
- .use-debian/android_build
|
|
||||||
- .ci-deqp-artifacts
|
|
||||||
variables:
|
|
||||||
UNWIND: "disabled"
|
|
||||||
C_ARGS: >
|
|
||||||
-Wno-error=asm-operand-widths
|
|
||||||
-Wno-error=constant-conversion
|
|
||||||
-Wno-error=enum-conversion
|
|
||||||
-Wno-error=initializer-overrides
|
|
||||||
-Wno-error=sometimes-uninitialized
|
|
||||||
-Wno-error=implicit-const-int-float-conversion
|
|
||||||
CPP_ARGS: >
|
|
||||||
-Wno-error=c99-designator
|
|
||||||
-Wno-error=unused-variable
|
|
||||||
-Wno-error=unused-but-set-variable
|
|
||||||
-Wno-error=self-assign
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=disabled
|
|
||||||
-D gbm=disabled
|
|
||||||
-D egl=enabled
|
|
||||||
-D platforms=android
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D android-stub=true
|
|
||||||
-D llvm=disabled
|
|
||||||
-D platform-sdk-version=33
|
|
||||||
-D valgrind=disabled
|
|
||||||
-D android-libbacktrace=disabled
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=disabled
|
|
||||||
-D gallium-vdpau=disabled
|
|
||||||
-D gallium-omx=disabled
|
|
||||||
-D gallium-va=disabled
|
|
||||||
-D gallium-xa=disabled
|
|
||||||
-D gallium-nine=false
|
|
||||||
-D gallium-opencl=disabled
|
|
||||||
-D gallium-rusticl=false
|
|
||||||
LLVM_VERSION: ""
|
|
||||||
PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
|
|
||||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
|
||||||
MINIO_ARTIFACT_NAME: mesa-x86_64-android
|
|
||||||
script:
|
|
||||||
- CROSS=aarch64-linux-android GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d VULKAN_DRIVERS=freedreno,broadcom,virtio-experimental .gitlab-ci/meson/build.sh
|
|
||||||
# x86_64 build:
|
|
||||||
# Can't do Intel because gen_decoder.c currently requires libexpat, which
|
|
||||||
# is not a dependency that AOSP wants to accept. Can't do Radeon Gallium
|
|
||||||
# drivers because they requires LLVM, which we don't have an Android build
|
|
||||||
# of.
|
|
||||||
- CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris,virgl VULKAN_DRIVERS=amd,intel .gitlab-ci/meson/build.sh
|
|
||||||
- .gitlab-ci/prepare-artifacts.sh
|
|
||||||
|
|
||||||
.meson-cross:
|
|
||||||
extends:
|
|
||||||
- .meson-build
|
|
||||||
stage: build-misc
|
|
||||||
variables:
|
|
||||||
UNWIND: "disabled"
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=dri
|
|
||||||
-D gbm=enabled
|
|
||||||
-D egl=enabled
|
|
||||||
-D platforms=x11,wayland
|
|
||||||
-D osmesa=false
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=enabled
|
|
||||||
-D gallium-vdpau=disabled
|
|
||||||
-D gallium-omx=disabled
|
|
||||||
-D gallium-va=disabled
|
|
||||||
-D gallium-xa=disabled
|
|
||||||
-D gallium-nine=false
|
|
||||||
|
|
||||||
.meson-arm:
|
|
||||||
extends:
|
|
||||||
- .meson-cross
|
|
||||||
- .use-debian/arm_build
|
|
||||||
needs:
|
|
||||||
- debian/arm_build
|
|
||||||
variables:
|
|
||||||
VULKAN_DRIVERS: freedreno,broadcom
|
|
||||||
GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4,zink"
|
|
||||||
BUILDTYPE: "debugoptimized"
|
|
||||||
tags:
|
|
||||||
- aarch64
|
|
||||||
|
|
||||||
debian-armhf:
|
|
||||||
extends:
|
|
||||||
- .meson-arm
|
|
||||||
- .ci-deqp-artifacts
|
|
||||||
variables:
|
|
||||||
CROSS: armhf
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D llvm=disabled
|
|
||||||
-D valgrind=disabled
|
|
||||||
MINIO_ARTIFACT_NAME: mesa-armhf
|
|
||||||
# The strip command segfaults, failing to strip the binary and leaving
|
|
||||||
# tempfiles in our artifacts.
|
|
||||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
- .gitlab-ci/prepare-artifacts.sh
|
|
||||||
|
|
||||||
debian-arm64:
|
|
||||||
extends:
|
|
||||||
- .meson-arm
|
|
||||||
- .ci-deqp-artifacts
|
|
||||||
variables:
|
|
||||||
VULKAN_DRIVERS: "freedreno,broadcom,panfrost,imagination-experimental"
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D llvm=disabled
|
|
||||||
-D valgrind=disabled
|
|
||||||
-D imagination-srv=true
|
|
||||||
-D perfetto=true
|
|
||||||
MINIO_ARTIFACT_NAME: mesa-arm64
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
- .gitlab-ci/prepare-artifacts.sh
|
|
||||||
|
|
||||||
debian-arm64-asan:
|
|
||||||
extends:
|
|
||||||
- debian-arm64
|
|
||||||
variables:
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D llvm=disabled
|
|
||||||
-D b_sanitize=address
|
|
||||||
-D valgrind=disabled
|
|
||||||
-D tools=dlclose-skip
|
|
||||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
|
||||||
MINIO_ARTIFACT_NAME: mesa-arm64-asan
|
|
||||||
MESON_TEST_ARGS: "--no-suite mesa:compiler"
|
|
||||||
|
|
||||||
debian-arm64-build-test:
|
|
||||||
extends:
|
|
||||||
- .meson-arm
|
|
||||||
- .ci-deqp-artifacts
|
|
||||||
variables:
|
|
||||||
VULKAN_DRIVERS: "amd"
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-Dtools=panfrost,imagination
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
|
|
||||||
debian-arm64-release:
|
|
||||||
extends:
|
|
||||||
- debian-arm64
|
|
||||||
variables:
|
|
||||||
BUILDTYPE: release
|
|
||||||
MINIO_ARTIFACT_NAME: mesa-arm64-${BUILDTYPE}
|
|
||||||
C_ARGS: >
|
|
||||||
-Wno-error=stringop-truncation
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/meson/build.sh
|
|
||||||
- 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
|
|
||||||
|
|
||||||
debian-clang:
|
|
||||||
extends: .meson-build
|
|
||||||
variables:
|
|
||||||
LLVM_VERSION: "13"
|
|
||||||
UNWIND: "enabled"
|
|
||||||
GALLIUM_DUMP_CPU: "true"
|
|
||||||
C_ARGS: >
|
|
||||||
-Wno-error=constant-conversion
|
|
||||||
-Wno-error=enum-conversion
|
|
||||||
-Wno-error=implicit-const-int-float-conversion
|
|
||||||
-Wno-error=initializer-overrides
|
|
||||||
-Wno-error=sometimes-uninitialized
|
|
||||||
CPP_ARGS: >
|
|
||||||
-Wno-error=c99-designator
|
|
||||||
-Wno-error=implicit-const-int-float-conversion
|
|
||||||
-Wno-error=overloaded-virtual
|
|
||||||
-Wno-error=tautological-constant-out-of-range-compare
|
|
||||||
-Wno-error=unused-private-field
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=dri
|
|
||||||
-D gbm=enabled
|
|
||||||
-D egl=enabled
|
|
||||||
-D glvnd=true
|
|
||||||
-D platforms=x11,wayland
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=enabled
|
|
||||||
-D gallium-extra-hud=true
|
|
||||||
-D gallium-vdpau=enabled
|
|
||||||
-D gallium-omx=bellagio
|
|
||||||
-D gallium-va=enabled
|
|
||||||
-D gallium-xa=enabled
|
|
||||||
-D gallium-nine=true
|
|
||||||
-D gallium-opencl=icd
|
|
||||||
-D gles1=enabled
|
|
||||||
-D gles2=enabled
|
|
||||||
-D llvm=enabled
|
|
||||||
-D microsoft-clc=enabled
|
|
||||||
-D shared-llvm=enabled
|
|
||||||
-D opencl-spirv=true
|
|
||||||
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi"
|
|
||||||
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,swrast,panfrost,imagination-experimental,microsoft-experimental
|
|
||||||
EXTRA_OPTION:
|
|
||||||
-D spirv-to-dxil=true
|
|
||||||
-D osmesa=true
|
|
||||||
-D imagination-srv=true
|
|
||||||
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi,imagination
|
|
||||||
-D vulkan-layers=device-select,overlay
|
|
||||||
-D build-aco-tests=true
|
|
||||||
-D intel-clc=enabled
|
|
||||||
-D imagination-srv=true
|
|
||||||
CC: clang
|
|
||||||
CXX: clang++
|
|
||||||
|
|
||||||
debian-clang-release:
|
|
||||||
extends: debian-clang
|
|
||||||
variables:
|
|
||||||
BUILDTYPE: "release"
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=xlib
|
|
||||||
-D platforms=x11,wayland
|
|
||||||
|
|
||||||
windows-vs2019:
|
|
||||||
extends:
|
|
||||||
- .build-windows
|
|
||||||
- .use-windows_build_vs2019
|
|
||||||
- .windows-build-rules
|
|
||||||
stage: build-misc
|
|
||||||
script:
|
|
||||||
- pwsh -ExecutionPolicy RemoteSigned .\.gitlab-ci\windows\mesa_build.ps1
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- _build/meson-logs/*.txt
|
|
||||||
- _install/
|
|
||||||
|
|
||||||
.debian-cl:
|
|
||||||
extends: .meson-build
|
|
||||||
variables:
|
|
||||||
LLVM_VERSION: "13"
|
|
||||||
UNWIND: "enabled"
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=disabled
|
|
||||||
-D egl=disabled
|
|
||||||
-D gbm=disabled
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D valgrind=disabled
|
|
||||||
|
|
||||||
# TODO: remove with Clover
|
|
||||||
.debian-clover:
|
|
||||||
extends: .debian-cl
|
|
||||||
variables:
|
|
||||||
GALLIUM_DRIVERS: "r600,radeonsi,swrast"
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=disabled
|
|
||||||
-D gallium-vdpau=disabled
|
|
||||||
-D gallium-omx=disabled
|
|
||||||
-D gallium-va=disabled
|
|
||||||
-D gallium-xa=disabled
|
|
||||||
-D gallium-nine=false
|
|
||||||
-D gallium-opencl=icd
|
|
||||||
-D gallium-rusticl=false
|
|
||||||
|
|
||||||
debian-rusticl:
|
|
||||||
extends: .debian-cl
|
|
||||||
variables:
|
|
||||||
GALLIUM_DRIVERS: "iris,swrast"
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=disabled
|
|
||||||
-D gallium-vdpau=disabled
|
|
||||||
-D gallium-omx=disabled
|
|
||||||
-D gallium-va=disabled
|
|
||||||
-D gallium-xa=disabled
|
|
||||||
-D gallium-nine=false
|
|
||||||
-D gallium-opencl=disabled
|
|
||||||
-D gallium-rusticl=true
|
|
||||||
|
|
||||||
debian-vulkan:
|
|
||||||
extends: .meson-build
|
|
||||||
variables:
|
|
||||||
LLVM_VERSION: "13"
|
|
||||||
UNWIND: "disabled"
|
|
||||||
DRI_LOADERS: >
|
|
||||||
-D glx=disabled
|
|
||||||
-D gbm=disabled
|
|
||||||
-D egl=disabled
|
|
||||||
-D platforms=x11,wayland
|
|
||||||
-D osmesa=false
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D dri3=enabled
|
|
||||||
-D gallium-vdpau=disabled
|
|
||||||
-D gallium-omx=disabled
|
|
||||||
-D gallium-va=disabled
|
|
||||||
-D gallium-xa=disabled
|
|
||||||
-D gallium-nine=false
|
|
||||||
-D gallium-opencl=disabled
|
|
||||||
-D gallium-rusticl=false
|
|
||||||
-D b_sanitize=undefined
|
|
||||||
-D c_args=-fno-sanitize-recover=all
|
|
||||||
-D cpp_args=-fno-sanitize-recover=all
|
|
||||||
UBSAN_OPTIONS: "print_stacktrace=1"
|
|
||||||
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,imagination-experimental,microsoft-experimental
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D vulkan-layers=device-select,overlay
|
|
||||||
-D build-aco-tests=true
|
|
||||||
-D intel-clc=disabled
|
|
||||||
-D imagination-srv=true
|
|
||||||
|
|
||||||
debian-i386:
|
|
||||||
extends:
|
|
||||||
- .meson-cross
|
|
||||||
- .use-debian/i386_build
|
|
||||||
variables:
|
|
||||||
CROSS: i386
|
|
||||||
VULKAN_DRIVERS: intel,amd,swrast,virtio-experimental
|
|
||||||
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,swrast,virgl,zink,crocus"
|
|
||||||
LLVM_VERSION: 13
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D vulkan-layers=device-select,overlay
|
|
||||||
|
|
||||||
debian-s390x:
|
|
||||||
extends:
|
|
||||||
- debian-ppc64el
|
|
||||||
- .use-debian/s390x_build
|
|
||||||
- .s390x-rules
|
|
||||||
tags:
|
|
||||||
- kvm
|
|
||||||
variables:
|
|
||||||
CROSS: s390x
|
|
||||||
GALLIUM_DRIVERS: "swrast,zink"
|
|
||||||
LLVM_VERSION: 13
|
|
||||||
VULKAN_DRIVERS: "swrast"
|
|
||||||
|
|
||||||
debian-ppc64el:
|
|
||||||
extends:
|
|
||||||
- .meson-cross
|
|
||||||
- .use-debian/ppc64el_build
|
|
||||||
- .ppc64el-rules
|
|
||||||
variables:
|
|
||||||
CROSS: ppc64el
|
|
||||||
GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl,zink"
|
|
||||||
VULKAN_DRIVERS: "amd,swrast"
|
|
||||||
|
|
||||||
# Disabled as it hangs with winedbg on shared runners
|
|
||||||
.debian-mingw32-x86_64:
|
|
||||||
extends: .meson-build_mingw
|
|
||||||
stage: build-misc
|
|
||||||
variables:
|
|
||||||
UNWIND: "disabled"
|
|
||||||
C_ARGS: >
|
|
||||||
-Wno-error=format
|
|
||||||
-Wno-error=unused-but-set-variable
|
|
||||||
CPP_ARGS: >
|
|
||||||
-Wno-error=format
|
|
||||||
-Wno-error=unused-function
|
|
||||||
-Wno-error=unused-variable
|
|
||||||
-Wno-error=sign-compare
|
|
||||||
-Wno-error=narrowing
|
|
||||||
GALLIUM_DRIVERS: "swrast,d3d12,zink"
|
|
||||||
VULKAN_DRIVERS: "swrast,amd,microsoft-experimental"
|
|
||||||
GALLIUM_ST: >
|
|
||||||
-D gallium-opencl=icd
|
|
||||||
-D gallium-rusticl=false
|
|
||||||
-D opencl-spirv=true
|
|
||||||
-D microsoft-clc=enabled
|
|
||||||
-D static-libclc=all
|
|
||||||
-D llvm=enabled
|
|
||||||
-D gallium-va=enabled
|
|
||||||
-D video-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec
|
|
||||||
EXTRA_OPTION: >
|
|
||||||
-D min-windows-version=7
|
|
||||||
-D spirv-to-dxil=true
|
|
||||||
-D gles1=enabled
|
|
||||||
-D gles2=enabled
|
|
||||||
-D osmesa=true
|
|
||||||
-D cpp_rtti=true
|
|
||||||
-D shared-glapi=enabled
|
|
||||||
-D zlib=enabled
|
|
||||||
--cross-file=.gitlab-ci/x86_64-w64-mingw32
|
|
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
for var in \
|
for var in \
|
||||||
ACO_DEBUG \
|
|
||||||
ASAN_OPTIONS \
|
ASAN_OPTIONS \
|
||||||
BASE_SYSTEM_FORK_HOST_PREFIX \
|
BASE_SYSTEM_FORK_HOST_PREFIX \
|
||||||
BASE_SYSTEM_MAINLINE_HOST_PREFIX \
|
BASE_SYSTEM_MAINLINE_HOST_PREFIX \
|
||||||
@@ -10,7 +9,6 @@ for var in \
|
|||||||
CI_COMMIT_TITLE \
|
CI_COMMIT_TITLE \
|
||||||
CI_JOB_ID \
|
CI_JOB_ID \
|
||||||
CI_JOB_JWT_FILE \
|
CI_JOB_JWT_FILE \
|
||||||
CI_JOB_STARTED_AT \
|
|
||||||
CI_JOB_NAME \
|
CI_JOB_NAME \
|
||||||
CI_JOB_URL \
|
CI_JOB_URL \
|
||||||
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
|
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
|
||||||
@@ -28,8 +26,10 @@ for var in \
|
|||||||
CI_SERVER_URL \
|
CI_SERVER_URL \
|
||||||
CROSVM_GALLIUM_DRIVER \
|
CROSVM_GALLIUM_DRIVER \
|
||||||
CROSVM_GPU_ARGS \
|
CROSVM_GPU_ARGS \
|
||||||
CURRENT_SECTION \
|
CROSVM_TEST_SCRIPT \
|
||||||
DEQP_BIN_DIR \
|
DEQP_BIN_DIR \
|
||||||
|
DEQP_CASELIST_FILTER \
|
||||||
|
DEQP_CASELIST_INV_FILTER \
|
||||||
DEQP_CONFIG \
|
DEQP_CONFIG \
|
||||||
DEQP_EXPECTED_RENDERER \
|
DEQP_EXPECTED_RENDERER \
|
||||||
DEQP_FRACTION \
|
DEQP_FRACTION \
|
||||||
@@ -49,7 +49,6 @@ for var in \
|
|||||||
FDO_UPSTREAM_REPO \
|
FDO_UPSTREAM_REPO \
|
||||||
FD_MESA_DEBUG \
|
FD_MESA_DEBUG \
|
||||||
FLAKES_CHANNEL \
|
FLAKES_CHANNEL \
|
||||||
FREEDRENO_HANGCHECK_MS \
|
|
||||||
GALLIUM_DRIVER \
|
GALLIUM_DRIVER \
|
||||||
GALLIVM_PERF \
|
GALLIVM_PERF \
|
||||||
GPU_VERSION \
|
GPU_VERSION \
|
||||||
@@ -61,16 +60,12 @@ for var in \
|
|||||||
GTEST_SKIPS \
|
GTEST_SKIPS \
|
||||||
HWCI_FREQ_MAX \
|
HWCI_FREQ_MAX \
|
||||||
HWCI_KERNEL_MODULES \
|
HWCI_KERNEL_MODULES \
|
||||||
HWCI_KVM \
|
|
||||||
HWCI_START_WESTON \
|
|
||||||
HWCI_START_XORG \
|
HWCI_START_XORG \
|
||||||
HWCI_TEST_SCRIPT \
|
HWCI_TEST_SCRIPT \
|
||||||
IR3_SHADER_DEBUG \
|
IR3_SHADER_DEBUG \
|
||||||
JOB_ARTIFACTS_BASE \
|
JOB_ARTIFACTS_BASE \
|
||||||
JOB_RESULTS_PATH \
|
JOB_RESULTS_PATH \
|
||||||
JOB_ROOTFS_OVERLAY_PATH \
|
JOB_ROOTFS_OVERLAY_PATH \
|
||||||
KERNEL_IMAGE_BASE_URL \
|
|
||||||
KERNEL_IMAGE_NAME \
|
|
||||||
LD_LIBRARY_PATH \
|
LD_LIBRARY_PATH \
|
||||||
LP_NUM_THREADS \
|
LP_NUM_THREADS \
|
||||||
MESA_BASE_TAG \
|
MESA_BASE_TAG \
|
||||||
@@ -82,12 +77,9 @@ for var in \
|
|||||||
MESA_IMAGE \
|
MESA_IMAGE \
|
||||||
MESA_IMAGE_PATH \
|
MESA_IMAGE_PATH \
|
||||||
MESA_IMAGE_TAG \
|
MESA_IMAGE_TAG \
|
||||||
MESA_LOADER_DRIVER_OVERRIDE \
|
|
||||||
MESA_TEMPLATES_COMMIT \
|
MESA_TEMPLATES_COMMIT \
|
||||||
MESA_VK_IGNORE_CONFORMANCE_WARNING \
|
MESA_VK_IGNORE_CONFORMANCE_WARNING \
|
||||||
MESA_SPIRV_LOG_LEVEL \
|
|
||||||
MINIO_HOST \
|
MINIO_HOST \
|
||||||
MINIO_RESULTS_UPLOAD \
|
|
||||||
NIR_DEBUG \
|
NIR_DEBUG \
|
||||||
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER \
|
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER \
|
||||||
PAN_MESA_DEBUG \
|
PAN_MESA_DEBUG \
|
||||||
@@ -100,25 +92,18 @@ for var in \
|
|||||||
PIGLIT_REPLAY_DESCRIPTION_FILE \
|
PIGLIT_REPLAY_DESCRIPTION_FILE \
|
||||||
PIGLIT_REPLAY_DEVICE_NAME \
|
PIGLIT_REPLAY_DEVICE_NAME \
|
||||||
PIGLIT_REPLAY_EXTRA_ARGS \
|
PIGLIT_REPLAY_EXTRA_ARGS \
|
||||||
PIGLIT_REPLAY_LOOP_TIMES \
|
|
||||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE \
|
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE \
|
||||||
PIGLIT_REPLAY_SUBCOMMAND \
|
PIGLIT_REPLAY_SUBCOMMAND \
|
||||||
PIGLIT_RESULTS \
|
PIGLIT_RESULTS \
|
||||||
PIGLIT_TESTS \
|
PIGLIT_TESTS \
|
||||||
PIPELINE_ARTIFACTS_BASE \
|
PIPELINE_ARTIFACTS_BASE \
|
||||||
RADV_DEBUG \
|
|
||||||
RADV_PERFTEST \
|
|
||||||
SKQP_ASSETS_DIR \
|
SKQP_ASSETS_DIR \
|
||||||
SKQP_BACKENDS \
|
SKQP_BACKENDS \
|
||||||
TU_DEBUG \
|
TU_DEBUG \
|
||||||
VIRGL_HOST_API \
|
VIRGL_HOST_API \
|
||||||
WAFFLE_PLATFORM \
|
|
||||||
VK_CPU \
|
VK_CPU \
|
||||||
VK_DRIVER \
|
VK_DRIVER \
|
||||||
VK_ICD_FILENAMES \
|
VK_ICD_FILENAMES \
|
||||||
VKD3D_PROTON_RESULTS \
|
|
||||||
ZINK_DESCRIPTORS \
|
|
||||||
LVP_POISON_MEMORY \
|
|
||||||
; do
|
; do
|
||||||
if [ -n "${!var+x}" ]; then
|
if [ -n "${!var+x}" ]; then
|
||||||
echo "export $var=${!var@Q}"
|
echo "export $var=${!var@Q}"
|
||||||
|
@@ -9,7 +9,6 @@ cd /
|
|||||||
|
|
||||||
mount -t proc none /proc
|
mount -t proc none /proc
|
||||||
mount -t sysfs none /sys
|
mount -t sysfs none /sys
|
||||||
mount -t debugfs none /sys/kernel/debug
|
|
||||||
mount -t devtmpfs none /dev || echo possibly already mounted
|
mount -t devtmpfs none /dev || echo possibly already mounted
|
||||||
mkdir -p /dev/pts
|
mkdir -p /dev/pts
|
||||||
mount -t devpts devpts /dev/pts
|
mount -t devpts devpts /dev/pts
|
||||||
|
@@ -1,85 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Make sure to kill itself and all the children process from this script on
|
|
||||||
# exiting, since any console output may interfere with LAVA signals handling,
|
|
||||||
# which based on the log console.
|
|
||||||
cleanup() {
|
|
||||||
if [ "$BACKGROUND_PIDS" = "" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
set +x
|
|
||||||
echo "Killing all child processes"
|
|
||||||
for pid in $BACKGROUND_PIDS
|
|
||||||
do
|
|
||||||
kill "$pid" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
|
|
||||||
# Sleep just a little to give enough time for subprocesses to be gracefully
|
|
||||||
# killed. Then apply a SIGKILL if necessary.
|
|
||||||
sleep 5
|
|
||||||
for pid in $BACKGROUND_PIDS
|
|
||||||
do
|
|
||||||
kill -9 "$pid" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
|
|
||||||
BACKGROUND_PIDS=
|
|
||||||
set -x
|
|
||||||
}
|
|
||||||
trap cleanup INT TERM EXIT
|
|
||||||
|
|
||||||
# Space separated values with the PIDS of the processes started in the
|
|
||||||
# background by this script
|
|
||||||
BACKGROUND_PIDS=
|
|
||||||
|
|
||||||
|
|
||||||
# Second-stage init, used to set up devices and our job environment before
|
# Second-stage init, used to set up devices and our job environment before
|
||||||
# running tests.
|
# running tests.
|
||||||
|
|
||||||
for path in '/set-job-env-vars.sh' './set-job-env-vars.sh'; do
|
. /set-job-env-vars.sh
|
||||||
[ -f "$path" ] && source "$path"
|
|
||||||
done
|
|
||||||
. "$SCRIPTS_DIR"/setup-test-env.sh
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# Set up any devices required by the jobs
|
# Set up any devices required by the jobs
|
||||||
[ -z "$HWCI_KERNEL_MODULES" ] || {
|
[ -z "$HWCI_KERNEL_MODULES" ] || (echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe)
|
||||||
echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set up ZRAM
|
|
||||||
HWCI_ZRAM_SIZE=2G
|
|
||||||
if zramctl --find --size $HWCI_ZRAM_SIZE -a zstd; then
|
|
||||||
mkswap /dev/zram0
|
|
||||||
swapon /dev/zram0
|
|
||||||
echo "zram: $HWCI_ZRAM_SIZE activated"
|
|
||||||
else
|
|
||||||
echo "zram: skipping, not supported"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Load the KVM module specific to the detected CPU virtualization extensions:
|
|
||||||
# - vmx for Intel VT
|
|
||||||
# - svm for AMD-V
|
|
||||||
#
|
|
||||||
# Additionally, download the kernel image to boot the VM via HWCI_TEST_SCRIPT.
|
|
||||||
#
|
|
||||||
if [ "$HWCI_KVM" = "true" ]; then
|
|
||||||
unset KVM_KERNEL_MODULE
|
|
||||||
grep -qs '\bvmx\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_intel || {
|
|
||||||
grep -qs '\bsvm\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_amd
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -z "${KVM_KERNEL_MODULE}" ] && \
|
|
||||||
echo "WARNING: Failed to detect CPU virtualization extensions" || \
|
|
||||||
modprobe ${KVM_KERNEL_MODULE}
|
|
||||||
|
|
||||||
mkdir -p /lava-files
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
-o "/lava-files/${KERNEL_IMAGE_NAME}" \
|
|
||||||
"${KERNEL_IMAGE_BASE_URL}/${KERNEL_IMAGE_NAME}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
|
# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
|
||||||
# it in /install
|
# it in /install
|
||||||
@@ -107,23 +36,11 @@ if [ "$HWCI_FREQ_MAX" = "true" ]; then
|
|||||||
# Disable GPU runtime power management
|
# Disable GPU runtime power management
|
||||||
GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
|
GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
|
||||||
test -z "$GPU_AUTOSUSPEND" || echo -1 > $GPU_AUTOSUSPEND || true
|
test -z "$GPU_AUTOSUSPEND" || echo -1 > $GPU_AUTOSUSPEND || true
|
||||||
# Lock Intel GPU frequency to 70% of the maximum allowed by hardware
|
|
||||||
# and enable throttling detection & reporting.
|
|
||||||
# Additionally, set the upper limit for CPU scaling frequency to 65% of the
|
|
||||||
# maximum permitted, as an additional measure to mitigate thermal throttling.
|
|
||||||
./intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Increase freedreno hangcheck timer because it's right at the edge of the
|
|
||||||
# spilling tests timing out (and some traces, too)
|
|
||||||
if [ -n "$FREEDRENO_HANGCHECK_MS" ]; then
|
|
||||||
echo $FREEDRENO_HANGCHECK_MS | tee -a /sys/kernel/debug/dri/128/hangcheck_period_ms
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start a little daemon to capture the first devcoredump we encounter. (They
|
# Start a little daemon to capture the first devcoredump we encounter. (They
|
||||||
# expire after 5 minutes, so we poll for them).
|
# expire after 5 minutes, so we poll for them).
|
||||||
/capture-devcoredump.sh &
|
./capture-devcoredump.sh &
|
||||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
|
||||||
|
|
||||||
# If we want Xorg to be running for the test, then we start it up before the
|
# If we want Xorg to be running for the test, then we start it up before the
|
||||||
# HWCI_TEST_SCRIPT because we need to use xinit to start X (otherwise
|
# HWCI_TEST_SCRIPT because we need to use xinit to start X (otherwise
|
||||||
@@ -132,9 +49,7 @@ BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
|||||||
if [ -n "$HWCI_START_XORG" ]; then
|
if [ -n "$HWCI_START_XORG" ]; then
|
||||||
echo "touch /xorg-started; sleep 100000" > /xorg-script
|
echo "touch /xorg-started; sleep 100000" > /xorg-script
|
||||||
env \
|
env \
|
||||||
VK_ICD_FILENAMES=/install/share/vulkan/icd.d/${VK_DRIVER}_icd.`uname -m`.json \
|
|
||||||
xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
||||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
|
||||||
|
|
||||||
# Wait for xorg to be ready for connections.
|
# Wait for xorg to be ready for connections.
|
||||||
for i in 1 2 3 4 5; do
|
for i in 1 2 3 4 5; do
|
||||||
@@ -146,53 +61,18 @@ if [ -n "$HWCI_START_XORG" ]; then
|
|||||||
export DISPLAY=:0
|
export DISPLAY=:0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$HWCI_START_WESTON" ]; then
|
RESULT=fail
|
||||||
WESTON_X11_SOCK="/tmp/.X11-unix/X0"
|
if sh $HWCI_TEST_SCRIPT; then
|
||||||
if [ -n "$HWCI_START_XORG" ]; then
|
RESULT=pass
|
||||||
echo "Please consider dropping HWCI_START_XORG and instead using Weston XWayland for testing."
|
rm -rf results/trace/$PIGLIT_REPLAY_DEVICE_NAME
|
||||||
WESTON_X11_SOCK="/tmp/.X11-unix/X1"
|
|
||||||
fi
|
|
||||||
export WAYLAND_DISPLAY=wayland-0
|
|
||||||
|
|
||||||
# Display server is Weston Xwayland when HWCI_START_XORG is not set or Xorg when it's
|
|
||||||
export DISPLAY=:0
|
|
||||||
mkdir -p /tmp/.X11-unix
|
|
||||||
|
|
||||||
env \
|
|
||||||
VK_ICD_FILENAMES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname -m).json" \
|
|
||||||
weston -Bheadless-backend.so --use-gl -Swayland-0 --xwayland --idle-time=0 &
|
|
||||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
|
||||||
|
|
||||||
while [ ! -S "$WESTON_X11_SOCK" ]; do sleep 1; done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set +e
|
|
||||||
bash -c ". $SCRIPTS_DIR/setup-test-env.sh && $HWCI_TEST_SCRIPT"
|
|
||||||
EXIT_CODE=$?
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Let's make sure the results are always stored in current working directory
|
|
||||||
mv -f ${CI_PROJECT_DIR}/results ./ 2>/dev/null || true
|
|
||||||
|
|
||||||
[ ${EXIT_CODE} -ne 0 ] || rm -rf results/trace/"$PIGLIT_REPLAY_DEVICE_NAME"
|
|
||||||
|
|
||||||
# Make sure that capture-devcoredump is done before we start trying to tar up
|
|
||||||
# artifacts -- if it's writing while tar is reading, tar will throw an error and
|
|
||||||
# kill the job.
|
|
||||||
cleanup
|
|
||||||
|
|
||||||
# upload artifacts
|
# upload artifacts
|
||||||
if [ -n "$MINIO_RESULTS_UPLOAD" ]; then
|
MINIO=$(cat /proc/cmdline | tr ' ' '\n' | grep minio_results | cut -d '=' -f 2 || true)
|
||||||
tar --zstd -cf results.tar.zst results/;
|
if [ -n "$MINIO" ]; then
|
||||||
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" results.tar.zst https://"$MINIO_RESULTS_UPLOAD"/results.tar.zst;
|
tar -czf results.tar.gz results/;
|
||||||
|
ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}";
|
||||||
|
ci-fairy minio cp results.tar.gz minio://"$MINIO"/results.tar.gz;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We still need to echo the hwci: mesa message, as some scripts rely on it, such
|
|
||||||
# as the python ones inside the bare-metal folder
|
|
||||||
[ ${EXIT_CODE} -eq 0 ] && RESULT=pass || RESULT=fail
|
|
||||||
|
|
||||||
set +x
|
|
||||||
echo "hwci: mesa: $RESULT"
|
echo "hwci: mesa: $RESULT"
|
||||||
# Sleep a bit to avoid kernel dump message interleave from LAVA ENDTC signal
|
|
||||||
sleep 1
|
|
||||||
exit $EXIT_CODE
|
|
||||||
|
@@ -1,758 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# This is an utility script to manage Intel GPU frequencies.
|
|
||||||
# It can be used for debugging performance problems or trying to obtain a stable
|
|
||||||
# frequency while benchmarking.
|
|
||||||
#
|
|
||||||
# Note the Intel i915 GPU driver allows to change the minimum, maximum and boost
|
|
||||||
# frequencies in steps of 50 MHz via:
|
|
||||||
#
|
|
||||||
# /sys/class/drm/card<n>/<freq_info>
|
|
||||||
#
|
|
||||||
# Where <n> is the DRM card index and <freq_info> one of the following:
|
|
||||||
#
|
|
||||||
# - gt_max_freq_mhz (enforced maximum freq)
|
|
||||||
# - gt_min_freq_mhz (enforced minimum freq)
|
|
||||||
# - gt_boost_freq_mhz (enforced boost freq)
|
|
||||||
#
|
|
||||||
# The hardware capabilities can be accessed via:
|
|
||||||
#
|
|
||||||
# - gt_RP0_freq_mhz (supported maximum freq)
|
|
||||||
# - gt_RPn_freq_mhz (supported minimum freq)
|
|
||||||
# - gt_RP1_freq_mhz (most efficient freq)
|
|
||||||
#
|
|
||||||
# The current frequency can be read from:
|
|
||||||
# - gt_act_freq_mhz (the actual GPU freq)
|
|
||||||
# - gt_cur_freq_mhz (the last requested freq)
|
|
||||||
#
|
|
||||||
# Also note that in addition to GPU management, the script offers the
|
|
||||||
# possibility to adjust CPU operating frequencies. However, this is currently
|
|
||||||
# limited to just setting the maximum scaling frequency as percentage of the
|
|
||||||
# maximum frequency allowed by the hardware.
|
|
||||||
#
|
|
||||||
# Copyright (C) 2022 Collabora Ltd.
|
|
||||||
# Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# Constants
|
|
||||||
#
|
|
||||||
|
|
||||||
# GPU
|
|
||||||
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/gt_%s_freq_mhz"
|
|
||||||
ENF_FREQ_INFO="max min boost"
|
|
||||||
CAP_FREQ_INFO="RP0 RPn RP1"
|
|
||||||
ACT_FREQ_INFO="act cur"
|
|
||||||
THROTT_DETECT_SLEEP_SEC=2
|
|
||||||
THROTT_DETECT_PID_FILE_PATH=/tmp/thrott-detect.pid
|
|
||||||
|
|
||||||
# CPU
|
|
||||||
CPU_SYSFS_PREFIX=/sys/devices/system/cpu
|
|
||||||
CPU_PSTATE_SYSFS_PATTERN="${CPU_SYSFS_PREFIX}/intel_pstate/%s"
|
|
||||||
CPU_FREQ_SYSFS_PATTERN="${CPU_SYSFS_PREFIX}/cpu%s/cpufreq/%s_freq"
|
|
||||||
CAP_CPU_FREQ_INFO="cpuinfo_max cpuinfo_min"
|
|
||||||
ENF_CPU_FREQ_INFO="scaling_max scaling_min"
|
|
||||||
ACT_CPU_FREQ_INFO="scaling_cur"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Global variables.
|
|
||||||
#
|
|
||||||
unset INTEL_DRM_CARD_INDEX
|
|
||||||
unset GET_ACT_FREQ GET_ENF_FREQ GET_CAP_FREQ
|
|
||||||
unset SET_MIN_FREQ SET_MAX_FREQ
|
|
||||||
unset MONITOR_FREQ
|
|
||||||
unset CPU_SET_MAX_FREQ
|
|
||||||
unset DETECT_THROTT
|
|
||||||
unset DRY_RUN
|
|
||||||
|
|
||||||
#
|
|
||||||
# Simple printf based stderr logger.
|
|
||||||
#
|
|
||||||
log() {
|
|
||||||
local msg_type=$1
|
|
||||||
|
|
||||||
shift
|
|
||||||
printf "%s: %s: " "${msg_type}" "${0##*/}" >&2
|
|
||||||
printf "$@" >&2
|
|
||||||
printf "\n" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Helper to print sysfs path for the given card index and freq info.
|
|
||||||
#
|
|
||||||
# arg1: Frequency info sysfs name, one of *_FREQ_INFO constants above
|
|
||||||
# arg2: Video card index, defaults to INTEL_DRM_CARD_INDEX
|
|
||||||
#
|
|
||||||
print_freq_sysfs_path() {
|
|
||||||
printf ${DRM_FREQ_SYSFS_PATTERN} "${2:-${INTEL_DRM_CARD_INDEX}}" "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Helper to set INTEL_DRM_CARD_INDEX for the first identified Intel video card.
|
|
||||||
#
|
|
||||||
identify_intel_gpu() {
|
|
||||||
local i=0 vendor path
|
|
||||||
|
|
||||||
while [ ${i} -lt 16 ]; do
|
|
||||||
[ -c "/dev/dri/card$i" ] || {
|
|
||||||
i=$((i + 1))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
path=$(print_freq_sysfs_path "" ${i})
|
|
||||||
path=${path%/*}/device/vendor
|
|
||||||
|
|
||||||
[ -r "${path}" ] && read vendor < "${path}" && \
|
|
||||||
[ "${vendor}" = "0x8086" ] && INTEL_DRM_CARD_INDEX=$i && return 0
|
|
||||||
|
|
||||||
i=$((i + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Read the specified freq info from sysfs.
|
|
||||||
#
|
|
||||||
# arg1: Flag (y/n) to also enable printing the freq info.
|
|
||||||
# arg2...: Frequency info sysfs name(s), see *_FREQ_INFO constants above
|
|
||||||
# return: Global variable(s) FREQ_${arg} containing the requested information
|
|
||||||
#
|
|
||||||
read_freq_info() {
|
|
||||||
local var val info path print=0 ret=0
|
|
||||||
|
|
||||||
[ "$1" = "y" ] && print=1
|
|
||||||
shift
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
info=$1
|
|
||||||
shift
|
|
||||||
var=FREQ_${info}
|
|
||||||
path=$(print_freq_sysfs_path "${info}")
|
|
||||||
|
|
||||||
[ -r ${path} ] && read ${var} < ${path} || {
|
|
||||||
log ERROR "Failed to read freq info from: %s" "${path}"
|
|
||||||
ret=1
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -n "${var}" ] || {
|
|
||||||
log ERROR "Got empty freq info from: %s" "${path}"
|
|
||||||
ret=1
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
[ ${print} -eq 1 ] && {
|
|
||||||
eval val=\$${var}
|
|
||||||
printf "%6s: %4s MHz\n" "${info}" "${val}"
|
|
||||||
}
|
|
||||||
done
|
|
||||||
|
|
||||||
return ${ret}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Display requested info.
|
|
||||||
#
|
|
||||||
print_freq_info() {
|
|
||||||
local req_freq
|
|
||||||
|
|
||||||
[ -n "${GET_CAP_FREQ}" ] && {
|
|
||||||
printf "* Hardware capabilities\n"
|
|
||||||
read_freq_info y ${CAP_FREQ_INFO}
|
|
||||||
printf "\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -n "${GET_ENF_FREQ}" ] && {
|
|
||||||
printf "* Enforcements\n"
|
|
||||||
read_freq_info y ${ENF_FREQ_INFO}
|
|
||||||
printf "\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -n "${GET_ACT_FREQ}" ] && {
|
|
||||||
printf "* Actual\n"
|
|
||||||
read_freq_info y ${ACT_FREQ_INFO}
|
|
||||||
printf "\n"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Helper to print frequency value as requested by user via '-s, --set' option.
|
|
||||||
# arg1: user requested freq value
|
|
||||||
#
|
|
||||||
compute_freq_set() {
|
|
||||||
local val
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
+)
|
|
||||||
val=${FREQ_RP0}
|
|
||||||
;;
|
|
||||||
-)
|
|
||||||
val=${FREQ_RPn}
|
|
||||||
;;
|
|
||||||
*%)
|
|
||||||
val=$((${1%?} * ${FREQ_RP0} / 100))
|
|
||||||
# Adjust freq to comply with 50 MHz increments
|
|
||||||
val=$((val / 50 * 50))
|
|
||||||
;;
|
|
||||||
*[!0-9]*)
|
|
||||||
log ERROR "Cannot set freq to invalid value: %s" "$1"
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
"")
|
|
||||||
log ERROR "Cannot set freq to unspecified value"
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Adjust freq to comply with 50 MHz increments
|
|
||||||
val=$(($1 / 50 * 50))
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
printf "%s" "${val}"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Helper for set_freq().
|
|
||||||
#
|
|
||||||
set_freq_max() {
|
|
||||||
log INFO "Setting GPU max freq to %s MHz" "${SET_MAX_FREQ}"
|
|
||||||
|
|
||||||
read_freq_info n min || return $?
|
|
||||||
|
|
||||||
[ ${SET_MAX_FREQ} -gt ${FREQ_RP0} ] && {
|
|
||||||
log ERROR "Cannot set GPU max freq (%s) to be greater than hw max freq (%s)" \
|
|
||||||
"${SET_MAX_FREQ}" "${FREQ_RP0}"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[ ${SET_MAX_FREQ} -lt ${FREQ_RPn} ] && {
|
|
||||||
log ERROR "Cannot set GPU max freq (%s) to be less than hw min freq (%s)" \
|
|
||||||
"${SET_MIN_FREQ}" "${FREQ_RPn}"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[ ${SET_MAX_FREQ} -lt ${FREQ_min} ] && {
|
|
||||||
log ERROR "Cannot set GPU max freq (%s) to be less than min freq (%s)" \
|
|
||||||
"${SET_MAX_FREQ}" "${FREQ_min}"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -z "${DRY_RUN}" ] || return 0
|
|
||||||
|
|
||||||
printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) \
|
|
||||||
$(print_freq_sysfs_path boost) > /dev/null
|
|
||||||
[ $? -eq 0 ] || {
|
|
||||||
log ERROR "Failed to set GPU max frequency"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Helper for set_freq().
|
|
||||||
#
|
|
||||||
set_freq_min() {
|
|
||||||
log INFO "Setting GPU min freq to %s MHz" "${SET_MIN_FREQ}"
|
|
||||||
|
|
||||||
read_freq_info n max || return $?
|
|
||||||
|
|
||||||
[ ${SET_MIN_FREQ} -gt ${FREQ_max} ] && {
|
|
||||||
log ERROR "Cannot set GPU min freq (%s) to be greater than max freq (%s)" \
|
|
||||||
"${SET_MIN_FREQ}" "${FREQ_max}"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[ ${SET_MIN_FREQ} -lt ${FREQ_RPn} ] && {
|
|
||||||
log ERROR "Cannot set GPU min freq (%s) to be less than hw min freq (%s)" \
|
|
||||||
"${SET_MIN_FREQ}" "${FREQ_RPn}"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -z "${DRY_RUN}" ] || return 0
|
|
||||||
|
|
||||||
printf "%s" ${SET_MIN_FREQ} > $(print_freq_sysfs_path min)
|
|
||||||
[ $? -eq 0 ] || {
|
|
||||||
log ERROR "Failed to set GPU min frequency"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Set min or max or both GPU frequencies to the user indicated values.
|
|
||||||
#
|
|
||||||
set_freq() {
|
|
||||||
# Get hw max & min frequencies
|
|
||||||
read_freq_info n RP0 RPn || return $?
|
|
||||||
|
|
||||||
[ -z "${SET_MAX_FREQ}" ] || {
|
|
||||||
SET_MAX_FREQ=$(compute_freq_set "${SET_MAX_FREQ}")
|
|
||||||
[ -z "${SET_MAX_FREQ}" ] && return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -z "${SET_MIN_FREQ}" ] || {
|
|
||||||
SET_MIN_FREQ=$(compute_freq_set "${SET_MIN_FREQ}")
|
|
||||||
[ -z "${SET_MIN_FREQ}" ] && return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Ensure correct operation order, to avoid setting min freq
|
|
||||||
# to a value which is larger than max freq.
|
|
||||||
#
|
|
||||||
# E.g.:
|
|
||||||
# crt_min=crt_max=600; new_min=new_max=700
|
|
||||||
# > operation order: max=700; min=700
|
|
||||||
#
|
|
||||||
# crt_min=crt_max=600; new_min=new_max=500
|
|
||||||
# > operation order: min=500; max=500
|
|
||||||
#
|
|
||||||
if [ -n "${SET_MAX_FREQ}" ] && [ -n "${SET_MIN_FREQ}" ]; then
|
|
||||||
[ ${SET_MAX_FREQ} -lt ${SET_MIN_FREQ} ] && {
|
|
||||||
log ERROR "Cannot set GPU max freq to be less than min freq"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
read_freq_info n min || return $?
|
|
||||||
|
|
||||||
if [ ${SET_MAX_FREQ} -lt ${FREQ_min} ]; then
|
|
||||||
set_freq_min || return $?
|
|
||||||
set_freq_max
|
|
||||||
else
|
|
||||||
set_freq_max || return $?
|
|
||||||
set_freq_min
|
|
||||||
fi
|
|
||||||
elif [ -n "${SET_MAX_FREQ}" ]; then
|
|
||||||
set_freq_max
|
|
||||||
elif [ -n "${SET_MIN_FREQ}" ]; then
|
|
||||||
set_freq_min
|
|
||||||
else
|
|
||||||
log "Unexpected call to set_freq()"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Helper for detect_throttling().
|
|
||||||
#
|
|
||||||
get_thrott_detect_pid() {
|
|
||||||
[ -e ${THROTT_DETECT_PID_FILE_PATH} ] || return 0
|
|
||||||
|
|
||||||
local pid
|
|
||||||
read pid < ${THROTT_DETECT_PID_FILE_PATH} || {
|
|
||||||
log ERROR "Failed to read pid from: %s" "${THROTT_DETECT_PID_FILE_PATH}"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
local proc_path=/proc/${pid:-invalid}/cmdline
|
|
||||||
[ -r ${proc_path} ] && grep -qs "${0##*/}" ${proc_path} && {
|
|
||||||
printf "%s" "${pid}"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove orphaned PID file
|
|
||||||
rm -rf ${THROTT_DETECT_PID_FILE_PATH}
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Control detection and reporting of GPU throttling events.
|
|
||||||
# arg1: start - run throttle detector in background
|
|
||||||
# stop - stop throttle detector process, if any
|
|
||||||
# status - verify if throttle detector is running
|
|
||||||
#
|
|
||||||
detect_throttling() {
|
|
||||||
local pid
|
|
||||||
pid=$(get_thrott_detect_pid)
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
status)
|
|
||||||
printf "Throttling detector is "
|
|
||||||
[ -z "${pid}" ] && printf "not running\n" && return 0
|
|
||||||
printf "running (pid=%s)\n" ${pid}
|
|
||||||
;;
|
|
||||||
|
|
||||||
stop)
|
|
||||||
[ -z "${pid}" ] && return 0
|
|
||||||
|
|
||||||
log INFO "Stopping throttling detector (pid=%s)" "${pid}"
|
|
||||||
kill ${pid}; sleep 1; kill -0 ${pid} 2>/dev/null && kill -9 ${pid}
|
|
||||||
rm -rf ${THROTT_DETECT_PID_FILE_PATH}
|
|
||||||
;;
|
|
||||||
|
|
||||||
start)
|
|
||||||
[ -n "${pid}" ] && {
|
|
||||||
log WARN "Throttling detector is already running (pid=%s)" ${pid}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
(
|
|
||||||
read_freq_info n RPn || exit $?
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
sleep ${THROTT_DETECT_SLEEP_SEC}
|
|
||||||
read_freq_info n act min cur || exit $?
|
|
||||||
|
|
||||||
#
|
|
||||||
# The throttling seems to occur when act freq goes below min.
|
|
||||||
# However, it's necessary to exclude the idle states, where
|
|
||||||
# act freq normally reaches RPn and cur goes below min.
|
|
||||||
#
|
|
||||||
[ ${FREQ_act} -lt ${FREQ_min} ] && \
|
|
||||||
[ ${FREQ_act} -gt ${FREQ_RPn} ] && \
|
|
||||||
[ ${FREQ_cur} -ge ${FREQ_min} ] && \
|
|
||||||
printf "GPU throttling detected: act=%s min=%s cur=%s RPn=%s\n" \
|
|
||||||
${FREQ_act} ${FREQ_min} ${FREQ_cur} ${FREQ_RPn}
|
|
||||||
done
|
|
||||||
) &
|
|
||||||
|
|
||||||
pid=$!
|
|
||||||
log INFO "Started GPU throttling detector (pid=%s)" ${pid}
|
|
||||||
|
|
||||||
printf "%s\n" ${pid} > ${THROTT_DETECT_PID_FILE_PATH} || \
|
|
||||||
log WARN "Failed to write throttle detector PID file"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Retrieve the list of online CPUs.
|
|
||||||
#
|
|
||||||
get_online_cpus() {
|
|
||||||
local path cpu_index
|
|
||||||
|
|
||||||
printf "0"
|
|
||||||
for path in $(grep 1 ${CPU_SYSFS_PREFIX}/cpu*/online); do
|
|
||||||
cpu_index=${path##*/cpu}
|
|
||||||
printf " %s" ${cpu_index%%/*}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Helper to print sysfs path for the given CPU index and freq info.
|
|
||||||
#
|
|
||||||
# arg1: Frequency info sysfs name, one of *_CPU_FREQ_INFO constants above
|
|
||||||
# arg2: CPU index
|
|
||||||
#
|
|
||||||
print_cpu_freq_sysfs_path() {
|
|
||||||
printf ${CPU_FREQ_SYSFS_PATTERN} "$2" "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Read the specified CPU freq info from sysfs.
|
|
||||||
#
|
|
||||||
# arg1: CPU index
|
|
||||||
# arg2: Flag (y/n) to also enable printing the freq info.
|
|
||||||
# arg3...: Frequency info sysfs name(s), see *_CPU_FREQ_INFO constants above
|
|
||||||
# return: Global variable(s) CPU_FREQ_${arg} containing the requested information
|
|
||||||
#
|
|
||||||
read_cpu_freq_info() {
|
|
||||||
local var val info path cpu_index print=0 ret=0
|
|
||||||
|
|
||||||
cpu_index=$1
|
|
||||||
[ "$2" = "y" ] && print=1
|
|
||||||
shift 2
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
info=$1
|
|
||||||
shift
|
|
||||||
var=CPU_FREQ_${info}
|
|
||||||
path=$(print_cpu_freq_sysfs_path "${info}" ${cpu_index})
|
|
||||||
|
|
||||||
[ -r ${path} ] && read ${var} < ${path} || {
|
|
||||||
log ERROR "Failed to read CPU freq info from: %s" "${path}"
|
|
||||||
ret=1
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -n "${var}" ] || {
|
|
||||||
log ERROR "Got empty CPU freq info from: %s" "${path}"
|
|
||||||
ret=1
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
[ ${print} -eq 1 ] && {
|
|
||||||
eval val=\$${var}
|
|
||||||
printf "%6s: %4s Hz\n" "${info}" "${val}"
|
|
||||||
}
|
|
||||||
done
|
|
||||||
|
|
||||||
return ${ret}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Helper to print freq. value as requested by user via '--cpu-set-max' option.
|
|
||||||
# arg1: user requested freq value
|
|
||||||
#
|
|
||||||
compute_cpu_freq_set() {
|
|
||||||
local val
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
+)
|
|
||||||
val=${CPU_FREQ_cpuinfo_max}
|
|
||||||
;;
|
|
||||||
-)
|
|
||||||
val=${CPU_FREQ_cpuinfo_min}
|
|
||||||
;;
|
|
||||||
*%)
|
|
||||||
val=$((${1%?} * ${CPU_FREQ_cpuinfo_max} / 100))
|
|
||||||
;;
|
|
||||||
*[!0-9]*)
|
|
||||||
log ERROR "Cannot set CPU freq to invalid value: %s" "$1"
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
"")
|
|
||||||
log ERROR "Cannot set CPU freq to unspecified value"
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
log ERROR "Cannot set CPU freq to custom value; use +, -, or % instead"
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
printf "%s" "${val}"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Adjust CPU max scaling frequency.
|
|
||||||
#
|
|
||||||
set_cpu_freq_max() {
|
|
||||||
local target_freq res=0
|
|
||||||
case "${CPU_SET_MAX_FREQ}" in
|
|
||||||
+)
|
|
||||||
target_freq=100
|
|
||||||
;;
|
|
||||||
-)
|
|
||||||
target_freq=1
|
|
||||||
;;
|
|
||||||
*%)
|
|
||||||
target_freq=${CPU_SET_MAX_FREQ%?}
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
log ERROR "Invalid CPU freq"
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
local pstate_info=$(printf "${CPU_PSTATE_SYSFS_PATTERN}" max_perf_pct)
|
|
||||||
[ -e "${pstate_info}" ] && {
|
|
||||||
log INFO "Setting intel_pstate max perf to %s" "${target_freq}%"
|
|
||||||
printf "%s" "${target_freq}" > "${pstate_info}"
|
|
||||||
[ $? -eq 0 ] || {
|
|
||||||
log ERROR "Failed to set intel_pstate max perf"
|
|
||||||
res=1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local cpu_index
|
|
||||||
for cpu_index in $(get_online_cpus); do
|
|
||||||
read_cpu_freq_info ${cpu_index} n ${CAP_CPU_FREQ_INFO} || { res=$?; continue; }
|
|
||||||
|
|
||||||
target_freq=$(compute_cpu_freq_set "${CPU_SET_MAX_FREQ}")
|
|
||||||
[ -z "${target_freq}" ] && { res=$?; continue; }
|
|
||||||
|
|
||||||
log INFO "Setting CPU%s max scaling freq to %s Hz" ${cpu_index} "${target_freq}"
|
|
||||||
[ -n "${DRY_RUN}" ] && continue
|
|
||||||
|
|
||||||
printf "%s" ${target_freq} > $(print_cpu_freq_sysfs_path scaling_max ${cpu_index})
|
|
||||||
[ $? -eq 0 ] || {
|
|
||||||
res=1
|
|
||||||
log ERROR "Failed to set CPU%s max scaling frequency" ${cpu_index}
|
|
||||||
}
|
|
||||||
done
|
|
||||||
|
|
||||||
return ${res}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Show help message.
|
|
||||||
#
|
|
||||||
print_usage() {
|
|
||||||
cat <<EOF
|
|
||||||
Usage: ${0##*/} [OPTION]...
|
|
||||||
|
|
||||||
A script to manage Intel GPU frequencies. Can be used for debugging performance
|
|
||||||
problems or trying to obtain a stable frequency while benchmarking.
|
|
||||||
|
|
||||||
Note Intel GPUs only accept specific frequencies, usually multiples of 50 MHz.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-g, --get [act|enf|cap|all]
|
|
||||||
Get frequency information: active (default), enforced,
|
|
||||||
hardware capabilities or all of them.
|
|
||||||
|
|
||||||
-s, --set [{min|max}=]{FREQUENCY[%]|+|-}
|
|
||||||
Set min or max frequency to the given value (MHz).
|
|
||||||
Append '%' to interpret FREQUENCY as % of hw max.
|
|
||||||
Use '+' or '-' to set frequency to hardware max or min.
|
|
||||||
Omit min/max prefix to set both frequencies.
|
|
||||||
|
|
||||||
-r, --reset Reset frequencies to hardware defaults.
|
|
||||||
|
|
||||||
-m, --monitor [act|enf|cap|all]
|
|
||||||
Monitor the indicated frequencies via 'watch' utility.
|
|
||||||
See '-g, --get' option for more details.
|
|
||||||
|
|
||||||
-d|--detect-thrott [start|stop|status]
|
|
||||||
Start (default operation) the throttling detector
|
|
||||||
as a background process. Use 'stop' or 'status' to
|
|
||||||
terminate the detector process or verify its status.
|
|
||||||
|
|
||||||
--cpu-set-max [FREQUENCY%|+|-}
|
|
||||||
Set CPU max scaling frequency as % of hw max.
|
|
||||||
Use '+' or '-' to set frequency to hardware max or min.
|
|
||||||
|
|
||||||
-r, --reset Reset frequencies to hardware defaults.
|
|
||||||
|
|
||||||
--dry-run See what the script will do without applying any
|
|
||||||
frequency changes.
|
|
||||||
|
|
||||||
-h, --help Display this help text and exit.
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Parse user input for '-g, --get' option.
|
|
||||||
# Returns 0 if a value has been provided, otherwise 1.
|
|
||||||
#
|
|
||||||
parse_option_get() {
|
|
||||||
local ret=0
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
act) GET_ACT_FREQ=1;;
|
|
||||||
enf) GET_ENF_FREQ=1;;
|
|
||||||
cap) GET_CAP_FREQ=1;;
|
|
||||||
all) GET_ACT_FREQ=1; GET_ENF_FREQ=1; GET_CAP_FREQ=1;;
|
|
||||||
-*|"")
|
|
||||||
# No value provided, using default.
|
|
||||||
GET_ACT_FREQ=1
|
|
||||||
ret=1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
print_usage
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
return ${ret}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Validate user input for '-s, --set' option.
|
|
||||||
# arg1: input value to be validated
|
|
||||||
# arg2: optional flag indicating input is restricted to %
|
|
||||||
#
|
|
||||||
validate_option_set() {
|
|
||||||
case "$1" in
|
|
||||||
+|-|[0-9]%|[0-9][0-9]%)
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
*[!0-9]*|"")
|
|
||||||
print_usage
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
[ -z "$2" ] || { print_usage; exit 1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Parse script arguments.
|
|
||||||
#
|
|
||||||
[ $# -eq 0 ] && { print_usage; exit 1; }
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case "$1" in
|
|
||||||
-g|--get)
|
|
||||||
parse_option_get "$2" && shift
|
|
||||||
;;
|
|
||||||
|
|
||||||
-s|--set)
|
|
||||||
shift
|
|
||||||
case "$1" in
|
|
||||||
min=*)
|
|
||||||
SET_MIN_FREQ=${1#min=}
|
|
||||||
validate_option_set "${SET_MIN_FREQ}"
|
|
||||||
;;
|
|
||||||
max=*)
|
|
||||||
SET_MAX_FREQ=${1#max=}
|
|
||||||
validate_option_set "${SET_MAX_FREQ}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
SET_MIN_FREQ=$1
|
|
||||||
validate_option_set "${SET_MIN_FREQ}"
|
|
||||||
SET_MAX_FREQ=${SET_MIN_FREQ}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
-r|--reset)
|
|
||||||
RESET_FREQ=1
|
|
||||||
SET_MIN_FREQ="-"
|
|
||||||
SET_MAX_FREQ="+"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-m|--monitor)
|
|
||||||
MONITOR_FREQ=act
|
|
||||||
parse_option_get "$2" && MONITOR_FREQ=$2 && shift
|
|
||||||
;;
|
|
||||||
|
|
||||||
-d|--detect-thrott)
|
|
||||||
DETECT_THROTT=start
|
|
||||||
case "$2" in
|
|
||||||
start|stop|status)
|
|
||||||
DETECT_THROTT=$2
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
--cpu-set-max)
|
|
||||||
shift
|
|
||||||
CPU_SET_MAX_FREQ=$1
|
|
||||||
validate_option_set "${CPU_SET_MAX_FREQ}" restricted
|
|
||||||
;;
|
|
||||||
|
|
||||||
--dry-run)
|
|
||||||
DRY_RUN=1
|
|
||||||
;;
|
|
||||||
|
|
||||||
-h|--help)
|
|
||||||
print_usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
print_usage
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
|
||||||
# Main
|
|
||||||
#
|
|
||||||
RET=0
|
|
||||||
|
|
||||||
identify_intel_gpu || {
|
|
||||||
log INFO "No Intel GPU detected"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -n "${SET_MIN_FREQ}${SET_MAX_FREQ}" ] && { set_freq || RET=$?; }
|
|
||||||
print_freq_info
|
|
||||||
|
|
||||||
[ -n "${DETECT_THROTT}" ] && detect_throttling ${DETECT_THROTT}
|
|
||||||
|
|
||||||
[ -n "${CPU_SET_MAX_FREQ}" ] && { set_cpu_freq_max || RET=$?; }
|
|
||||||
|
|
||||||
[ -n "${MONITOR_FREQ}" ] && {
|
|
||||||
log INFO "Entering frequency monitoring mode"
|
|
||||||
sleep 2
|
|
||||||
exec watch -d -n 1 "$0" -g "${MONITOR_FREQ}"
|
|
||||||
}
|
|
||||||
|
|
||||||
exit ${RET}
|
|
@@ -1,174 +0,0 @@
|
|||||||
From bf8ada0d15f94824ee1643d4e17a66dffdbaf2e5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
||||||
Date: Fri, 26 Aug 2022 18:24:27 +0200
|
|
||||||
Subject: [PATCH 1/2] Allow running on Android from the command line
|
|
||||||
|
|
||||||
For testing the Android EGL platform without having to go via the
|
|
||||||
Android activity manager, build deqp-egl.
|
|
||||||
|
|
||||||
Tests that render to native windows are unsupported, as command line
|
|
||||||
programs cannot create windows on Android.
|
|
||||||
|
|
||||||
$ cmake -S . -B build/ -DDEQP_TARGET=android -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror -DANDROID_NDK_PATH=./android-ndk-r21d -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28 -DGLCTS_GTF_TARGET=gles32 -G Ninja
|
|
||||||
$ ninja -C build modules/egl/deqp-egl
|
|
||||||
|
|
||||||
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
||||||
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 36 ++-----------------
|
|
||||||
.../android/tcuAndroidNativeActivity.cpp | 36 ++++++++++---------
|
|
||||||
.../platform/android/tcuAndroidPlatform.cpp | 12 ++++++-
|
|
||||||
3 files changed, 33 insertions(+), 51 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 1ff2bb9..8c76abb 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -249,7 +249,7 @@ include_directories(
|
|
||||||
external/vulkancts/framework/vulkan/generated/vulkan
|
|
||||||
)
|
|
||||||
|
|
||||||
-if (DE_OS_IS_ANDROID OR DE_OS_IS_IOS)
|
|
||||||
+if (DE_OS_IS_IOS)
|
|
||||||
# On Android deqp modules are compiled as libraries and linked into final .so
|
|
||||||
set(DEQP_MODULE_LIBRARIES )
|
|
||||||
set(DEQP_MODULE_ENTRY_POINTS )
|
|
||||||
@@ -293,7 +293,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
|
|
||||||
set(DEQP_MODULE_LIBRARIES ${DEQP_MODULE_LIBRARIES} PARENT_SCOPE)
|
|
||||||
set(DEQP_MODULE_ENTRY_POINTS ${DEQP_MODULE_ENTRY_POINTS} PARENT_SCOPE)
|
|
||||||
|
|
||||||
- if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS)
|
|
||||||
+ if (NOT DE_OS_IS_IOS)
|
|
||||||
# Executable target
|
|
||||||
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
|
|
||||||
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
|
|
||||||
@@ -367,37 +367,7 @@ add_subdirectory(external/vulkancts/vkscpc)
|
|
||||||
add_subdirectory(external/openglcts)
|
|
||||||
|
|
||||||
# Single-binary targets
|
|
||||||
-if (DE_OS_IS_ANDROID)
|
|
||||||
- include_directories(executor)
|
|
||||||
- include_directories(${PROJECT_BINARY_DIR}/external/vulkancts/framework/vulkan)
|
|
||||||
-
|
|
||||||
- set(DEQP_SRCS
|
|
||||||
- framework/platform/android/tcuAndroidMain.cpp
|
|
||||||
- framework/platform/android/tcuAndroidJNI.cpp
|
|
||||||
- framework/platform/android/tcuAndroidPlatformCapabilityQueryJNI.cpp
|
|
||||||
- framework/platform/android/tcuTestLogParserJNI.cpp
|
|
||||||
- ${DEQP_MODULE_ENTRY_POINTS}
|
|
||||||
- )
|
|
||||||
-
|
|
||||||
- set(DEQP_LIBS
|
|
||||||
- tcutil-platform
|
|
||||||
- xecore
|
|
||||||
- ${DEQP_MODULE_LIBRARIES}
|
|
||||||
- )
|
|
||||||
-
|
|
||||||
- add_library(deqp SHARED ${DEQP_SRCS})
|
|
||||||
- target_link_libraries(deqp ${DEQP_LIBS})
|
|
||||||
-
|
|
||||||
- # Separate out the debug information because it's enormous
|
|
||||||
- add_custom_command(TARGET deqp POST_BUILD
|
|
||||||
- COMMAND ${CMAKE_STRIP} --only-keep-debug -o $<TARGET_FILE:deqp>.debug $<TARGET_FILE:deqp>
|
|
||||||
- COMMAND ${CMAKE_STRIP} -g $<TARGET_FILE:deqp>)
|
|
||||||
-
|
|
||||||
- # Needed by OpenGL CTS that defines its own activity but depends on
|
|
||||||
- # common Android support code.
|
|
||||||
- target_include_directories(deqp PRIVATE framework/platform/android)
|
|
||||||
-
|
|
||||||
-elseif (DE_OS_IS_IOS)
|
|
||||||
+if (DE_OS_IS_IOS)
|
|
||||||
# Code sign identity
|
|
||||||
set(DEQP_IOS_CODE_SIGN_IDENTITY "drawElements" CACHE STRING "Code sign identity for iOS build")
|
|
||||||
|
|
||||||
diff --git a/framework/platform/android/tcuAndroidNativeActivity.cpp b/framework/platform/android/tcuAndroidNativeActivity.cpp
|
|
||||||
index 6f8cd8f..b83e30f 100644
|
|
||||||
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
|
|
||||||
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
|
|
||||||
@@ -116,23 +116,25 @@ namespace Android
|
|
||||||
NativeActivity::NativeActivity (ANativeActivity* activity)
|
|
||||||
: m_activity(activity)
|
|
||||||
{
|
|
||||||
- activity->instance = (void*)this;
|
|
||||||
- activity->callbacks->onStart = onStartCallback;
|
|
||||||
- activity->callbacks->onResume = onResumeCallback;
|
|
||||||
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
|
|
||||||
- activity->callbacks->onPause = onPauseCallback;
|
|
||||||
- activity->callbacks->onStop = onStopCallback;
|
|
||||||
- activity->callbacks->onDestroy = onDestroyCallback;
|
|
||||||
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
|
|
||||||
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
|
|
||||||
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
|
|
||||||
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
|
|
||||||
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
|
|
||||||
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
|
|
||||||
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
|
|
||||||
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
|
|
||||||
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
|
|
||||||
- activity->callbacks->onLowMemory = onLowMemoryCallback;
|
|
||||||
+ if (activity) {
|
|
||||||
+ activity->instance = (void*)this;
|
|
||||||
+ activity->callbacks->onStart = onStartCallback;
|
|
||||||
+ activity->callbacks->onResume = onResumeCallback;
|
|
||||||
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
|
|
||||||
+ activity->callbacks->onPause = onPauseCallback;
|
|
||||||
+ activity->callbacks->onStop = onStopCallback;
|
|
||||||
+ activity->callbacks->onDestroy = onDestroyCallback;
|
|
||||||
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
|
|
||||||
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
|
|
||||||
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
|
|
||||||
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
|
|
||||||
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
|
|
||||||
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
|
|
||||||
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
|
|
||||||
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
|
|
||||||
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
|
|
||||||
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
NativeActivity::~NativeActivity (void)
|
|
||||||
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
|
|
||||||
index 69ab384..d7288f6 100644
|
|
||||||
--- a/framework/platform/android/tcuAndroidPlatform.cpp
|
|
||||||
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
*//*--------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "tcuAndroidPlatform.hpp"
|
|
||||||
+#include "tcuAndroidNativeActivity.hpp"
|
|
||||||
#include "tcuAndroidUtil.hpp"
|
|
||||||
#include "gluRenderContext.hpp"
|
|
||||||
#include "egluNativeDisplay.hpp"
|
|
||||||
@@ -170,7 +171,7 @@ eglu::NativeWindow* NativeWindowFactory::createWindow (const eglu::WindowParams&
|
|
||||||
Window* window = m_windowRegistry.tryAcquireWindow();
|
|
||||||
|
|
||||||
if (!window)
|
|
||||||
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
|
|
||||||
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
|
|
||||||
|
|
||||||
return new NativeWindow(window, params.width, params.height, format);
|
|
||||||
}
|
|
||||||
@@ -286,6 +287,9 @@ static size_t getTotalSystemMemory (ANativeActivity* activity)
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
+ if (!activity)
|
|
||||||
+ throw tcu::InternalError("No activity (running from command line?");
|
|
||||||
+
|
|
||||||
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
|
|
||||||
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
|
|
||||||
return totalMemory;
|
|
||||||
@@ -382,3 +386,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
|
|
||||||
|
|
||||||
} // Android
|
|
||||||
} // tcu
|
|
||||||
+
|
|
||||||
+tcu::Platform* createPlatform (void)
|
|
||||||
+{
|
|
||||||
+ tcu::Android::NativeActivity activity(NULL);
|
|
||||||
+ return new tcu::Android::Platform(activity);
|
|
||||||
+}
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@@ -1,161 +0,0 @@
|
|||||||
From 6d99990e93869e361035b7c06c05183041dec8b4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ricardo Garcia <rgarcia@igalia.com>
|
|
||||||
Date: Mon, 20 Feb 2023 13:57:53 +0100
|
|
||||||
Subject: [PATCH] Fix build for the surfaceless and null-WS target platforms
|
|
||||||
|
|
||||||
Both platforms should not be considered for building Vulkan Video, which
|
|
||||||
is only available in the normal Linux and Win32 targets, and their
|
|
||||||
createLibrary platform methods do not take a library type argument.
|
|
||||||
|
|
||||||
No test results should be affected by these changes.
|
|
||||||
|
|
||||||
Components: Framework
|
|
||||||
VK-GL-CTS issue: 4295
|
|
||||||
|
|
||||||
Change-Id: I4de5b42685899099a9cfcf7da64fe299fef61ffc
|
|
||||||
---
|
|
||||||
external/vulkancts/framework/vulkan/vkPlatform.hpp | 2 +-
|
|
||||||
.../vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp | 2 +-
|
|
||||||
external/vulkancts/modules/vulkan/video/CMakeLists.txt | 2 +-
|
|
||||||
.../modules/vulkan/video/vktVideoSessionNvUtils.cpp | 2 +-
|
|
||||||
external/vulkancts/modules/vulkan/vktTestPackage.cpp | 2 +-
|
|
||||||
external/vulkancts/vkscpc/vkscpc.cpp | 2 +-
|
|
||||||
external/vulkancts/vkscserver/vksServices.cpp | 2 +-
|
|
||||||
framework/delibs/debase/deDefs.h | 6 ++++++
|
|
||||||
framework/platform/CMakeLists.txt | 1 +
|
|
||||||
targets/nullws/nullws.cmake | 1 +
|
|
||||||
10 files changed, 15 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/external/vulkancts/framework/vulkan/vkPlatform.hpp b/external/vulkancts/framework/vulkan/vkPlatform.hpp
|
|
||||||
index bec39d326..7574166b9 100644
|
|
||||||
--- a/external/vulkancts/framework/vulkan/vkPlatform.hpp
|
|
||||||
+++ b/external/vulkancts/framework/vulkan/vkPlatform.hpp
|
|
||||||
@@ -399,7 +399,7 @@ public:
|
|
||||||
|
|
||||||
Platform (void) {}
|
|
||||||
~Platform (void) {}
|
|
||||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
|
||||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
|
||||||
virtual Library* createLibrary (LibraryType libraryType = LIBRARY_TYPE_VULKAN, const char* libraryPath = DE_NULL) const = 0;
|
|
||||||
#else
|
|
||||||
virtual Library* createLibrary (const char* libraryPath = DE_NULL) const = 0;
|
|
||||||
diff --git a/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp b/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp
|
|
||||||
index 5f6d884f4..af6bf6938 100644
|
|
||||||
--- a/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp
|
|
||||||
+++ b/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp
|
|
||||||
@@ -133,7 +133,7 @@ public:
|
|
||||||
tcu::TestLog& log = m_context.getTestContext().getLog();
|
|
||||||
const deUint32 apiVersion = m_context.getUsedApiVersion();
|
|
||||||
const vk::Platform& platform = m_context.getTestContext().getPlatform().getVulkanPlatform();
|
|
||||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
|
||||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
|
||||||
de::MovePtr<vk::Library> vkLibrary = de::MovePtr<vk::Library>(platform.createLibrary(vk::Platform::LibraryType::LIBRARY_TYPE_VULKAN, m_context.getTestContext().getCommandLine().getVkLibraryPath()));
|
|
||||||
#else
|
|
||||||
de::MovePtr<vk::Library> vkLibrary = de::MovePtr<vk::Library>(platform.createLibrary(m_context.getTestContext().getCommandLine().getVkLibraryPath()));
|
|
||||||
diff --git a/external/vulkancts/modules/vulkan/video/CMakeLists.txt b/external/vulkancts/modules/vulkan/video/CMakeLists.txt
|
|
||||||
index 464adb1e2..f9a2044e7 100644
|
|
||||||
--- a/external/vulkancts/modules/vulkan/video/CMakeLists.txt
|
|
||||||
+++ b/external/vulkancts/modules/vulkan/video/CMakeLists.txt
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
include_directories(..)
|
|
||||||
-if (DE_OS_IS_WIN32 OR DE_OS_IS_UNIX)
|
|
||||||
+if ((DE_OS_IS_WIN32 OR DE_OS_IS_UNIX) AND NOT DEQP_USE_SURFACELESS AND NOT DEQP_USE_NULLWS)
|
|
||||||
include_directories(${FFMPEG_INCLUDE_PATH})
|
|
||||||
add_compile_definitions(DE_BUILD_VIDEO)
|
|
||||||
endif()
|
|
||||||
diff --git a/external/vulkancts/modules/vulkan/video/vktVideoSessionNvUtils.cpp b/external/vulkancts/modules/vulkan/video/vktVideoSessionNvUtils.cpp
|
|
||||||
index 00491930c..9323278be 100644
|
|
||||||
--- a/external/vulkancts/modules/vulkan/video/vktVideoSessionNvUtils.cpp
|
|
||||||
+++ b/external/vulkancts/modules/vulkan/video/vktVideoSessionNvUtils.cpp
|
|
||||||
@@ -148,7 +148,7 @@ private:
|
|
||||||
};
|
|
||||||
|
|
||||||
NvFunctions::NvFunctions (const vk::Platform& platform)
|
|
||||||
-#ifdef DE_BUILD_VIDEO
|
|
||||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
|
||||||
: m_library (de::MovePtr<vk::Library>(platform.createLibrary(vk::Platform::LIBRARY_TYPE_VULKAN_VIDEO_DECODE_PARSER, DE_NULL)))
|
|
||||||
#else
|
|
||||||
: m_library (de::MovePtr<vk::Library>(platform.createLibrary()))
|
|
||||||
diff --git a/external/vulkancts/modules/vulkan/vktTestPackage.cpp b/external/vulkancts/modules/vulkan/vktTestPackage.cpp
|
|
||||||
index 959a9d368..cac454c71 100644
|
|
||||||
--- a/external/vulkancts/modules/vulkan/vktTestPackage.cpp
|
|
||||||
+++ b/external/vulkancts/modules/vulkan/vktTestPackage.cpp
|
|
||||||
@@ -204,7 +204,7 @@ static void restoreStandardOutput () { qpRedirectOut(openWrite, open
|
|
||||||
|
|
||||||
static MovePtr<vk::Library> createLibrary (tcu::TestContext& testCtx)
|
|
||||||
{
|
|
||||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
|
||||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
|
||||||
return MovePtr<vk::Library>(testCtx.getPlatform().getVulkanPlatform().createLibrary(vk::Platform::LIBRARY_TYPE_VULKAN, testCtx.getCommandLine().getVkLibraryPath()));
|
|
||||||
#else
|
|
||||||
return MovePtr<vk::Library>(testCtx.getPlatform().getVulkanPlatform().createLibrary(testCtx.getCommandLine().getVkLibraryPath()));
|
|
||||||
diff --git a/external/vulkancts/vkscpc/vkscpc.cpp b/external/vulkancts/vkscpc/vkscpc.cpp
|
|
||||||
index 55b5665c8..91725633a 100644
|
|
||||||
--- a/external/vulkancts/vkscpc/vkscpc.cpp
|
|
||||||
+++ b/external/vulkancts/vkscpc/vkscpc.cpp
|
|
||||||
@@ -288,7 +288,7 @@ int main (int argc, char** argv)
|
|
||||||
tcu::DirArchive archive {""};
|
|
||||||
tcu::TestLog log { cmdLine.getOption<opt::LogFile>().c_str() }; log.supressLogging(true);
|
|
||||||
de::SharedPtr<tcu::Platform> platform {createPlatform()};
|
|
||||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
|
||||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
|
||||||
de::SharedPtr<vk::Library> library {platform->getVulkanPlatform().createLibrary(vk::Platform::LIBRARY_TYPE_VULKAN, DE_NULL)};
|
|
||||||
#else
|
|
||||||
de::SharedPtr<vk::Library> library {platform->getVulkanPlatform().createLibrary(DE_NULL)};
|
|
||||||
diff --git a/external/vulkancts/vkscserver/vksServices.cpp b/external/vulkancts/vkscserver/vksServices.cpp
|
|
||||||
index 461c7a349..fe1160edc 100644
|
|
||||||
--- a/external/vulkancts/vkscserver/vksServices.cpp
|
|
||||||
+++ b/external/vulkancts/vkscserver/vksServices.cpp
|
|
||||||
@@ -163,7 +163,7 @@ VkscServer* createServerVKSC(const std::string& logFile)
|
|
||||||
tcu::DirArchive archive {""};
|
|
||||||
tcu::TestLog log { logFile.c_str() }; log.supressLogging(true);
|
|
||||||
tcu::Platform* platform {createPlatform()};
|
|
||||||
-#if (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)
|
|
||||||
+#ifdef DE_PLATFORM_USE_LIBRARY_TYPE
|
|
||||||
vk::Library* library {platform->getVulkanPlatform().createLibrary(vk::Platform::LIBRARY_TYPE_VULKAN, DE_NULL)};
|
|
||||||
#else
|
|
||||||
vk::Library* library {platform->getVulkanPlatform().createLibrary(DE_NULL)};
|
|
||||||
diff --git a/framework/delibs/debase/deDefs.h b/framework/delibs/debase/deDefs.h
|
|
||||||
index 39cd65d0b..2885fe5c5 100644
|
|
||||||
--- a/framework/delibs/debase/deDefs.h
|
|
||||||
+++ b/framework/delibs/debase/deDefs.h
|
|
||||||
@@ -101,6 +101,12 @@
|
|
||||||
# error Unknown operating system.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if ((DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_UNIX)) && !defined(DEQP_SURFACELESS) && !defined(NULLWS)
|
|
||||||
+# define DE_PLATFORM_USE_LIBRARY_TYPE 1
|
|
||||||
+#else
|
|
||||||
+# undef DE_PLATFORM_USE_LIBRARY_TYPE
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* CPUs */
|
|
||||||
#define DE_CPU_VANILLA 0
|
|
||||||
#define DE_CPU_X86 1
|
|
||||||
diff --git a/framework/platform/CMakeLists.txt b/framework/platform/CMakeLists.txt
|
|
||||||
index 00c53e3c9..b2a1d57b6 100644
|
|
||||||
--- a/framework/platform/CMakeLists.txt
|
|
||||||
+++ b/framework/platform/CMakeLists.txt
|
|
||||||
@@ -113,6 +113,7 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
elseif (DE_OS_IS_UNIX AND DEQP_USE_SURFACELESS)
|
|
||||||
+ add_definitions(-DDEQP_SURFACELESS=1)
|
|
||||||
set(TCUTIL_PLATFORM_SRCS
|
|
||||||
surfaceless/tcuSurfacelessPlatform.hpp
|
|
||||||
surfaceless/tcuSurfacelessPlatform.cpp
|
|
||||||
diff --git a/targets/nullws/nullws.cmake b/targets/nullws/nullws.cmake
|
|
||||||
index 81a7f9ea2..5f6f9b773 100644
|
|
||||||
--- a/targets/nullws/nullws.cmake
|
|
||||||
+++ b/targets/nullws/nullws.cmake
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
message("*** Using nullws target")
|
|
||||||
set(DEQP_TARGET_NAME "nullws")
|
|
||||||
|
|
||||||
+set(DEQP_USE_NULLWS ON)
|
|
||||||
add_definitions(-DNULLWS)
|
|
||||||
|
|
||||||
find_library(GLES2_LIBRARY NAMES libGLESv2 GLESv2)
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@@ -1,27 +0,0 @@
|
|||||||
From c2d5252f4a8be94720235feb9e358ecb0a2e8e11 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Helen Koike <helen.koike@collabora.com>
|
|
||||||
Date: Tue, 27 Sep 2022 12:35:22 -0300
|
|
||||||
Subject: [PATCH 2/2] Android prints to stdout instead of logcat
|
|
||||||
|
|
||||||
Signed-off-by: Helen Koike <helen.koike@collabora.com>
|
|
||||||
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
|
|
||||||
---
|
|
||||||
framework/qphelper/qpDebugOut.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/framework/qphelper/qpDebugOut.c b/framework/qphelper/qpDebugOut.c
|
|
||||||
index 6579e9f..c200c6f 100644
|
|
||||||
--- a/framework/qphelper/qpDebugOut.c
|
|
||||||
+++ b/framework/qphelper/qpDebugOut.c
|
|
||||||
@@ -98,7 +98,7 @@ void qpDiev (const char* format, va_list args)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* print() implementation. */
|
|
||||||
-#if (DE_OS == DE_OS_ANDROID)
|
|
||||||
+#if (0)
|
|
||||||
|
|
||||||
#include <android/log.h>
|
|
||||||
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@@ -1,72 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
|
|
||||||
EPHEMERAL="
|
|
||||||
autoconf
|
|
||||||
automake
|
|
||||||
bzip2
|
|
||||||
cmake
|
|
||||||
git
|
|
||||||
libtool
|
|
||||||
libepoxy-dev
|
|
||||||
libtbb-dev
|
|
||||||
make
|
|
||||||
openssl-dev
|
|
||||||
unzip
|
|
||||||
xz
|
|
||||||
zstd-dev
|
|
||||||
"
|
|
||||||
|
|
||||||
apk add \
|
|
||||||
bash \
|
|
||||||
bison \
|
|
||||||
ccache \
|
|
||||||
clang-dev \
|
|
||||||
coreutils \
|
|
||||||
curl \
|
|
||||||
flex \
|
|
||||||
gcc \
|
|
||||||
g++ \
|
|
||||||
gettext \
|
|
||||||
glslang \
|
|
||||||
linux-headers \
|
|
||||||
llvm15-dev \
|
|
||||||
meson \
|
|
||||||
expat-dev \
|
|
||||||
elfutils-dev \
|
|
||||||
libselinux-dev \
|
|
||||||
libva-dev \
|
|
||||||
libpciaccess-dev \
|
|
||||||
zlib-dev \
|
|
||||||
python3-dev \
|
|
||||||
py3-mako \
|
|
||||||
py3-ply \
|
|
||||||
vulkan-headers \
|
|
||||||
spirv-tools-dev \
|
|
||||||
util-macros \
|
|
||||||
$EPHEMERAL
|
|
||||||
|
|
||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-wayland.sh
|
|
||||||
|
|
||||||
pushd /usr/local
|
|
||||||
git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1
|
|
||||||
rm -rf shader-db/.git
|
|
||||||
cd shader-db
|
|
||||||
make
|
|
||||||
popd
|
|
||||||
|
|
||||||
|
|
||||||
############### Uninstall the build software
|
|
||||||
|
|
||||||
apk del $EPHEMERAL
|
|
||||||
|
|
||||||
. .gitlab-ci/container/container_post_build.sh
|
|
@@ -1,12 +1,6 @@
|
|||||||
CONFIG_LOCALVERSION_AUTO=y
|
CONFIG_LOCALVERSION_AUTO=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
|
|
||||||
CONFIG_CRYPTO_ZSTD=y
|
|
||||||
CONFIG_ZRAM_MEMORY_TRACKING=y
|
|
||||||
CONFIG_ZRAM_WRITEBACK=y
|
|
||||||
CONFIG_ZRAM=y
|
|
||||||
CONFIG_ZSMALLOC_STAT=y
|
|
||||||
|
|
||||||
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
||||||
CONFIG_BLK_DEV_INITRD=n
|
CONFIG_BLK_DEV_INITRD=n
|
||||||
|
|
||||||
@@ -61,9 +55,3 @@ CONFIG_USB_NET_DRIVERS=y
|
|||||||
CONFIG_USB_RTL8152=y
|
CONFIG_USB_RTL8152=y
|
||||||
CONFIG_USB_NET_AX8817X=y
|
CONFIG_USB_NET_AX8817X=y
|
||||||
CONFIG_USB_NET_SMSC95XX=y
|
CONFIG_USB_NET_SMSC95XX=y
|
||||||
|
|
||||||
# TK1
|
|
||||||
CONFIG_ARM_TEGRA_DEVFREQ=y
|
|
||||||
|
|
||||||
# 32-bit build failure
|
|
||||||
CONFIG_DRM_MSM=n
|
|
||||||
|
@@ -1,12 +1,6 @@
|
|||||||
CONFIG_LOCALVERSION_AUTO=y
|
CONFIG_LOCALVERSION_AUTO=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
|
|
||||||
CONFIG_CRYPTO_ZSTD=y
|
|
||||||
CONFIG_ZRAM_MEMORY_TRACKING=y
|
|
||||||
CONFIG_ZRAM_WRITEBACK=y
|
|
||||||
CONFIG_ZRAM=y
|
|
||||||
CONFIG_ZSMALLOC_STAT=y
|
|
||||||
|
|
||||||
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
||||||
CONFIG_BLK_DEV_INITRD=n
|
CONFIG_BLK_DEV_INITRD=n
|
||||||
|
|
||||||
@@ -22,7 +16,6 @@ CONFIG_DRM_LIMA=y
|
|||||||
CONFIG_DRM_PANEL_SIMPLE=y
|
CONFIG_DRM_PANEL_SIMPLE=y
|
||||||
CONFIG_DRM_PANEL_EDP=y
|
CONFIG_DRM_PANEL_EDP=y
|
||||||
CONFIG_DRM_MSM=y
|
CONFIG_DRM_MSM=y
|
||||||
CONFIG_DRM_ETNAVIV=y
|
|
||||||
CONFIG_DRM_I2C_ADV7511=y
|
CONFIG_DRM_I2C_ADV7511=y
|
||||||
CONFIG_PWM_CROS_EC=y
|
CONFIG_PWM_CROS_EC=y
|
||||||
CONFIG_BACKLIGHT_PWM=y
|
CONFIG_BACKLIGHT_PWM=y
|
||||||
@@ -46,7 +39,6 @@ CONFIG_OF=y
|
|||||||
CONFIG_QCOM_COMMAND_DB=y
|
CONFIG_QCOM_COMMAND_DB=y
|
||||||
CONFIG_QCOM_RPMHPD=y
|
CONFIG_QCOM_RPMHPD=y
|
||||||
CONFIG_QCOM_RPMPD=y
|
CONFIG_QCOM_RPMPD=y
|
||||||
CONFIG_QCOM_OCMEM=y
|
|
||||||
CONFIG_SDM_GPUCC_845=y
|
CONFIG_SDM_GPUCC_845=y
|
||||||
CONFIG_SDM_VIDEOCC_845=y
|
CONFIG_SDM_VIDEOCC_845=y
|
||||||
CONFIG_SDM_DISPCC_845=y
|
CONFIG_SDM_DISPCC_845=y
|
||||||
@@ -67,7 +59,6 @@ CONFIG_POWER_RESET_QCOM_PON=y
|
|||||||
CONFIG_RTC_DRV_PM8XXX=y
|
CONFIG_RTC_DRV_PM8XXX=y
|
||||||
CONFIG_INTERCONNECT=y
|
CONFIG_INTERCONNECT=y
|
||||||
CONFIG_INTERCONNECT_QCOM=y
|
CONFIG_INTERCONNECT_QCOM=y
|
||||||
CONFIG_INTERCONNECT_QCOM_MSM8996=y
|
|
||||||
CONFIG_INTERCONNECT_QCOM_SDM845=y
|
CONFIG_INTERCONNECT_QCOM_SDM845=y
|
||||||
CONFIG_INTERCONNECT_QCOM_MSM8916=y
|
CONFIG_INTERCONNECT_QCOM_MSM8916=y
|
||||||
CONFIG_INTERCONNECT_QCOM_OSM_L3=y
|
CONFIG_INTERCONNECT_QCOM_OSM_L3=y
|
||||||
@@ -75,16 +66,11 @@ CONFIG_INTERCONNECT_QCOM_SC7180=y
|
|||||||
CONFIG_CRYPTO_DEV_QCOM_RNG=y
|
CONFIG_CRYPTO_DEV_QCOM_RNG=y
|
||||||
CONFIG_SC_DISPCC_7180=y
|
CONFIG_SC_DISPCC_7180=y
|
||||||
CONFIG_SC_GPUCC_7180=y
|
CONFIG_SC_GPUCC_7180=y
|
||||||
CONFIG_QCOM_SPMI_ADC5=y
|
|
||||||
CONFIG_DRM_PARADE_PS8640=y
|
|
||||||
CONFIG_PHY_QCOM_USB_HS=y
|
|
||||||
|
|
||||||
# db410c ethernet
|
# db410c ethernet
|
||||||
CONFIG_USB_RTL8152=y
|
CONFIG_USB_RTL8152=y
|
||||||
# db820c ethernet
|
# db820c ethernet
|
||||||
CONFIG_ATL1C=y
|
CONFIG_ATL1C=y
|
||||||
# Chromebooks ethernet
|
|
||||||
CONFIG_USB_ONBOARD_HUB=y
|
|
||||||
|
|
||||||
CONFIG_ARCH_ALPINE=n
|
CONFIG_ARCH_ALPINE=n
|
||||||
CONFIG_ARCH_BCM2835=n
|
CONFIG_ARCH_BCM2835=n
|
||||||
@@ -171,16 +157,3 @@ CONFIG_HW_RANDOM_MTK=y
|
|||||||
CONFIG_MTK_DEVAPC=y
|
CONFIG_MTK_DEVAPC=y
|
||||||
CONFIG_PWM_MTK_DISP=y
|
CONFIG_PWM_MTK_DISP=y
|
||||||
CONFIG_MTK_CMDQ=y
|
CONFIG_MTK_CMDQ=y
|
||||||
|
|
||||||
# For nouveau. Note that DRM must be a module so that it's loaded after NFS is up to provide the firmware.
|
|
||||||
CONFIG_ARCH_TEGRA=y
|
|
||||||
CONFIG_DRM_NOUVEAU=m
|
|
||||||
CONFIG_DRM_TEGRA=m
|
|
||||||
CONFIG_R8169=y
|
|
||||||
CONFIG_STAGING=y
|
|
||||||
CONFIG_DRM_TEGRA_STAGING=y
|
|
||||||
CONFIG_TEGRA_HOST1X=y
|
|
||||||
CONFIG_ARM_TEGRA_DEVFREQ=y
|
|
||||||
CONFIG_TEGRA_SOCTHERM=y
|
|
||||||
CONFIG_DRM_TEGRA_DEBUG=y
|
|
||||||
CONFIG_PWM_TEGRA=y
|
|
||||||
|
@@ -6,39 +6,29 @@ set -o xtrace
|
|||||||
# Fetch the arm-built rootfs image and unpack it in our x86 container (saves
|
# Fetch the arm-built rootfs image and unpack it in our x86 container (saves
|
||||||
# network transfer, disk usage, and runtime on test jobs)
|
# network transfer, disk usage, and runtime on test jobs)
|
||||||
|
|
||||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
|
||||||
if curl -X HEAD -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
|
|
||||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}"
|
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||||
else
|
else
|
||||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
|
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget ${ARTIFACTS_URL}/lava-rootfs.tgz -O rootfs.tgz
|
||||||
"${ARTIFACTS_URL}"/lava-rootfs.tar.zst -o rootfs.tar.zst
|
mkdir -p /rootfs-$arch
|
||||||
mkdir -p /rootfs-"$arch"
|
tar -C /rootfs-$arch '--exclude=./dev/*' -zxf rootfs.tgz
|
||||||
tar -C /rootfs-"$arch" '--exclude=./dev/*' --zstd -xf rootfs.tar.zst
|
rm rootfs.tgz
|
||||||
rm rootfs.tar.zst
|
|
||||||
|
|
||||||
if [[ $arch == "arm64" ]]; then
|
if [[ $arch == "arm64" ]]; then
|
||||||
mkdir -p /baremetal-files
|
mkdir -p /baremetal-files
|
||||||
pushd /baremetal-files
|
pushd /baremetal-files
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget ${ARTIFACTS_URL}/Image
|
||||||
-O "${ARTIFACTS_URL}"/Image
|
wget ${ARTIFACTS_URL}/Image.gz
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget ${ARTIFACTS_URL}/cheza-kernel
|
||||||
-O "${ARTIFACTS_URL}"/Image.gz
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
-O "${ARTIFACTS_URL}"/cheza-kernel
|
|
||||||
|
|
||||||
DEVICE_TREES=""
|
DEVICE_TREES="apq8016-sbc.dtb apq8096-db820c.dtb"
|
||||||
DEVICE_TREES="$DEVICE_TREES apq8016-sbc.dtb"
|
|
||||||
DEVICE_TREES="$DEVICE_TREES apq8096-db820c.dtb"
|
|
||||||
DEVICE_TREES="$DEVICE_TREES tegra210-p3450-0000.dtb"
|
|
||||||
DEVICE_TREES="$DEVICE_TREES imx8mq-nitrogen.dtb"
|
|
||||||
|
|
||||||
for DTB in $DEVICE_TREES; do
|
for DTB in $DEVICE_TREES; do
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget ${ARTIFACTS_URL}/$DTB
|
||||||
-O "${ARTIFACTS_URL}/$DTB"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
popd
|
popd
|
||||||
@@ -46,16 +36,12 @@ elif [[ $arch == "armhf" ]]; then
|
|||||||
mkdir -p /baremetal-files
|
mkdir -p /baremetal-files
|
||||||
pushd /baremetal-files
|
pushd /baremetal-files
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget ${ARTIFACTS_URL}/zImage
|
||||||
-O "${ARTIFACTS_URL}"/zImage
|
|
||||||
|
|
||||||
DEVICE_TREES=""
|
DEVICE_TREES="imx6q-cubox-i.dtb"
|
||||||
DEVICE_TREES="$DEVICE_TREES imx6q-cubox-i.dtb"
|
|
||||||
DEVICE_TREES="$DEVICE_TREES tegra124-jetson-tk1.dtb"
|
|
||||||
|
|
||||||
for DTB in $DEVICE_TREES; do
|
for DTB in $DEVICE_TREES; do
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget ${ARTIFACTS_URL}/$DTB
|
||||||
-O "${ARTIFACTS_URL}/$DTB"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@@ -1,16 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
APITRACE_VERSION="790380e05854d5c9d315555444ffcc7acb8f4037"
|
APITRACE_VERSION="170424754bb46002ba706e16ee5404b61988d74a"
|
||||||
|
|
||||||
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
|
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
|
||||||
pushd /apitrace
|
pushd /apitrace
|
||||||
git checkout "$APITRACE_VERSION"
|
git checkout "$APITRACE_VERSION"
|
||||||
git submodule update --init --depth 1 --recursive
|
git submodule update --init --depth 1 --recursive
|
||||||
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on $EXTRA_CMAKE_ARGS
|
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on $EXTRA_CMAKE_ARGS
|
||||||
cmake --build _build --parallel --target apitrace eglretrace
|
ninja -C _build
|
||||||
mkdir build
|
mkdir build
|
||||||
cp _build/apitrace build
|
cp _build/apitrace build
|
||||||
cp _build/eglretrace build
|
cp _build/eglretrace build
|
||||||
|
@@ -1,31 +1,24 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
git config --global user.email "mesa@example.com"
|
CROSVM_VERSION=d2b6a64dd31c92a284a905c0f2483d0b222b1220
|
||||||
git config --global user.name "Mesa CI"
|
git clone --single-branch -b for-mesa-ci --no-checkout https://gitlab.freedesktop.org/tomeu/crosvm.git /platform/crosvm
|
||||||
|
|
||||||
CROSVM_VERSION=00af43e1b565e1ae0047ba84b970da5e089e4f48
|
|
||||||
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm
|
|
||||||
pushd /platform/crosvm
|
pushd /platform/crosvm
|
||||||
git checkout "$CROSVM_VERSION"
|
git checkout "$CROSVM_VERSION"
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
|
||||||
VIRGLRENDERER_VERSION=fc2ad36998f8af8ea3cc68fb9c747dfec9cb4635
|
VIRGLRENDERER_VERSION=2a5fb800c6b0ce15ad37c2c698635e3e2d27b37c
|
||||||
rm -rf third_party/virglrenderer
|
|
||||||
git clone --single-branch -b master --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
|
|
||||||
pushd third_party/virglrenderer
|
pushd third_party/virglrenderer
|
||||||
git checkout "$VIRGLRENDERER_VERSION"
|
git checkout "$VIRGLRENDERER_VERSION"
|
||||||
meson build/ -Drender-server-worker=process -Dvenus-experimental=true $EXTRA_MESON_ARGS
|
meson build/ $EXTRA_MESON_ARGS
|
||||||
ninja -C build install
|
ninja -C build install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||||
bindgen-cli \
|
bindgen \
|
||||||
-j ${FDO_CI_CONCURRENT:-4} \
|
-j ${FDO_CI_CONCURRENT:-4} \
|
||||||
--root /usr/local \
|
--root /usr/local \
|
||||||
--version 0.63.0 \
|
|
||||||
$EXTRA_CARGO_ARGS
|
$EXTRA_CARGO_ARGS
|
||||||
|
|
||||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||||
@@ -38,4 +31,4 @@ RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
|||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
rm -rf /platform/crosvm
|
rm -rf $PLATFORM2_ROOT $AOSP_EXTERNAL_ROOT/minijail $THIRD_PARTY_ROOT/adhd $THIRD_PARTY_ROOT/rust-vmm /platform/crosvm
|
||||||
|
@@ -1,56 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ -n "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
if [ -n "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
||||||
# Build and install from source
|
# Build and install from source
|
||||||
DEQP_RUNNER_CARGO_ARGS="--git ${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/anholt/deqp-runner.git}"
|
EXTRA_CARGO_ARGS="--git ${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/anholt/deqp-runner.git} ${EXTRA_CARGO_ARGS}"
|
||||||
|
|
||||||
if [ -n "${DEQP_RUNNER_GIT_TAG}" ]; then
|
if [ -n "${DEQP_RUNNER_GIT_TAG}" ]; then
|
||||||
DEQP_RUNNER_CARGO_ARGS="--tag ${DEQP_RUNNER_GIT_TAG} ${DEQP_RUNNER_CARGO_ARGS}"
|
EXTRA_CARGO_ARGS="--tag ${DEQP_RUNNER_GIT_TAG} ${EXTRA_CARGO_ARGS}"
|
||||||
else
|
else
|
||||||
DEQP_RUNNER_CARGO_ARGS="--rev ${DEQP_RUNNER_GIT_REV} ${DEQP_RUNNER_CARGO_ARGS}"
|
EXTRA_CARGO_ARGS="--rev ${DEQP_RUNNER_GIT_REV} ${EXTRA_CARGO_ARGS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DEQP_RUNNER_CARGO_ARGS="${DEQP_RUNNER_CARGO_ARGS} ${EXTRA_CARGO_ARGS}"
|
|
||||||
else
|
else
|
||||||
# Install from package registry
|
# Install from package registry
|
||||||
DEQP_RUNNER_CARGO_ARGS="--version 0.16.0 ${EXTRA_CARGO_ARGS} -- deqp-runner"
|
EXTRA_CARGO_ARGS="--version 0.11.0 ${EXTRA_CARGO_ARGS} -- deqp-runner"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$ANDROID_NDK_HOME" ]; then
|
cargo install --locked \
|
||||||
cargo install --locked \
|
-j ${FDO_CI_CONCURRENT:-4} \
|
||||||
-j ${FDO_CI_CONCURRENT:-4} \
|
--root /usr/local \
|
||||||
--root /usr/local \
|
${EXTRA_CARGO_ARGS}
|
||||||
${DEQP_RUNNER_CARGO_ARGS}
|
|
||||||
else
|
|
||||||
mkdir -p /deqp-runner
|
|
||||||
pushd /deqp-runner
|
|
||||||
git clone --branch v0.16.1 --depth 1 https://gitlab.freedesktop.org/anholt/deqp-runner.git deqp-runner-git
|
|
||||||
pushd deqp-runner-git
|
|
||||||
|
|
||||||
cargo install --locked \
|
|
||||||
-j ${FDO_CI_CONCURRENT:-4} \
|
|
||||||
--root /usr/local --version 2.10.0 \
|
|
||||||
cargo-ndk
|
|
||||||
|
|
||||||
rustup target add x86_64-linux-android
|
|
||||||
RUSTFLAGS='-C target-feature=+crt-static' cargo ndk --target x86_64-linux-android build
|
|
||||||
|
|
||||||
mv target/x86_64-linux-android/debug/deqp-runner /deqp-runner
|
|
||||||
|
|
||||||
cargo uninstall --locked \
|
|
||||||
--root /usr/local \
|
|
||||||
cargo-ndk
|
|
||||||
|
|
||||||
popd
|
|
||||||
rm -rf deqp-runner-git
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# remove unused test runners to shrink images for the Mesa CI build (not kernel,
|
|
||||||
# which chooses its own deqp branch)
|
|
||||||
if [ -z "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
|
||||||
rm -f /usr/local/bin/igt-runner
|
|
||||||
fi
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
@@ -7,26 +6,11 @@ git config --global user.email "mesa@example.com"
|
|||||||
git config --global user.name "Mesa CI"
|
git config --global user.name "Mesa CI"
|
||||||
git clone \
|
git clone \
|
||||||
https://github.com/KhronosGroup/VK-GL-CTS.git \
|
https://github.com/KhronosGroup/VK-GL-CTS.git \
|
||||||
-b vulkan-cts-1.3.5.0 \
|
-b vulkan-cts-1.2.7.2 \
|
||||||
--depth 1 \
|
--depth 1 \
|
||||||
/VK-GL-CTS
|
/VK-GL-CTS
|
||||||
pushd /VK-GL-CTS
|
pushd /VK-GL-CTS
|
||||||
|
|
||||||
cts_commits_to_backport=()
|
|
||||||
|
|
||||||
for commit in "${cts_commits_to_backport[@]}"
|
|
||||||
do
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
"https://github.com/KhronosGroup/VK-GL-CTS/commit/$commit.patch" | git am -
|
|
||||||
done
|
|
||||||
|
|
||||||
# Fix surfaceless build.
|
|
||||||
git am < $OLDPWD/.gitlab-ci/container/0001-Fix-build-for-the-surfaceless-and-null-WS-target-pla.patch
|
|
||||||
|
|
||||||
# Android specific patches.
|
|
||||||
git am < $OLDPWD/.gitlab-ci/container/0001-Allow-running-on-Android-from-the-command-line.patch
|
|
||||||
git am < $OLDPWD/.gitlab-ci/container/0002-Android-prints-to-stdout-instead-of-logcat.patch
|
|
||||||
|
|
||||||
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
|
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
|
||||||
# libpng (sigh). The archives get their checksums checked anyway, and git
|
# libpng (sigh). The archives get their checksums checked anyway, and git
|
||||||
# always goes through ssh or https.
|
# always goes through ssh or https.
|
||||||
@@ -39,24 +23,15 @@ cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
pushd /deqp
|
pushd /deqp
|
||||||
|
# When including EGL/X11 testing, do that build first and save off its
|
||||||
|
# deqp-egl binary.
|
||||||
|
cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||||
|
-DDEQP_TARGET=x11_egl_glx \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
$EXTRA_CMAKE_ARGS
|
||||||
|
ninja modules/egl/deqp-egl
|
||||||
|
cp /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-x11
|
||||||
|
|
||||||
if [ "${DEQP_TARGET}" != 'android' ]; then
|
|
||||||
# When including EGL/X11 testing, do that build first and save off its
|
|
||||||
# deqp-egl binary.
|
|
||||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
|
||||||
-DDEQP_TARGET=x11_egl_glx \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
$EXTRA_CMAKE_ARGS
|
|
||||||
ninja modules/egl/deqp-egl
|
|
||||||
cp /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-x11
|
|
||||||
|
|
||||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
|
||||||
-DDEQP_TARGET=wayland \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
$EXTRA_CMAKE_ARGS
|
|
||||||
ninja modules/egl/deqp-egl
|
|
||||||
cp /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-wayland
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||||
-DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \
|
-DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \
|
||||||
@@ -64,41 +39,34 @@ cmake -S /VK-GL-CTS -B . -G Ninja \
|
|||||||
$EXTRA_CMAKE_ARGS
|
$EXTRA_CMAKE_ARGS
|
||||||
ninja
|
ninja
|
||||||
|
|
||||||
if [ "${DEQP_TARGET}" != 'android' ]; then
|
mv /deqp/modules/egl/deqp-egl-x11 /deqp/modules/egl/deqp-egl
|
||||||
mv /deqp/modules/egl/deqp-egl-x11 /deqp/modules/egl/deqp-egl
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy out the mustpass lists we want.
|
# Copy out the mustpass lists we want.
|
||||||
mkdir /deqp/mustpass
|
mkdir /deqp/mustpass
|
||||||
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
|
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/master/vk-default.txt) ; do
|
||||||
cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
|
cat /VK-GL-CTS/external/vulkancts/mustpass/master/$mustpass \
|
||||||
>> /deqp/mustpass/vk-master.txt
|
>> /deqp/mustpass/vk-master.txt
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "${DEQP_TARGET}" != 'android' ]; then
|
cp \
|
||||||
cp \
|
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
|
||||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
|
/deqp/mustpass/.
|
||||||
/deqp/mustpass/.
|
cp \
|
||||||
cp \
|
/deqp/external/openglcts/modules/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt \
|
||||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt \
|
/deqp/mustpass/.
|
||||||
/deqp/mustpass/.
|
cp \
|
||||||
cp \
|
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-master.txt \
|
||||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-master.txt \
|
/deqp/mustpass/.
|
||||||
/deqp/mustpass/.
|
cp \
|
||||||
cp \
|
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \
|
||||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \
|
/deqp/mustpass/.
|
||||||
/deqp/mustpass/.
|
|
||||||
cp \
|
|
||||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass_single/4.6.1.x/*-single.txt \
|
|
||||||
/deqp/mustpass/.
|
|
||||||
|
|
||||||
# Save *some* executor utils, but otherwise strip things down
|
# Save *some* executor utils, but otherwise strip things down
|
||||||
# to reduct deqp build size:
|
# to reduct deqp build size:
|
||||||
mkdir /deqp/executor.save
|
mkdir /deqp/executor.save
|
||||||
cp /deqp/executor/testlog-to-* /deqp/executor.save
|
cp /deqp/executor/testlog-to-* /deqp/executor.save
|
||||||
rm -rf /deqp/executor
|
rm -rf /deqp/executor
|
||||||
mv /deqp/executor.save /deqp/executor
|
mv /deqp/executor.save /deqp/executor
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
|
# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
|
||||||
rm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass
|
rm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass
|
||||||
@@ -109,11 +77,10 @@ rm -rf /deqp/external/openglcts/modules/cts-runner
|
|||||||
rm -rf /deqp/modules/internal
|
rm -rf /deqp/modules/internal
|
||||||
rm -rf /deqp/execserver
|
rm -rf /deqp/execserver
|
||||||
rm -rf /deqp/framework
|
rm -rf /deqp/framework
|
||||||
# shellcheck disable=SC2038,SC2185 # TODO: rewrite find
|
|
||||||
find -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs rm -rf
|
find -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs rm -rf
|
||||||
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
|
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
|
||||||
${STRIP_CMD:-strip} external/openglcts/modules/glcts
|
${STRIP_CMD:-strip} external/openglcts/modules/glcts
|
||||||
${STRIP_CMD:-strip} modules/*/deqp-*
|
${STRIP_CMD:-strip} modules/*/deqp-*
|
||||||
du -sh ./*
|
du -sh *
|
||||||
rm -rf /VK-GL-CTS
|
rm -rf /VK-GL-CTS
|
||||||
popd
|
popd
|
||||||
|
@@ -4,7 +4,7 @@ set -ex
|
|||||||
|
|
||||||
git clone https://github.com/ValveSoftware/Fossilize.git
|
git clone https://github.com/ValveSoftware/Fossilize.git
|
||||||
cd Fossilize
|
cd Fossilize
|
||||||
git checkout 16fba1b8b5d9310126bb02323d7bae3227338461
|
git checkout 72088685d90bc814d14aad5505354ffa8a642789
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
@@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
GFXRECONSTRUCT_VERSION=5ed3caeecc46e976c4df31e263df8451ae176c26
|
GFXRECONSTRUCT_VERSION=3738decc2f4f9ff183818e5ab213a75a79fb7ab1
|
||||||
|
|
||||||
git clone https://github.com/LunarG/gfxreconstruct.git \
|
git clone https://github.com/LunarG/gfxreconstruct.git --single-branch -b master --no-checkout /gfxreconstruct
|
||||||
--single-branch \
|
|
||||||
-b master \
|
|
||||||
--no-checkout \
|
|
||||||
/gfxreconstruct
|
|
||||||
pushd /gfxreconstruct
|
pushd /gfxreconstruct
|
||||||
git checkout "$GFXRECONSTRUCT_VERSION"
|
git checkout "$GFXRECONSTRUCT_VERSION"
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
git submodule update
|
git submodule update
|
||||||
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/gfxreconstruct/build -DBUILD_WERROR=OFF
|
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build _build --parallel --target tools/{replay,info}/install/strip
|
ninja -C _build gfxrecon-replay gfxrecon-info
|
||||||
|
mkdir -p build/bin
|
||||||
|
install _build/tools/replay/gfxrecon-replay build/bin
|
||||||
|
install _build/tools/info/gfxrecon-info build/bin
|
||||||
|
strip build/bin/*
|
||||||
find . -not -path './build' -not -path './build/*' -delete
|
find . -not -path './build' -not -path './build/*' -delete
|
||||||
popd
|
popd
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
PARALLEL_DEQP_RUNNER_VERSION=fe557794b5dadd8dbf0eae403296625e03bda18a
|
PARALLEL_DEQP_RUNNER_VERSION=6596b71cf37a7efb4d54acd48c770ed2d4ad6b7e
|
||||||
|
|
||||||
git clone https://gitlab.freedesktop.org/mesa/parallel-deqp-runner --single-branch -b master --no-checkout /parallel-deqp-runner
|
git clone https://gitlab.freedesktop.org/mesa/parallel-deqp-runner --single-branch -b master --no-checkout /parallel-deqp-runner
|
||||||
pushd /parallel-deqp-runner
|
pushd /parallel-deqp-runner
|
||||||
|
@@ -1,11 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
mkdir -p kernel
|
mkdir -p kernel
|
||||||
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 ${KERNEL_URL} \
|
wget -qO- ${KERNEL_URL} | tar -xj --strip-components=1 -C kernel
|
||||||
| tar -xj --strip-components=1 -C kernel
|
|
||||||
pushd kernel
|
pushd kernel
|
||||||
|
|
||||||
# The kernel doesn't like the gold linker (or the old lld in our debians).
|
# The kernel doesn't like the gold linker (or the old lld in our debians).
|
||||||
@@ -13,15 +11,12 @@ pushd kernel
|
|||||||
# debian (they'll get blown away by the rm of the kernel dir at the end).
|
# debian (they'll get blown away by the rm of the kernel dir at the end).
|
||||||
mkdir -p ld-links
|
mkdir -p ld-links
|
||||||
for i in /usr/bin/*-ld /usr/bin/ld; do
|
for i in /usr/bin/*-ld /usr/bin/ld; do
|
||||||
i=$(basename $i)
|
i=`basename $i`
|
||||||
ln -sf /usr/bin/$i.bfd ld-links/$i
|
ln -sf /usr/bin/$i.bfd ld-links/$i
|
||||||
done
|
done
|
||||||
|
export PATH=`pwd`/ld-links:$PATH
|
||||||
|
|
||||||
NEWPATH=$(pwd)/ld-links
|
export LOCALVERSION="`basename $KERNEL_URL`"
|
||||||
export PATH=$NEWPATH:$PATH
|
|
||||||
|
|
||||||
KERNEL_FILENAME=$(basename $KERNEL_URL)
|
|
||||||
export LOCALVERSION="$KERNEL_FILENAME"
|
|
||||||
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/container/${KERNEL_ARCH}.config
|
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/container/${KERNEL_ARCH}.config
|
||||||
make ${KERNEL_IMAGE_NAME}
|
make ${KERNEL_IMAGE_NAME}
|
||||||
for image in ${KERNEL_IMAGE_NAME}; do
|
for image in ${KERNEL_IMAGE_NAME}; do
|
||||||
@@ -33,8 +28,10 @@ if [[ -n ${DEVICE_TREES} ]]; then
|
|||||||
cp ${DEVICE_TREES} /lava-files/.
|
cp ${DEVICE_TREES} /lava-files/.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make modules
|
if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
|
||||||
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
|
make modules
|
||||||
|
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
|
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
|
||||||
make Image.lzma
|
make Image.lzma
|
||||||
|
@@ -26,5 +26,5 @@ mkdir -p /usr/lib/clc
|
|||||||
ln -s /usr/share/clc/spirv64-mesa3d-.spv /usr/lib/clc/
|
ln -s /usr/share/clc/spirv64-mesa3d-.spv /usr/lib/clc/
|
||||||
ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
|
ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
|
||||||
|
|
||||||
du -sh ./*
|
du -sh *
|
||||||
rm -rf /libclc /llvm-project
|
rm -rf /libclc /llvm-project
|
||||||
|
@@ -1,15 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
export LIBDRM_VERSION=libdrm-2.4.110
|
export LIBDRM_VERSION=libdrm-2.4.109
|
||||||
|
|
||||||
curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||||
https://dri.freedesktop.org/libdrm/"$LIBDRM_VERSION".tar.xz
|
tar -xvf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
||||||
tar -xvf "$LIBDRM_VERSION".tar.xz && rm "$LIBDRM_VERSION".tar.xz
|
cd $LIBDRM_VERSION
|
||||||
cd "$LIBDRM_VERSION"
|
|
||||||
meson build -D vc4=false -D freedreno=false -D etnaviv=false $EXTRA_MESON_ARGS
|
meson build -D vc4=false -D freedreno=false -D etnaviv=false $EXTRA_MESON_ARGS
|
||||||
ninja -C build install
|
ninja -C build install
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf "$LIBDRM_VERSION"
|
rm -rf $LIBDRM_VERSION
|
||||||
|
|
||||||
|
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
VER="13.0.0"
|
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
-O "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v${VER}.tar.gz"
|
|
||||||
tar -xvf "v${VER}.tar.gz" && rm "v${VER}.tar.gz"
|
|
||||||
|
|
||||||
mkdir "SPIRV-LLVM-Translator-${VER}/build"
|
|
||||||
pushd "SPIRV-LLVM-Translator-${VER}/build"
|
|
||||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
|
|
||||||
ninja
|
|
||||||
ninja install
|
|
||||||
# For some reason llvm-spirv is not installed by default
|
|
||||||
ninja llvm-spirv
|
|
||||||
cp tools/llvm-spirv/llvm-spirv /usr/bin/
|
|
||||||
popd
|
|
||||||
|
|
||||||
du -sh "SPIRV-LLVM-Translator-${VER}"
|
|
||||||
rm -rf "SPIRV-LLVM-Translator-${VER}"
|
|
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
MOLD_VERSION="1.10.0"
|
|
||||||
|
|
||||||
git clone -b v"$MOLD_VERSION" --single-branch --depth 1 https://github.com/rui314/mold.git
|
|
||||||
pushd mold
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D MOLD_LTO=ON
|
|
||||||
cmake --build . --parallel
|
|
||||||
cmake --install .
|
|
||||||
popd
|
|
||||||
rm -rf mold
|
|
@@ -1,21 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
REV="355ad6bcb2cb3d9e030b7c6eef2b076b0dfb4d63"
|
|
||||||
|
|
||||||
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
|
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
|
||||||
pushd /piglit
|
pushd /piglit
|
||||||
git checkout "$REV"
|
git checkout af1785f31f65622d9b1ca1c08c75cf140bc7ed22
|
||||||
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
|
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
|
||||||
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS $EXTRA_CMAKE_ARGS
|
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS $EXTRA_CMAKE_ARGS
|
||||||
ninja $PIGLIT_BUILD_TARGETS
|
ninja $PIGLIT_BUILD_TARGETS
|
||||||
# shellcheck disable=SC2038,SC2185 # TODO: rewrite find
|
|
||||||
find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | xargs rm -rf
|
find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | xargs rm -rf
|
||||||
rm -rf target_api
|
rm -rf target_api
|
||||||
if [ "$PIGLIT_BUILD_TARGETS" = "piglit_replayer" ]; then
|
if [ "x$PIGLIT_BUILD_TARGETS" = "xpiglit_replayer" ]; then
|
||||||
# shellcheck disable=SC2038,SC2185 # TODO: rewrite find
|
|
||||||
find ! -regex "^\.$" \
|
find ! -regex "^\.$" \
|
||||||
! -regex "^\.\/piglit.*" \
|
! -regex "^\.\/piglit.*" \
|
||||||
! -regex "^\.\/framework.*" \
|
! -regex "^\.\/framework.*" \
|
||||||
|
@@ -8,25 +8,17 @@ set -ex
|
|||||||
# cargo (and rustup) wants to store stuff in $HOME/.cargo, and binaries in
|
# cargo (and rustup) wants to store stuff in $HOME/.cargo, and binaries in
|
||||||
# $HOME/.cargo/bin. Make bin a link to a public bin directory so the commands
|
# $HOME/.cargo/bin. Make bin a link to a public bin directory so the commands
|
||||||
# are just available to all build jobs.
|
# are just available to all build jobs.
|
||||||
mkdir -p "$HOME"/.cargo
|
mkdir -p $HOME/.cargo
|
||||||
ln -s /usr/local/bin "$HOME"/.cargo/bin
|
ln -s /usr/local/bin $HOME/.cargo/bin
|
||||||
|
|
||||||
# Rusticl requires at least Rust 1.60.0
|
|
||||||
#
|
|
||||||
# Also, pick a specific snapshot from rustup so the compiler doesn't drift on
|
|
||||||
# us.
|
|
||||||
RUST_VERSION=1.60.0-2022-04-07
|
|
||||||
|
|
||||||
# For rust in Mesa, we use rustup to install. This lets us pick an arbitrary
|
# For rust in Mesa, we use rustup to install. This lets us pick an arbitrary
|
||||||
# version of the compiler, rather than whatever the container's Debian comes
|
# version of the compiler, rather than whatever the container's Debian comes
|
||||||
# with.
|
# with.
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
#
|
||||||
--proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
|
# Pick the rust compiler (1.48) available in Debian stable, and pick a specific
|
||||||
--default-toolchain $RUST_VERSION \
|
# snapshot from rustup so the compiler doesn't drift on us.
|
||||||
--profile minimal \
|
wget https://sh.rustup.rs -O - | \
|
||||||
-y
|
sh -s -- -y --default-toolchain 1.49.0-2020-12-31
|
||||||
|
|
||||||
rustup component add rustfmt
|
|
||||||
|
|
||||||
# Set up a config script for cross compiling -- cargo needs your system cc for
|
# Set up a config script for cross compiling -- cargo needs your system cc for
|
||||||
# linking in cross builds, but doesn't know what you want to use for system cc.
|
# linking in cross builds, but doesn't know what you want to use for system cc.
|
||||||
|
@@ -1,76 +1,61 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
|
||||||
# Copyright (C) 2022 Collabora Limited
|
|
||||||
# Author: Guilherme Gallo <guilherme.gallo@collabora.com>
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
# copy of this software and associated documentation files (the "Software"),
|
|
||||||
# to deal in the Software without restriction, including without limitation
|
|
||||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
# and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
# Software is furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice (including the next
|
|
||||||
# paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
# Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
# SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
create_gn_args() {
|
create_gn_args() {
|
||||||
# gn can be configured to cross-compile skia and its tools
|
|
||||||
# It is important to set the target_cpu to guarantee the intended target
|
|
||||||
# machine
|
|
||||||
cp "${BASE_ARGS_GN_FILE}" "${SKQP_OUT_DIR}"/args.gn
|
cp "${BASE_ARGS_GN_FILE}" "${SKQP_OUT_DIR}"/args.gn
|
||||||
echo "target_cpu = \"${SKQP_ARCH}\"" >> "${SKQP_OUT_DIR}"/args.gn
|
echo "target_cpu = \"${SKQP_ARCH}\"" >> "${SKQP_OUT_DIR}"/args.gn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
download_skqp_models() (
|
||||||
|
# The download_model.py script needs a checksum file to know what models
|
||||||
|
# version to download.
|
||||||
|
|
||||||
download_skia_source() {
|
# This is the most recent commit available in the skia repository with a
|
||||||
if [ -z ${SKIA_DIR+x} ]
|
# valid files.checksum
|
||||||
then
|
SKIA_LAST_SKQP_CUT_COMMIT_SHA=ccf5f0d75b6a6b54756f2c62d57e3730eed8aa45
|
||||||
return 1
|
git fetch origin "${SKIA_LAST_SKQP_CUT_COMMIT_SHA}:refs/remotes/origin/${SKIA_LAST_SKQP_CUT_COMMIT_SHA}"
|
||||||
fi
|
git checkout "${SKIA_LAST_SKQP_CUT_COMMIT_SHA}" -- \
|
||||||
|
platform_tools/android/apps/skqp/src/main/assets/files.checksum
|
||||||
|
|
||||||
# Skia cloned from https://android.googlesource.com/platform/external/skqp
|
# The following patch transforms download_model.py from python2 to python3.
|
||||||
# has all needed assets tracked on git-fs
|
git apply "${DOWNLOAD_MODEL_PATCH_FILE}"
|
||||||
SKQP_REPO=https://android.googlesource.com/platform/external/skqp
|
python3 tools/skqp/download_model.py
|
||||||
SKQP_BRANCH=android-cts-11.0_r7
|
|
||||||
|
|
||||||
git clone --branch "${SKQP_BRANCH}" --depth 1 "${SKQP_REPO}" "${SKIA_DIR}"
|
# Copy resources from skia to skqp directory
|
||||||
}
|
python3 tools/skqp/setup_resources
|
||||||
|
)
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
SCRIPT_DIR=$(realpath "$(dirname "$0")")
|
SCRIPT_DIR=$(realpath "$(dirname "$0")")
|
||||||
SKQP_PATCH_DIR="${SCRIPT_DIR}/patches"
|
FETCH_GN_PATCH_FILE="${SCRIPT_DIR}/build-skqp_fetch-gn.patch"
|
||||||
BASE_ARGS_GN_FILE="${SCRIPT_DIR}/build-skqp_base.gn"
|
BASE_ARGS_GN_FILE="${SCRIPT_DIR}/build-skqp_base.gn"
|
||||||
|
DOWNLOAD_MODEL_PATCH_FILE="${SCRIPT_DIR}/build-skqp_download_model.patch"
|
||||||
|
|
||||||
SKQP_ARCH=${SKQP_ARCH:-x64}
|
SKQP_ARCH=${SKQP_ARCH:-x64}
|
||||||
SKIA_DIR=${SKIA_DIR:-$(mktemp -d)}
|
SKIA_DIR=${SKIA_DIR:-$(mktemp -d)}
|
||||||
|
SKQP_DIR=${SKQP_DIR:-$(mktemp -d)}
|
||||||
SKQP_OUT_DIR=${SKIA_DIR}/out/${SKQP_ARCH}
|
SKQP_OUT_DIR=${SKIA_DIR}/out/${SKQP_ARCH}
|
||||||
SKQP_INSTALL_DIR=${SKQP_INSTALL_DIR:-/skqp}
|
SKQP_INSTALL_DIR=/skqp
|
||||||
SKQP_ASSETS_DIR="${SKQP_INSTALL_DIR}/assets"
|
SKQP_ASSETS_DIR="${SKQP_INSTALL_DIR}/assets"
|
||||||
SKQP_BINARIES=(skqp list_gpu_unit_tests list_gms)
|
# Build list_gpu_unit_tests to update the unittests.txt file properly to the
|
||||||
|
# target hardware.
|
||||||
|
SKQP_BINARIES=(skqp list_gpu_unit_tests)
|
||||||
|
|
||||||
download_skia_source
|
# Using a recent release version to mitigate instability during test phase
|
||||||
|
SKIA_COMMIT_SHA="canvaskit/0.32.0"
|
||||||
|
|
||||||
|
git clone 'https://skia.googlesource.com/skia/' \
|
||||||
|
--single-branch \
|
||||||
|
-b "${SKIA_COMMIT_SHA}" \
|
||||||
|
"${SKIA_DIR}"
|
||||||
|
|
||||||
pushd "${SKIA_DIR}"
|
pushd "${SKIA_DIR}"
|
||||||
|
|
||||||
# Apply all skqp patches for Mesa CI
|
git apply "${FETCH_GN_PATCH_FILE}"
|
||||||
cat "${SKQP_PATCH_DIR}"/build-skqp_*.patch |
|
# Fetch some needed build tools needed to build skia/skqp
|
||||||
patch -p1
|
# Basically, it clones repositories with commits SHAs from
|
||||||
|
# ${SKIA_DIR}/DEPS directory
|
||||||
# Fetch some needed build tools needed to build skia/skqp.
|
python3 tools/git-sync-deps
|
||||||
# Basically, it clones repositories with commits SHAs from ${SKIA_DIR}/DEPS
|
|
||||||
# directory.
|
|
||||||
python tools/git-sync-deps
|
|
||||||
|
|
||||||
mkdir -p "${SKQP_OUT_DIR}"
|
mkdir -p "${SKQP_OUT_DIR}"
|
||||||
mkdir -p "${SKQP_INSTALL_DIR}"
|
mkdir -p "${SKQP_INSTALL_DIR}"
|
||||||
@@ -83,15 +68,15 @@ bin/gn gen "${SKQP_OUT_DIR}"
|
|||||||
for BINARY in "${SKQP_BINARIES[@]}"
|
for BINARY in "${SKQP_BINARIES[@]}"
|
||||||
do
|
do
|
||||||
/usr/bin/ninja -C "${SKQP_OUT_DIR}" "${BINARY}"
|
/usr/bin/ninja -C "${SKQP_OUT_DIR}" "${BINARY}"
|
||||||
# Strip binary, since gn is not stripping it even when `is_debug == false`
|
|
||||||
${STRIP_CMD:-strip} "${SKQP_OUT_DIR}/${BINARY}"
|
|
||||||
install -m 0755 "${SKQP_OUT_DIR}/${BINARY}" "${SKQP_INSTALL_DIR}"
|
install -m 0755 "${SKQP_OUT_DIR}/${BINARY}" "${SKQP_INSTALL_DIR}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Move assets to the target directory, which will reside in rootfs.
|
# Acquire assets and move them to the target directory.
|
||||||
|
download_skqp_models
|
||||||
mv platform_tools/android/apps/skqp/src/main/assets/ "${SKQP_ASSETS_DIR}"
|
mv platform_tools/android/apps/skqp/src/main/assets/ "${SKQP_ASSETS_DIR}"
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
rm -Rf "${SKQP_DIR}"
|
||||||
rm -Rf "${SKIA_DIR}"
|
rm -Rf "${SKIA_DIR}"
|
||||||
|
|
||||||
set +ex
|
set +ex
|
||||||
|
@@ -1,30 +1,8 @@
|
|||||||
cc = "clang"
|
cc = "gcc"
|
||||||
cxx = "clang++"
|
cxx = "g++"
|
||||||
|
|
||||||
extra_cflags = [ "-DSK_ENABLE_DUMP_GPU", "-DSK_BUILD_FOR_SKQP" ]
|
extra_cflags = [ "-DSK_ENABLE_DUMP_GPU", "-DSK_BUILD_FOR_SKQP" ]
|
||||||
extra_cflags_cc = [
|
extra_cflags_cc = [ "-static", "-Wno-error", "-Wno-macro-redefined", "-Wno-suggest-destructor-override", "-Wno-suggest-override" ]
|
||||||
"-Wno-error",
|
|
||||||
|
|
||||||
# skqp build process produces a lot of compilation warnings, silencing
|
|
||||||
# most of them to remove clutter and avoid the CI job log to exceed the
|
|
||||||
# maximum size
|
|
||||||
|
|
||||||
# GCC flags
|
|
||||||
"-Wno-redundant-move",
|
|
||||||
"-Wno-suggest-override",
|
|
||||||
"-Wno-class-memaccess",
|
|
||||||
"-Wno-deprecated-copy",
|
|
||||||
"-Wno-uninitialized",
|
|
||||||
|
|
||||||
# Clang flags
|
|
||||||
"-Wno-macro-redefined",
|
|
||||||
"-Wno-anon-enum-enum-conversion",
|
|
||||||
"-Wno-suggest-destructor-override",
|
|
||||||
"-Wno-return-std-move-in-c++11",
|
|
||||||
"-Wno-extra-semi-stmt",
|
|
||||||
]
|
|
||||||
|
|
||||||
cc_wrapper = "ccache"
|
|
||||||
|
|
||||||
is_debug = false
|
is_debug = false
|
||||||
|
|
||||||
|
22
.gitlab-ci/container/build-skqp_download_model.patch
Normal file
22
.gitlab-ci/container/build-skqp_download_model.patch
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/tools/skqp/download_model.py b/tools/skqp/download_model.py
|
||||||
|
index fb0020e481..a5d8a03754 100755
|
||||||
|
--- a/tools/skqp/download_model.py
|
||||||
|
+++ b/tools/skqp/download_model.py
|
||||||
|
@@ -10,7 +10,7 @@ import os
|
||||||
|
import shutil
|
||||||
|
import sys
|
||||||
|
import tempfile
|
||||||
|
-import urllib2
|
||||||
|
+import urllib.request, urllib.error, urllib.parse
|
||||||
|
|
||||||
|
def checksum(path):
|
||||||
|
if not os.path.exists(path):
|
||||||
|
@@ -33,7 +33,7 @@ def download(md5, path):
|
||||||
|
pass # ignore race condition
|
||||||
|
url = 'https://storage.googleapis.com/skia-skqp-assets/' + md5
|
||||||
|
with open(path, 'wb') as o:
|
||||||
|
- shutil.copyfileobj(urllib2.urlopen(url), o)
|
||||||
|
+ shutil.copyfileobj(urllib.request.urlopen(url), o)
|
||||||
|
|
||||||
|
def tmp(prefix):
|
||||||
|
fd, path = tempfile.mkstemp(prefix=prefix)
|
13
.gitlab-ci/container/build-skqp_fetch-gn.patch
Normal file
13
.gitlab-ci/container/build-skqp_fetch-gn.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/bin/fetch-gn b/bin/fetch-gn
|
||||||
|
index b4bb14c630..59c4591a30 100755
|
||||||
|
--- a/bin/fetch-gn
|
||||||
|
+++ b/bin/fetch-gn
|
||||||
|
@@ -23,7 +23,7 @@ os.chdir(os.path.join(os.path.dirname(__file__), os.pardir))
|
||||||
|
gnzip = os.path.join(tempfile.mkdtemp(), 'gn.zip')
|
||||||
|
with open(gnzip, 'wb') as f:
|
||||||
|
OS = {'darwin': 'mac', 'linux': 'linux', 'linux2': 'linux', 'win32': 'windows'}[sys.platform]
|
||||||
|
- cpu = {'amd64': 'amd64', 'arm64': 'arm64', 'x86_64': 'amd64'}[platform.machine().lower()]
|
||||||
|
+ cpu = {'amd64': 'amd64', 'arm64': 'arm64', 'x86_64': 'amd64', 'aarch64': 'arm64'}[platform.machine().lower()]
|
||||||
|
|
||||||
|
rev = 'd62642c920e6a0d1756316d225a90fd6faa9e21e'
|
||||||
|
url = 'https://chrome-infra-packages.appspot.com/dl/gn/gn/{}-{}/+/git_revision:{}'.format(
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
VKD3D_PROTON_COMMIT="507cb3195bae32395c69763afec2b1ac078d509a"
|
VKD3D_PROTON_VERSION="2.3.1"
|
||||||
|
VKD3D_PROTON_COMMIT="3ed3526332f53d7d35cf1b685fa8096b01f26ff0"
|
||||||
|
|
||||||
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
|
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
|
||||||
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
|
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
|
||||||
@@ -15,7 +16,7 @@ function build_arch {
|
|||||||
meson "$@" \
|
meson "$@" \
|
||||||
-Denable_tests=true \
|
-Denable_tests=true \
|
||||||
--buildtype release \
|
--buildtype release \
|
||||||
--prefix "$VKD3D_PROTON_DST_DIR" \
|
--prefix "$VKD3D_PROTON_BUILD_DIR" \
|
||||||
--strip \
|
--strip \
|
||||||
--bindir "x${arch}" \
|
--bindir "x${arch}" \
|
||||||
--libdir "x${arch}" \
|
--libdir "x${arch}" \
|
||||||
@@ -23,17 +24,20 @@ function build_arch {
|
|||||||
|
|
||||||
ninja -C "$VKD3D_PROTON_BUILD_DIR/build.${arch}" install
|
ninja -C "$VKD3D_PROTON_BUILD_DIR/build.${arch}" install
|
||||||
|
|
||||||
install -D -m755 -t "${VKD3D_PROTON_DST_DIR}/x${arch}/bin" "$VKD3D_PROTON_BUILD_DIR/build.${arch}/tests/d3d12"
|
install -D -m755 -t "${VKD3D_PROTON_DST_DIR}/x${arch}/bin" "$VKD3D_PROTON_BUILD_DIR/build.${arch}/tests/"*.exe
|
||||||
}
|
}
|
||||||
|
|
||||||
git clone https://github.com/HansKristian-Work/vkd3d-proton.git --single-branch -b master --no-checkout "$VKD3D_PROTON_SRC_DIR"
|
git clone https://github.com/HansKristian-Work/vkd3d-proton.git --single-branch -b "v$VKD3D_PROTON_VERSION" --no-checkout "$VKD3D_PROTON_SRC_DIR"
|
||||||
pushd "$VKD3D_PROTON_SRC_DIR"
|
pushd "$VKD3D_PROTON_SRC_DIR"
|
||||||
git checkout "$VKD3D_PROTON_COMMIT"
|
git checkout "$VKD3D_PROTON_COMMIT"
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
git submodule update --recursive
|
git submodule update --recursive
|
||||||
build_arch 64
|
build_arch 64 --cross-file build-win64.txt
|
||||||
build_arch 86
|
build_arch 86 --cross-file build-win32.txt
|
||||||
|
cp "setup_vkd3d_proton.sh" "$VKD3D_PROTON_BUILD_DIR/setup_vkd3d_proton.sh"
|
||||||
|
chmod +x "$VKD3D_PROTON_BUILD_DIR/setup_vkd3d_proton.sh"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
"$VKD3D_PROTON_BUILD_DIR"/setup_vkd3d_proton.sh install
|
||||||
rm -rf "$VKD3D_PROTON_BUILD_DIR"
|
rm -rf "$VKD3D_PROTON_BUILD_DIR"
|
||||||
rm -rf "$VKD3D_PROTON_SRC_DIR"
|
rm -rf "$VKD3D_PROTON_SRC_DIR"
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# When changing this file, you need to bump the following
|
|
||||||
# .gitlab-ci/image-tags.yml tags:
|
|
||||||
# DEBIAN_X86_TEST_GL_TAG
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
VALIDATION_TAG="v1.3.238"
|
|
||||||
|
|
||||||
git clone -b "$VALIDATION_TAG" --single-branch --depth 1 https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
|
|
||||||
pushd Vulkan-ValidationLayers
|
|
||||||
python3 scripts/update_deps.py --dir external --config debug
|
|
||||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=OFF -DBUILD_WERROR=OFF -C external/helper.cmake -S . -B build
|
|
||||||
ninja -C build install
|
|
||||||
popd
|
|
||||||
rm -rf Vulkan-ValidationLayers
|
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
@@ -9,7 +8,7 @@ export WAYLAND_PROTOCOLS_VERSION="1.24"
|
|||||||
git clone https://gitlab.freedesktop.org/wayland/wayland
|
git clone https://gitlab.freedesktop.org/wayland/wayland
|
||||||
cd wayland
|
cd wayland
|
||||||
git checkout "$LIBWAYLAND_VERSION"
|
git checkout "$LIBWAYLAND_VERSION"
|
||||||
meson -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build $EXTRA_MESON_ARGS
|
meson -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build
|
||||||
ninja -C _build install
|
ninja -C _build install
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf wayland
|
rm -rf wayland
|
||||||
@@ -17,7 +16,7 @@ rm -rf wayland
|
|||||||
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols
|
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols
|
||||||
cd wayland-protocols
|
cd wayland-protocols
|
||||||
git checkout "$WAYLAND_PROTOCOLS_VERSION"
|
git checkout "$WAYLAND_PROTOCOLS_VERSION"
|
||||||
meson _build $EXTRA_MESON_ARGS
|
meson _build
|
||||||
ninja -C _build install
|
ninja -C _build install
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf wayland-protocols
|
rm -rf wayland-protocols
|
||||||
|
@@ -7,6 +7,4 @@ fi
|
|||||||
# Clean up any build cache for rust.
|
# Clean up any build cache for rust.
|
||||||
rm -rf /.cargo
|
rm -rf /.cargo
|
||||||
|
|
||||||
if test -x /usr/bin/ccache; then
|
ccache --show-stats
|
||||||
ccache --show-stats
|
|
||||||
fi
|
|
||||||
|
@@ -1,52 +1,36 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if test -x /usr/bin/ccache; then
|
if test -f /etc/debian_version; then
|
||||||
if test -f /etc/debian_version; then
|
CCACHE_PATH=/usr/lib/ccache
|
||||||
CCACHE_PATH=/usr/lib/ccache
|
else
|
||||||
elif test -f /etc/alpine-release; then
|
CCACHE_PATH=/usr/lib64/ccache
|
||||||
CCACHE_PATH=/usr/lib/ccache/bin
|
|
||||||
else
|
|
||||||
CCACHE_PATH=/usr/lib64/ccache
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Common setup among container builds before we get to building code.
|
|
||||||
|
|
||||||
export CCACHE_COMPILERCHECK=content
|
|
||||||
export CCACHE_COMPRESS=true
|
|
||||||
export CCACHE_DIR=/cache/$CI_PROJECT_NAME/ccache
|
|
||||||
export PATH=$CCACHE_PATH:$PATH
|
|
||||||
|
|
||||||
# CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
|
|
||||||
export CC="${CCACHE_PATH}/gcc"
|
|
||||||
export CXX="${CCACHE_PATH}/g++"
|
|
||||||
|
|
||||||
ccache --show-stats
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# When not using the mold linker (e.g. unsupported architecture), force
|
# Common setup among container builds before we get to building code.
|
||||||
# linkers to gold, since it's so much faster for building. We can't use
|
|
||||||
|
export CCACHE_COMPILERCHECK=content
|
||||||
|
export CCACHE_COMPRESS=true
|
||||||
|
export CCACHE_DIR=/cache/mesa/ccache
|
||||||
|
export PATH=$CCACHE_PATH:$PATH
|
||||||
|
|
||||||
|
# CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
|
||||||
|
export CC="${CCACHE_PATH}/gcc"
|
||||||
|
export CXX="${CCACHE_PATH}/g++"
|
||||||
|
|
||||||
|
# Force linkers to gold, since it's so much faster for building. We can't use
|
||||||
# lld because we're on old debian and it's buggy. ming fails meson builds
|
# lld because we're on old debian and it's buggy. ming fails meson builds
|
||||||
# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
|
# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
|
||||||
find /usr/bin -name \*-ld -o -name ld | \
|
find /usr/bin -name \*-ld -o -name ld | \
|
||||||
grep -v mingw | \
|
grep -v mingw | \
|
||||||
xargs -n 1 -I '{}' ln -sf '{}.gold' '{}'
|
xargs -n 1 -I '{}' ln -sf '{}.gold' '{}'
|
||||||
|
|
||||||
|
ccache --show-stats
|
||||||
|
|
||||||
# Make a wrapper script for ninja to always include the -j flags
|
# Make a wrapper script for ninja to always include the -j flags
|
||||||
{
|
echo '#!/bin/sh -x' > /usr/local/bin/ninja
|
||||||
echo '#!/bin/sh -x'
|
echo '/usr/bin/ninja -j${FDO_CI_CONCURRENT:-4} "$@"' >> /usr/local/bin/ninja
|
||||||
# shellcheck disable=SC2016
|
|
||||||
echo '/usr/bin/ninja -j${FDO_CI_CONCURRENT:-4} "$@"'
|
|
||||||
} > /usr/local/bin/ninja
|
|
||||||
chmod +x /usr/local/bin/ninja
|
chmod +x /usr/local/bin/ninja
|
||||||
|
|
||||||
# Set MAKEFLAGS so that all make invocations in container builds include the
|
# Set MAKEFLAGS so that all make invocations in container builds include the
|
||||||
# flags (doesn't apply to non-container builds, but we don't run make there)
|
# flags (doesn't apply to non-container builds, but we don't run make there)
|
||||||
export MAKEFLAGS="-j${FDO_CI_CONCURRENT:-4}"
|
export MAKEFLAGS="-j${FDO_CI_CONCURRENT:-4}"
|
||||||
|
|
||||||
# make wget to try more than once, when download fails or timeout
|
|
||||||
echo -e "retry_connrefused = on\n" \
|
|
||||||
"read_timeout = 300\n" \
|
|
||||||
"tries = 4\n" \
|
|
||||||
"retry_on_host_error = on\n" \
|
|
||||||
"retry_on_http_error = 429,500,502,503,504\n" \
|
|
||||||
"wait_retry = 32" >> /etc/wgetrc
|
|
||||||
|
@@ -5,33 +5,31 @@ arch=$2
|
|||||||
cpu_family=$3
|
cpu_family=$3
|
||||||
cpu=$4
|
cpu=$4
|
||||||
cross_file="/cross_file-$arch.txt"
|
cross_file="/cross_file-$arch.txt"
|
||||||
sdk_version=$5
|
|
||||||
|
|
||||||
# armv7 has the toolchain split between two names.
|
# armv7 has the toolchain split between two names.
|
||||||
arch2=${6:-$2}
|
arch2=${5:-$2}
|
||||||
|
|
||||||
# Note that we disable C++ exceptions, because Mesa doesn't use exceptions,
|
# Note that we disable C++ exceptions, because Mesa doesn't use exceptions,
|
||||||
# and allowing it in code generation means we get unwind symbols that break
|
# and allowing it in code generation means we get unwind symbols that break
|
||||||
# the libEGL and driver symbol tests.
|
# the libEGL and driver symbol tests.
|
||||||
|
|
||||||
cat > "$cross_file" <<EOF
|
cat >$cross_file <<EOF
|
||||||
[binaries]
|
[binaries]
|
||||||
ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
|
ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-ar'
|
||||||
c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
|
c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
|
||||||
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
|
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
|
||||||
c_ld = 'lld'
|
c_ld = 'lld'
|
||||||
cpp_ld = 'lld'
|
cpp_ld = 'lld'
|
||||||
strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip'
|
strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-strip'
|
||||||
pkgconfig = ['/usr/bin/pkg-config']
|
pkgconfig = ['/usr/bin/pkg-config']
|
||||||
|
|
||||||
[host_machine]
|
[host_machine]
|
||||||
system = 'android'
|
system = 'linux'
|
||||||
cpu_family = '$cpu_family'
|
cpu_family = '$cpu_family'
|
||||||
cpu = '$cpu'
|
cpu = '$cpu'
|
||||||
endian = 'little'
|
endian = 'little'
|
||||||
|
|
||||||
[properties]
|
[properties]
|
||||||
needs_exe_wrapper = true
|
needs_exe_wrapper = true
|
||||||
pkg_config_libdir = '/usr/local/lib/${arch2}/pkgconfig/:/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/${arch2}/pkgconfig/'
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
# Makes a .pc file in the Android NDK for meson to find its libraries.
|
# Makes a .pc file in the Android NDK for meson to find its libraries.
|
||||||
|
|
||||||
@@ -10,7 +9,6 @@ pc="$2"
|
|||||||
cflags="$3"
|
cflags="$3"
|
||||||
libs="$4"
|
libs="$4"
|
||||||
version="$5"
|
version="$5"
|
||||||
sdk_version="$6"
|
|
||||||
|
|
||||||
sysroot=$ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
sysroot=$ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
||||||
|
|
||||||
@@ -25,7 +23,7 @@ for arch in \
|
|||||||
cat >$pcdir/$pc <<EOF
|
cat >$pcdir/$pc <<EOF
|
||||||
prefix=$sysroot
|
prefix=$sysroot
|
||||||
exec_prefix=$sysroot
|
exec_prefix=$sysroot
|
||||||
libdir=$sysroot/usr/lib/$arch/$sdk_version
|
libdir=$sysroot/usr/lib/$arch/29
|
||||||
sharedlibdir=$sysroot/usr/lib/$arch
|
sharedlibdir=$sysroot/usr/lib/$arch
|
||||||
includedir=$sysroot/usr/include
|
includedir=$sysroot/usr/include
|
||||||
|
|
||||||
@@ -34,7 +32,7 @@ Description: zlib compression library
|
|||||||
Version: $version
|
Version: $version
|
||||||
|
|
||||||
Requires:
|
Requires:
|
||||||
Libs: -L$sysroot/usr/lib/$arch/$sdk_version $libs
|
Libs: -L$sysroot/usr/lib/$arch/29 $libs
|
||||||
Cflags: -I$sysroot/usr/include $cflags
|
Cflags: -I$sysroot/usr/include $cflags
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
|
@@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
arch=$1
|
arch=$1
|
||||||
cross_file="/cross_file-$arch.txt"
|
cross_file="/cross_file-$arch.txt"
|
||||||
meson env2mfile --cross --debarch "$arch" -o "$cross_file"
|
/usr/share/meson/debcrossgen --arch $arch -o "$cross_file"
|
||||||
|
|
||||||
# Explicitly set ccache path for cross compilers
|
# Explicitly set ccache path for cross compilers
|
||||||
sed -i "s|/usr/bin/\([^-]*\)-linux-gnu\([^-]*\)-g|/usr/lib/ccache/\\1-linux-gnu\\2-g|g" "$cross_file"
|
sed -i "s|/usr/bin/\([^-]*\)-linux-gnu\([^-]*\)-g|/usr/lib/ccache/\\1-linux-gnu\\2-g|g" "$cross_file"
|
||||||
|
if [ "$arch" = "i386" ]; then
|
||||||
|
# Work around a bug in debcrossgen that should be fixed in the next release
|
||||||
|
sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" "$cross_file"
|
||||||
|
fi
|
||||||
# Rely on qemu-user being configured in binfmt_misc on the host
|
# Rely on qemu-user being configured in binfmt_misc on the host
|
||||||
# shellcheck disable=SC1003 # how this sed doesn't seems to work for me locally
|
|
||||||
sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
|
sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
|
||||||
|
|
||||||
# Add a line for rustc, which meson env2mfile is missing.
|
# Add a line for rustc, which debcrossgen is missing.
|
||||||
cc=$(sed -n "s|^c\s*=\s*\[?'\(.*\)'\]?|\1|p" < "$cross_file")
|
cc=`sed -n 's|c = .\(.*\).|\1|p' < $cross_file`
|
||||||
|
|
||||||
if [[ "$arch" = "arm64" ]]; then
|
if [[ "$arch" = "arm64" ]]; then
|
||||||
rust_target=aarch64-unknown-linux-gnu
|
rust_target=aarch64-unknown-linux-gnu
|
||||||
elif [[ "$arch" = "armhf" ]]; then
|
elif [[ "$arch" = "armhf" ]]; then
|
||||||
@@ -27,8 +27,6 @@ elif [[ "$arch" = "s390x" ]]; then
|
|||||||
else
|
else
|
||||||
echo "Needs rustc target mapping"
|
echo "Needs rustc target mapping"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC1003 # how this sed doesn't seems to work for me locally
|
|
||||||
sed -i -e '/\[binaries\]/a\' -e "rust = ['rustc', '--target=$rust_target', '-C', 'linker=$cc']" "$cross_file"
|
sed -i -e '/\[binaries\]/a\' -e "rust = ['rustc', '--target=$rust_target', '-C', 'linker=$cc']" "$cross_file"
|
||||||
|
|
||||||
# Set up cmake cross compile toolchain file for dEQP builds
|
# Set up cmake cross compile toolchain file for dEQP builds
|
||||||
@@ -36,18 +34,18 @@ toolchain_file="/toolchain-$arch.cmake"
|
|||||||
if [[ "$arch" = "arm64" ]]; then
|
if [[ "$arch" = "arm64" ]]; then
|
||||||
GCC_ARCH="aarch64-linux-gnu"
|
GCC_ARCH="aarch64-linux-gnu"
|
||||||
DE_CPU="DE_CPU_ARM_64"
|
DE_CPU="DE_CPU_ARM_64"
|
||||||
|
CMAKE_ARCH=arm
|
||||||
elif [[ "$arch" = "armhf" ]]; then
|
elif [[ "$arch" = "armhf" ]]; then
|
||||||
GCC_ARCH="arm-linux-gnueabihf"
|
GCC_ARCH="arm-linux-gnueabihf"
|
||||||
DE_CPU="DE_CPU_ARM"
|
DE_CPU="DE_CPU_ARM"
|
||||||
|
CMAKE_ARCH=arm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$GCC_ARCH" ]]; then
|
if [[ -n "$GCC_ARCH" ]]; then
|
||||||
{
|
echo "set(CMAKE_SYSTEM_NAME Linux)" > "$toolchain_file"
|
||||||
echo "set(CMAKE_SYSTEM_NAME Linux)";
|
echo "set(CMAKE_SYSTEM_PROCESSOR arm)" >> "$toolchain_file"
|
||||||
echo "set(CMAKE_SYSTEM_PROCESSOR arm)";
|
echo "set(CMAKE_C_COMPILER /usr/lib/ccache/$GCC_ARCH-gcc)" >> "$toolchain_file"
|
||||||
echo "set(CMAKE_C_COMPILER /usr/lib/ccache/$GCC_ARCH-gcc)";
|
echo "set(CMAKE_CXX_COMPILER /usr/lib/ccache/$GCC_ARCH-g++)" >> "$toolchain_file"
|
||||||
echo "set(CMAKE_CXX_COMPILER /usr/lib/ccache/$GCC_ARCH-g++)";
|
echo "set(ENV{PKG_CONFIG} \"/usr/bin/$GCC_ARCH-pkg-config\")" >> "$toolchain_file"
|
||||||
echo "set(ENV{PKG_CONFIG} \"/usr/bin/$GCC_ARCH-pkg-config\")";
|
echo "set(DE_CPU $DE_CPU)" >> "$toolchain_file"
|
||||||
echo "set(DE_CPU $DE_CPU)";
|
|
||||||
} > "$toolchain_file"
|
|
||||||
fi
|
fi
|
||||||
|
@@ -1,49 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2140 # ugly array, remove later
|
|
||||||
# shellcheck disable=SC2288 # ugly array, remove later
|
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ $DEBIAN_ARCH = arm64 ]; then
|
if [ $DEBIAN_ARCH = arm64 ]; then
|
||||||
ARCH_PACKAGES="firmware-qcom-media
|
ARCH_PACKAGES="firmware-qcom-media
|
||||||
firmware-linux-nonfree
|
|
||||||
libfontconfig1
|
libfontconfig1
|
||||||
libgl1
|
libgl1
|
||||||
libglu1-mesa
|
libglu1-mesa
|
||||||
libvulkan-dev
|
|
||||||
"
|
"
|
||||||
elif [ $DEBIAN_ARCH = amd64 ]; then
|
elif [ $DEBIAN_ARCH = amd64 ]; then
|
||||||
# Add llvm 13 to the build image
|
|
||||||
apt-get -y install --no-install-recommends curl gnupg2 software-properties-common
|
|
||||||
apt-key add /llvm-snapshot.gpg.key
|
|
||||||
add-apt-repository "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
|
|
||||||
# Debian bullseye has older wine 5.0, we want >= 7.0 for traces.
|
|
||||||
apt-key add /winehq.gpg.key
|
|
||||||
apt-add-repository https://dl.winehq.org/wine-builds/debian/
|
|
||||||
|
|
||||||
|
|
||||||
ARCH_PACKAGES="firmware-amd-graphics
|
ARCH_PACKAGES="firmware-amd-graphics
|
||||||
inetutils-syslogd
|
|
||||||
iptables
|
|
||||||
libcap2
|
|
||||||
libfontconfig1
|
|
||||||
libelf1
|
libelf1
|
||||||
libfdt1
|
|
||||||
libgl1
|
|
||||||
libglu1-mesa
|
|
||||||
libllvm13
|
|
||||||
libllvm11
|
libllvm11
|
||||||
libva2
|
libva2
|
||||||
libva-drm2
|
libva-drm2
|
||||||
libvulkan-dev
|
|
||||||
socat
|
|
||||||
spirv-tools
|
|
||||||
sysvinit-core
|
|
||||||
"
|
|
||||||
|
|
||||||
elif [ $DEBIAN_ARCH = armhf ]; then
|
|
||||||
ARCH_PACKAGES="firmware-misc-nonfree
|
|
||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -54,17 +24,12 @@ INSTALL_CI_FAIRY_PACKAGES="git
|
|||||||
python3-wheel
|
python3-wheel
|
||||||
"
|
"
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get -y install --no-install-recommends \
|
apt-get -y install --no-install-recommends \
|
||||||
$ARCH_PACKAGES \
|
$ARCH_PACKAGES \
|
||||||
$INSTALL_CI_FAIRY_PACKAGES \
|
$INSTALL_CI_FAIRY_PACKAGES \
|
||||||
$EXTRA_LOCAL_PACKAGES \
|
|
||||||
bash \
|
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
|
||||||
firmware-realtek \
|
firmware-realtek \
|
||||||
initramfs-tools \
|
initramfs-tools \
|
||||||
jq \
|
|
||||||
libasan6 \
|
libasan6 \
|
||||||
libexpat1 \
|
libexpat1 \
|
||||||
libpng16-16 \
|
libpng16-16 \
|
||||||
@@ -103,32 +68,14 @@ apt-get -y install --no-install-recommends \
|
|||||||
sntp \
|
sntp \
|
||||||
strace \
|
strace \
|
||||||
waffle-utils \
|
waffle-utils \
|
||||||
weston \
|
wget \
|
||||||
xinit \
|
xinit \
|
||||||
xserver-xorg-core \
|
xserver-xorg-core \
|
||||||
xwayland \
|
xz-utils
|
||||||
zstd
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$DEBIAN_ARCH" = "amd64" ]; then
|
|
||||||
# workaround wine needing 32-bit
|
|
||||||
# https://bugs.winehq.org/show_bug.cgi?id=53393
|
|
||||||
apt-get install -y --no-remove wine-stable-amd64 # a requirement for wine-stable
|
|
||||||
WINE_PKG="wine-stable"
|
|
||||||
WINE_PKG_DROP="wine-stable-i386"
|
|
||||||
apt download "${WINE_PKG}"
|
|
||||||
dpkg --ignore-depends="${WINE_PKG_DROP}" -i "${WINE_PKG}"*.deb
|
|
||||||
rm "${WINE_PKG}"*.deb
|
|
||||||
sed -i "/${WINE_PKG_DROP}/d" /var/lib/dpkg/status
|
|
||||||
apt-get install -y --no-remove winehq-stable # symlinks-only, depends on wine-stable
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Needed for ci-fairy, this revision is able to upload files to
|
# Needed for ci-fairy, this revision is able to upload files to
|
||||||
# MinIO and doesn't depend on git
|
# MinIO and doesn't depend on git
|
||||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@34f4ade99434043f88e164933f570301fd18b125
|
||||||
|
|
||||||
# Needed for manipulation with traces yaml files.
|
|
||||||
pip3 install yq
|
|
||||||
|
|
||||||
apt-get purge -y \
|
apt-get purge -y \
|
||||||
$INSTALL_CI_FAIRY_PACKAGES
|
$INSTALL_CI_FAIRY_PACKAGES
|
||||||
@@ -147,6 +94,10 @@ chmod +x /init
|
|||||||
# Strip the image to a small minimal system without removing the debian
|
# Strip the image to a small minimal system without removing the debian
|
||||||
# toolchain.
|
# toolchain.
|
||||||
|
|
||||||
|
# xz compress firmware so it doesn't waste RAM at runtime on ramdisk systems
|
||||||
|
find /lib/firmware -type f -print0 | \
|
||||||
|
xargs -0r -P4 -n4 xz -T1 -C crc32
|
||||||
|
|
||||||
# Copy timezone file and remove tzdata package
|
# Copy timezone file and remove tzdata package
|
||||||
rm -rf /etc/localtime
|
rm -rf /etc/localtime
|
||||||
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
||||||
@@ -215,7 +166,9 @@ UNNEEDED_PACKAGES="apt libapt-pkg6.0 "\
|
|||||||
"insserv "\
|
"insserv "\
|
||||||
"udev "\
|
"udev "\
|
||||||
"init-system-helpers "\
|
"init-system-helpers "\
|
||||||
|
"bash "\
|
||||||
"cpio "\
|
"cpio "\
|
||||||
|
"xz-utils "\
|
||||||
"passwd "\
|
"passwd "\
|
||||||
"libsemanage1 libsemanage-common "\
|
"libsemanage1 libsemanage-common "\
|
||||||
"libsepol1 "\
|
"libsepol1 "\
|
||||||
@@ -231,8 +184,6 @@ UNNEEDED_PACKAGES="apt libapt-pkg6.0 "\
|
|||||||
"libgles2-mesa-dev "\
|
"libgles2-mesa-dev "\
|
||||||
"libglx-mesa0 "\
|
"libglx-mesa0 "\
|
||||||
"mesa-common-dev "\
|
"mesa-common-dev "\
|
||||||
"gnupg2 "\
|
|
||||||
"software-properties-common " \
|
|
||||||
|
|
||||||
# Removing unneeded packages
|
# Removing unneeded packages
|
||||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||||
@@ -257,12 +208,12 @@ rm -rf etc/dpkg
|
|||||||
# Drop directories not part of ostree
|
# Drop directories not part of ostree
|
||||||
# Note that /var needs to exist as ostree bind mounts the deployment /var over
|
# Note that /var needs to exist as ostree bind mounts the deployment /var over
|
||||||
# it
|
# it
|
||||||
rm -rf var/* srv share
|
rm -rf var/* opt srv share
|
||||||
|
|
||||||
# ca-certificates are in /etc drop the source
|
# ca-certificates are in /etc drop the source
|
||||||
rm -rf usr/share/ca-certificates
|
rm -rf usr/share/ca-certificates
|
||||||
|
|
||||||
# No need for completions
|
# No bash, no need for completions
|
||||||
rm -rf usr/share/bash-completion
|
rm -rf usr/share/bash-completion
|
||||||
|
|
||||||
# No zsh, no need for comletions
|
# No zsh, no need for comletions
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
@@ -15,11 +14,9 @@ apt-get update
|
|||||||
|
|
||||||
apt-get install -y --no-remove \
|
apt-get install -y --no-remove \
|
||||||
$STABLE_EPHEMERAL \
|
$STABLE_EPHEMERAL \
|
||||||
curl \
|
|
||||||
crossbuild-essential-$arch \
|
crossbuild-essential-$arch \
|
||||||
libelf-dev:$arch \
|
libelf-dev:$arch \
|
||||||
libexpat1-dev:$arch \
|
libexpat1-dev:$arch \
|
||||||
libffi-dev:$arch \
|
|
||||||
libpciaccess-dev:$arch \
|
libpciaccess-dev:$arch \
|
||||||
libstdc++6:$arch \
|
libstdc++6:$arch \
|
||||||
libvulkan-dev:$arch \
|
libvulkan-dev:$arch \
|
||||||
@@ -37,26 +34,21 @@ apt-get install -y --no-remove \
|
|||||||
libxrandr-dev:$arch \
|
libxrandr-dev:$arch \
|
||||||
libxshmfence-dev:$arch \
|
libxshmfence-dev:$arch \
|
||||||
libxxf86vm-dev:$arch \
|
libxxf86vm-dev:$arch \
|
||||||
libwayland-dev:$arch
|
wget
|
||||||
|
|
||||||
if [[ $arch != "armhf" ]]; then
|
if [[ $arch != "armhf" ]]; then
|
||||||
# See the list of available architectures in https://apt.llvm.org/bullseye/dists/llvm-toolchain-bullseye-13/main/
|
if [[ $arch == "s390x" ]]; then
|
||||||
if [[ $arch == "s390x" ]] || [[ $arch == "i386" ]] || [[ $arch == "arm64" ]]; then
|
LLVM=9
|
||||||
LLVM=13
|
|
||||||
else
|
else
|
||||||
LLVM=11
|
LLVM=11
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We don't need clang-format for the crossbuilds, but the installed amd64
|
|
||||||
# package will conflict with libclang. Uninstall clang-format (and its
|
|
||||||
# problematic dependency) to fix.
|
|
||||||
apt-get remove -y clang-format-13 libclang-cpp13
|
|
||||||
|
|
||||||
# llvm-*-tools:$arch conflicts with python3:amd64. Install dependencies only
|
# llvm-*-tools:$arch conflicts with python3:amd64. Install dependencies only
|
||||||
# with apt-get, then force-install llvm-*-{dev,tools}:$arch with dpkg to get
|
# with apt-get, then force-install llvm-*-{dev,tools}:$arch with dpkg to get
|
||||||
# around this.
|
# around this.
|
||||||
apt-get install -y --no-remove --no-install-recommends \
|
apt-get install -y --no-remove \
|
||||||
libclang-cpp${LLVM}:$arch \
|
libclang-cpp${LLVM}:$arch \
|
||||||
|
libffi-dev:$arch \
|
||||||
libgcc-s1:$arch \
|
libgcc-s1:$arch \
|
||||||
libtinfo-dev:$arch \
|
libtinfo-dev:$arch \
|
||||||
libz3-dev:$arch \
|
libz3-dev:$arch \
|
||||||
@@ -74,8 +66,6 @@ fi
|
|||||||
EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt -D libdir=lib/$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)"
|
EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt -D libdir=lib/$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)"
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
||||||
. .gitlab-ci/container/build-wayland.sh
|
|
||||||
|
|
||||||
apt-get purge -y \
|
apt-get purge -y \
|
||||||
$STABLE_EPHEMERAL
|
$STABLE_EPHEMERAL
|
||||||
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
@@ -12,29 +11,27 @@ EPHEMERAL="\
|
|||||||
apt-get install -y --no-remove $EPHEMERAL
|
apt-get install -y --no-remove $EPHEMERAL
|
||||||
|
|
||||||
# Fetch the NDK and extract just the toolchain we want.
|
# Fetch the NDK and extract just the toolchain we want.
|
||||||
ndk=$ANDROID_NDK
|
ndk=android-ndk-r21d
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget -O $ndk.zip https://dl.google.com/android/repository/$ndk-linux-x86_64.zip
|
||||||
-o $ndk.zip https://dl.google.com/android/repository/$ndk-linux.zip
|
|
||||||
unzip -d / $ndk.zip "$ndk/toolchains/llvm/*"
|
unzip -d / $ndk.zip "$ndk/toolchains/llvm/*"
|
||||||
rm $ndk.zip
|
rm $ndk.zip
|
||||||
# Since it was packed as a zip file, symlinks/hardlinks got turned into
|
# Since it was packed as a zip file, symlinks/hardlinks got turned into
|
||||||
# duplicate files. Turn them into hardlinks to save on container space.
|
# duplicate files. Turn them into hardlinks to save on container space.
|
||||||
rdfind -makehardlinks true -makeresultsfile false /${ndk}/
|
rdfind -makehardlinks true -makeresultsfile false /android-ndk-r21d/
|
||||||
# Drop some large tools we won't use in this build.
|
# Drop some large tools we won't use in this build.
|
||||||
find /${ndk}/ -type f | grep -E -i "clang-check|clang-tidy|lldb" | xargs rm -f
|
find /android-ndk-r21d/ -type f | egrep -i "clang-check|clang-tidy|lldb" | xargs rm -f
|
||||||
|
|
||||||
sh .gitlab-ci/container/create-android-ndk-pc.sh /$ndk zlib.pc "" "-lz" "1.2.3" $ANDROID_SDK_VERSION
|
sh .gitlab-ci/container/create-android-ndk-pc.sh /$ndk zlib.pc "" "-lz" "1.2.3"
|
||||||
|
|
||||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk x86_64-linux-android x86_64 x86_64 $ANDROID_SDK_VERSION
|
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk x86_64-linux-android x86_64 x86_64
|
||||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk i686-linux-android x86 x86 $ANDROID_SDK_VERSION
|
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk i686-linux-android x86 x86
|
||||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk aarch64-linux-android aarch64 armv8 $ANDROID_SDK_VERSION
|
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk aarch64-linux-android arm armv8
|
||||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk arm-linux-androideabi arm armv7hl $ANDROID_SDK_VERSION armv7a-linux-androideabi
|
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk arm-linux-androideabi arm armv7hl armv7a-linux-androideabi
|
||||||
|
|
||||||
# Not using build-libdrm.sh because we don't want its cleanup after building
|
# Not using build-libdrm.sh because we don't want its cleanup after building
|
||||||
# each arch. Fetch and extract now.
|
# each arch. Fetch and extract now.
|
||||||
export LIBDRM_VERSION=libdrm-2.4.110
|
export LIBDRM_VERSION=libdrm-2.4.109
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||||
-O https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
|
||||||
tar -xf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
tar -xf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
||||||
|
|
||||||
for arch in \
|
for arch in \
|
||||||
@@ -63,8 +60,7 @@ done
|
|||||||
rm -rf $LIBDRM_VERSION
|
rm -rf $LIBDRM_VERSION
|
||||||
|
|
||||||
export LIBELF_VERSION=libelf-0.8.13
|
export LIBELF_VERSION=libelf-0.8.13
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget https://fossies.org/linux/misc/old/$LIBELF_VERSION.tar.gz
|
||||||
-O https://fossies.org/linux/misc/old/$LIBELF_VERSION.tar.gz
|
|
||||||
|
|
||||||
# Not 100% sure who runs the mirror above so be extra careful
|
# Not 100% sure who runs the mirror above so be extra careful
|
||||||
if ! echo "4136d7b4c04df68b686570afa26988ac ${LIBELF_VERSION}.tar.gz" | md5sum -c -; then
|
if ! echo "4136d7b4c04df68b686570afa26988ac ${LIBELF_VERSION}.tar.gz" | md5sum -c -; then
|
||||||
@@ -90,11 +86,11 @@ for arch in \
|
|||||||
ccarch=armv7a-linux-androideabi
|
ccarch=armv7a-linux-androideabi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export CC=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
|
export CC=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ar
|
||||||
export CC=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}${ANDROID_SDK_VERSION}-clang
|
export CC=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}29-clang
|
||||||
export CXX=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}${ANDROID_SDK_VERSION}-clang++
|
export CXX=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}29-clang++
|
||||||
export LD=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ld
|
export LD=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ld
|
||||||
export RANLIB=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
|
export RANLIB=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ranlib
|
||||||
|
|
||||||
# The configure script doesn't know about android, but doesn't really use the host anyway it
|
# The configure script doesn't know about android, but doesn't really use the host anyway it
|
||||||
# seems
|
# seems
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
arch=arm64 . .gitlab-ci/container/debian/arm_test.sh
|
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
@@ -9,34 +8,24 @@ sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
|||||||
echo 'deb https://deb.debian.org/debian buster main' >/etc/apt/sources.list.d/buster.list
|
echo 'deb https://deb.debian.org/debian buster main' >/etc/apt/sources.list.d/buster.list
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
# Ephemeral packages (installed for this script and removed again at
|
|
||||||
# the end)
|
|
||||||
STABLE_EPHEMERAL=" \
|
|
||||||
libssl-dev \
|
|
||||||
"
|
|
||||||
|
|
||||||
apt-get -y install \
|
apt-get -y install \
|
||||||
${EXTRA_LOCAL_PACKAGES} \
|
abootimg \
|
||||||
${STABLE_EPHEMERAL} \
|
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bc \
|
bc \
|
||||||
bison \
|
bison \
|
||||||
ccache \
|
ccache \
|
||||||
cmake \
|
cmake \
|
||||||
curl \
|
|
||||||
debootstrap \
|
debootstrap \
|
||||||
fastboot \
|
fastboot \
|
||||||
flex \
|
flex \
|
||||||
g++ \
|
g++ \
|
||||||
git \
|
git \
|
||||||
glslang-tools \
|
|
||||||
kmod \
|
kmod \
|
||||||
libasan6 \
|
libasan6 \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
libelf-dev \
|
libelf-dev \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
libvulkan-dev \
|
|
||||||
libx11-dev \
|
libx11-dev \
|
||||||
libx11-xcb-dev \
|
libx11-xcb-dev \
|
||||||
libxcb-dri2-0-dev \
|
libxcb-dri2-0-dev \
|
||||||
@@ -51,9 +40,8 @@ apt-get -y install \
|
|||||||
libxrandr-dev \
|
libxrandr-dev \
|
||||||
libxshmfence-dev \
|
libxshmfence-dev \
|
||||||
libxxf86vm-dev \
|
libxxf86vm-dev \
|
||||||
libwayland-dev \
|
|
||||||
llvm-11-dev \
|
llvm-11-dev \
|
||||||
ninja-build \
|
meson \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
python3-mako \
|
python3-mako \
|
||||||
python3-pil \
|
python3-pil \
|
||||||
@@ -61,32 +49,23 @@ apt-get -y install \
|
|||||||
python3-requests \
|
python3-requests \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
u-boot-tools \
|
u-boot-tools \
|
||||||
|
wget \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
zlib1g-dev \
|
zlib1g-dev
|
||||||
zstd
|
|
||||||
|
|
||||||
# Not available anymore in bullseye
|
# Not available anymore in bullseye
|
||||||
apt-get install -y --no-remove -t buster \
|
apt-get install -y --no-remove -t buster \
|
||||||
android-sdk-ext4-utils
|
android-sdk-ext4-utils
|
||||||
|
|
||||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@34f4ade99434043f88e164933f570301fd18b125
|
||||||
|
|
||||||
# We need at least 0.61.4 for proper Rust; 0.62 for modern meson env2mfile
|
|
||||||
pip3 install meson==0.63.3
|
|
||||||
|
|
||||||
arch=armhf
|
arch=armhf
|
||||||
. .gitlab-ci/container/cross_build.sh
|
. .gitlab-ci/container/cross_build.sh
|
||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
. .gitlab-ci/container/build-mold.sh
|
|
||||||
|
|
||||||
# dependencies where we want a specific version
|
# dependencies where we want a specific version
|
||||||
EXTRA_MESON_ARGS=
|
EXTRA_MESON_ARGS=
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
||||||
. .gitlab-ci/container/build-wayland.sh
|
|
||||||
|
|
||||||
apt-get purge -y $STABLE_EPHEMERAL
|
|
||||||
|
|
||||||
. .gitlab-ci/container/container_post_build.sh
|
. .gitlab-ci/container/container_post_build.sh
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
@@ -10,8 +9,8 @@ sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
|||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
apt-get install -y --no-remove \
|
apt-get install -y --no-remove \
|
||||||
|
abootimg \
|
||||||
cpio \
|
cpio \
|
||||||
curl \
|
|
||||||
fastboot \
|
fastboot \
|
||||||
netcat \
|
netcat \
|
||||||
procps \
|
procps \
|
||||||
@@ -20,30 +19,15 @@ apt-get install -y --no-remove \
|
|||||||
python3-serial \
|
python3-serial \
|
||||||
rsync \
|
rsync \
|
||||||
snmp \
|
snmp \
|
||||||
zstd
|
wget
|
||||||
|
|
||||||
# setup SNMPv2 SMI MIB
|
# setup SNMPv2 SMI MIB
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget https://raw.githubusercontent.com/net-snmp/net-snmp/master/mibs/SNMPv2-SMI.txt \
|
||||||
https://raw.githubusercontent.com/net-snmp/net-snmp/master/mibs/SNMPv2-SMI.txt \
|
-O /usr/share/snmp/mibs/SNMPv2-SMI.txt
|
||||||
-o /usr/share/snmp/mibs/SNMPv2-SMI.txt
|
|
||||||
|
|
||||||
. .gitlab-ci/container/baremetal_build.sh
|
arch=arm64 . .gitlab-ci/container/baremetal_build.sh
|
||||||
|
arch=armhf . .gitlab-ci/container/baremetal_build.sh
|
||||||
|
|
||||||
if [[ "$arch" == "arm64" ]]; then
|
# This firmware file from Debian bullseye causes hangs
|
||||||
# This firmware file from Debian bullseye causes hangs
|
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qcom/a530_pfp.fw?id=d5f9eea5a251d43412b07f5295d03e97b89ac4a5 \
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
-O /rootfs-arm64/lib/firmware/qcom/a530_pfp.fw
|
||||||
"https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qcom/a530_pfp.fw?id=d5f9eea5a251d43412b07f5295d03e97b89ac4a5" \
|
|
||||||
-o /rootfs-arm64/lib/firmware/qcom/a530_pfp.fw
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p /baremetal-files/jetson-nano/boot/
|
|
||||||
ln -s \
|
|
||||||
/baremetal-files/Image \
|
|
||||||
/baremetal-files/tegra210-p3450-0000.dtb \
|
|
||||||
/baremetal-files/jetson-nano/boot/
|
|
||||||
|
|
||||||
mkdir -p /baremetal-files/jetson-tk1/boot/
|
|
||||||
ln -s \
|
|
||||||
/baremetal-files/zImage \
|
|
||||||
/baremetal-files/tegra124-jetson-tk1.dtb \
|
|
||||||
/baremetal-files/jetson-tk1/boot/
|
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
arch=armhf . .gitlab-ci/container/debian/arm_test.sh
|
|
@@ -1,52 +0,0 @@
|
|||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
Version: GnuPG v1.4.12 (GNU/Linux)
|
|
||||||
|
|
||||||
mQINBFE9lCwBEADi0WUAApM/mgHJRU8lVkkw0CHsZNpqaQDNaHefD6Rw3S4LxNmM
|
|
||||||
EZaOTkhP200XZM8lVdbfUW9xSjA3oPldc1HG26NjbqqCmWpdo2fb+r7VmU2dq3NM
|
|
||||||
R18ZlKixiLDE6OUfaXWKamZsXb6ITTYmgTO6orQWYrnW6ckYHSeaAkW0wkDAryl2
|
|
||||||
B5v8aoFnQ1rFiVEMo4NGzw4UX+MelF7rxaaregmKVTPiqCOSPJ1McC1dHFN533FY
|
|
||||||
Wh/RVLKWo6npu+owtwYFQW+zyQhKzSIMvNujFRzhIxzxR9Gn87MoLAyfgKEzrbbT
|
|
||||||
DhqqNXTxS4UMUKCQaO93TzetX/EBrRpJj+vP640yio80h4Dr5pAd7+LnKwgpTDk1
|
|
||||||
G88bBXJAcPZnTSKu9I2c6KY4iRNbvRz4i+ZdwwZtdW4nSdl2792L7Sl7Nc44uLL/
|
|
||||||
ZqkKDXEBF6lsX5XpABwyK89S/SbHOytXv9o4puv+65Ac5/UShspQTMSKGZgvDauU
|
|
||||||
cs8kE1U9dPOqVNCYq9Nfwinkf6RxV1k1+gwtclxQuY7UpKXP0hNAXjAiA5KS5Crq
|
|
||||||
7aaJg9q2F4bub0mNU6n7UI6vXguF2n4SEtzPRk6RP+4TiT3bZUsmr+1ktogyOJCc
|
|
||||||
Ha8G5VdL+NBIYQthOcieYCBnTeIH7D3Sp6FYQTYtVbKFzmMK+36ERreL/wARAQAB
|
|
||||||
tD1TeWx2ZXN0cmUgTGVkcnUgLSBEZWJpYW4gTExWTSBwYWNrYWdlcyA8c3lsdmVz
|
|
||||||
dHJlQGRlYmlhbi5vcmc+iQI4BBMBAgAiBQJRPZQsAhsDBgsJCAcDAgYVCAIJCgsE
|
|
||||||
FgIDAQIeAQIXgAAKCRAVz00Yr090Ibx+EADArS/hvkDF8juWMXxh17CgR0WZlHCC
|
|
||||||
9CTBWkg5a0bNN/3bb97cPQt/vIKWjQtkQpav6/5JTVCSx2riL4FHYhH0iuo4iAPR
|
|
||||||
udC7Cvg8g7bSPrKO6tenQZNvQm+tUmBHgFiMBJi92AjZ/Qn1Shg7p9ITivFxpLyX
|
|
||||||
wpmnF1OKyI2Kof2rm4BFwfSWuf8Fvh7kDMRLHv+MlnK/7j/BNpKdozXxLcwoFBmn
|
|
||||||
l0WjpAH3OFF7Pvm1LJdf1DjWKH0Dc3sc6zxtmBR/KHHg6kK4BGQNnFKujcP7TVdv
|
|
||||||
gMYv84kun14pnwjZcqOtN3UJtcx22880DOQzinoMs3Q4w4o05oIF+sSgHViFpc3W
|
|
||||||
R0v+RllnH05vKZo+LDzc83DQVrdwliV12eHxrMQ8UYg88zCbF/cHHnlzZWAJgftg
|
|
||||||
hB08v1BKPgYRUzwJ6VdVqXYcZWEaUJmQAPuAALyZESw94hSo28FAn0/gzEc5uOYx
|
|
||||||
K+xG/lFwgAGYNb3uGM5m0P6LVTfdg6vDwwOeTNIExVk3KVFXeSQef2ZMkhwA7wya
|
|
||||||
KJptkb62wBHFE+o9TUdtMCY6qONxMMdwioRE5BYNwAsS1PnRD2+jtlI0DzvKHt7B
|
|
||||||
MWd8hnoUKhMeZ9TNmo+8CpsAtXZcBho0zPGz/R8NlJhAWpdAZ1CmcPo83EW86Yq7
|
|
||||||
BxQUKnNHcwj2ebkCDQRRPZQsARAA4jxYmbTHwmMjqSizlMJYNuGOpIidEdx9zQ5g
|
|
||||||
zOr431/VfWq4S+VhMDhs15j9lyml0y4ok215VRFwrAREDg6UPMr7ajLmBQGau0Fc
|
|
||||||
bvZJ90l4NjXp5p0NEE/qOb9UEHT7EGkEhaZ1ekkWFTWCgsy7rRXfZLxB6sk7pzLC
|
|
||||||
DshyW3zjIakWAnpQ5j5obiDy708pReAuGB94NSyb1HoW/xGsGgvvCw4r0w3xPStw
|
|
||||||
F1PhmScE6NTBIfLliea3pl8vhKPlCh54Hk7I8QGjo1ETlRP4Qll1ZxHJ8u25f/ta
|
|
||||||
RES2Aw8Hi7j0EVcZ6MT9JWTI83yUcnUlZPZS2HyeWcUj+8nUC8W4N8An+aNps9l/
|
|
||||||
21inIl2TbGo3Yn1JQLnA1YCoGwC34g8QZTJhElEQBN0X29ayWW6OdFx8MDvllbBV
|
|
||||||
ymmKq2lK1U55mQTfDli7S3vfGz9Gp/oQwZ8bQpOeUkc5hbZszYwP4RX+68xDPfn+
|
|
||||||
M9udl+qW9wu+LyePbW6HX90LmkhNkkY2ZzUPRPDHZANU5btaPXc2H7edX4y4maQa
|
|
||||||
xenqD0lGh9LGz/mps4HEZtCI5CY8o0uCMF3lT0XfXhuLksr7Pxv57yue8LLTItOJ
|
|
||||||
d9Hmzp9G97SRYYeqU+8lyNXtU2PdrLLq7QHkzrsloG78lCpQcalHGACJzrlUWVP/
|
|
||||||
fN3Ht3kAEQEAAYkCHwQYAQIACQUCUT2ULAIbDAAKCRAVz00Yr090IbhWEADbr50X
|
|
||||||
OEXMIMGRLe+YMjeMX9NG4jxs0jZaWHc/WrGR+CCSUb9r6aPXeLo+45949uEfdSsB
|
|
||||||
pbaEdNWxF5Vr1CSjuO5siIlgDjmT655voXo67xVpEN4HhMrxugDJfCa6z97P0+ML
|
|
||||||
PdDxim57uNqkam9XIq9hKQaurxMAECDPmlEXI4QT3eu5qw5/knMzDMZj4Vi6hovL
|
|
||||||
wvvAeLHO/jsyfIdNmhBGU2RWCEZ9uo/MeerPHtRPfg74g+9PPfP6nyHD2Wes6yGd
|
|
||||||
oVQwtPNAQD6Cj7EaA2xdZYLJ7/jW6yiPu98FFWP74FN2dlyEA2uVziLsfBrgpS4l
|
|
||||||
tVOlrO2YzkkqUGrybzbLpj6eeHx+Cd7wcjI8CalsqtL6cG8cUEjtWQUHyTbQWAgG
|
|
||||||
5VPEgIAVhJ6RTZ26i/G+4J8neKyRs4vz+57UGwY6zI4AB1ZcWGEE3Bf+CDEDgmnP
|
|
||||||
LSwbnHefK9IljT9XU98PelSryUO/5UPw7leE0akXKB4DtekToO226px1VnGp3Bov
|
|
||||||
1GBGvpHvL2WizEwdk+nfk8LtrLzej+9FtIcq3uIrYnsac47Pf7p0otcFeTJTjSq3
|
|
||||||
krCaoG4Hx0zGQG2ZFpHrSrZTVy6lxvIdfi0beMgY6h78p6M9eYZHQHc02DjFkQXN
|
|
||||||
bXb5c6gCHESH5PXwPU4jQEE7Ib9J6sbk7ZT2Mw==
|
|
||||||
=j+4q
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@@ -1,16 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
arch=s390x
|
arch=s390x
|
||||||
|
|
||||||
# Ephemeral packages (installed for this script and removed again at the end)
|
|
||||||
STABLE_EPHEMERAL="libssl-dev"
|
|
||||||
|
|
||||||
apt-get -y install "$STABLE_EPHEMERAL"
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-mold.sh
|
|
||||||
|
|
||||||
apt-get purge -y "$STABLE_EPHEMERAL"
|
|
||||||
|
|
||||||
. .gitlab-ci/container/cross_build.sh
|
. .gitlab-ci/container/cross_build.sh
|
||||||
|
@@ -1,53 +0,0 @@
|
|||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
|
|
||||||
mQGNBFwOmrgBDAC9FZW3dFpew1hwDaqRfdQQ1ABcmOYu1NKZHwYjd+bGvcR2LRGe
|
|
||||||
R5dfRqG1Uc/5r6CPCMvnWxFprymkqKEADn8eFn+aCnPx03HrhA+lNEbciPfTHylt
|
|
||||||
NTTuRua7YpJIgEOjhXUbxXxnvF8fhUf5NJpJg6H6fPQARUW+5M//BlVgwn2jhzlW
|
|
||||||
U+uwgeJthhiuTXkls9Yo3EoJzmkUih+ABZgvaiBpr7GZRw9GO1aucITct0YDNTVX
|
|
||||||
KA6el78/udi5GZSCKT94yY9ArN4W6NiOFCLV7MU5d6qMjwGFhfg46NBv9nqpGinK
|
|
||||||
3NDjqCevKouhtKl2J+nr3Ju3Spzuv6Iex7tsOqt+XdZCoY+8+dy3G5zbJwBYsMiS
|
|
||||||
rTNF55PHtBH1S0QK5OoN2UR1ie/aURAyAFEMhTzvFB2B2v7C0IKIOmYMEG+DPMs9
|
|
||||||
FQs/vZ1UnAQgWk02ZiPryoHfjFO80+XYMrdWN+RSo5q9ODClloaKXjqI/aWLGirm
|
|
||||||
KXw2R8tz31go3NMAEQEAAbQnV2luZUhRIHBhY2thZ2VzIDx3aW5lLWRldmVsQHdp
|
|
||||||
bmVocS5vcmc+iQHOBBMBCgA4AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEE
|
|
||||||
1D9kAUU2nFHXht3qdvGiD/mHZy8FAlwOmyUACgkQdvGiD/mHZy/zkwv7B+nKFlDY
|
|
||||||
Bzz/7j0gqIODbs5FRZRtuf/IuPP3vZdWlNfAW/VyaLtVLJCM/mmaf/O6/gJ+D+E9
|
|
||||||
BBoSmHdHzBBOQHIj5IbRedynNcHT5qXsdBeU2ZPR50sdE+jmukvw3Wa5JijoDgUu
|
|
||||||
LGLGtU48Z3JsBXQ54OlnTZXQ2SMFhRUa10JANXSJQ+QY2Wo2Pi2+MEAHcrd71A2S
|
|
||||||
0mT2DQSSBQ92c6WPfUpOSBawd8P0ipT7rVFNLJh8HVQGyEWxPl8ecDEHoVfG2rdV
|
|
||||||
D0ADbNLx9031UUwpUicO6vW/2Ec7c3VNG1cpOtyNTw/lEgvsXOh3GQs/DvFvMy/h
|
|
||||||
QzaeF3Qq6cAPlKuxieJe4lLYFBTmCAT4iB1J8oeFs4G7ScfZH4+4NBe3VGoeCD/M
|
|
||||||
Wl+qxntAroblxiFuqtPJg+NKZYWBzkptJNhnrBxcBnRinGZLw2k/GR/qPMgsR2L4
|
|
||||||
cP+OUuka+R2gp9oDVTZTyMowz+ROIxnEijF50pkj2VBFRB02rfiMp7q6iQIzBBAB
|
|
||||||
CgAdFiEE2iNXmnTUrZr50/lFzvrI6q8XUZ0FAlwOm3AACgkQzvrI6q8XUZ3KKg/+
|
|
||||||
MD8CgvLiHEX90fXQ23RZQRm2J21w3gxdIen/N8yJVIbK7NIgYhgWfGWsGQedtM7D
|
|
||||||
hMwUlDSRb4rWy9vrXBaiZoF3+nK9AcLvPChkZz28U59Jft6/l0gVrykey/ERU7EV
|
|
||||||
w1Ie1eRu0tRSXsKvMZyQH8897iHZ7uqoJgyk8U8CvSW+V80yqLB2M8Tk8ECZq34f
|
|
||||||
HqUIGs4Wo0UZh0vV4+dEQHBh1BYpmmWl+UPf7nzNwFWXu/EpjVhkExRqTnkEJ+Ai
|
|
||||||
OxbtrRn6ETKzpV4DjyifqQF639bMIem7DRRf+mkcrAXetvWkUkE76e3E9KLvETCZ
|
|
||||||
l4SBfgqSZs2vNngmpX6Qnoh883aFo5ZgVN3v6uTS+LgTwMt/XlnDQ7+Zw+ehCZ2R
|
|
||||||
CO21Y9Kbw6ZEWls/8srZdCQ2LxnyeyQeIzsLnqT/waGjQj35i4exzYeWpojVDb3r
|
|
||||||
tvvOALYGVlSYqZXIALTx2/tHXKLHyrn1C0VgHRnl+hwv7U49f7RvfQXpx47YQN/C
|
|
||||||
PWrpbG69wlKuJptr+olbyoKAWfl+UzoO8vLMo5njWQNAoAwh1H8aFUVNyhtbkRuq
|
|
||||||
l0kpy1Cmcq8uo6taK9lvYp8jak7eV8lHSSiGUKTAovNTwfZG2JboGV4/qLDUKvpa
|
|
||||||
lPp2xVpF9MzA8VlXTOzLpSyIVxZnPTpL+xR5P9WQjMS5AY0EXA6auAEMAMReKL89
|
|
||||||
0z0SL+/i/geB/agfG/k6AXiG2a9kVWeIjAqFwHKl9W/DTNvOqCDgAt51oiHGRRjt
|
|
||||||
1Xm3XZD4p+GM1uZWn9qIFL49Gt5x94TqdrsKTVCJr0Kazn2mKQc7aja0zac+WtZG
|
|
||||||
OFn7KbniuAcwtC780cyikfmmExLI1/Vjg+NiMlMtZfpK6FIW+ulPiDQPdzIhVppx
|
|
||||||
w9/KlR2Fvh4TbzDsUqkFQSSAFdQ65BWgvzLpZHdKO/ILpDkThLbipjtvbBv/pHKM
|
|
||||||
O/NFTNoYkJ3cNW/kfcynwV+4AcKwdRz2A3Mez+g5TKFYPZROIbayOo01yTMLfz2p
|
|
||||||
jcqki/t4PACtwFOhkAs+MYPPyZDUkTFcEJQCPDstkAgmJWI3K2qELtDOLQyps3WY
|
|
||||||
Mfp+mntOdc8bKjFTMcCEk1zcm14K4Oms+w6dw2UnYsX1FAYYhPm8HUYwE4kP8M+D
|
|
||||||
9HGLMjLqqF/kanlCFZs5Avx3mDSAx6zS8vtNdGh+64oDNk4x4A2j8GTUuQARAQAB
|
|
||||||
iQG8BBgBCgAmFiEE1D9kAUU2nFHXht3qdvGiD/mHZy8FAlwOmrgCGwwFCQPCZwAA
|
|
||||||
CgkQdvGiD/mHZy9FnAwAgfUkxsO53Pm2iaHhtF4+BUc8MNJj64Jvm1tghr6PBRtM
|
|
||||||
hpbvvN8SSOFwYIsS+2BMsJ2ldox4zMYhuvBcgNUlix0G0Z7h1MjftDdsLFi1DNv2
|
|
||||||
J9dJ9LdpWdiZbyg4Sy7WakIZ/VvH1Znd89Imo7kCScRdXTjIw2yCkotE5lK7A6Ns
|
|
||||||
NbVuoYEN+dbGioF4csYehnjTdojwF/19mHFxrXkdDZ/V6ZYFIFxEsxL8FEuyI4+o
|
|
||||||
LC3DFSA4+QAFdkjGFXqFPlaEJxWt5d7wk0y+tt68v+ulkJ900BvR+OOMqQURwrAi
|
|
||||||
iP3I28aRrMjZYwyqHl8i/qyIv+WRakoDKV+wWteR5DmRAPHmX2vnlPlCmY8ysR6J
|
|
||||||
2jUAfuDFVu4/qzJe6vw5tmPJMdfvy0W5oogX6sEdin5M5w2b3WrN8nXZcjbWymqP
|
|
||||||
6jCdl6eoCCkKNOIbr/MMSkd2KqAqDVM5cnnlQ7q+AXzwNpj3RGJVoBxbS0nn9JWY
|
|
||||||
QNQrWh9rAcMIGT+b1le0
|
|
||||||
=4lsa
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Installing wine, need this for testing mingw or nine
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y --no-remove \
|
|
||||||
wine \
|
|
||||||
wine64 \
|
|
||||||
xvfb
|
|
||||||
|
|
||||||
# Used to initialize the Wine environment to reduce build time
|
|
||||||
wine64 whoami.exe
|
|
||||||
|
|
@@ -1,16 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
apt-get install -y ca-certificates gnupg2 software-properties-common
|
apt-get install -y ca-certificates
|
||||||
|
|
||||||
# Add llvm 13 to the build image
|
|
||||||
apt-key add .gitlab-ci/container/debian/llvm-snapshot.gpg.key
|
|
||||||
add-apt-repository "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
|
|
||||||
|
|
||||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||||
|
|
||||||
@@ -27,25 +22,23 @@ apt-get install -y --no-remove \
|
|||||||
$STABLE_EPHEMERAL \
|
$STABLE_EPHEMERAL \
|
||||||
bison \
|
bison \
|
||||||
ccache \
|
ccache \
|
||||||
curl \
|
|
||||||
clang-format-13 \
|
|
||||||
dpkg-cross \
|
dpkg-cross \
|
||||||
findutils \
|
|
||||||
flex \
|
flex \
|
||||||
g++ \
|
g++ \
|
||||||
cmake \
|
g++-mingw-w64-x86-64 \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
glslang-tools \
|
glslang-tools \
|
||||||
kmod \
|
kmod \
|
||||||
libclang-13-dev \
|
|
||||||
libclang-11-dev \
|
libclang-11-dev \
|
||||||
|
libclang-9-dev \
|
||||||
|
libclc-dev \
|
||||||
libelf-dev \
|
libelf-dev \
|
||||||
libepoxy-dev \
|
libepoxy-dev \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
libgtk-3-dev \
|
libgtk-3-dev \
|
||||||
libllvm13 \
|
|
||||||
libllvm11 \
|
libllvm11 \
|
||||||
|
libllvm9 \
|
||||||
libomxil-bellagio-dev \
|
libomxil-bellagio-dev \
|
||||||
libpciaccess-dev \
|
libpciaccess-dev \
|
||||||
libunwind-dev \
|
libunwind-dev \
|
||||||
@@ -59,32 +52,27 @@ apt-get install -y --no-remove \
|
|||||||
libxrandr-dev \
|
libxrandr-dev \
|
||||||
libxrender-dev \
|
libxrender-dev \
|
||||||
libxshmfence-dev \
|
libxshmfence-dev \
|
||||||
|
libxvmc-dev \
|
||||||
libxxf86vm-dev \
|
libxxf86vm-dev \
|
||||||
|
libz-mingw-w64-dev \
|
||||||
make \
|
make \
|
||||||
ninja-build \
|
meson \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
python3-mako \
|
python3-mako \
|
||||||
python3-pil \
|
python3-pil \
|
||||||
python3-ply \
|
|
||||||
python3-requests \
|
python3-requests \
|
||||||
qemu-user \
|
qemu-user \
|
||||||
valgrind \
|
valgrind \
|
||||||
|
wget \
|
||||||
|
wine64 \
|
||||||
x11proto-dri2-dev \
|
x11proto-dri2-dev \
|
||||||
x11proto-gl-dev \
|
x11proto-gl-dev \
|
||||||
x11proto-randr-dev \
|
x11proto-randr-dev \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
zlib1g-dev \
|
zlib1g-dev
|
||||||
zstd
|
|
||||||
|
|
||||||
# Needed for ci-fairy, this revision is able to upload files to MinIO
|
# Needed for ci-fairy, this revision is able to upload files to MinIO
|
||||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@34f4ade99434043f88e164933f570301fd18b125
|
||||||
|
|
||||||
# We need at least 1.0.0 for proper Rust; 0.62 for modern meson env2mfile
|
|
||||||
pip3 install meson==1.0.0
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-rust.sh
|
|
||||||
|
|
||||||
. .gitlab-ci/container/debian/x86_build-base-wine.sh
|
|
||||||
|
|
||||||
############### Uninstall ephemeral packages
|
############### Uninstall ephemeral packages
|
||||||
|
|
||||||
|
@@ -1,78 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Pull packages from msys2 repository that can be directly used.
|
|
||||||
# We can use https://packages.msys2.org/ to retrieve the newest package
|
|
||||||
mkdir ~/tmp
|
|
||||||
pushd ~/tmp
|
|
||||||
MINGW_PACKET_LIST="
|
|
||||||
mingw-w64-x86_64-headers-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst
|
|
||||||
mingw-w64-x86_64-vulkan-loader-1.3.211-1-any.pkg.tar.zst
|
|
||||||
mingw-w64-x86_64-libelf-0.8.13-6-any.pkg.tar.zst
|
|
||||||
mingw-w64-x86_64-zlib-1.2.12-1-any.pkg.tar.zst
|
|
||||||
mingw-w64-x86_64-zstd-1.5.2-2-any.pkg.tar.zst
|
|
||||||
"
|
|
||||||
|
|
||||||
for i in $MINGW_PACKET_LIST
|
|
||||||
do
|
|
||||||
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
-O "https://mirror.msys2.org/mingw/mingw64/$i"
|
|
||||||
tar xf $i --strip-components=1 -C /usr/x86_64-w64-mingw32/
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
rm -rf ~/tmp
|
|
||||||
|
|
||||||
mkdir -p /usr/x86_64-w64-mingw32/bin
|
|
||||||
|
|
||||||
# The output of `wine64 llvm-config --system-libs --cxxflags mcdisassembler`
|
|
||||||
# containes absolute path like '-IZ:'
|
|
||||||
# The sed is used to replace `-IZ:/usr/x86_64-w64-mingw32/include`
|
|
||||||
# to `-I/usr/x86_64-w64-mingw32/include`
|
|
||||||
|
|
||||||
# Debian's pkg-config wrapers for mingw are broken, and there's no sign that
|
|
||||||
# they're going to be fixed, so we'll just have to fix it ourselves
|
|
||||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492
|
|
||||||
cat >/usr/x86_64-w64-mingw32/bin/pkg-config <<EOF
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig:/usr/x86_64-w64-mingw32/share/pkgconfig pkg-config \$@
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/x86_64-w64-mingw32/bin/pkg-config
|
|
||||||
|
|
||||||
cat >/usr/x86_64-w64-mingw32/bin/llvm-config <<EOF
|
|
||||||
#!/bin/sh
|
|
||||||
wine64 llvm-config \$@ | sed -e "s,Z:/,/,gi"
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/x86_64-w64-mingw32/bin/llvm-config
|
|
||||||
|
|
||||||
cat >/usr/x86_64-w64-mingw32/bin/clang <<EOF
|
|
||||||
#!/bin/sh
|
|
||||||
wine64 clang \$@
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/x86_64-w64-mingw32/bin/clang
|
|
||||||
|
|
||||||
cat >/usr/x86_64-w64-mingw32/bin/llvm-as <<EOF
|
|
||||||
#!/bin/sh
|
|
||||||
wine64 llvm-as \$@
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/x86_64-w64-mingw32/bin/llvm-as
|
|
||||||
|
|
||||||
cat >/usr/x86_64-w64-mingw32/bin/llvm-link <<EOF
|
|
||||||
#!/bin/sh
|
|
||||||
wine64 llvm-link \$@
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/x86_64-w64-mingw32/bin/llvm-link
|
|
||||||
|
|
||||||
cat >/usr/x86_64-w64-mingw32/bin/opt <<EOF
|
|
||||||
#!/bin/sh
|
|
||||||
wine64 opt \$@
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/x86_64-w64-mingw32/bin/opt
|
|
||||||
|
|
||||||
cat >/usr/x86_64-w64-mingw32/bin/llvm-spirv <<EOF
|
|
||||||
#!/bin/sh
|
|
||||||
wine64 llvm-spirv \$@
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/x86_64-w64-mingw32/bin/llvm-spirv
|
|
@@ -1,125 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Building libdrm (libva dependency)
|
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
|
||||||
|
|
||||||
wd=$PWD
|
|
||||||
CMAKE_TOOLCHAIN_MINGW_PATH=$wd/.gitlab-ci/container/debian/x86_mingw-toolchain.cmake
|
|
||||||
mkdir -p ~/tmp
|
|
||||||
pushd ~/tmp
|
|
||||||
|
|
||||||
# Building DirectX-Headers
|
|
||||||
git clone https://github.com/microsoft/DirectX-Headers -b v1.606.4 --depth 1
|
|
||||||
mkdir -p DirectX-Headers/build
|
|
||||||
pushd DirectX-Headers/build
|
|
||||||
meson .. \
|
|
||||||
--backend=ninja \
|
|
||||||
--buildtype=release -Dbuild-test=false \
|
|
||||||
-Dprefix=/usr/x86_64-w64-mingw32/ \
|
|
||||||
--cross-file=$wd/.gitlab-ci/x86_64-w64-mingw32
|
|
||||||
|
|
||||||
ninja install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Building libva
|
|
||||||
git clone https://github.com/intel/libva
|
|
||||||
pushd libva/
|
|
||||||
# libva-win32 is released with libva version 2.17 (see https://github.com/intel/libva/releases/tag/2.17.0)
|
|
||||||
git checkout 2.17.0
|
|
||||||
popd
|
|
||||||
# libva already has a build dir in their repo, use builddir instead
|
|
||||||
mkdir -p libva/builddir
|
|
||||||
pushd libva/builddir
|
|
||||||
meson .. \
|
|
||||||
--backend=ninja \
|
|
||||||
--buildtype=release \
|
|
||||||
-Dprefix=/usr/x86_64-w64-mingw32/ \
|
|
||||||
--cross-file=$wd/.gitlab-ci/x86_64-w64-mingw32
|
|
||||||
|
|
||||||
ninja install
|
|
||||||
popd
|
|
||||||
|
|
||||||
export VULKAN_SDK_VERSION=1.3.211.0
|
|
||||||
|
|
||||||
# Building SPIRV Tools
|
|
||||||
git clone -b sdk-$VULKAN_SDK_VERSION --depth=1 \
|
|
||||||
https://github.com/KhronosGroup/SPIRV-Tools SPIRV-Tools
|
|
||||||
|
|
||||||
git clone -b sdk-$VULKAN_SDK_VERSION --depth=1 \
|
|
||||||
https://github.com/KhronosGroup/SPIRV-Headers SPIRV-Tools/external/SPIRV-Headers
|
|
||||||
|
|
||||||
mkdir -p SPIRV-Tools/build
|
|
||||||
pushd SPIRV-Tools/build
|
|
||||||
cmake .. \
|
|
||||||
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_MINGW_PATH \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ \
|
|
||||||
-GNinja -DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMAKE_CROSSCOMPILING=1 \
|
|
||||||
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW
|
|
||||||
|
|
||||||
ninja install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Building LLVM
|
|
||||||
git clone -b release/14.x --depth=1 \
|
|
||||||
https://github.com/llvm/llvm-project llvm-project
|
|
||||||
|
|
||||||
git clone -b v14.0.0 --depth=1 \
|
|
||||||
https://github.com/KhronosGroup/SPIRV-LLVM-Translator llvm-project/llvm/projects/SPIRV-LLVM-Translator
|
|
||||||
|
|
||||||
mkdir llvm-project/build
|
|
||||||
pushd llvm-project/build
|
|
||||||
cmake ../llvm \
|
|
||||||
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_MINGW_PATH \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ \
|
|
||||||
-GNinja -DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMAKE_CROSSCOMPILING=1 \
|
|
||||||
-DLLVM_ENABLE_RTTI=ON \
|
|
||||||
-DCROSS_TOOLCHAIN_FLAGS_NATIVE=-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$PWD/../../SPIRV-Tools/external/SPIRV-Headers \
|
|
||||||
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$PWD/../../SPIRV-Tools/external/SPIRV-Headers \
|
|
||||||
-DLLVM_ENABLE_PROJECTS="clang" \
|
|
||||||
-DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" \
|
|
||||||
-DLLVM_OPTIMIZED_TABLEGEN=TRUE \
|
|
||||||
-DLLVM_ENABLE_ASSERTIONS=TRUE \
|
|
||||||
-DLLVM_INCLUDE_UTILS=OFF \
|
|
||||||
-DLLVM_INCLUDE_RUNTIMES=OFF \
|
|
||||||
-DLLVM_INCLUDE_TESTS=OFF \
|
|
||||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
|
||||||
-DLLVM_INCLUDE_GO_TESTS=OFF \
|
|
||||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
|
||||||
-DLLVM_BUILD_LLVM_C_DYLIB=OFF \
|
|
||||||
-DLLVM_ENABLE_DIA_SDK=OFF \
|
|
||||||
-DCLANG_BUILD_TOOLS=ON \
|
|
||||||
-DLLVM_SPIRV_INCLUDE_TESTS=OFF
|
|
||||||
|
|
||||||
ninja install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Building libclc
|
|
||||||
mkdir llvm-project/build-libclc
|
|
||||||
pushd llvm-project/build-libclc
|
|
||||||
cmake ../libclc \
|
|
||||||
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_MINGW_PATH \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ \
|
|
||||||
-GNinja -DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMAKE_CROSSCOMPILING=1 \
|
|
||||||
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
|
|
||||||
-DCMAKE_CXX_FLAGS="-m64" \
|
|
||||||
-DLLVM_CONFIG="/usr/x86_64-w64-mingw32/bin/llvm-config" \
|
|
||||||
-DLLVM_CLANG="/usr/x86_64-w64-mingw32/bin/clang" \
|
|
||||||
-DLLVM_AS="/usr/x86_64-w64-mingw32/bin/llvm-as" \
|
|
||||||
-DLLVM_LINK="/usr/x86_64-w64-mingw32/bin/llvm-link" \
|
|
||||||
-DLLVM_OPT="/usr/x86_64-w64-mingw32/bin/opt" \
|
|
||||||
-DLLVM_SPIRV="/usr/x86_64-w64-mingw32/bin/llvm-spirv" \
|
|
||||||
-DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-"
|
|
||||||
|
|
||||||
ninja install
|
|
||||||
popd
|
|
||||||
|
|
||||||
popd # ~/tmp
|
|
||||||
|
|
||||||
# Cleanup ~/tmp
|
|
||||||
rm -rf ~/tmp
|
|
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y --no-remove \
|
|
||||||
zstd \
|
|
||||||
g++-mingw-w64-i686 \
|
|
||||||
g++-mingw-w64-x86-64
|
|
||||||
|
|
||||||
. .gitlab-ci/container/debian/x86_build-mingw-patch.sh
|
|
||||||
. .gitlab-ci/container/debian/x86_build-mingw-source-deps.sh
|
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
@@ -13,21 +12,24 @@ STABLE_EPHEMERAL=" \
|
|||||||
autotools-dev \
|
autotools-dev \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
libtool \
|
libtool \
|
||||||
libssl-dev \
|
python3-pip \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
# We need multiarch for Wine
|
||||||
|
dpkg --add-architecture i386
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
apt-get install -y --no-remove \
|
apt-get install -y --no-remove \
|
||||||
$STABLE_EPHEMERAL \
|
$STABLE_EPHEMERAL \
|
||||||
check \
|
check \
|
||||||
clang \
|
clang \
|
||||||
|
cmake \
|
||||||
libasan6 \
|
libasan6 \
|
||||||
libarchive-dev \
|
libarchive-dev \
|
||||||
libclang-cpp13-dev \
|
|
||||||
libclang-cpp11-dev \
|
libclang-cpp11-dev \
|
||||||
libgbm-dev \
|
libgbm-dev \
|
||||||
libglvnd-dev \
|
libglvnd-dev \
|
||||||
|
libllvmspirvlib-dev \
|
||||||
liblua5.3-dev \
|
liblua5.3-dev \
|
||||||
libxcb-dri2-0-dev \
|
libxcb-dri2-0-dev \
|
||||||
libxcb-dri3-dev \
|
libxcb-dri3-dev \
|
||||||
@@ -39,39 +41,41 @@ apt-get install -y --no-remove \
|
|||||||
libxcb-xfixes0-dev \
|
libxcb-xfixes0-dev \
|
||||||
libxcb1-dev \
|
libxcb1-dev \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
llvm-13-dev \
|
|
||||||
llvm-11-dev \
|
llvm-11-dev \
|
||||||
|
llvm-9-dev \
|
||||||
ocl-icd-opencl-dev \
|
ocl-icd-opencl-dev \
|
||||||
python3-pip \
|
|
||||||
python3-venv \
|
|
||||||
procps \
|
procps \
|
||||||
spirv-tools \
|
spirv-tools \
|
||||||
shellcheck \
|
|
||||||
strace \
|
strace \
|
||||||
time \
|
time \
|
||||||
yamllint \
|
wine \
|
||||||
zstd
|
wine32
|
||||||
|
|
||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
|
|
||||||
|
# Debian's pkg-config wrapers for mingw are broken, and there's no sign that
|
||||||
|
# they're going to be fixed, so we'll just have to fix it ourselves
|
||||||
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492
|
||||||
|
cat >/usr/local/bin/x86_64-w64-mingw32-pkg-config <<EOF
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig pkg-config \$@
|
||||||
|
EOF
|
||||||
|
chmod +x /usr/local/bin/x86_64-w64-mingw32-pkg-config
|
||||||
|
|
||||||
|
|
||||||
# dependencies where we want a specific version
|
# dependencies where we want a specific version
|
||||||
export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
|
export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
|
||||||
|
|
||||||
export XORGMACROS_VERSION=util-macros-1.19.0
|
export XORGMACROS_VERSION=util-macros-1.19.0
|
||||||
|
|
||||||
. .gitlab-ci/container/build-mold.sh
|
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -O \
|
|
||||||
$XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
|
||||||
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
||||||
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
||||||
rm -rf $XORGMACROS_VERSION
|
rm -rf $XORGMACROS_VERSION
|
||||||
|
|
||||||
. .gitlab-ci/container/build-llvm-spirv.sh
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-libclc.sh
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
||||||
. .gitlab-ci/container/build-wayland.sh
|
. .gitlab-ci/container/build-wayland.sh
|
||||||
@@ -83,22 +87,17 @@ cd shader-db
|
|||||||
make
|
make
|
||||||
popd
|
popd
|
||||||
|
|
||||||
git clone https://github.com/microsoft/DirectX-Headers -b v1.606.4 --depth 1
|
git clone https://github.com/microsoft/DirectX-Headers -b v1.0.1 --depth 1
|
||||||
mkdir -p DirectX-Headers/build
|
pushd DirectX-Headers
|
||||||
pushd DirectX-Headers/build
|
mkdir build
|
||||||
|
cd build
|
||||||
meson .. --backend=ninja --buildtype=release -Dbuild-test=false
|
meson .. --backend=ninja --buildtype=release -Dbuild-test=false
|
||||||
ninja
|
ninja
|
||||||
ninja install
|
ninja install
|
||||||
popd
|
popd
|
||||||
rm -rf DirectX-Headers
|
rm -rf DirectX-Headers
|
||||||
|
|
||||||
python3 -m pip install -r .gitlab-ci/lava/requirements.txt
|
pip3 install git+https://git.lavasoftware.org/lava/lavacli@3db3ddc45e5358908bc6a17448059ea2340492b7
|
||||||
|
|
||||||
# install bindgen
|
|
||||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
|
||||||
bindgen --version 0.59.2 \
|
|
||||||
-j ${FDO_CI_CONCURRENT:-4} \
|
|
||||||
--root /usr/local
|
|
||||||
|
|
||||||
############### Uninstall the build software
|
############### Uninstall the build software
|
||||||
|
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
set(CMAKE_SYSTEM_NAME Windows)
|
|
||||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
|
||||||
|
|
||||||
set(CMAKE_SYSROOT /usr/x86_64-w64-mingw32/)
|
|
||||||
set(ENV{PKG_CONFIG} /usr/x86_64-w64-mingw32/bin/pkg-config)
|
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc-posix)
|
|
||||||
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++-posix)
|
|
@@ -1,99 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# The relative paths in this file only become valid at runtime.
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
# Ephemeral packages (installed for this script and removed again at the end)
|
|
||||||
STABLE_EPHEMERAL=" \
|
|
||||||
ccache \
|
|
||||||
unzip \
|
|
||||||
dpkg-dev \
|
|
||||||
build-essential:native \
|
|
||||||
config-package-dev \
|
|
||||||
debhelper-compat \
|
|
||||||
cmake \
|
|
||||||
ninja-build \
|
|
||||||
"
|
|
||||||
|
|
||||||
apt-get install -y --no-remove --no-install-recommends \
|
|
||||||
$STABLE_EPHEMERAL \
|
|
||||||
iproute2
|
|
||||||
|
|
||||||
############### Building ...
|
|
||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
|
||||||
|
|
||||||
############### Downloading NDK for native builds for the guest ...
|
|
||||||
|
|
||||||
# Fetch the NDK and extract just the toolchain we want.
|
|
||||||
ndk=$ANDROID_NDK
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
-o $ndk.zip https://dl.google.com/android/repository/$ndk-linux.zip
|
|
||||||
unzip -d / $ndk.zip
|
|
||||||
rm $ndk.zip
|
|
||||||
|
|
||||||
############### Build dEQP runner
|
|
||||||
|
|
||||||
export ANDROID_NDK_HOME=/$ndk
|
|
||||||
. .gitlab-ci/container/build-rust.sh
|
|
||||||
. .gitlab-ci/container/build-deqp-runner.sh
|
|
||||||
|
|
||||||
rm -rf /root/.cargo
|
|
||||||
rm -rf /root/.rustup
|
|
||||||
|
|
||||||
############### Build dEQP GL
|
|
||||||
|
|
||||||
DEQP_TARGET="android" \
|
|
||||||
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28" \
|
|
||||||
. .gitlab-ci/container/build-deqp.sh
|
|
||||||
|
|
||||||
############### Downloading Cuttlefish resources ...
|
|
||||||
|
|
||||||
CUTTLEFISH_VERSION=9082637 # Chosen from https://ci.android.com/builds/branches/aosp-master/grid?
|
|
||||||
|
|
||||||
mkdir /cuttlefish
|
|
||||||
pushd /cuttlefish
|
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
-o aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip https://ci.android.com/builds/submitted/$CUTTLEFISH_VERSION/aosp_cf_x86_64_phone-userdebug/latest/raw/aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip
|
|
||||||
unzip aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip
|
|
||||||
rm aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip
|
|
||||||
ls -lhS ./*
|
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
https://ci.android.com/builds/submitted/$CUTTLEFISH_VERSION/aosp_cf_x86_64_phone-userdebug/latest/raw/cvd-host_package.tar.gz | tar -xzvf-
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
############### Building and installing Debian package ...
|
|
||||||
|
|
||||||
git clone --depth 1 https://github.com/google/android-cuttlefish.git
|
|
||||||
pushd android-cuttlefish
|
|
||||||
|
|
||||||
pushd base
|
|
||||||
dpkg-buildpackage -uc -us
|
|
||||||
popd
|
|
||||||
|
|
||||||
apt-get install -y ./cuttlefish-base_*.deb
|
|
||||||
|
|
||||||
popd
|
|
||||||
rm -rf android-cuttlefish
|
|
||||||
|
|
||||||
addgroup --system kvm
|
|
||||||
usermod -a -G kvm,cvdnetwork root
|
|
||||||
|
|
||||||
############### Uninstall the build software
|
|
||||||
|
|
||||||
rm -rf "/${ndk:?}"
|
|
||||||
|
|
||||||
ccache --show-stats
|
|
||||||
|
|
||||||
apt-get purge -y \
|
|
||||||
$STABLE_EPHEMERAL
|
|
||||||
|
|
||||||
apt-get autoremove -y --purge
|
|
@@ -1,78 +1,34 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
apt-get install -y ca-certificates gnupg2 software-properties-common
|
apt-get install -y ca-certificates
|
||||||
|
|
||||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||||
|
|
||||||
# Ephemeral packages (installed for this script and removed again at
|
# Ephemeral packages (installed for this script and removed again at
|
||||||
# the end)
|
# the end)
|
||||||
STABLE_EPHEMERAL=" \
|
STABLE_EPHEMERAL=" \
|
||||||
autoconf \
|
cargo \
|
||||||
automake \
|
|
||||||
bc \
|
|
||||||
bison \
|
|
||||||
bzip2 \
|
|
||||||
ccache \
|
|
||||||
cmake \
|
|
||||||
clang-11 \
|
|
||||||
flex \
|
|
||||||
glslang-tools \
|
|
||||||
g++ \
|
|
||||||
libasound2-dev \
|
|
||||||
libcap-dev \
|
|
||||||
libclang-cpp11-dev \
|
|
||||||
libegl-dev \
|
|
||||||
libelf-dev \
|
|
||||||
libepoxy-dev \
|
|
||||||
libgbm-dev \
|
|
||||||
libpciaccess-dev \
|
|
||||||
libvulkan-dev \
|
|
||||||
libwayland-dev \
|
|
||||||
libx11-xcb-dev \
|
|
||||||
libxext-dev \
|
|
||||||
llvm-13-dev \
|
|
||||||
llvm-11-dev \
|
|
||||||
make \
|
|
||||||
meson \
|
|
||||||
patch \
|
|
||||||
pkg-config \
|
|
||||||
protobuf-compiler \
|
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
python3-wheel \
|
python3-wheel \
|
||||||
spirv-tools \
|
|
||||||
wayland-protocols \
|
|
||||||
xz-utils \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
# Add llvm 13 to the build image
|
|
||||||
apt-key add .gitlab-ci/container/debian/llvm-snapshot.gpg.key
|
|
||||||
add-apt-repository "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
|
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
|
|
||||||
apt-get install -y \
|
|
||||||
sysvinit-core
|
|
||||||
|
|
||||||
apt-get install -y --no-remove \
|
apt-get install -y --no-remove \
|
||||||
curl \
|
|
||||||
git \
|
git \
|
||||||
git-lfs \
|
git-lfs \
|
||||||
inetutils-syslogd \
|
|
||||||
iptables \
|
|
||||||
jq \
|
|
||||||
libasan6 \
|
libasan6 \
|
||||||
libexpat1 \
|
libexpat1 \
|
||||||
libllvm13 \
|
|
||||||
libllvm11 \
|
libllvm11 \
|
||||||
|
libllvm9 \
|
||||||
liblz4-1 \
|
liblz4-1 \
|
||||||
libpng16-16 \
|
libpng16-16 \
|
||||||
libpython3.9 \
|
libpython3.9 \
|
||||||
@@ -92,68 +48,22 @@ apt-get install -y --no-remove \
|
|||||||
python3-requests \
|
python3-requests \
|
||||||
python3-six \
|
python3-six \
|
||||||
python3-yaml \
|
python3-yaml \
|
||||||
socat \
|
|
||||||
vulkan-tools \
|
vulkan-tools \
|
||||||
waffle-utils \
|
waffle-utils \
|
||||||
xauth \
|
xauth \
|
||||||
xvfb \
|
xvfb \
|
||||||
zlib1g \
|
zlib1g
|
||||||
zstd
|
|
||||||
|
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
$STABLE_EPHEMERAL
|
$STABLE_EPHEMERAL
|
||||||
|
|
||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
|
||||||
|
|
||||||
############### Build kernel
|
|
||||||
|
|
||||||
export DEFCONFIG="arch/x86/configs/x86_64_defconfig"
|
|
||||||
export KERNEL_IMAGE_NAME=bzImage
|
|
||||||
export KERNEL_ARCH=x86_64
|
|
||||||
export DEBIAN_ARCH=amd64
|
|
||||||
|
|
||||||
mkdir -p /lava-files/
|
|
||||||
. .gitlab-ci/container/build-kernel.sh
|
|
||||||
|
|
||||||
# Needed for ci-fairy, this revision is able to upload files to MinIO
|
# Needed for ci-fairy, this revision is able to upload files to MinIO
|
||||||
# and doesn't depend on git
|
# and doesn't depend on git
|
||||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@34f4ade99434043f88e164933f570301fd18b125
|
||||||
|
|
||||||
# Needed for manipulation with traces yaml files.
|
|
||||||
pip3 install yq
|
|
||||||
|
|
||||||
# Needed for crosvm compilation.
|
|
||||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 100
|
|
||||||
|
|
||||||
############### Build LLVM-SPIRV translator
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-llvm-spirv.sh
|
|
||||||
|
|
||||||
############### Build libclc
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-libclc.sh
|
|
||||||
|
|
||||||
############### Build libdrm
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
|
||||||
|
|
||||||
############### Build Wayland
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-wayland.sh
|
|
||||||
|
|
||||||
############### Build Crosvm
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-rust.sh
|
|
||||||
. .gitlab-ci/container/build-crosvm.sh
|
|
||||||
|
|
||||||
############### Build dEQP runner
|
############### Build dEQP runner
|
||||||
. .gitlab-ci/container/build-deqp-runner.sh
|
. .gitlab-ci/container/build-deqp-runner.sh
|
||||||
|
rm -rf ~/.cargo
|
||||||
rm -rf /root/.cargo
|
|
||||||
rm -rf /root/.rustup
|
|
||||||
|
|
||||||
ccache --show-stats
|
|
||||||
|
|
||||||
apt-get purge -y $STABLE_EPHEMERAL
|
apt-get purge -y $STABLE_EPHEMERAL
|
||||||
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
@@ -8,31 +7,38 @@ export DEBIAN_FRONTEND=noninteractive
|
|||||||
|
|
||||||
# Ephemeral packages (installed for this script and removed again at the end)
|
# Ephemeral packages (installed for this script and removed again at the end)
|
||||||
STABLE_EPHEMERAL=" \
|
STABLE_EPHEMERAL=" \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
bc \
|
||||||
|
bison \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
ccache \
|
ccache \
|
||||||
clang-13 \
|
|
||||||
clang-11 \
|
clang-11 \
|
||||||
cmake \
|
cmake \
|
||||||
|
flex \
|
||||||
g++ \
|
g++ \
|
||||||
glslang-tools \
|
glslang-tools \
|
||||||
libasound2-dev \
|
libasound2-dev \
|
||||||
libcap-dev \
|
libcap-dev \
|
||||||
libclang-cpp13-dev \
|
|
||||||
libclang-cpp11-dev \
|
libclang-cpp11-dev \
|
||||||
|
libelf-dev \
|
||||||
|
libexpat1-dev \
|
||||||
|
libfdt-dev \
|
||||||
|
libgbm-dev \
|
||||||
libgles2-mesa-dev \
|
libgles2-mesa-dev \
|
||||||
|
libllvmspirvlib-dev \
|
||||||
libpciaccess-dev \
|
libpciaccess-dev \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libudev-dev \
|
libudev-dev \
|
||||||
libvulkan-dev \
|
libvulkan-dev \
|
||||||
libwaffle-dev \
|
libwaffle-dev \
|
||||||
libwayland-dev \
|
|
||||||
libx11-xcb-dev \
|
libx11-xcb-dev \
|
||||||
libxcb-dri2-0-dev \
|
libxcb-dri2-0-dev \
|
||||||
|
libxext-dev \
|
||||||
libxkbcommon-dev \
|
libxkbcommon-dev \
|
||||||
libxrandr-dev \
|
|
||||||
libxrender-dev \
|
libxrender-dev \
|
||||||
llvm-13-dev \
|
|
||||||
llvm-11-dev \
|
llvm-11-dev \
|
||||||
|
llvm-spirv \
|
||||||
make \
|
make \
|
||||||
meson \
|
meson \
|
||||||
ocl-icd-opencl-dev \
|
ocl-icd-opencl-dev \
|
||||||
@@ -42,34 +48,61 @@ STABLE_EPHEMERAL=" \
|
|||||||
xz-utils \
|
xz-utils \
|
||||||
"
|
"
|
||||||
|
|
||||||
apt-get update
|
|
||||||
|
|
||||||
apt-get install -y --no-remove \
|
apt-get install -y --no-remove \
|
||||||
$STABLE_EPHEMERAL \
|
$STABLE_EPHEMERAL \
|
||||||
clinfo \
|
clinfo \
|
||||||
iptables \
|
iptables \
|
||||||
libclang-common-13-dev \
|
|
||||||
libclang-common-11-dev \
|
libclang-common-11-dev \
|
||||||
libclang-cpp13 \
|
|
||||||
libclang-cpp11 \
|
libclang-cpp11 \
|
||||||
libcap2 \
|
libcap2 \
|
||||||
libegl1 \
|
libegl1 \
|
||||||
libepoxy0 \
|
libepoxy-dev \
|
||||||
libfdt1 \
|
libfdt1 \
|
||||||
|
libllvmspirvlib11 \
|
||||||
libxcb-shm0 \
|
libxcb-shm0 \
|
||||||
ocl-icd-libopencl1 \
|
ocl-icd-libopencl1 \
|
||||||
python3-lxml \
|
python3-lxml \
|
||||||
python3-renderdoc \
|
python3-renderdoc \
|
||||||
python3-simplejson \
|
python3-simplejson \
|
||||||
spirv-tools \
|
spirv-tools \
|
||||||
weston
|
sysvinit-core \
|
||||||
|
wget
|
||||||
|
|
||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
|
############### Build libdrm
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
||||||
|
############### Build Wayland
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-wayland.sh
|
||||||
|
|
||||||
|
############### Build Crosvm
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-rust.sh
|
||||||
|
. .gitlab-ci/container/build-crosvm.sh
|
||||||
|
rm -rf /root/.cargo
|
||||||
|
rm -rf /root/.rustup
|
||||||
|
|
||||||
|
############### Build kernel
|
||||||
|
|
||||||
|
export DEFCONFIG="arch/x86/configs/x86_64_defconfig"
|
||||||
|
export KERNEL_IMAGE_NAME=bzImage
|
||||||
|
export KERNEL_ARCH=x86_64
|
||||||
|
export DEBIAN_ARCH=amd64
|
||||||
|
|
||||||
|
mkdir -p /lava-files/
|
||||||
|
. .gitlab-ci/container/build-kernel.sh
|
||||||
|
|
||||||
|
############### Build libclc
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-libclc.sh
|
||||||
|
|
||||||
############### Build piglit
|
############### Build piglit
|
||||||
|
|
||||||
PIGLIT_OPTS="-DPIGLIT_BUILD_GLX_TESTS=ON -DPIGLIT_BUILD_CL_TESTS=ON -DPIGLIT_BUILD_DMA_BUF_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
|
PIGLIT_OPTS="-DPIGLIT_BUILD_CL_TESTS=ON -DPIGLIT_BUILD_DMA_BUF_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
|
||||||
|
|
||||||
############### Build dEQP GL
|
############### Build dEQP GL
|
||||||
|
|
||||||
@@ -79,10 +112,6 @@ DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
|
|||||||
|
|
||||||
. .gitlab-ci/container/build-apitrace.sh
|
. .gitlab-ci/container/build-apitrace.sh
|
||||||
|
|
||||||
############### Build validation layer for zink
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-vulkan-validation.sh
|
|
||||||
|
|
||||||
############### Uninstall the build software
|
############### Uninstall the build software
|
||||||
|
|
||||||
ccache --show-stats
|
ccache --show-stats
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# The relative paths in this file only become valid at runtime.
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
@@ -17,7 +14,6 @@ STABLE_EPHEMERAL=" \
|
|||||||
g++-mingw-w64-x86-64-posix \
|
g++-mingw-w64-x86-64-posix \
|
||||||
glslang-tools \
|
glslang-tools \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
gnupg2 \
|
|
||||||
libgbm-dev \
|
libgbm-dev \
|
||||||
libgles2-mesa-dev \
|
libgles2-mesa-dev \
|
||||||
liblz4-dev \
|
liblz4-dev \
|
||||||
@@ -39,54 +35,81 @@ STABLE_EPHEMERAL=" \
|
|||||||
p7zip \
|
p7zip \
|
||||||
patch \
|
patch \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
python3-dev \
|
|
||||||
python3-distutils \
|
python3-distutils \
|
||||||
python3-pip \
|
wget \
|
||||||
python3-setuptools \
|
|
||||||
python3-wheel \
|
|
||||||
software-properties-common \
|
|
||||||
wine64-tools \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
"
|
"
|
||||||
|
|
||||||
apt-get install -y --no-remove --no-install-recommends \
|
apt-get install -y --no-remove \
|
||||||
$STABLE_EPHEMERAL \
|
$STABLE_EPHEMERAL \
|
||||||
curl \
|
|
||||||
libepoxy0 \
|
|
||||||
libxcb-shm0 \
|
libxcb-shm0 \
|
||||||
pciutils \
|
|
||||||
python3-lxml \
|
python3-lxml \
|
||||||
python3-simplejson \
|
python3-simplejson \
|
||||||
xinit \
|
xinit \
|
||||||
xserver-xorg-video-amdgpu \
|
xserver-xorg-video-amdgpu \
|
||||||
xserver-xorg-video-ati
|
xserver-xorg-video-ati
|
||||||
|
|
||||||
# Install a more recent version of Wine than exists in Debian.
|
# We need multiarch for Wine
|
||||||
apt-key add .gitlab-ci/container/debian/winehq.gpg.key
|
dpkg --add-architecture i386
|
||||||
apt-add-repository https://dl.winehq.org/wine-builds/debian/
|
|
||||||
apt-get update -q
|
|
||||||
|
|
||||||
# workaround wine needing 32-bit
|
apt-get update
|
||||||
# https://bugs.winehq.org/show_bug.cgi?id=53393
|
|
||||||
apt-get install -y --no-remove wine-stable-amd64 # a requirement for wine-stable
|
apt-get install -y --no-remove \
|
||||||
WINE_PKG="wine-stable"
|
wine \
|
||||||
WINE_PKG_DROP="wine-stable-i386"
|
wine32 \
|
||||||
apt-get download "${WINE_PKG}"
|
wine64
|
||||||
dpkg --ignore-depends="${WINE_PKG_DROP}" -i "${WINE_PKG}"*.deb
|
|
||||||
rm "${WINE_PKG}"*.deb
|
function setup_wine() {
|
||||||
sed -i "/${WINE_PKG_DROP}/d" /var/lib/dpkg/status
|
export WINEDEBUG="-all"
|
||||||
apt-get install -y --no-remove winehq-stable # symlinks-only, depends on wine-stable
|
export WINEPREFIX="$1"
|
||||||
|
|
||||||
|
# We don't want crash dialogs
|
||||||
|
cat >crashdialog.reg <<EOF
|
||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\Software\Wine\WineDbg]
|
||||||
|
"ShowCrashDialog"=dword:00000000
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Set the wine prefix and disable the crash dialog
|
||||||
|
wine regedit crashdialog.reg
|
||||||
|
rm crashdialog.reg
|
||||||
|
|
||||||
|
# An immediate wine command may fail with: "${WINEPREFIX}: Not a
|
||||||
|
# valid wine prefix." and that is just spit because of checking
|
||||||
|
# the existance of the system.reg file, which fails. Just giving
|
||||||
|
# it a bit more of time for it to be created solves the problem
|
||||||
|
# ...
|
||||||
|
while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done
|
||||||
|
}
|
||||||
|
|
||||||
############### Install DXVK
|
############### Install DXVK
|
||||||
|
|
||||||
. .gitlab-ci/container/setup-wine.sh "/dxvk-wine64"
|
DXVK_VERSION="1.8.1"
|
||||||
. .gitlab-ci/container/install-wine-dxvk.sh
|
|
||||||
|
|
||||||
############### Install apitrace binaries for wine
|
setup_wine "/dxvk-wine64"
|
||||||
|
|
||||||
|
wget "https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VERSION}/dxvk-${DXVK_VERSION}.tar.gz"
|
||||||
|
tar xzpf dxvk-"${DXVK_VERSION}".tar.gz
|
||||||
|
dxvk-"${DXVK_VERSION}"/setup_dxvk.sh install
|
||||||
|
rm -rf dxvk-"${DXVK_VERSION}"
|
||||||
|
rm dxvk-"${DXVK_VERSION}".tar.gz
|
||||||
|
|
||||||
|
############### Install Windows' apitrace binaries
|
||||||
|
|
||||||
|
APITRACE_VERSION="10.0"
|
||||||
|
APITRACE_VERSION_DATE=""
|
||||||
|
|
||||||
|
wget "https://github.com/apitrace/apitrace/releases/download/${APITRACE_VERSION}/apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"
|
||||||
|
7zr x "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z" \
|
||||||
|
"apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/apitrace.exe" \
|
||||||
|
"apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/d3dretrace.exe"
|
||||||
|
mv "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64" /apitrace-msvc-win64
|
||||||
|
rm "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"
|
||||||
|
|
||||||
. .gitlab-ci/container/install-wine-apitrace.sh
|
|
||||||
# Add the apitrace path to the registry
|
# Add the apitrace path to the registry
|
||||||
wine64 \
|
wine \
|
||||||
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
|
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
|
||||||
/v Path \
|
/v Path \
|
||||||
/t REG_EXPAND_SZ \
|
/t REG_EXPAND_SZ \
|
||||||
@@ -97,11 +120,19 @@ wine64 \
|
|||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
|
############### Build libdrm
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
||||||
|
############### Build Wayland
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-wayland.sh
|
||||||
|
|
||||||
############### Build parallel-deqp-runner's hang-detection tool
|
############### Build parallel-deqp-runner's hang-detection tool
|
||||||
|
|
||||||
. .gitlab-ci/container/build-hang-detection.sh
|
. .gitlab-ci/container/build-hang-detection.sh
|
||||||
|
|
||||||
############### Build piglit replayer
|
############### Build piglit
|
||||||
|
|
||||||
PIGLIT_BUILD_TARGETS="piglit_replayer" . .gitlab-ci/container/build-piglit.sh
|
PIGLIT_BUILD_TARGETS="piglit_replayer" . .gitlab-ci/container/build-piglit.sh
|
||||||
|
|
||||||
@@ -113,17 +144,13 @@ PIGLIT_BUILD_TARGETS="piglit_replayer" . .gitlab-ci/container/build-piglit.sh
|
|||||||
|
|
||||||
. .gitlab-ci/container/build-deqp.sh
|
. .gitlab-ci/container/build-deqp.sh
|
||||||
|
|
||||||
############### Build apitrace
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-apitrace.sh
|
|
||||||
|
|
||||||
############### Build gfxreconstruct
|
############### Build gfxreconstruct
|
||||||
|
|
||||||
. .gitlab-ci/container/build-gfxreconstruct.sh
|
. .gitlab-ci/container/build-gfxreconstruct.sh
|
||||||
|
|
||||||
############### Build VKD3D-Proton
|
############### Build VKD3D-Proton
|
||||||
|
|
||||||
. .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64"
|
setup_wine "/vkd3d-proton-wine64"
|
||||||
|
|
||||||
. .gitlab-ci/container/build-vkd3d-proton.sh
|
. .gitlab-ci/container/build-vkd3d-proton.sh
|
||||||
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
@@ -9,24 +8,23 @@ EPHEMERAL="
|
|||||||
autoconf
|
autoconf
|
||||||
automake
|
automake
|
||||||
bzip2
|
bzip2
|
||||||
cmake
|
|
||||||
git
|
git
|
||||||
libtool
|
libtool
|
||||||
pkgconfig(epoxy)
|
pkgconfig(epoxy)
|
||||||
pkgconfig(gbm)
|
pkgconfig(gbm)
|
||||||
pkgconfig(openssl)
|
|
||||||
unzip
|
unzip
|
||||||
|
wget
|
||||||
xz
|
xz
|
||||||
"
|
"
|
||||||
|
|
||||||
dnf install -y --setopt=install_weak_deps=False \
|
dnf install -y --setopt=install_weak_deps=False \
|
||||||
bison \
|
bison \
|
||||||
|
ccache \
|
||||||
clang-devel \
|
clang-devel \
|
||||||
flex \
|
flex \
|
||||||
gcc \
|
gcc \
|
||||||
gcc-c++ \
|
gcc-c++ \
|
||||||
gettext \
|
gettext \
|
||||||
glslang \
|
|
||||||
kernel-headers \
|
kernel-headers \
|
||||||
llvm-devel \
|
llvm-devel \
|
||||||
meson \
|
meson \
|
||||||
@@ -59,14 +57,12 @@ dnf install -y --setopt=install_weak_deps=False \
|
|||||||
"pkgconfig(xshmfence)" \
|
"pkgconfig(xshmfence)" \
|
||||||
"pkgconfig(xxf86vm)" \
|
"pkgconfig(xxf86vm)" \
|
||||||
"pkgconfig(zlib)" \
|
"pkgconfig(zlib)" \
|
||||||
procps-ng \
|
|
||||||
python-unversioned-command \
|
python-unversioned-command \
|
||||||
python3-devel \
|
python3-devel \
|
||||||
python3-mako \
|
python3-mako \
|
||||||
python3-ply \
|
python3-devel \
|
||||||
|
python3-mako \
|
||||||
vulkan-headers \
|
vulkan-headers \
|
||||||
spirv-tools-devel \
|
|
||||||
spirv-llvm-translator-devel \
|
|
||||||
$EPHEMERAL
|
$EPHEMERAL
|
||||||
|
|
||||||
|
|
||||||
@@ -78,14 +74,11 @@ export XORG_RELEASES=https://xorg.freedesktop.org/releases/individu
|
|||||||
|
|
||||||
export XORGMACROS_VERSION=util-macros-1.19.0
|
export XORGMACROS_VERSION=util-macros-1.19.0
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
||||||
-O $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
|
||||||
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
||||||
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
||||||
rm -rf $XORGMACROS_VERSION
|
rm -rf $XORGMACROS_VERSION
|
||||||
|
|
||||||
. .gitlab-ci/container/build-mold.sh
|
|
||||||
|
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
||||||
. .gitlab-ci/container/build-wayland.sh
|
. .gitlab-ci/container/build-wayland.sh
|
||||||
|
@@ -1,524 +0,0 @@
|
|||||||
# Docker image tag helper templates
|
|
||||||
|
|
||||||
.incorporate-templates-commit:
|
|
||||||
variables:
|
|
||||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
|
||||||
|
|
||||||
.incorporate-base-tag+templates-commit:
|
|
||||||
variables:
|
|
||||||
FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
|
||||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
|
||||||
|
|
||||||
.set-image:
|
|
||||||
extends:
|
|
||||||
- .incorporate-templates-commit
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
|
|
||||||
image: "$MESA_IMAGE"
|
|
||||||
|
|
||||||
.set-image-base-tag:
|
|
||||||
extends:
|
|
||||||
- .set-image
|
|
||||||
- .incorporate-base-tag+templates-commit
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
|
|
||||||
|
|
||||||
.use-wine:
|
|
||||||
variables:
|
|
||||||
WINEPATH: "/usr/x86_64-w64-mingw32/bin;/usr/x86_64-w64-mingw32/lib;/usr/lib/gcc/x86_64-w64-mingw32/10-posix;c:/windows;c:/windows/system32"
|
|
||||||
|
|
||||||
# Build the CI docker images.
|
|
||||||
#
|
|
||||||
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
|
|
||||||
# image doesn't exist yet, the container stage job generates it.
|
|
||||||
#
|
|
||||||
# In order to generate a new image, one should generally change the tag.
|
|
||||||
# While removing the image from the registry would also work, that's not
|
|
||||||
# recommended except for ephemeral images during development: Replacing
|
|
||||||
# an image after a significant amount of time might pull in newer
|
|
||||||
# versions of gcc/clang or other packages, which might break the build
|
|
||||||
# with older commits using the same tag.
|
|
||||||
#
|
|
||||||
# After merging a change resulting in generating a new image to the
|
|
||||||
# main repository, it's recommended to remove the image from the source
|
|
||||||
# repository's container registry, so that the image from the main
|
|
||||||
# repository's registry will be used there as well.
|
|
||||||
|
|
||||||
.container:
|
|
||||||
stage: container
|
|
||||||
extends:
|
|
||||||
- .container-rules
|
|
||||||
- .incorporate-templates-commit
|
|
||||||
- .use-wine
|
|
||||||
variables:
|
|
||||||
FDO_DISTRIBUTION_VERSION: bullseye-slim
|
|
||||||
FDO_REPO_SUFFIX: $CI_JOB_NAME
|
|
||||||
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
|
|
||||||
# no need to pull the whole repo to build the container image
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
|
|
||||||
.use-base-image:
|
|
||||||
extends:
|
|
||||||
- .container
|
|
||||||
- .incorporate-base-tag+templates-commit
|
|
||||||
# Don't want the .container rules
|
|
||||||
- .build-rules
|
|
||||||
|
|
||||||
# Debian 11 based x86 build image base
|
|
||||||
debian/x86_build-base:
|
|
||||||
extends:
|
|
||||||
- .fdo.container-build@debian
|
|
||||||
- .container
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-x86_build-base ${DEBIAN_BASE_TAG}
|
|
||||||
|
|
||||||
.use-debian/x86_build-base:
|
|
||||||
extends:
|
|
||||||
- .fdo.container-build@debian
|
|
||||||
- .use-base-image
|
|
||||||
variables:
|
|
||||||
MESA_BASE_IMAGE: ${DEBIAN_X86_BUILD_BASE_IMAGE}
|
|
||||||
MESA_BASE_TAG: *debian-x86_build-base
|
|
||||||
MESA_ARTIFACTS_BASE_TAG: *debian-x86_build-base
|
|
||||||
needs:
|
|
||||||
- debian/x86_build-base
|
|
||||||
|
|
||||||
# Debian 11 based x86 main build image
|
|
||||||
debian/x86_build:
|
|
||||||
extends:
|
|
||||||
- .use-debian/x86_build-base
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-x86_build ${DEBIAN_BUILD_TAG}
|
|
||||||
|
|
||||||
.use-debian/x86_build:
|
|
||||||
extends:
|
|
||||||
- .set-image-base-tag
|
|
||||||
variables:
|
|
||||||
MESA_BASE_TAG: *debian-x86_build-base
|
|
||||||
MESA_IMAGE_PATH: ${DEBIAN_X86_BUILD_IMAGE_PATH}
|
|
||||||
MESA_IMAGE_TAG: *debian-x86_build
|
|
||||||
needs:
|
|
||||||
- debian/x86_build
|
|
||||||
|
|
||||||
# Debian 11 based i386 cross-build image
|
|
||||||
debian/i386_build:
|
|
||||||
extends:
|
|
||||||
- .use-debian/x86_build-base
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-i386_build ${DEBIAN_BUILD_TAG}
|
|
||||||
|
|
||||||
.use-debian/i386_build:
|
|
||||||
extends:
|
|
||||||
- .set-image-base-tag
|
|
||||||
variables:
|
|
||||||
MESA_BASE_TAG: *debian-x86_build-base
|
|
||||||
MESA_IMAGE_PATH: "debian/i386_build"
|
|
||||||
MESA_IMAGE_TAG: *debian-i386_build
|
|
||||||
needs:
|
|
||||||
- debian/i386_build
|
|
||||||
|
|
||||||
# Debian 11 based x86-mingw cross main build image
|
|
||||||
debian/x86_build-mingw:
|
|
||||||
extends:
|
|
||||||
- .use-debian/x86_build-base
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-x86_build_mingw ${DEBIAN_BUILD_MINGW_TAG}
|
|
||||||
|
|
||||||
.use-debian/x86_build_mingw:
|
|
||||||
extends:
|
|
||||||
- .set-image-base-tag
|
|
||||||
variables:
|
|
||||||
MESA_BASE_TAG: *debian-x86_build-base
|
|
||||||
MESA_IMAGE_PATH: ${DEBIAN_X86_BUILD_MINGW_IMAGE_PATH}
|
|
||||||
MESA_IMAGE_TAG: *debian-x86_build_mingw
|
|
||||||
needs:
|
|
||||||
- debian/x86_build-mingw
|
|
||||||
|
|
||||||
# Debian 11 based ppc64el cross-build image
|
|
||||||
debian/ppc64el_build:
|
|
||||||
extends:
|
|
||||||
- .use-debian/x86_build-base
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-ppc64el_build ${DEBIAN_BUILD_TAG}
|
|
||||||
|
|
||||||
.use-debian/ppc64el_build:
|
|
||||||
extends:
|
|
||||||
- .set-image-base-tag
|
|
||||||
variables:
|
|
||||||
MESA_BASE_TAG: *debian-x86_build-base
|
|
||||||
MESA_IMAGE_PATH: "debian/ppc64el_build"
|
|
||||||
MESA_IMAGE_TAG: *debian-ppc64el_build
|
|
||||||
needs:
|
|
||||||
- debian/ppc64el_build
|
|
||||||
|
|
||||||
# Debian 11 based s390x cross-build image
|
|
||||||
debian/s390x_build:
|
|
||||||
extends:
|
|
||||||
- .use-debian/x86_build-base
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-s390x_build ${DEBIAN_BUILD_TAG}
|
|
||||||
|
|
||||||
.use-debian/s390x_build:
|
|
||||||
extends:
|
|
||||||
- .set-image-base-tag
|
|
||||||
variables:
|
|
||||||
MESA_BASE_TAG: *debian-x86_build-base
|
|
||||||
MESA_IMAGE_PATH: "debian/s390x_build"
|
|
||||||
MESA_IMAGE_TAG: *debian-s390x_build
|
|
||||||
needs:
|
|
||||||
- debian/s390x_build
|
|
||||||
|
|
||||||
# Android NDK cross-build image
|
|
||||||
debian/android_build:
|
|
||||||
extends:
|
|
||||||
- .use-debian/x86_build-base
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
|
|
||||||
ANDROID_SDK_VERSION: 33
|
|
||||||
ANDROID_NDK: android-ndk-r25b
|
|
||||||
|
|
||||||
.use-debian/android_build:
|
|
||||||
extends:
|
|
||||||
- .set-image-base-tag
|
|
||||||
variables:
|
|
||||||
MESA_BASE_TAG: *debian-x86_build-base
|
|
||||||
MESA_IMAGE_PATH: "debian/android_build"
|
|
||||||
MESA_IMAGE_TAG: *debian-android_build
|
|
||||||
needs:
|
|
||||||
- debian/android_build
|
|
||||||
|
|
||||||
# Debian 11 based x86 test image base
|
|
||||||
debian/x86_test-base:
|
|
||||||
extends: debian/x86_build-base
|
|
||||||
variables:
|
|
||||||
KERNEL_URL: &kernel-rootfs-url "https://gitlab.freedesktop.org/gfx-ci/linux/-/archive/v6.1-for-mesa-ci-439f86d0051b/linux-v6.1-for-mesa-ci-439f86d0051b.tar.bz2"
|
|
||||||
MESA_IMAGE_TAG: &debian-x86_test-base ${DEBIAN_BASE_TAG}
|
|
||||||
|
|
||||||
.use-debian/x86_test-base:
|
|
||||||
extends:
|
|
||||||
- .fdo.container-build@debian
|
|
||||||
- .use-base-image
|
|
||||||
variables:
|
|
||||||
MESA_BASE_IMAGE: ${DEBIAN_X86_TEST_BASE_IMAGE}
|
|
||||||
MESA_BASE_TAG: *debian-x86_test-base
|
|
||||||
needs:
|
|
||||||
- debian/x86_test-base
|
|
||||||
|
|
||||||
# Debian 11 based x86 test image for GL
|
|
||||||
debian/x86_test-gl:
|
|
||||||
extends: .use-debian/x86_test-base
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-x86_test-gl ${DEBIAN_X86_TEST_GL_TAG}
|
|
||||||
|
|
||||||
.use-debian/x86_test-gl:
|
|
||||||
extends:
|
|
||||||
- .set-image-base-tag
|
|
||||||
variables:
|
|
||||||
MESA_BASE_TAG: *debian-x86_test-base
|
|
||||||
MESA_IMAGE_PATH: ${DEBIAN_X86_TEST_IMAGE_GL_PATH}
|
|
||||||
MESA_IMAGE_TAG: *debian-x86_test-gl
|
|
||||||
needs:
|
|
||||||
- debian/x86_test-gl
|
|
||||||
|
|
||||||
# Debian 11 based x86 test image for VK
|
|
||||||
debian/x86_test-vk:
|
|
||||||
extends: .use-debian/x86_test-base
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-x86_test-vk ${DEBIAN_X86_TEST_VK_TAG}
|
|
||||||
|
|
||||||
.use-debian/x86_test-vk:
|
|
||||||
extends:
|
|
||||||
- .set-image-base-tag
|
|
||||||
variables:
|
|
||||||
MESA_BASE_TAG: *debian-x86_test-base
|
|
||||||
MESA_IMAGE_PATH: ${DEBIAN_X86_TEST_IMAGE_VK_PATH}
|
|
||||||
MESA_IMAGE_TAG: *debian-x86_test-vk
|
|
||||||
needs:
|
|
||||||
- debian/x86_test-vk
|
|
||||||
|
|
||||||
# Debian 11 based x86 test image for Android
|
|
||||||
debian/x86_test-android:
|
|
||||||
extends: .use-debian/x86_test-base
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-x86_test-android ${DEBIAN_X86_TEST_ANDROID_TAG}
|
|
||||||
ANDROID_NDK: android-ndk-r25b
|
|
||||||
|
|
||||||
.use-debian/x86_test-android:
|
|
||||||
extends:
|
|
||||||
- .set-image-base-tag
|
|
||||||
variables:
|
|
||||||
MESA_BASE_TAG: *debian-x86_test-base
|
|
||||||
MESA_IMAGE_PATH: ${DEBIAN_X86_TEST_ANDROID_IMAGE_PATH}
|
|
||||||
MESA_IMAGE_TAG: *debian-x86_test-android
|
|
||||||
needs:
|
|
||||||
- debian/x86_test-android
|
|
||||||
|
|
||||||
# Debian 11 based ARM build image
|
|
||||||
debian/arm_build:
|
|
||||||
extends:
|
|
||||||
- .fdo.container-build@debian
|
|
||||||
- .container
|
|
||||||
tags:
|
|
||||||
- aarch64
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-arm_build ${DEBIAN_BASE_TAG}
|
|
||||||
|
|
||||||
.use-debian/arm_build:
|
|
||||||
extends:
|
|
||||||
- .set-image
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: "debian/arm_build"
|
|
||||||
MESA_IMAGE_TAG: *debian-arm_build
|
|
||||||
MESA_ARTIFACTS_TAG: *debian-arm_build
|
|
||||||
needs:
|
|
||||||
- debian/arm_build
|
|
||||||
|
|
||||||
|
|
||||||
# Alpine based x86 build image
|
|
||||||
alpine/x86_build:
|
|
||||||
extends:
|
|
||||||
- .fdo.container-build@alpine
|
|
||||||
- .container
|
|
||||||
variables:
|
|
||||||
FDO_DISTRIBUTION_VERSION: "3.17"
|
|
||||||
MESA_IMAGE_TAG: &alpine-x86_build ${ALPINE_X86_BUILD_TAG}
|
|
||||||
|
|
||||||
.use-alpine/x86_build:
|
|
||||||
extends:
|
|
||||||
- .set-image
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: "alpine/x86_build"
|
|
||||||
MESA_IMAGE_TAG: *alpine-x86_build
|
|
||||||
needs:
|
|
||||||
- alpine/x86_build
|
|
||||||
|
|
||||||
# Fedora 36 based x86 build image
|
|
||||||
fedora/x86_build:
|
|
||||||
extends:
|
|
||||||
- .fdo.container-build@fedora
|
|
||||||
- .container
|
|
||||||
variables:
|
|
||||||
FDO_DISTRIBUTION_VERSION: 36
|
|
||||||
MESA_IMAGE_TAG: &fedora-x86_build ${FEDORA_X86_BUILD_TAG}
|
|
||||||
|
|
||||||
.use-fedora/x86_build:
|
|
||||||
extends:
|
|
||||||
- .set-image
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: "fedora/x86_build"
|
|
||||||
MESA_IMAGE_TAG: *fedora-x86_build
|
|
||||||
needs:
|
|
||||||
- fedora/x86_build
|
|
||||||
|
|
||||||
|
|
||||||
.kernel+rootfs:
|
|
||||||
extends:
|
|
||||||
- .build-rules
|
|
||||||
stage: container
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: fetch
|
|
||||||
KERNEL_URL: *kernel-rootfs-url
|
|
||||||
MESA_ROOTFS_TAG: &kernel-rootfs ${KERNEL_ROOTFS_TAG}
|
|
||||||
DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/container/lava_build.sh
|
|
||||||
|
|
||||||
kernel+rootfs_amd64:
|
|
||||||
extends:
|
|
||||||
- .use-debian/x86_build-base
|
|
||||||
- .kernel+rootfs
|
|
||||||
image: "$FDO_BASE_IMAGE"
|
|
||||||
variables:
|
|
||||||
DEBIAN_ARCH: "amd64"
|
|
||||||
DISTRIBUTION_TAG: &distribution-tag-amd64 "${MESA_ROOTFS_TAG}--${MESA_ARTIFACTS_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
|
|
||||||
|
|
||||||
kernel+rootfs_arm64:
|
|
||||||
extends:
|
|
||||||
- .use-debian/arm_build
|
|
||||||
- .kernel+rootfs
|
|
||||||
tags:
|
|
||||||
- aarch64
|
|
||||||
variables:
|
|
||||||
DEBIAN_ARCH: "arm64"
|
|
||||||
|
|
||||||
kernel+rootfs_armhf:
|
|
||||||
extends:
|
|
||||||
- kernel+rootfs_arm64
|
|
||||||
variables:
|
|
||||||
DEBIAN_ARCH: "armhf"
|
|
||||||
|
|
||||||
# Cannot use anchors defined here from included files, so use extends: instead
|
|
||||||
.use-kernel+rootfs-arm:
|
|
||||||
variables:
|
|
||||||
DISTRIBUTION_TAG: *distribution-tag-arm
|
|
||||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
|
||||||
|
|
||||||
.use-kernel+rootfs-amd64:
|
|
||||||
variables:
|
|
||||||
DISTRIBUTION_TAG: *distribution-tag-amd64
|
|
||||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
|
||||||
|
|
||||||
# x86 image with ARM64 & armhf kernel & rootfs for baremetal testing
|
|
||||||
.debian/arm_test:
|
|
||||||
extends:
|
|
||||||
- .fdo.container-build@debian
|
|
||||||
- .container
|
|
||||||
# Don't want the .container rules
|
|
||||||
- .build-rules
|
|
||||||
variables:
|
|
||||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_TEMPLATES_COMMIT}"
|
|
||||||
ARTIFACTS_PREFIX: "https://${MINIO_HOST}/mesa-lava"
|
|
||||||
ARTIFACTS_SUFFIX: "${MESA_ROOTFS_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
|
|
||||||
MESA_ARTIFACTS_TAG: *debian-arm_build
|
|
||||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
|
||||||
|
|
||||||
debian/armhf_test:
|
|
||||||
extends:
|
|
||||||
- .debian/arm_test
|
|
||||||
needs:
|
|
||||||
- kernel+rootfs_armhf
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-armhf_test ${DEBIAN_BASE_TAG}
|
|
||||||
|
|
||||||
debian/arm64_test:
|
|
||||||
extends:
|
|
||||||
- .debian/arm_test
|
|
||||||
needs:
|
|
||||||
- kernel+rootfs_arm64
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_TAG: &debian-arm64_test ${DEBIAN_BASE_TAG}
|
|
||||||
|
|
||||||
.use-debian/arm_test:
|
|
||||||
variables:
|
|
||||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
|
||||||
|
|
||||||
.use-debian/armhf_test:
|
|
||||||
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_TEMPLATES_COMMIT}"
|
|
||||||
extends:
|
|
||||||
- .use-debian/arm_test
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: "debian/armhf_test"
|
|
||||||
MESA_IMAGE_TAG: *debian-armhf_test
|
|
||||||
needs:
|
|
||||||
- debian/arm_test
|
|
||||||
|
|
||||||
.use-debian/arm64_test:
|
|
||||||
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_TEMPLATES_COMMIT}"
|
|
||||||
extends:
|
|
||||||
- .use-debian/arm_test
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: "debian/arm64_test"
|
|
||||||
MESA_IMAGE_TAG: *debian-arm64_test
|
|
||||||
needs:
|
|
||||||
- debian/arm_test
|
|
||||||
|
|
||||||
# Native Windows docker builds
|
|
||||||
#
|
|
||||||
# Unlike the above Linux-based builds - including MinGW builds which
|
|
||||||
# cross-compile for Windows - which use the freedesktop ci-templates, we
|
|
||||||
# cannot use the same scheme here. As Windows lacks support for
|
|
||||||
# Docker-in-Docker, and Podman does not run natively on Windows, we have
|
|
||||||
# to open-code much of the same ourselves.
|
|
||||||
#
|
|
||||||
# This is achieved by first running in a native Windows shell instance
|
|
||||||
# (host PowerShell) in the container stage to build and push the image,
|
|
||||||
# then in the build stage by executing inside Docker.
|
|
||||||
|
|
||||||
.windows-docker-vs2019:
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}"
|
|
||||||
MESA_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MESA_IMAGE_PATH:${MESA_IMAGE_TAG}"
|
|
||||||
|
|
||||||
.windows_container_build:
|
|
||||||
inherit:
|
|
||||||
default: [retry]
|
|
||||||
extends:
|
|
||||||
- .container
|
|
||||||
- .windows-docker-vs2019
|
|
||||||
rules:
|
|
||||||
- if: '$MICROSOFT_FARM == "offline"'
|
|
||||||
when: never
|
|
||||||
- !reference [.container-rules, rules]
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: fetch # we do actually need the full repository though
|
|
||||||
MESA_BASE_IMAGE: None
|
|
||||||
tags:
|
|
||||||
- windows
|
|
||||||
- shell
|
|
||||||
- "2022"
|
|
||||||
- mesa
|
|
||||||
script:
|
|
||||||
- .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $MESA_IMAGE $MESA_UPSTREAM_IMAGE ${DOCKERFILE} ${MESA_BASE_IMAGE}
|
|
||||||
|
|
||||||
windows_vs2019:
|
|
||||||
inherit:
|
|
||||||
default: [retry]
|
|
||||||
extends:
|
|
||||||
- .windows_container_build
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: &windows_vs_image_path ${WINDOWS_X64_VS_PATH}
|
|
||||||
MESA_IMAGE_TAG: &windows_vs_image_tag ${WINDOWS_X64_VS_TAG}
|
|
||||||
DOCKERFILE: Dockerfile_vs
|
|
||||||
MESA_BASE_IMAGE: "mcr.microsoft.com/windows/server:ltsc2022"
|
|
||||||
|
|
||||||
windows_build_vs2019:
|
|
||||||
inherit:
|
|
||||||
default: [retry]
|
|
||||||
extends:
|
|
||||||
- .windows_container_build
|
|
||||||
rules:
|
|
||||||
- if: '$MICROSOFT_FARM == "offline"'
|
|
||||||
when: never
|
|
||||||
- !reference [.build-rules, rules]
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: &windows_build_image_path ${WINDOWS_X64_BUILD_PATH}
|
|
||||||
MESA_IMAGE_TAG: &windows_build_image_tag ${MESA_BASE_IMAGE_TAG}--${WINDOWS_X64_BUILD_TAG}
|
|
||||||
DOCKERFILE: Dockerfile_build
|
|
||||||
MESA_BASE_IMAGE_PATH: *windows_vs_image_path
|
|
||||||
MESA_BASE_IMAGE_TAG: *windows_vs_image_tag
|
|
||||||
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${MESA_BASE_IMAGE_TAG}"
|
|
||||||
timeout: 2h 30m # LLVM takes ages
|
|
||||||
needs:
|
|
||||||
- windows_vs2019
|
|
||||||
|
|
||||||
windows_test_vs2019:
|
|
||||||
inherit:
|
|
||||||
default: [retry]
|
|
||||||
extends:
|
|
||||||
- .windows_container_build
|
|
||||||
rules:
|
|
||||||
- if: '$MICROSOFT_FARM == "offline"'
|
|
||||||
when: never
|
|
||||||
- !reference [.build-rules, rules]
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: &windows_test_image_path ${WINDOWS_X64_TEST_PATH}
|
|
||||||
MESA_IMAGE_TAG: &windows_test_image_tag ${MESA_BASE_IMAGE_TAG}--${WINDOWS_X64_TEST_TAG}
|
|
||||||
DOCKERFILE: Dockerfile_test
|
|
||||||
MESA_BASE_IMAGE_PATH: *windows_vs_image_path
|
|
||||||
MESA_BASE_IMAGE_TAG: *windows_vs_image_tag
|
|
||||||
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${MESA_BASE_IMAGE_TAG}"
|
|
||||||
timeout: 2h 30m
|
|
||||||
needs:
|
|
||||||
- windows_vs2019
|
|
||||||
|
|
||||||
.use-windows_build_vs2019:
|
|
||||||
inherit:
|
|
||||||
default: [retry]
|
|
||||||
extends: .windows-docker-vs2019
|
|
||||||
image: "$MESA_IMAGE"
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: *windows_build_image_path
|
|
||||||
MESA_IMAGE_TAG: *windows_build_image_tag
|
|
||||||
MESA_BASE_IMAGE_TAG: *windows_vs_image_tag
|
|
||||||
needs:
|
|
||||||
- windows_build_vs2019
|
|
||||||
|
|
||||||
.use-windows_test_vs2019:
|
|
||||||
inherit:
|
|
||||||
default: [retry]
|
|
||||||
extends: .windows-docker-vs2019
|
|
||||||
image: "$MESA_IMAGE"
|
|
||||||
variables:
|
|
||||||
MESA_IMAGE_PATH: *windows_test_image_path
|
|
||||||
MESA_IMAGE_TAG: *windows_test_image_tag
|
|
||||||
MESA_BASE_IMAGE_TAG: *windows_vs_image_tag
|
|
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
APITRACE_VERSION="11.1"
|
|
||||||
APITRACE_VERSION_DATE=""
|
|
||||||
|
|
||||||
curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
"https://github.com/apitrace/apitrace/releases/download/${APITRACE_VERSION}/apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"
|
|
||||||
7zr x "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z" \
|
|
||||||
"apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/apitrace.exe" \
|
|
||||||
"apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/d3dretrace.exe"
|
|
||||||
mv "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64" /apitrace-msvc-win64
|
|
||||||
rm "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"
|
|
||||||
|
|
||||||
|
|
@@ -1,40 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
dxvk_install_release() {
|
|
||||||
local DXVK_VERSION=${1:-"1.10.3"}
|
|
||||||
|
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
|
||||||
-O "https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VERSION}/dxvk-${DXVK_VERSION}.tar.gz"
|
|
||||||
tar xzpf dxvk-"${DXVK_VERSION}".tar.gz
|
|
||||||
# https://github.com/doitsujin/dxvk/issues/2921
|
|
||||||
sed -i 's/wine="wine"/wine="wine32"/' "dxvk-${DXVK_VERSION}"/setup_dxvk.sh
|
|
||||||
"dxvk-${DXVK_VERSION}"/setup_dxvk.sh install
|
|
||||||
rm -rf "dxvk-${DXVK_VERSION}"
|
|
||||||
rm dxvk-"${DXVK_VERSION}".tar.gz
|
|
||||||
}
|
|
||||||
|
|
||||||
# Install from a Github PR number
|
|
||||||
dxvk_install_pr() {
|
|
||||||
local __prnum=$1
|
|
||||||
|
|
||||||
# NOTE: Clone all the ensite history of the repo so as not to think
|
|
||||||
# harder about cloning just enough for 'git describe' to work. 'git
|
|
||||||
# describe' is used by the dxvk build system to generate a
|
|
||||||
# dxvk_version Meson variable, which is nice-to-have.
|
|
||||||
git clone https://github.com/doitsujin/dxvk
|
|
||||||
pushd dxvk
|
|
||||||
git fetch origin pull/"$__prnum"/head:pr
|
|
||||||
git checkout pr
|
|
||||||
./package-release.sh pr ../dxvk-build --no-package
|
|
||||||
popd
|
|
||||||
pushd ./dxvk-build/dxvk-pr
|
|
||||||
./setup_dxvk.sh install
|
|
||||||
popd
|
|
||||||
rm -rf ./dxvk-build ./dxvk
|
|
||||||
}
|
|
||||||
|
|
||||||
dxvk_install_release "1.10.1"
|
|
||||||
#dxvk_install_pr 2359
|
|
||||||
|
|
@@ -1,7 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
|
|
||||||
# shellcheck disable=SC2034 # Variables are used in scripts called from here
|
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
@@ -11,8 +8,7 @@ export DEBIAN_FRONTEND=noninteractive
|
|||||||
check_minio()
|
check_minio()
|
||||||
{
|
{
|
||||||
MINIO_PATH="${MINIO_HOST}/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
|
MINIO_PATH="${MINIO_HOST}/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
|
||||||
if curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s -X HEAD \
|
if wget -q --method=HEAD "https://${MINIO_PATH}/done"; then
|
||||||
"https://${MINIO_PATH}/done"; then
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -29,7 +25,6 @@ check_minio "${CI_PROJECT_PATH}"
|
|||||||
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||||
GCC_ARCH="aarch64-linux-gnu"
|
GCC_ARCH="aarch64-linux-gnu"
|
||||||
KERNEL_ARCH="arm64"
|
KERNEL_ARCH="arm64"
|
||||||
SKQP_ARCH="arm64"
|
|
||||||
DEFCONFIG="arch/arm64/configs/defconfig"
|
DEFCONFIG="arch/arm64/configs/defconfig"
|
||||||
DEVICE_TREES="arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb"
|
DEVICE_TREES="arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb"
|
||||||
DEVICE_TREES+=" arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dtb"
|
DEVICE_TREES+=" arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dtb"
|
||||||
@@ -39,32 +34,24 @@ if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
|||||||
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/apq8096-db820c.dtb"
|
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/apq8096-db820c.dtb"
|
||||||
DEVICE_TREES+=" arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dtb"
|
DEVICE_TREES+=" arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dtb"
|
||||||
DEVICE_TREES+=" arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb"
|
DEVICE_TREES+=" arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb"
|
||||||
DEVICE_TREES+=" arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dtb"
|
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots.dtb"
|
||||||
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dtb"
|
|
||||||
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown-r1.dtb"
|
|
||||||
DEVICE_TREES+=" arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dtb"
|
|
||||||
DEVICE_TREES+=" arch/arm64/boot/dts/mediatek/mt8192-asurada-spherion-r0.dtb"
|
|
||||||
KERNEL_IMAGE_NAME="Image"
|
KERNEL_IMAGE_NAME="Image"
|
||||||
|
|
||||||
elif [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
elif [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||||
GCC_ARCH="arm-linux-gnueabihf"
|
GCC_ARCH="arm-linux-gnueabihf"
|
||||||
KERNEL_ARCH="arm"
|
KERNEL_ARCH="arm"
|
||||||
SKQP_ARCH="arm"
|
|
||||||
DEFCONFIG="arch/arm/configs/multi_v7_defconfig"
|
DEFCONFIG="arch/arm/configs/multi_v7_defconfig"
|
||||||
DEVICE_TREES="arch/arm/boot/dts/rk3288-veyron-jaq.dtb"
|
DEVICE_TREES="arch/arm/boot/dts/rk3288-veyron-jaq.dtb"
|
||||||
DEVICE_TREES+=" arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dtb"
|
DEVICE_TREES+=" arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dtb"
|
||||||
DEVICE_TREES+=" arch/arm/boot/dts/imx6q-cubox-i.dtb"
|
DEVICE_TREES+=" arch/arm/boot/dts/imx6q-cubox-i.dtb"
|
||||||
DEVICE_TREES+=" arch/arm/boot/dts/tegra124-jetson-tk1.dtb"
|
|
||||||
KERNEL_IMAGE_NAME="zImage"
|
KERNEL_IMAGE_NAME="zImage"
|
||||||
. .gitlab-ci/container/create-cross-file.sh armhf
|
. .gitlab-ci/container/create-cross-file.sh armhf
|
||||||
else
|
else
|
||||||
GCC_ARCH="x86_64-linux-gnu"
|
GCC_ARCH="x86_64-linux-gnu"
|
||||||
KERNEL_ARCH="x86_64"
|
KERNEL_ARCH="x86_64"
|
||||||
SKQP_ARCH="x64"
|
|
||||||
DEFCONFIG="arch/x86/configs/x86_64_defconfig"
|
DEFCONFIG="arch/x86/configs/x86_64_defconfig"
|
||||||
DEVICE_TREES=""
|
DEVICE_TREES=""
|
||||||
KERNEL_IMAGE_NAME="bzImage"
|
KERNEL_IMAGE_NAME="bzImage"
|
||||||
ARCH_PACKAGES="libasound2-dev libcap-dev libfdt-dev libva-dev wayland-protocols p7zip"
|
ARCH_PACKAGES="libva-dev"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine if we're in a cross build.
|
# Determine if we're in a cross build.
|
||||||
@@ -86,19 +73,15 @@ fi
|
|||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y --no-remove \
|
apt-get install -y --no-remove \
|
||||||
-o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' \
|
|
||||||
${ARCH_PACKAGES} \
|
${ARCH_PACKAGES} \
|
||||||
automake \
|
automake \
|
||||||
bc \
|
bc \
|
||||||
clang \
|
|
||||||
cmake \
|
cmake \
|
||||||
curl \
|
|
||||||
debootstrap \
|
debootstrap \
|
||||||
git \
|
git \
|
||||||
glslang-tools \
|
glslang-tools \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
libegl1-mesa-dev \
|
libegl1-mesa-dev \
|
||||||
libxext-dev \
|
|
||||||
libfontconfig-dev \
|
libfontconfig-dev \
|
||||||
libgbm-dev \
|
libgbm-dev \
|
||||||
libgl-dev \
|
libgl-dev \
|
||||||
@@ -114,17 +97,15 @@ apt-get install -y --no-remove \
|
|||||||
libx11-xcb-dev \
|
libx11-xcb-dev \
|
||||||
libxcb-dri2-0-dev \
|
libxcb-dri2-0-dev \
|
||||||
libxkbcommon-dev \
|
libxkbcommon-dev \
|
||||||
libwayland-dev \
|
|
||||||
ninja-build \
|
ninja-build \
|
||||||
patch \
|
patch \
|
||||||
protobuf-compiler \
|
|
||||||
python-is-python3 \
|
python-is-python3 \
|
||||||
python3-distutils \
|
python3-distutils \
|
||||||
python3-mako \
|
python3-mako \
|
||||||
python3-numpy \
|
python3-numpy \
|
||||||
python3-serial \
|
python3-serial \
|
||||||
unzip \
|
unzip \
|
||||||
zstd
|
wget
|
||||||
|
|
||||||
|
|
||||||
if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||||
@@ -142,24 +123,10 @@ if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
|||||||
libxkbcommon-dev:armhf
|
libxkbcommon-dev:armhf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "/lava-files/rootfs-${DEBIAN_ARCH}"
|
|
||||||
|
|
||||||
############### Setuping
|
|
||||||
if [ "$DEBIAN_ARCH" = "amd64" ]; then
|
|
||||||
. .gitlab-ci/container/setup-wine.sh "/dxvk-wine64"
|
|
||||||
. .gitlab-ci/container/install-wine-dxvk.sh
|
|
||||||
mv /dxvk-wine64 "/lava-files/rootfs-${DEBIAN_ARCH}/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
############### Installing
|
|
||||||
. .gitlab-ci/container/install-wine-apitrace.sh
|
|
||||||
mkdir -p "/lava-files/rootfs-${DEBIAN_ARCH}/apitrace-msvc-win64"
|
|
||||||
mv /apitrace-msvc-win64/bin "/lava-files/rootfs-${DEBIAN_ARCH}/apitrace-msvc-win64"
|
|
||||||
rm -rf /apitrace-msvc-win64
|
|
||||||
|
|
||||||
############### Building
|
############### Building
|
||||||
STRIP_CMD="${GCC_ARCH}-strip"
|
STRIP_CMD="${GCC_ARCH}-strip"
|
||||||
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/lib/$GCC_ARCH
|
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}
|
||||||
|
|
||||||
|
|
||||||
############### Build apitrace
|
############### Build apitrace
|
||||||
@@ -182,14 +149,14 @@ mv /deqp /lava-files/rootfs-${DEBIAN_ARCH}/.
|
|||||||
|
|
||||||
|
|
||||||
############### Build SKQP
|
############### Build SKQP
|
||||||
if [[ "$DEBIAN_ARCH" = "arm64" ]] \
|
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||||
|| [[ "$DEBIAN_ARCH" = "amd64" ]]; then
|
SKQP_ARCH="arm64" . .gitlab-ci/container/build-skqp.sh
|
||||||
. .gitlab-ci/container/build-skqp.sh
|
|
||||||
mv /skqp /lava-files/rootfs-${DEBIAN_ARCH}/.
|
mv /skqp /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
############### Build piglit
|
############### Build piglit
|
||||||
PIGLIT_OPTS="-DPIGLIT_BUILD_DMA_BUF_TESTS=ON -DPIGLIT_BUILD_GLX_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
|
PIGLIT_OPTS="-DPIGLIT_BUILD_DMA_BUF_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
|
||||||
mv /piglit /lava-files/rootfs-${DEBIAN_ARCH}/.
|
mv /piglit /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||||
|
|
||||||
############### Build libva tests
|
############### Build libva tests
|
||||||
@@ -198,28 +165,10 @@ if [[ "$DEBIAN_ARCH" = "amd64" ]]; then
|
|||||||
mv /va/bin/* /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/
|
mv /va/bin/* /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
############### Build Crosvm
|
|
||||||
if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
|
|
||||||
. .gitlab-ci/container/build-crosvm.sh
|
|
||||||
mv /usr/local/bin/crosvm /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/
|
|
||||||
mv /usr/local/lib/$GCC_ARCH/libvirglrenderer.* /lava-files/rootfs-${DEBIAN_ARCH}/usr/lib/$GCC_ARCH/
|
|
||||||
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/local/libexec/
|
|
||||||
mv /usr/local/libexec/virgl* /lava-files/rootfs-${DEBIAN_ARCH}/usr/local/libexec/
|
|
||||||
fi
|
|
||||||
|
|
||||||
############### Build libdrm
|
############### Build libdrm
|
||||||
EXTRA_MESON_ARGS+=" -D prefix=/libdrm"
|
EXTRA_MESON_ARGS+=" -D prefix=/libdrm"
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
||||||
|
|
||||||
############### Build local stuff for use by igt and kernel testing, which
|
|
||||||
############### will reuse most of our container build process from a specific
|
|
||||||
############### hash of the Mesa tree.
|
|
||||||
if [[ -e ".gitlab-ci/local/build-rootfs.sh" ]]; then
|
|
||||||
. .gitlab-ci/local/build-rootfs.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
############### Build kernel
|
############### Build kernel
|
||||||
. .gitlab-ci/container/build-kernel.sh
|
. .gitlab-ci/container/build-kernel.sh
|
||||||
|
|
||||||
@@ -242,20 +191,16 @@ fi
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
cp .gitlab-ci/container/create-rootfs.sh /lava-files/rootfs-${DEBIAN_ARCH}/.
|
cp .gitlab-ci/container/create-rootfs.sh /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||||
cp .gitlab-ci/container/debian/llvm-snapshot.gpg.key /lava-files/rootfs-${DEBIAN_ARCH}/.
|
|
||||||
cp .gitlab-ci/container/debian/winehq.gpg.key /lava-files/rootfs-${DEBIAN_ARCH}/.
|
|
||||||
chroot /lava-files/rootfs-${DEBIAN_ARCH} sh /create-rootfs.sh
|
chroot /lava-files/rootfs-${DEBIAN_ARCH} sh /create-rootfs.sh
|
||||||
rm /lava-files/rootfs-${DEBIAN_ARCH}/{llvm-snapshot,winehq}.gpg.key
|
|
||||||
rm /lava-files/rootfs-${DEBIAN_ARCH}/create-rootfs.sh
|
rm /lava-files/rootfs-${DEBIAN_ARCH}/create-rootfs.sh
|
||||||
cp /etc/wgetrc /lava-files/rootfs-${DEBIAN_ARCH}/etc/.
|
|
||||||
|
|
||||||
|
|
||||||
############### Install the built libdrm
|
############### Install the built libdrm
|
||||||
# Dependencies pulled during the creation of the rootfs may overwrite
|
# Dependencies pulled during the creation of the rootfs may overwrite
|
||||||
# the built libdrm. Hence, we add it after the rootfs has been already
|
# the built libdrm. Hence, we add it after the rootfs has been already
|
||||||
# created.
|
# created.
|
||||||
find /libdrm/ -name lib\*\.so\* \
|
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/lib/$GCC_ARCH
|
||||||
-exec cp -t /lava-files/rootfs-${DEBIAN_ARCH}/usr/lib/$GCC_ARCH/. {} \;
|
find /libdrm/ -name lib\*\.so\* | xargs cp -t /lava-files/rootfs-${DEBIAN_ARCH}/usr/lib/$GCC_ARCH/.
|
||||||
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/libdrm/
|
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/libdrm/
|
||||||
cp -Rp /libdrm/share /lava-files/rootfs-${DEBIAN_ARCH}/libdrm/share
|
cp -Rp /libdrm/share /lava-files/rootfs-${DEBIAN_ARCH}/libdrm/share
|
||||||
rm -rf /libdrm
|
rm -rf /libdrm
|
||||||
@@ -269,13 +214,14 @@ fi
|
|||||||
|
|
||||||
du -ah /lava-files/rootfs-${DEBIAN_ARCH} | sort -h | tail -100
|
du -ah /lava-files/rootfs-${DEBIAN_ARCH} | sort -h | tail -100
|
||||||
pushd /lava-files/rootfs-${DEBIAN_ARCH}
|
pushd /lava-files/rootfs-${DEBIAN_ARCH}
|
||||||
tar --zstd -cf /lava-files/lava-rootfs.tar.zst .
|
tar czf /lava-files/lava-rootfs.tgz .
|
||||||
popd
|
popd
|
||||||
|
|
||||||
. .gitlab-ci/container/container_post_build.sh
|
. .gitlab-ci/container/container_post_build.sh
|
||||||
|
|
||||||
############### Upload the files!
|
############### Upload the files!
|
||||||
FILES_TO_UPLOAD="lava-rootfs.tar.zst \
|
ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}"
|
||||||
|
FILES_TO_UPLOAD="lava-rootfs.tgz \
|
||||||
$KERNEL_IMAGE_NAME"
|
$KERNEL_IMAGE_NAME"
|
||||||
|
|
||||||
if [[ -n $DEVICE_TREES ]]; then
|
if [[ -n $DEVICE_TREES ]]; then
|
||||||
@@ -283,9 +229,9 @@ if [[ -n $DEVICE_TREES ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for f in $FILES_TO_UPLOAD; do
|
for f in $FILES_TO_UPLOAD; do
|
||||||
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/$f \
|
ci-fairy minio cp /lava-files/$f \
|
||||||
https://${MINIO_PATH}/$f
|
minio://${MINIO_PATH}/$f
|
||||||
done
|
done
|
||||||
|
|
||||||
touch /lava-files/done
|
touch /lava-files/done
|
||||||
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/done https://${MINIO_PATH}/done
|
ci-fairy minio cp /lava-files/done minio://${MINIO_PATH}/done
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
diff --git a/BUILD.gn b/BUILD.gn
|
|
||||||
index d2b1407..7b60c90 100644
|
|
||||||
--- a/BUILD.gn
|
|
||||||
+++ b/BUILD.gn
|
|
||||||
@@ -144,7 +144,7 @@ config("skia_public") {
|
|
||||||
|
|
||||||
# Skia internal APIs, used by Skia itself and a few test tools.
|
|
||||||
config("skia_private") {
|
|
||||||
- visibility = [ ":*" ]
|
|
||||||
+ visibility = [ "*" ]
|
|
||||||
|
|
||||||
include_dirs = [
|
|
||||||
"include/private",
|
|
@@ -1,68 +0,0 @@
|
|||||||
diff --git a/bin/fetch-gn b/bin/fetch-gn
|
|
||||||
index d5e94a2..59c4591 100755
|
|
||||||
--- a/bin/fetch-gn
|
|
||||||
+++ b/bin/fetch-gn
|
|
||||||
@@ -5,39 +5,44 @@
|
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
|
||||||
# found in the LICENSE file.
|
|
||||||
|
|
||||||
-import hashlib
|
|
||||||
import os
|
|
||||||
+import platform
|
|
||||||
import shutil
|
|
||||||
import stat
|
|
||||||
import sys
|
|
||||||
-import urllib2
|
|
||||||
+import tempfile
|
|
||||||
+import zipfile
|
|
||||||
+
|
|
||||||
+if sys.version_info[0] < 3:
|
|
||||||
+ from urllib2 import urlopen
|
|
||||||
+else:
|
|
||||||
+ from urllib.request import urlopen
|
|
||||||
|
|
||||||
os.chdir(os.path.join(os.path.dirname(__file__), os.pardir))
|
|
||||||
|
|
||||||
-dst = 'bin/gn.exe' if 'win32' in sys.platform else 'bin/gn'
|
|
||||||
+gnzip = os.path.join(tempfile.mkdtemp(), 'gn.zip')
|
|
||||||
+with open(gnzip, 'wb') as f:
|
|
||||||
+ OS = {'darwin': 'mac', 'linux': 'linux', 'linux2': 'linux', 'win32': 'windows'}[sys.platform]
|
|
||||||
+ cpu = {'amd64': 'amd64', 'arm64': 'arm64', 'x86_64': 'amd64', 'aarch64': 'arm64'}[platform.machine().lower()]
|
|
||||||
|
|
||||||
-sha1 = '2f27ff0b6118e5886df976da5effa6003d19d1ce' if 'linux' in sys.platform else \
|
|
||||||
- '9be792dd9010ce303a9c3a497a67bcc5ac8c7666' if 'darwin' in sys.platform else \
|
|
||||||
- 'eb69be2d984b4df60a8c21f598135991f0ad1742' # Windows
|
|
||||||
+ rev = 'd62642c920e6a0d1756316d225a90fd6faa9e21e'
|
|
||||||
+ url = 'https://chrome-infra-packages.appspot.com/dl/gn/gn/{}-{}/+/git_revision:{}'.format(
|
|
||||||
+ OS,cpu,rev)
|
|
||||||
+ f.write(urlopen(url).read())
|
|
||||||
|
|
||||||
-def sha1_of_file(path):
|
|
||||||
- h = hashlib.sha1()
|
|
||||||
- if os.path.isfile(path):
|
|
||||||
- with open(path, 'rb') as f:
|
|
||||||
- h.update(f.read())
|
|
||||||
- return h.hexdigest()
|
|
||||||
+gn = 'gn.exe' if 'win32' in sys.platform else 'gn'
|
|
||||||
+with zipfile.ZipFile(gnzip, 'r') as f:
|
|
||||||
+ f.extract(gn, 'bin')
|
|
||||||
|
|
||||||
-if sha1_of_file(dst) != sha1:
|
|
||||||
- with open(dst, 'wb') as f:
|
|
||||||
- f.write(urllib2.urlopen('https://chromium-gn.storage-download.googleapis.com/' + sha1).read())
|
|
||||||
+gn = os.path.join('bin', gn)
|
|
||||||
|
|
||||||
- os.chmod(dst, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
|
|
||||||
- stat.S_IRGRP | stat.S_IXGRP |
|
|
||||||
- stat.S_IROTH | stat.S_IXOTH )
|
|
||||||
+os.chmod(gn, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
|
|
||||||
+ stat.S_IRGRP | stat.S_IXGRP |
|
|
||||||
+ stat.S_IROTH | stat.S_IXOTH )
|
|
||||||
|
|
||||||
# We'll also copy to a path that depot_tools' GN wrapper will expect to find the binary.
|
|
||||||
copy_path = 'buildtools/linux64/gn' if 'linux' in sys.platform else \
|
|
||||||
'buildtools/mac/gn' if 'darwin' in sys.platform else \
|
|
||||||
'buildtools/win/gn.exe'
|
|
||||||
if os.path.isdir(os.path.dirname(copy_path)):
|
|
||||||
- shutil.copy(dst, copy_path)
|
|
||||||
+ shutil.copy(gn, copy_path)
|
|
@@ -1,142 +0,0 @@
|
|||||||
Patch based from diff with skia repository from commit
|
|
||||||
013397884c73959dc07cb0a26ee742b1cdfbda8a
|
|
||||||
|
|
||||||
Adds support for Python3, but removes the constraint of only SHA based refs in
|
|
||||||
DEPS
|
|
||||||
diff --git a/tools/git-sync-deps b/tools/git-sync-deps
|
|
||||||
index c7379c0b5c..f63d4d9ccf 100755
|
|
||||||
--- a/tools/git-sync-deps
|
|
||||||
+++ b/tools/git-sync-deps
|
|
||||||
@@ -43,7 +43,7 @@ def git_executable():
|
|
||||||
A string suitable for passing to subprocess functions, or None.
|
|
||||||
"""
|
|
||||||
envgit = os.environ.get('GIT_EXECUTABLE')
|
|
||||||
- searchlist = ['git']
|
|
||||||
+ searchlist = ['git', 'git.bat']
|
|
||||||
if envgit:
|
|
||||||
searchlist.insert(0, envgit)
|
|
||||||
with open(os.devnull, 'w') as devnull:
|
|
||||||
@@ -94,21 +94,25 @@ def is_git_toplevel(git, directory):
|
|
||||||
try:
|
|
||||||
toplevel = subprocess.check_output(
|
|
||||||
[git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
|
|
||||||
- return os.path.realpath(directory) == os.path.realpath(toplevel)
|
|
||||||
+ return os.path.realpath(directory) == os.path.realpath(toplevel.decode())
|
|
||||||
except subprocess.CalledProcessError:
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
-def status(directory, checkoutable):
|
|
||||||
- def truncate(s, length):
|
|
||||||
+def status(directory, commithash, change):
|
|
||||||
+ def truncate_beginning(s, length):
|
|
||||||
+ return s if len(s) <= length else '...' + s[-(length-3):]
|
|
||||||
+ def truncate_end(s, length):
|
|
||||||
return s if len(s) <= length else s[:(length - 3)] + '...'
|
|
||||||
+
|
|
||||||
dlen = 36
|
|
||||||
- directory = truncate(directory, dlen)
|
|
||||||
- checkoutable = truncate(checkoutable, 40)
|
|
||||||
- sys.stdout.write('%-*s @ %s\n' % (dlen, directory, checkoutable))
|
|
||||||
+ directory = truncate_beginning(directory, dlen)
|
|
||||||
+ commithash = truncate_end(commithash, 40)
|
|
||||||
+ symbol = '>' if change else '@'
|
|
||||||
+ sys.stdout.write('%-*s %s %s\n' % (dlen, directory, symbol, commithash))
|
|
||||||
|
|
||||||
|
|
||||||
-def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
||||||
+def git_checkout_to_directory(git, repo, commithash, directory, verbose):
|
|
||||||
"""Checkout (and clone if needed) a Git repository.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
@@ -117,8 +121,7 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
||||||
repo (string) the location of the repository, suitable
|
|
||||||
for passing to `git clone`.
|
|
||||||
|
|
||||||
- checkoutable (string) a tag, branch, or commit, suitable for
|
|
||||||
- passing to `git checkout`
|
|
||||||
+ commithash (string) a commit, suitable for passing to `git checkout`
|
|
||||||
|
|
||||||
directory (string) the path into which the repository
|
|
||||||
should be checked out.
|
|
||||||
@@ -129,7 +132,12 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
||||||
"""
|
|
||||||
if not os.path.isdir(directory):
|
|
||||||
subprocess.check_call(
|
|
||||||
- [git, 'clone', '--quiet', repo, directory])
|
|
||||||
+ [git, 'clone', '--quiet', '--no-checkout', repo, directory])
|
|
||||||
+ subprocess.check_call([git, 'checkout', '--quiet', commithash],
|
|
||||||
+ cwd=directory)
|
|
||||||
+ if verbose:
|
|
||||||
+ status(directory, commithash, True)
|
|
||||||
+ return
|
|
||||||
|
|
||||||
if not is_git_toplevel(git, directory):
|
|
||||||
# if the directory exists, but isn't a git repo, you will modify
|
|
||||||
@@ -145,11 +153,11 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
||||||
with open(os.devnull, 'w') as devnull:
|
|
||||||
# If this fails, we will fetch before trying again. Don't spam user
|
|
||||||
# with error infomation.
|
|
||||||
- if 0 == subprocess.call([git, 'checkout', '--quiet', checkoutable],
|
|
||||||
+ if 0 == subprocess.call([git, 'checkout', '--quiet', commithash],
|
|
||||||
cwd=directory, stderr=devnull):
|
|
||||||
# if this succeeds, skip slow `git fetch`.
|
|
||||||
if verbose:
|
|
||||||
- status(directory, checkoutable) # Success.
|
|
||||||
+ status(directory, commithash, False) # Success.
|
|
||||||
return
|
|
||||||
|
|
||||||
# If the repo has changed, always force use of the correct repo.
|
|
||||||
@@ -159,18 +167,24 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
||||||
|
|
||||||
subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
|
|
||||||
|
|
||||||
- subprocess.check_call([git, 'checkout', '--quiet', checkoutable], cwd=directory)
|
|
||||||
+ subprocess.check_call([git, 'checkout', '--quiet', commithash], cwd=directory)
|
|
||||||
|
|
||||||
if verbose:
|
|
||||||
- status(directory, checkoutable) # Success.
|
|
||||||
+ status(directory, commithash, True) # Success.
|
|
||||||
|
|
||||||
|
|
||||||
def parse_file_to_dict(path):
|
|
||||||
dictionary = {}
|
|
||||||
- execfile(path, dictionary)
|
|
||||||
+ with open(path) as f:
|
|
||||||
+ exec('def Var(x): return vars[x]\n' + f.read(), dictionary)
|
|
||||||
return dictionary
|
|
||||||
|
|
||||||
|
|
||||||
+def is_sha1_sum(s):
|
|
||||||
+ """SHA1 sums are 160 bits, encoded as lowercase hexadecimal."""
|
|
||||||
+ return len(s) == 40 and all(c in '0123456789abcdef' for c in s)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
def git_sync_deps(deps_file_path, command_line_os_requests, verbose):
|
|
||||||
"""Grab dependencies, with optional platform support.
|
|
||||||
|
|
||||||
@@ -204,19 +218,19 @@ def git_sync_deps(deps_file_path, command_line_os_requests, verbose):
|
|
||||||
raise Exception('%r is parent of %r' % (other_dir, directory))
|
|
||||||
list_of_arg_lists = []
|
|
||||||
for directory in sorted(dependencies):
|
|
||||||
- if not isinstance(dependencies[directory], basestring):
|
|
||||||
+ if not isinstance(dependencies[directory], str):
|
|
||||||
if verbose:
|
|
||||||
- print 'Skipping "%s".' % directory
|
|
||||||
+ sys.stdout.write( 'Skipping "%s".\n' % directory)
|
|
||||||
continue
|
|
||||||
if '@' in dependencies[directory]:
|
|
||||||
- repo, checkoutable = dependencies[directory].split('@', 1)
|
|
||||||
+ repo, commithash = dependencies[directory].split('@', 1)
|
|
||||||
else:
|
|
||||||
- raise Exception("please specify commit or tag")
|
|
||||||
+ raise Exception("please specify commit")
|
|
||||||
|
|
||||||
relative_directory = os.path.join(deps_file_directory, directory)
|
|
||||||
|
|
||||||
list_of_arg_lists.append(
|
|
||||||
- (git, repo, checkoutable, relative_directory, verbose))
|
|
||||||
+ (git, repo, commithash, relative_directory, verbose))
|
|
||||||
|
|
||||||
multithread(git_checkout_to_directory, list_of_arg_lists)
|
|
||||||
|
|
@@ -1,41 +0,0 @@
|
|||||||
diff --git a/tools/skqp/src/skqp.cpp b/tools/skqp/src/skqp.cpp
|
|
||||||
index 50ed9db01d..938217000d 100644
|
|
||||||
--- a/tools/skqp/src/skqp.cpp
|
|
||||||
+++ b/tools/skqp/src/skqp.cpp
|
|
||||||
@@ -448,7 +448,7 @@ inline void write(SkWStream* wStream, const T& text) {
|
|
||||||
|
|
||||||
void SkQP::makeReport() {
|
|
||||||
SkASSERT_RELEASE(fAssetManager);
|
|
||||||
- int glesErrorCount = 0, vkErrorCount = 0, gles = 0, vk = 0;
|
|
||||||
+ int glErrorCount = 0, glesErrorCount = 0, vkErrorCount = 0, gl = 0, gles = 0, vk = 0;
|
|
||||||
|
|
||||||
if (!sk_isdir(fReportDirectory.c_str())) {
|
|
||||||
SkDebugf("Report destination does not exist: '%s'\n", fReportDirectory.c_str());
|
|
||||||
@@ -460,6 +460,7 @@ void SkQP::makeReport() {
|
|
||||||
htmOut.writeText(kDocHead);
|
|
||||||
for (const SkQP::RenderResult& run : fRenderResults) {
|
|
||||||
switch (run.fBackend) {
|
|
||||||
+ case SkQP::SkiaBackend::kGL: ++gl; break;
|
|
||||||
case SkQP::SkiaBackend::kGLES: ++gles; break;
|
|
||||||
case SkQP::SkiaBackend::kVulkan: ++vk; break;
|
|
||||||
default: break;
|
|
||||||
@@ -477,15 +478,17 @@ void SkQP::makeReport() {
|
|
||||||
}
|
|
||||||
write(&htmOut, SkStringPrintf(" f(%s);\n", str.c_str()));
|
|
||||||
switch (run.fBackend) {
|
|
||||||
+ case SkQP::SkiaBackend::kGL: ++glErrorCount; break;
|
|
||||||
case SkQP::SkiaBackend::kGLES: ++glesErrorCount; break;
|
|
||||||
case SkQP::SkiaBackend::kVulkan: ++vkErrorCount; break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
htmOut.writeText(kDocMiddle);
|
|
||||||
- write(&htmOut, SkStringPrintf("<p>gles errors: %d (of %d)</br>\n"
|
|
||||||
+ write(&htmOut, SkStringPrintf("<p>gl errors: %d (of %d)</br>\n"
|
|
||||||
+ "gles errors: %d (of %d)</br>\n"
|
|
||||||
"vk errors: %d (of %d)</p>\n",
|
|
||||||
- glesErrorCount, gles, vkErrorCount, vk));
|
|
||||||
+ glErrorCount, gl, glesErrorCount, gles, vkErrorCount, vk));
|
|
||||||
htmOut.writeText(kDocTail);
|
|
||||||
SkFILEWStream unitOut(SkOSPath::Join(fReportDirectory.c_str(), kUnitTestReportPath).c_str());
|
|
||||||
SkASSERT_RELEASE(unitOut.isValid());
|
|
@@ -1,13 +0,0 @@
|
|||||||
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
|
|
||||||
index 454334a..1797594 100644
|
|
||||||
--- a/gn/BUILDCONFIG.gn
|
|
||||||
+++ b/gn/BUILDCONFIG.gn
|
|
||||||
@@ -80,7 +80,7 @@ if (current_cpu == "") {
|
|
||||||
is_clang = is_android || is_ios || is_mac ||
|
|
||||||
(cc == "clang" && cxx == "clang++") || clang_win != ""
|
|
||||||
if (!is_clang && !is_win) {
|
|
||||||
- is_clang = exec_script("gn/is_clang.py",
|
|
||||||
+ is_clang = exec_script("//gn/is_clang.py",
|
|
||||||
[
|
|
||||||
cc,
|
|
||||||
cxx,
|
|
@@ -1,18 +0,0 @@
|
|||||||
Nima-Cpp is not available anymore inside googlesource, revert to github one
|
|
||||||
Simulates `git revert 49233d2521054037ded7d760427c4a0dc1e11356`
|
|
||||||
|
|
||||||
diff --git a/DEPS b/DEPS
|
|
||||||
index 7e0b941..c88b064 100644
|
|
||||||
--- a/DEPS
|
|
||||||
+++ b/DEPS
|
|
||||||
@@ -33,8 +33,8 @@ deps = {
|
|
||||||
#"third_party/externals/v8" : "https://chromium.googlesource.com/v8/v8.git@5f1ae66d5634e43563b2d25ea652dfb94c31a3b4",
|
|
||||||
"third_party/externals/wuffs" : "https://skia.googlesource.com/external/github.com/google/wuffs.git@fda3c4c9863d9f9fcec58ae66508c4621fc71ea5",
|
|
||||||
"third_party/externals/zlib" : "https://chromium.googlesource.com/chromium/src/third_party/zlib@47af7c547f8551bd25424e56354a2ae1e9062859",
|
|
||||||
- "third_party/externals/Nima-Cpp" : "https://skia.googlesource.com/external/github.com/2d-inc/Nima-Cpp.git@4bd02269d7d1d2e650950411325eafa15defb084",
|
|
||||||
- "third_party/externals/Nima-Math-Cpp" : "https://skia.googlesource.com/external/github.com/2d-inc/Nima-Math-Cpp.git@e0c12772093fa8860f55358274515b86885f0108",
|
|
||||||
+ "third_party/externals/Nima-Cpp" : "https://github.com/2d-inc/Nima-Cpp.git@4bd02269d7d1d2e650950411325eafa15defb084",
|
|
||||||
+ "third_party/externals/Nima-Math-Cpp" : "https://github.com/2d-inc/Nima-Math-Cpp.git@e0c12772093fa8860f55358274515b86885f0108",
|
|
||||||
|
|
||||||
"../src": {
|
|
||||||
"url": "https://chromium.googlesource.com/chromium/src.git@ccf3465732e5d5363f0e44a8fac54550f62dd1d0",
|
|
@@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
export WINEPREFIX="$1"
|
|
||||||
export WINEDEBUG="-all"
|
|
||||||
|
|
||||||
# We don't want crash dialogs
|
|
||||||
cat >crashdialog.reg <<EOF
|
|
||||||
Windows Registry Editor Version 5.00
|
|
||||||
|
|
||||||
[HKEY_CURRENT_USER\Software\Wine\WineDbg]
|
|
||||||
"ShowCrashDialog"=dword:00000000
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Set the wine prefix and disable the crash dialog
|
|
||||||
wine64 regedit crashdialog.reg
|
|
||||||
rm crashdialog.reg
|
|
||||||
|
|
||||||
# An immediate wine command may fail with: "${WINEPREFIX}: Not a
|
|
||||||
# valid wine prefix." and that is just spit because of checking
|
|
||||||
# the existance of the system.reg file, which fails. Just giving
|
|
||||||
# it a bit more of time for it to be created solves the problem
|
|
||||||
# ...
|
|
||||||
while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done
|
|
@@ -1,12 +1,6 @@
|
|||||||
CONFIG_LOCALVERSION_AUTO=y
|
CONFIG_LOCALVERSION_AUTO=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
|
|
||||||
CONFIG_CRYPTO_ZSTD=y
|
|
||||||
CONFIG_ZRAM_MEMORY_TRACKING=y
|
|
||||||
CONFIG_ZRAM_WRITEBACK=y
|
|
||||||
CONFIG_ZRAM=y
|
|
||||||
CONFIG_ZSMALLOC_STAT=y
|
|
||||||
|
|
||||||
CONFIG_PWM=y
|
CONFIG_PWM=y
|
||||||
CONFIG_PM_DEVFREQ=y
|
CONFIG_PM_DEVFREQ=y
|
||||||
CONFIG_OF=y
|
CONFIG_OF=y
|
||||||
@@ -78,11 +72,9 @@ CONFIG_PARPORT_PC=y
|
|||||||
CONFIG_PARPORT_SERIAL=y
|
CONFIG_PARPORT_SERIAL=y
|
||||||
CONFIG_SERIAL_8250_DW=y
|
CONFIG_SERIAL_8250_DW=y
|
||||||
CONFIG_CHROME_PLATFORMS=y
|
CONFIG_CHROME_PLATFORMS=y
|
||||||
CONFIG_KVM_AMD=m
|
|
||||||
|
|
||||||
#options for Intel devices
|
#options for Intel devices
|
||||||
CONFIG_MFD_INTEL_LPSS_PCI=y
|
CONFIG_MFD_INTEL_LPSS_PCI=y
|
||||||
CONFIG_KVM_INTEL=m
|
|
||||||
|
|
||||||
#options for KVM guests
|
#options for KVM guests
|
||||||
CONFIG_FUSE_FS=y
|
CONFIG_FUSE_FS=y
|
||||||
@@ -106,6 +98,3 @@ CONFIG_CRYPTO_DEV_VIRTIO=y
|
|||||||
CONFIG_HW_RANDOM_VIRTIO=y
|
CONFIG_HW_RANDOM_VIRTIO=y
|
||||||
CONFIG_BLK_MQ_VIRTIO=y
|
CONFIG_BLK_MQ_VIRTIO=y
|
||||||
CONFIG_TUN=y
|
CONFIG_TUN=y
|
||||||
CONFIG_VSOCKETS=y
|
|
||||||
CONFIG_VIRTIO_VSOCKETS=y
|
|
||||||
CONFIG_VHOST_VSOCK=m
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user