Compare commits
102 Commits
23.1
...
mesa-22.1.
Author | SHA1 | Date | |
---|---|---|---|
|
53fe3ea095 | ||
|
276d23b4bc | ||
|
8cd82ee256 | ||
|
939a0cf876 | ||
|
c074592f3d | ||
|
63d75ac797 | ||
|
5e3b01c515 | ||
|
c7830bf873 | ||
|
e34284b7dc | ||
|
bad73e0959 | ||
|
888b4de9d4 | ||
|
5a1b1a0729 | ||
|
88b07e972b | ||
|
38fd735a72 | ||
|
3ae788a937 | ||
|
68998c0c9a | ||
|
8a53885999 | ||
|
c7fe963150 | ||
|
f6c77aa558 | ||
|
fe83982fa6 | ||
|
8939224350 | ||
|
3dd54edd12 | ||
|
7358faab52 | ||
|
100360a307 | ||
|
5634be6cb8 | ||
|
1e1b7661e2 | ||
|
f11afdbf9c | ||
|
ed6d83f01b | ||
|
12eb1548bd | ||
|
4a434c77fc | ||
|
c203721116 | ||
|
add1e87c4e | ||
|
2379bc19a8 | ||
|
99ce005b93 | ||
|
d71e9fcb15 | ||
|
5d8a4ce3c4 | ||
|
e07d4a02fe | ||
|
ff7e8aec04 | ||
|
001a5c73cc | ||
|
a1c167da48 | ||
|
acc3752a10 | ||
|
1fddd2dbeb | ||
|
e8ba43c8f8 | ||
|
f53d45cbb5 | ||
|
cfc3827890 | ||
|
ae85860679 | ||
|
0776767b15 | ||
|
5286bd22d8 | ||
|
de0c61c03b | ||
|
cbee0572ed | ||
|
c5f6ff9d3e | ||
|
a9a6fb2cf2 | ||
|
2324083fe9 | ||
|
08e22fff13 | ||
|
af570d37a7 | ||
|
a427a88f40 | ||
|
f8dc7e0d37 | ||
|
55d9bd1b64 | ||
|
692d9bce64 | ||
|
503440f0dc | ||
|
2af5c609be | ||
|
f335548405 | ||
|
9d020c5b52 | ||
|
936c5278de | ||
|
1eda70fb31 | ||
|
3bd963d88b | ||
|
7c75d83842 | ||
|
b7e08dbc06 | ||
|
f00600e1a3 | ||
|
68b25a57c1 | ||
|
6a69784335 | ||
|
3987237220 | ||
|
a6c2047ea0 | ||
|
8efeb7e3bf | ||
|
9a28aea2a2 | ||
|
30a980fb94 | ||
|
4f031f35fe | ||
|
df6dc532d2 | ||
|
c849ae36e0 | ||
|
b7fe949ab9 | ||
|
445892367a | ||
|
81b10bd0dd | ||
|
24d6489d0d | ||
|
b27d409cfd | ||
|
df84664032 | ||
|
357e3130ad | ||
|
247ecdcc05 | ||
|
72cc88d205 | ||
|
a27af70c1b | ||
|
424c960492 | ||
|
db3e06f76c | ||
|
353330c094 | ||
|
f1168c53ae | ||
|
62b00f70fd | ||
|
ff76add805 | ||
|
f48a3cffe7 | ||
|
a80f8a5ed0 | ||
|
5f5c562f00 | ||
|
653b560413 | ||
|
9a1ca294a8 | ||
|
252a858bc5 | ||
|
c519c37784 |
@@ -8,7 +8,7 @@ charset = utf-8
|
||||
insert_final_newline = true
|
||||
tab_width = 8
|
||||
|
||||
[*.{c,h,cpp,hpp,cc,hh,y,yy}]
|
||||
[*.{c,h,cpp,hpp,cc,hh}]
|
||||
indent_style = space
|
||||
indent_size = 3
|
||||
max_line_length = 78
|
||||
@@ -16,14 +16,26 @@ max_line_length = 78
|
||||
[{Makefile*,*.mk}]
|
||||
indent_style = tab
|
||||
|
||||
[*.py]
|
||||
[{*.py,SCons*}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.pl]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.m4]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.html]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.rst]
|
||||
indent_style = space
|
||||
indent_size = 3
|
||||
@@ -34,11 +46,3 @@ trim_trailing_whitespace = false
|
||||
[{meson.build,meson_options.txt}]
|
||||
indent_style = space
|
||||
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
|
||||
*.pyo
|
||||
*.out
|
||||
/build
|
||||
build
|
||||
|
177
.gitlab-ci.yml
177
.gitlab-ci.yml
@@ -1,19 +1,6 @@
|
||||
workflow:
|
||||
rules:
|
||||
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
|
||||
variables:
|
||||
MESA_CI_PERFORMANCE_ENABLED: 1
|
||||
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH
|
||||
variables:
|
||||
LAVA_JOB_PRIORITY: 40
|
||||
- if: $GITLAB_USER_LOGIN != "marge-bot"
|
||||
variables:
|
||||
LAVA_JOB_PRIORITY: 50
|
||||
- when: always
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: mesa/mesa
|
||||
MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
|
||||
MESA_TEMPLATES_COMMIT: &ci-templates-commit 290b79e0e78eab67a83766f4e9691be554fc4afd
|
||||
CI_PRE_CLONE_SCRIPT: |-
|
||||
set -o xtrace
|
||||
wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
|
||||
@@ -21,7 +8,7 @@ variables:
|
||||
rm download-git-cache.sh
|
||||
set +o xtrace
|
||||
CI_JOB_JWT_FILE: /minio_jwt
|
||||
MINIO_HOST: s3.freedesktop.org
|
||||
MINIO_HOST: minio-packet.freedesktop.org
|
||||
# per-pipeline artifact storage on MinIO
|
||||
PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
|
||||
# per-job artifact storage on MinIO
|
||||
@@ -32,22 +19,14 @@ variables:
|
||||
# running on a particular CI farm (ie. for outages, etc):
|
||||
FD_FARM: "online"
|
||||
COLLABORA_FARM: "online"
|
||||
MICROSOFT_FARM: "online"
|
||||
LIMA_FARM: "online"
|
||||
IGALIA_FARM: "online"
|
||||
ANHOLT_FARM: "online"
|
||||
VALVE_FARM: "online"
|
||||
AUSTRIANCODER_FARM: "online" # only etnaviv GPUs
|
||||
MICROSOFT_FARM: "offline"
|
||||
|
||||
default:
|
||||
before_script:
|
||||
- >
|
||||
export SCRIPTS_DIR=$(mktemp -d) &&
|
||||
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh" &&
|
||||
chmod +x ${SCRIPTS_DIR}/setup-test-env.sh &&
|
||||
. ${SCRIPTS_DIR}/setup-test-env.sh &&
|
||||
echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}" &&
|
||||
unset CI_JOB_JWT # Unsetting vulnerable env variables
|
||||
- echo -e "\e[0Ksection_start:$(date +%s):unset_env_vars_section[collapsed=true]\r\e[0KUnsetting vulnerable environment variables"
|
||||
- echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}"
|
||||
- unset CI_JOB_JWT
|
||||
- echo -e "\e[0Ksection_end:$(date +%s):unset_env_vars_section\r\e[0K"
|
||||
|
||||
after_script:
|
||||
- >
|
||||
@@ -57,20 +36,14 @@ default:
|
||||
export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
|
||||
rm "${CI_JOB_JWT_FILE}"
|
||||
|
||||
# Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
|
||||
retry:
|
||||
max: 1
|
||||
|
||||
include:
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
|
||||
ref: 34f4ade99434043f88e164933f570301fd18b125
|
||||
file:
|
||||
- '/templates/ci-fairy.yml'
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *ci-templates-commit
|
||||
file:
|
||||
- '/templates/alpine.yml'
|
||||
- '/templates/debian.yml'
|
||||
- '/templates/fedora.yml'
|
||||
- local: '.gitlab-ci/image-tags.yml'
|
||||
@@ -79,7 +52,6 @@ include:
|
||||
- local: '.gitlab-ci/build/gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/test/gitlab-ci.yml'
|
||||
- local: '.gitlab-ci/test-source-dep.yml'
|
||||
- local: 'docs/gitlab-ci.yml'
|
||||
- local: 'src/amd/ci/gitlab-ci.yml'
|
||||
- local: 'src/broadcom/ci/gitlab-ci.yml'
|
||||
- local: 'src/etnaviv/ci/gitlab-ci.yml'
|
||||
@@ -87,9 +59,11 @@ include:
|
||||
- local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/iris/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/radeonsi/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
|
||||
- local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
|
||||
@@ -97,7 +71,6 @@ include:
|
||||
- local: 'src/intel/ci/gitlab-ci.yml'
|
||||
- local: 'src/microsoft/ci/gitlab-ci.yml'
|
||||
- local: 'src/panfrost/ci/gitlab-ci.yml'
|
||||
- local: 'src/virtio/ci/gitlab-ci.yml'
|
||||
|
||||
stages:
|
||||
- sanity
|
||||
@@ -105,7 +78,6 @@ stages:
|
||||
- git-archive
|
||||
- build-x86_64
|
||||
- build-misc
|
||||
- lint
|
||||
- amd
|
||||
- intel
|
||||
- nouveau
|
||||
@@ -117,11 +89,26 @@ stages:
|
||||
- layered-backends
|
||||
- deploy
|
||||
|
||||
# Generic rule to not run the job during scheduled pipelines
|
||||
# ----------------------------------------------------------
|
||||
.scheduled_pipelines-rules:
|
||||
rules: &ignore_scheduled_pipelines
|
||||
if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'
|
||||
when: never
|
||||
|
||||
# YAML anchors for rule conditions
|
||||
# --------------------------------
|
||||
.rules-anchors:
|
||||
rules:
|
||||
# Pipeline for forked project branch
|
||||
- if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
|
||||
when: manual
|
||||
# Forked project branch / pre-merge pipeline not for Marge bot
|
||||
- if: &is-forked-branch-or-pre-merge-not-for-marge '$CI_PROJECT_NAMESPACE != "mesa" || ($GITLAB_USER_LOGIN != "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event")'
|
||||
when: manual
|
||||
# Pipeline runs for the main branch of the upstream Mesa project
|
||||
- if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'
|
||||
when: always
|
||||
# Post-merge pipeline
|
||||
- if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
|
||||
when: on_success
|
||||
@@ -136,15 +123,71 @@ stages:
|
||||
when: on_success
|
||||
|
||||
|
||||
# When to automatically run the CI for build jobs
|
||||
.build-rules:
|
||||
.docs-base:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
- .ci-run-policy
|
||||
script:
|
||||
- apk --no-cache add graphviz doxygen
|
||||
- pip3 install sphinx breathe mako sphinx_rtd_theme
|
||||
- docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml
|
||||
- sphinx-build -W -b html docs public
|
||||
|
||||
pages:
|
||||
extends: .docs-base
|
||||
stage: deploy
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
needs: []
|
||||
rules:
|
||||
- *ignore_scheduled_pipelines
|
||||
- if: *is-mesa-main
|
||||
changes: &docs-or-ci
|
||||
- docs/**/*
|
||||
- .gitlab-ci.yml
|
||||
when: always
|
||||
# Other cases default to never
|
||||
|
||||
test-docs:
|
||||
extends: .docs-base
|
||||
# Cancel job if a newer commit is pushed to the same branch
|
||||
interruptible: true
|
||||
stage: deploy
|
||||
needs: []
|
||||
rules:
|
||||
- *ignore_scheduled_pipelines
|
||||
- if: *is-forked-branch
|
||||
changes: *docs-or-ci
|
||||
when: manual
|
||||
# Other cases default to never
|
||||
|
||||
test-docs-mr:
|
||||
extends:
|
||||
- test-docs
|
||||
needs:
|
||||
- sanity
|
||||
artifacts:
|
||||
expose_as: 'Documentation preview'
|
||||
paths:
|
||||
- public/
|
||||
rules:
|
||||
- if: *is-pre-merge
|
||||
changes: *docs-or-ci
|
||||
when: on_success
|
||||
# Other cases default to never
|
||||
|
||||
# When to automatically run the CI
|
||||
.ci-run-policy:
|
||||
rules:
|
||||
- *ignore_scheduled_pipelines
|
||||
# If any files affecting the pipeline are changed, build/test jobs run
|
||||
# automatically once all dependency jobs have passed
|
||||
- changes: &all_paths
|
||||
- VERSION
|
||||
- bin/git_sha1_gen.py
|
||||
- bin/install_megadrivers.py
|
||||
- bin/meson_get_version.py
|
||||
- bin/symbols-check.py
|
||||
# GitLab CI
|
||||
- .gitlab-ci.yml
|
||||
@@ -157,7 +200,12 @@ stages:
|
||||
- include/**/*
|
||||
- src/**/*
|
||||
when: on_success
|
||||
# Otherwise, build/test jobs won't run because no rule matched.
|
||||
# Otherwise, build/test jobs won't run
|
||||
- when: never
|
||||
retry:
|
||||
max: 2
|
||||
when:
|
||||
- runner_system_failure
|
||||
|
||||
|
||||
.ci-deqp-artifacts:
|
||||
@@ -173,7 +221,10 @@ stages:
|
||||
- _build/meson-logs/strace
|
||||
|
||||
.container-rules:
|
||||
extends:
|
||||
- .ci-run-policy
|
||||
rules:
|
||||
- *ignore_scheduled_pipelines
|
||||
# Run pipeline by default in the main project if any CI pipeline
|
||||
# configuration files were changed, to ensure docker images are up to date
|
||||
- if: *is-post-merge
|
||||
@@ -198,7 +249,8 @@ stages:
|
||||
- changes:
|
||||
*all_paths
|
||||
when: manual
|
||||
# Otherwise, container jobs won't run because no rule matched.
|
||||
# Otherwise, container jobs won't run
|
||||
- when: never
|
||||
|
||||
# Git archive
|
||||
|
||||
@@ -207,19 +259,20 @@ make git archive:
|
||||
- .fdo.ci-fairy
|
||||
stage: git-archive
|
||||
rules:
|
||||
- !reference [.scheduled_pipeline-rules, rules]
|
||||
- if: *is-scheduled-pipeline
|
||||
when: on_success
|
||||
# ensure we are running on packet
|
||||
tags:
|
||||
- packet.net
|
||||
script:
|
||||
# Compactify the .git directory
|
||||
- git gc --aggressive
|
||||
# Download & cache the perfetto subproject as well.
|
||||
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
|
||||
# compress the current folder
|
||||
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
|
||||
|
||||
- ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
|
||||
# login with the JWT token file
|
||||
- ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}"
|
||||
- ci-fairy minio cp ../$CI_PROJECT_NAME.tar.gz minio://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
|
||||
|
||||
|
||||
# Sanity checks of MR settings and commit logs
|
||||
@@ -240,3 +293,35 @@ sanity:
|
||||
when: on_failure
|
||||
reports:
|
||||
junit: check-*.xml
|
||||
|
||||
# Rules for tests that should not be present in MRs or the main
|
||||
# project's pipeline (don't block marge or report red on
|
||||
# mesa/mesa main) but should be present on pipelines in personal
|
||||
# branches (so you can opt in to running the flaky test when you want
|
||||
# to).
|
||||
.test-manual:
|
||||
rules:
|
||||
- *ignore_scheduled_pipelines
|
||||
- if: *is-forked-branch
|
||||
changes:
|
||||
*all_paths
|
||||
when: manual
|
||||
- when: never
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
JOB_TIMEOUT: 80
|
||||
|
||||
# The above .test-manual rules doesn't allow the jobs to be available for MRs
|
||||
# but we should have an option to have manual jobs in MRs as well.
|
||||
.test-manual-mr:
|
||||
rules:
|
||||
- *ignore_scheduled_pipelines
|
||||
- if: *is-forked-branch-or-pre-merge-not-for-marge
|
||||
changes:
|
||||
*all_paths
|
||||
when: manual
|
||||
- when: never
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
JOB_TIMEOUT: 80
|
||||
|
||||
|
@@ -15,20 +15,3 @@ glx@glx_arb_sync_control@timing.*
|
||||
|
||||
# This test is not built with waffle, while we do build tests with waffle
|
||||
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
|
||||
|
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
|
||||
|
@@ -80,9 +80,8 @@ mkdir -p /nfs/results
|
||||
|
||||
rm -rf /tftp/*
|
||||
if echo "$BM_KERNEL" | grep -q http; then
|
||||
apt-get install -y curl
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
$BM_KERNEL -o /tftp/vmlinuz
|
||||
apt install -y wget
|
||||
wget $BM_KERNEL -O /tftp/vmlinuz
|
||||
else
|
||||
cp $BM_KERNEL /tftp/vmlinuz
|
||||
fi
|
||||
@@ -91,8 +90,7 @@ echo "$BM_CMDLINE" > /tftp/cmdline
|
||||
set +e
|
||||
python3 $BM/cros_servo_run.py \
|
||||
--cpu $BM_SERIAL \
|
||||
--ec $BM_SERIAL_EC \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
|
||||
--ec $BM_SERIAL_EC
|
||||
ret=$?
|
||||
set -e
|
||||
|
||||
|
@@ -31,18 +31,52 @@ import threading
|
||||
|
||||
|
||||
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(
|
||||
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.ec_ser = SerialBuffer(
|
||||
ec, "results/serial-ec.txt", "R SERIAL-EC> ", line_queue=self.cpu_ser.line_queue)
|
||||
self.test_timeout = test_timeout
|
||||
|
||||
self.iter_feed_ec = threading.Thread(
|
||||
target=self.iter_feed_queue, daemon=True, args=(self.ec_ser.lines(),))
|
||||
self.iter_feed_ec.start()
|
||||
|
||||
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):
|
||||
self.ec_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):
|
||||
print("W SERIAL-EC> %s" % s)
|
||||
@@ -62,36 +96,23 @@ class CrosServoRun:
|
||||
self.ec_write("\n")
|
||||
self.ec_write("reboot\n")
|
||||
|
||||
bootloader_done = False
|
||||
# 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
|
||||
# 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):
|
||||
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
|
||||
|
||||
# The Cheza boards have issues with failing to bring up power to
|
||||
# the system sometimes, possibly dependent on ambient temperature
|
||||
# in the farm.
|
||||
if re.search("POWER_GOOD not seen in time", line):
|
||||
self.print_error(
|
||||
"Detected intermittent poweron failure, restarting run...")
|
||||
self.print_error("Detected intermittent poweron failure, restarting run...")
|
||||
return 2
|
||||
|
||||
if not bootloader_done:
|
||||
print("Failed to make it through bootloader, restarting run...")
|
||||
return 2
|
||||
|
||||
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):
|
||||
return 1
|
||||
|
||||
@@ -102,15 +123,13 @@ class CrosServoRun:
|
||||
if re.search("R8152: Bulk read error 0xffffffbf", line):
|
||||
tftp_failures += 1
|
||||
if tftp_failures >= 100:
|
||||
self.print_error(
|
||||
"Detected intermittent tftp failure, restarting run...")
|
||||
self.print_error("Detected intermittent tftp failure, restarting run...")
|
||||
return 2
|
||||
|
||||
# There are very infrequent bus errors during power management transitions
|
||||
# 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):
|
||||
self.print_error(
|
||||
"Detected cheza power management bus error, restarting run...")
|
||||
self.print_error("Detected cheza power management bus error, restarting run...")
|
||||
return 2
|
||||
|
||||
# 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
|
||||
# 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):
|
||||
self.print_error(
|
||||
"Detected cheza power management bus error, restarting run...")
|
||||
self.print_error("Detected cheza power management bus error, restarting run...")
|
||||
return 2
|
||||
|
||||
if re.search("coreboot.*bootblock starting", line):
|
||||
@@ -149,9 +167,8 @@ class CrosServoRun:
|
||||
else:
|
||||
return 1
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result")
|
||||
return 2
|
||||
self.print_error("Reached the end of the CPU serial log without finding a result")
|
||||
return 1
|
||||
|
||||
|
||||
def main():
|
||||
@@ -160,20 +177,21 @@ def main():
|
||||
help='CPU Serial device', required=True)
|
||||
parser.add_argument(
|
||||
'--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()
|
||||
|
||||
servo = CrosServoRun(args.cpu, args.ec)
|
||||
|
||||
while True:
|
||||
servo = CrosServoRun(args.cpu, args.ec, args.test_timeout * 60)
|
||||
retval = servo.run()
|
||||
|
||||
# power down the CPU on the device
|
||||
servo.ec_write("power off\n")
|
||||
servo.close()
|
||||
|
||||
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__':
|
||||
|
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
. "$SCRIPTS_DIR"/setup-test-env.sh
|
||||
|
||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||
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,
|
||||
# fetch them instead of looking in the container.
|
||||
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 \
|
||||
"$BM_KERNEL" -o kernel
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"$BM_DTB" -o dtb
|
||||
wget $BM_KERNEL -O kernel
|
||||
wget $BM_DTB -O dtb
|
||||
|
||||
cat kernel dtb > Image.gz-dtb
|
||||
rm kernel
|
||||
rm kernel dtb
|
||||
else
|
||||
cat $BM_KERNEL $BM_DTB > Image.gz-dtb
|
||||
cp $BM_DTB dtb
|
||||
fi
|
||||
|
||||
export PATH=$BM:$PATH
|
||||
|
||||
mkdir -p artifacts
|
||||
mkbootimg.py \
|
||||
--kernel Image.gz-dtb \
|
||||
--ramdisk rootfs.cpio.gz \
|
||||
--dtb dtb \
|
||||
--cmdline "$BM_CMDLINE" \
|
||||
$BM_MKBOOT_PARAMS \
|
||||
--header_version 2 \
|
||||
-o artifacts/fastboot.img
|
||||
abootimg \
|
||||
--create artifacts/fastboot.img \
|
||||
-k Image.gz-dtb \
|
||||
-r rootfs.cpio.gz \
|
||||
-c cmdline="$BM_CMDLINE"
|
||||
rm Image.gz-dtb
|
||||
|
||||
rm Image.gz-dtb dtb
|
||||
export PATH=$BM:$PATH
|
||||
|
||||
# Start background command for talking to serial if we have one.
|
||||
if [ -n "$BM_SERIAL_SCRIPT" ]; then
|
||||
@@ -142,7 +133,6 @@ fi
|
||||
set +e
|
||||
$BM/fastboot_run.py \
|
||||
--dev="$BM_SERIAL" \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20} \
|
||||
--fbserial="$BM_FASTBOOT_SERIAL" \
|
||||
--powerup="$BM_POWERUP" \
|
||||
--powerdown="$BM_POWERDOWN"
|
||||
|
@@ -22,21 +22,19 @@
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
import os
|
||||
import re
|
||||
from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
|
||||
class FastbootRun:
|
||||
def __init__(self, args, test_timeout):
|
||||
def __init__(self, args):
|
||||
self.powerup = args.powerup
|
||||
self.ser = SerialBuffer(
|
||||
args.dev, "results/serial-output.txt", "R SERIAL> ")
|
||||
self.fastboot = "fastboot boot -s {ser} artifacts/fastboot.img".format(
|
||||
ser=args.fbserial)
|
||||
self.test_timeout = test_timeout
|
||||
# We would like something like a 1 minute timeout, but the piglit traces
|
||||
# jobs stall out for long periods of time.
|
||||
self.ser = SerialBuffer(args.dev, "results/serial-output.txt", "R SERIAL> ", timeout=600)
|
||||
self.fastboot="fastboot boot -s {ser} artifacts/fastboot.img".format(ser=args.fbserial)
|
||||
|
||||
def close(self):
|
||||
self.ser.close()
|
||||
@@ -46,40 +44,34 @@ class FastbootRun:
|
||||
NO_COLOR = '\033[0m'
|
||||
print(RED + message + NO_COLOR)
|
||||
|
||||
def logged_system(self, cmd, timeout=60):
|
||||
def logged_system(self, cmd):
|
||||
print("Running '{}'".format(cmd))
|
||||
try:
|
||||
return subprocess.call(cmd, shell=True, timeout=timeout)
|
||||
except subprocess.TimeoutExpired:
|
||||
self.print_error("timeout, restarting run...")
|
||||
return 2
|
||||
return os.system(cmd)
|
||||
|
||||
def run(self):
|
||||
if ret := self.logged_system(self.powerup):
|
||||
return ret
|
||||
if self.logged_system(self.powerup) != 0:
|
||||
return 1
|
||||
|
||||
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 \
|
||||
re.search("Listening for fastboot command on", line):
|
||||
re.search("Listening for fastboot command on", line):
|
||||
fastboot_ready = True
|
||||
break
|
||||
|
||||
if re.search("data abort", line):
|
||||
self.print_error(
|
||||
"Detected crash during boot, restarting run...")
|
||||
self.print_error("Detected crash during boot, restarting run...")
|
||||
return 2
|
||||
|
||||
if not fastboot_ready:
|
||||
self.print_error(
|
||||
"Failed to get to fastboot prompt, restarting run...")
|
||||
self.print_error("Failed to get to fastboot prompt, restarting run...")
|
||||
return 2
|
||||
|
||||
if ret := self.logged_system(self.fastboot):
|
||||
return ret
|
||||
if self.logged_system(self.fastboot) != 0:
|
||||
return 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:
|
||||
return 2
|
||||
if print_more_lines > 0:
|
||||
@@ -91,8 +83,7 @@ class FastbootRun:
|
||||
# The db820c boards intermittently reboot. Just restart the run
|
||||
# when if we see a reboot after we got past fastboot.
|
||||
if re.search("PON REASON", line):
|
||||
self.print_error(
|
||||
"Detected spontaneous reboot, restarting run...")
|
||||
self.print_error("Detected spontaneous reboot, restarting run...")
|
||||
return 2
|
||||
|
||||
# db820c sometimes wedges around iommu fault recovery
|
||||
@@ -126,26 +117,18 @@ class FastbootRun:
|
||||
else:
|
||||
return 1
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result, restarting run...")
|
||||
self.print_error("Reached the end of the CPU serial log without finding a result, restarting run...")
|
||||
return 2
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'--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('--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)
|
||||
parser.add_argument('--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('--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)
|
||||
args = parser.parse_args()
|
||||
|
||||
fastboot = FastbootRun(args, args.test_timeout * 60)
|
||||
fastboot = FastbootRun(args)
|
||||
|
||||
while True:
|
||||
retval = fastboot.run()
|
||||
@@ -153,12 +136,11 @@ def main():
|
||||
if retval != 2:
|
||||
break
|
||||
|
||||
fastboot = FastbootRun(args, args.test_timeout * 60)
|
||||
fastboot = FastbootRun(args)
|
||||
|
||||
fastboot.logged_system(args.powerdown)
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@@ -8,8 +8,8 @@ relay = sys.argv[2]
|
||||
|
||||
# our relays are "off" means "board is powered".
|
||||
mode_swap = {
|
||||
"on": "off",
|
||||
"off": "on",
|
||||
"on" : "off",
|
||||
"off" : "on",
|
||||
}
|
||||
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
|
||||
|
||||
. "$SCRIPTS_DIR"/setup-test-env.sh
|
||||
|
||||
# Boot script for devices attached to a PoE switch, using NFS for the root
|
||||
# filesystem.
|
||||
|
||||
@@ -73,8 +71,6 @@ fi
|
||||
|
||||
set -ex
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# Clear out any previous run's artifacts.
|
||||
rm -rf results/
|
||||
mkdir -p results
|
||||
@@ -83,18 +79,13 @@ mkdir -p results
|
||||
# state, since it's volume-mounted on the host.
|
||||
rsync -a --delete $BM_ROOTFS/ /nfs/
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# If BM_BOOTFS is an URL, download it
|
||||
if echo $BM_BOOTFS | grep -q http; then
|
||||
apt-get install -y curl
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${FDO_HTTP_CACHE_URI:-}$BM_BOOTFS" -o /tmp/bootfs.tar
|
||||
apt install -y wget
|
||||
wget ${FDO_HTTP_CACHE_URI:-}$BM_BOOTFS -O /tmp/bootfs.tar
|
||||
BM_BOOTFS=/tmp/bootfs.tar
|
||||
fi
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# If BM_BOOTFS is a file, assume it is a tarball and uncompress it
|
||||
if [ -f $BM_BOOTFS ]; then
|
||||
mkdir -p /tmp/bootfs
|
||||
@@ -102,20 +93,14 @@ if [ -f $BM_BOOTFS ]; then
|
||||
BM_BOOTFS=/tmp/bootfs
|
||||
fi
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# Install kernel modules (it could be either in /lib/modules or
|
||||
# /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/lib/modules ] && rsync -a $BM_BOOTFS/lib/modules/ /nfs/lib/modules/
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# Install kernel image + bootloader files
|
||||
rsync -aL --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
|
||||
@@ -130,25 +115,10 @@ LABEL primary
|
||||
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
|
||||
mkdir -p /nfs/results
|
||||
. $BM/rootfs-setup.sh /nfs
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
echo "$BM_CMDLINE" > /tftp/cmdline.txt
|
||||
|
||||
# Add some required options in config.txt
|
||||
@@ -161,7 +131,7 @@ while [ $((ATTEMPTS--)) -gt 0 ]; do
|
||||
--dev="$BM_SERIAL" \
|
||||
--powerup="$BM_POWERUP" \
|
||||
--powerdown="$BM_POWERDOWN" \
|
||||
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
|
||||
--timeout="${BM_POE_TIMEOUT:-60}"
|
||||
ret=$?
|
||||
|
||||
if [ $ret -eq 2 ]; then
|
||||
@@ -172,12 +142,8 @@ while [ $((ATTEMPTS--)) -gt 0 ]; do
|
||||
done
|
||||
set -e
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
|
||||
# will look for them.
|
||||
cp -Rp /nfs/results/. results/
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
exit $ret
|
||||
|
@@ -28,14 +28,11 @@ from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
|
||||
class PoERun:
|
||||
def __init__(self, args, test_timeout):
|
||||
def __init__(self, args):
|
||||
self.powerup = args.powerup
|
||||
self.powerdown = args.powerdown
|
||||
self.ser = SerialBuffer(
|
||||
args.dev, "results/serial-output.txt", "")
|
||||
self.test_timeout = test_timeout
|
||||
self.ser = SerialBuffer(args.dev, "results/serial-output.txt", "", args.timeout)
|
||||
|
||||
def print_error(self, message):
|
||||
RED = '\033[0;31m'
|
||||
@@ -51,17 +48,16 @@ class PoERun:
|
||||
return 1
|
||||
|
||||
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):
|
||||
boot_detected = True
|
||||
break
|
||||
|
||||
if not boot_detected:
|
||||
self.print_error(
|
||||
"Something wrong; couldn't detect the boot start up sequence")
|
||||
self.print_error("Something wrong; couldn't detect the boot start up sequence")
|
||||
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):
|
||||
return 1
|
||||
|
||||
@@ -74,11 +70,6 @@ class PoERun:
|
||||
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)
|
||||
if result:
|
||||
if result.group(1) == "pass":
|
||||
@@ -86,30 +77,24 @@ class PoERun:
|
||||
else:
|
||||
return 1
|
||||
|
||||
self.print_error(
|
||||
"Reached the end of the CPU serial log without finding a result")
|
||||
self.print_error("Reached the end of the CPU serial log without finding a result")
|
||||
return 2
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--dev', type=str,
|
||||
help='Serial device to monitor', required=True)
|
||||
parser.add_argument('--powerup', type=str,
|
||||
help='shell command for rebooting', required=True)
|
||||
parser.add_argument('--powerdown', type=str,
|
||||
help='shell command for powering off', required=True)
|
||||
parser.add_argument(
|
||||
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
|
||||
parser.add_argument('--dev', type=str, help='Serial device to monitor', required=True)
|
||||
parser.add_argument('--powerup', type=str, help='shell command for rebooting', required=True)
|
||||
parser.add_argument('--powerdown', type=str, help='shell command for powering off', required=True)
|
||||
parser.add_argument('--timeout', type=int, default=60,
|
||||
help='time in seconds to wait for activity', required=False)
|
||||
args = parser.parse_args()
|
||||
|
||||
poe = PoERun(args, args.test_timeout * 60)
|
||||
poe = PoERun(args)
|
||||
retval = poe.run()
|
||||
|
||||
poe.logged_system(args.powerdown)
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@@ -8,17 +8,12 @@ mkdir -p $rootfs_dst/results
|
||||
cp $BM/bm-init.sh $rootfs_dst/init
|
||||
cp $CI_COMMON/init*.sh $rootfs_dst/
|
||||
|
||||
date +'%F %T'
|
||||
|
||||
# Make JWT token available as file in the bare-metal storage to enable access
|
||||
# to MinIO
|
||||
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/intel-gpu-freq.sh $rootfs_dst/
|
||||
cp "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/"
|
||||
|
||||
set +x
|
||||
|
||||
@@ -33,5 +28,3 @@ set -x
|
||||
# Add the Mesa drivers we built, and make a consistent symlink to them.
|
||||
mkdir -p $rootfs_dst/$CI_PROJECT_DIR
|
||||
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 time
|
||||
|
||||
|
||||
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.dev = dev
|
||||
|
||||
@@ -42,13 +41,7 @@ class SerialBuffer:
|
||||
self.serial = None
|
||||
|
||||
self.byte_queue = queue.Queue()
|
||||
# allow multiple SerialBuffers to share a line queue so you can merge
|
||||
# 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.line_queue = queue.Queue()
|
||||
self.prefix = prefix
|
||||
self.timeout = timeout
|
||||
self.sentinel = object()
|
||||
@@ -137,30 +130,14 @@ class SerialBuffer:
|
||||
self.line_queue.put(line)
|
||||
line = bytearray()
|
||||
|
||||
def lines(self, timeout=None, phase=None):
|
||||
start_time = time.monotonic()
|
||||
while True:
|
||||
read_timeout = None
|
||||
if timeout:
|
||||
read_timeout = timeout - (time.monotonic() - start_time)
|
||||
if read_timeout <= 0:
|
||||
print("read timeout waiting for serial during {}".format(phase))
|
||||
self.close()
|
||||
break
|
||||
def get_line(self):
|
||||
line = self.line_queue.get()
|
||||
if line == self.sentinel:
|
||||
self.lines_thread.join()
|
||||
return line
|
||||
|
||||
try:
|
||||
line = self.line_queue.get(timeout=read_timeout)
|
||||
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 lines(self):
|
||||
return iter(self.get_line, self.sentinel)
|
||||
|
||||
|
||||
def main():
|
||||
|
@@ -28,8 +28,8 @@
|
||||
import sys
|
||||
import telnetlib
|
||||
|
||||
host = sys.argv[1]
|
||||
port = sys.argv[2]
|
||||
host=sys.argv[1]
|
||||
port=sys.argv[2]
|
||||
|
||||
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,6 +1,6 @@
|
||||
# Shared between windows and Linux
|
||||
.build-common:
|
||||
extends: .build-rules
|
||||
extends: .ci-run-policy
|
||||
# Cancel job if a newer commit is pushed to the same branch
|
||||
interruptible: true
|
||||
artifacts:
|
||||
@@ -10,7 +10,6 @@
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
- shader-db
|
||||
- artifacts
|
||||
|
||||
# Just Linux
|
||||
.build-linux:
|
||||
@@ -22,16 +21,15 @@
|
||||
# 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
|
||||
- export PATH="/usr/lib/ccache:$PATH"
|
||||
- export CCACHE_BASEDIR="$PWD"
|
||||
- echo -e "\e[0Ksection_start:$(date +%s):ccache_before[collapsed=true]\r\e[0Kccache stats before build"
|
||||
- ccache --show-stats
|
||||
- echo -e "\e[0Ksection_end:$(date +%s):ccache_before\r\e[0K"
|
||||
after_script:
|
||||
- if test -x /usr/bin/ccache; then ccache --show-stats | grep "cache hit rate"; fi
|
||||
- echo -e "\e[0Ksection_start:$(date +%s):ccache_after[collapsed=true]\r\e[0Kccache stats after build"
|
||||
- ccache --show-stats
|
||||
- echo -e "\e[0Ksection_end:$(date +%s):ccache_after\r\e[0K"
|
||||
- !reference [default, after_script]
|
||||
|
||||
.build-windows:
|
||||
@@ -39,7 +37,7 @@
|
||||
tags:
|
||||
- windows
|
||||
- docker
|
||||
- "2022"
|
||||
- "1809"
|
||||
- mesa
|
||||
cache:
|
||||
key: ${CI_JOB_NAME}
|
||||
@@ -56,15 +54,6 @@
|
||||
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
|
||||
@@ -75,20 +64,18 @@ debian-testing:
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D platforms=x11,wayland
|
||||
-D platforms=x11
|
||||
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"
|
||||
VULKAN_DRIVERS: "swrast,amd,intel"
|
||||
BUILDTYPE: "debugoptimized"
|
||||
EXTRA_OPTION: >
|
||||
-D spirv-to-dxil=true
|
||||
-D valgrind=disabled
|
||||
-D perfetto=true
|
||||
-D valgrind=false
|
||||
MINIO_ARTIFACT_NAME: mesa-amd64
|
||||
LLVM_VERSION: "13"
|
||||
script:
|
||||
- .gitlab-ci/lava/lava-pytest.sh
|
||||
- .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/prepare-artifacts.sh
|
||||
artifacts:
|
||||
@@ -103,7 +90,7 @@ debian-testing-asan:
|
||||
-Wno-error=stringop-truncation
|
||||
EXTRA_OPTION: >
|
||||
-D b_sanitize=address
|
||||
-D valgrind=disabled
|
||||
-D valgrind=false
|
||||
-D tools=dlclose-skip
|
||||
MINIO_ARTIFACT_NAME: ""
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
@@ -126,43 +113,28 @@ debian-testing-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:
|
||||
debian-clover-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_ST: >
|
||||
-D gallium-opencl=icd
|
||||
-D opencl-spirv=true
|
||||
GALLIUM_DRIVERS: "swrast"
|
||||
BUILDTYPE: "debugoptimized"
|
||||
EXTRA_OPTION: >
|
||||
-D valgrind=disabled
|
||||
-D valgrind=false
|
||||
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:
|
||||
debian-gallium:
|
||||
extends: .meson-build
|
||||
variables:
|
||||
UNWIND: "enabled"
|
||||
@@ -175,37 +147,25 @@ debian-build-testing:
|
||||
-D dri3=enabled
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-xvmc=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
|
||||
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,xvmc,lima,panfrost,asahi
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
- .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
|
||||
@@ -216,62 +176,21 @@ debian-release:
|
||||
-D dri3=enabled
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-vdpau=enabled
|
||||
-D gallium-xvmc=disabled
|
||||
-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"
|
||||
VULKAN_DRIVERS: "amd,imagination-experimental"
|
||||
BUILDTYPE: "release"
|
||||
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
|
||||
|
||||
@@ -281,14 +200,13 @@ fedora-release:
|
||||
- .use-fedora/x86_build
|
||||
variables:
|
||||
BUILDTYPE: "release"
|
||||
C_LINK_ARGS: >
|
||||
C_ARGS: >
|
||||
-Wno-error=array-bounds
|
||||
-Wno-error=stringop-overflow
|
||||
-Wno-error=maybe-uninitialized
|
||||
-Wno-error=stringop-overread
|
||||
CPP_LINK_ARGS: >
|
||||
-Wno-error=uninitialized
|
||||
CPP_ARGS: >
|
||||
-Wno-error=array-bounds
|
||||
-Wno-error=stringop-overflow
|
||||
-Wno-error=stringop-overread
|
||||
DRI_LOADERS: >
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
@@ -296,32 +214,31 @@ fedora-release:
|
||||
-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_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=enabled
|
||||
-D gallium-xvmc=disabled
|
||||
-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
|
||||
-D vulkan-device-select-layer=true
|
||||
LLVM_VERSION: ""
|
||||
UNWIND: "disabled"
|
||||
VULKAN_DRIVERS: "amd,broadcom,freedreno,imagination-experimental,intel,intel_hasvk"
|
||||
VULKAN_DRIVERS: "amd,broadcom,freedreno,intel,imagination-experimental"
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
|
||||
@@ -329,7 +246,6 @@ debian-android:
|
||||
extends:
|
||||
- .meson-cross
|
||||
- .use-debian/android_build
|
||||
- .ci-deqp-artifacts
|
||||
variables:
|
||||
UNWIND: "disabled"
|
||||
C_ARGS: >
|
||||
@@ -337,13 +253,11 @@ debian-android:
|
||||
-Wno-error=constant-conversion
|
||||
-Wno-error=enum-conversion
|
||||
-Wno-error=initializer-overrides
|
||||
-Wno-error=missing-braces
|
||||
-Wno-error=sometimes-uninitialized
|
||||
-Wno-error=implicit-const-int-float-conversion
|
||||
-Wno-error=unused-function
|
||||
CPP_ARGS: >
|
||||
-Wno-error=c99-designator
|
||||
-Wno-error=unused-variable
|
||||
-Wno-error=unused-but-set-variable
|
||||
-Wno-error=self-assign
|
||||
-Wno-error=deprecated-declarations
|
||||
DRI_LOADERS: >
|
||||
-D glx=disabled
|
||||
-D gbm=disabled
|
||||
@@ -352,31 +266,27 @@ debian-android:
|
||||
EXTRA_OPTION: >
|
||||
-D android-stub=true
|
||||
-D llvm=disabled
|
||||
-D platform-sdk-version=33
|
||||
-D valgrind=disabled
|
||||
-D android-libbacktrace=disabled
|
||||
-D platform-sdk-version=29
|
||||
-D valgrind=false
|
||||
GALLIUM_ST: >
|
||||
-D dri3=disabled
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-xvmc=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
|
||||
- PKG_CONFIG_PATH=/usr/local/lib/aarch64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/pkgconfig/ 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
|
||||
- PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/pkgconfig/ CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris VULKAN_DRIVERS=amd,intel .gitlab-ci/meson/build.sh
|
||||
|
||||
.meson-cross:
|
||||
extends:
|
||||
@@ -388,11 +298,12 @@ debian-android:
|
||||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D platforms=x11,wayland
|
||||
-D platforms=x11
|
||||
-D osmesa=false
|
||||
GALLIUM_ST: >
|
||||
-D dri3=enabled
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-xvmc=disabled
|
||||
-D gallium-omx=disabled
|
||||
-D gallium-va=disabled
|
||||
-D gallium-xa=disabled
|
||||
@@ -406,7 +317,7 @@ debian-android:
|
||||
- debian/arm_build
|
||||
variables:
|
||||
VULKAN_DRIVERS: freedreno,broadcom
|
||||
GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4,zink"
|
||||
GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
|
||||
BUILDTYPE: "debugoptimized"
|
||||
tags:
|
||||
- aarch64
|
||||
@@ -419,11 +330,8 @@ debian-armhf:
|
||||
CROSS: armhf
|
||||
EXTRA_OPTION: >
|
||||
-D llvm=disabled
|
||||
-D valgrind=disabled
|
||||
-D valgrind=false
|
||||
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
|
||||
@@ -436,9 +344,8 @@ debian-arm64:
|
||||
VULKAN_DRIVERS: "freedreno,broadcom,panfrost,imagination-experimental"
|
||||
EXTRA_OPTION: >
|
||||
-D llvm=disabled
|
||||
-D valgrind=disabled
|
||||
-D valgrind=false
|
||||
-D imagination-srv=true
|
||||
-D perfetto=true
|
||||
MINIO_ARTIFACT_NAME: mesa-arm64
|
||||
script:
|
||||
- .gitlab-ci/meson/build.sh
|
||||
@@ -448,10 +355,12 @@ debian-arm64-asan:
|
||||
extends:
|
||||
- debian-arm64
|
||||
variables:
|
||||
C_ARGS: >
|
||||
-Wno-error=stringop-truncation
|
||||
EXTRA_OPTION: >
|
||||
-D llvm=disabled
|
||||
-D b_sanitize=address
|
||||
-D valgrind=disabled
|
||||
-D valgrind=false
|
||||
-D tools=dlclose-skip
|
||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||
MINIO_ARTIFACT_NAME: mesa-arm64-asan
|
||||
@@ -468,79 +377,35 @@ debian-arm64-build-test:
|
||||
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
|
||||
-Wno-error=unused-function
|
||||
CPP_ARGS: >
|
||||
-Wno-error=c99-designator
|
||||
-Wno-error=deprecated-declarations
|
||||
-Wno-error=implicit-const-int-float-conversion
|
||||
-Wno-error=missing-braces
|
||||
-Wno-error=overloaded-virtual
|
||||
-Wno-error=tautological-constant-out-of-range-compare
|
||||
-Wno-error=unused-const-variable
|
||||
-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
|
||||
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,swrast,panfrost,imagination-experimental
|
||||
EXTRA_OPTIONS:
|
||||
-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
|
||||
@@ -548,57 +413,39 @@ windows-vs2019:
|
||||
- .windows-build-rules
|
||||
stage: build-misc
|
||||
script:
|
||||
- pwsh -ExecutionPolicy RemoteSigned .\.gitlab-ci\windows\mesa_build.ps1
|
||||
- . .\.gitlab-ci\windows\mesa_build.ps1
|
||||
artifacts:
|
||||
paths:
|
||||
- _build/meson-logs/*.txt
|
||||
- _install/
|
||||
|
||||
.debian-cl:
|
||||
debian-clover:
|
||||
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_DRIVERS: "r600,radeonsi"
|
||||
GALLIUM_ST: >
|
||||
-D dri3=disabled
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-xvmc=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
|
||||
EXTRA_OPTION: >
|
||||
-D valgrind=false
|
||||
script:
|
||||
- LLVM_VERSION=9 GALLIUM_DRIVERS=r600,swrast .gitlab-ci/meson/build.sh
|
||||
- .gitlab-ci/meson/build.sh
|
||||
|
||||
debian-vulkan:
|
||||
extends: .meson-build
|
||||
variables:
|
||||
LLVM_VERSION: "13"
|
||||
UNWIND: "disabled"
|
||||
DRI_LOADERS: >
|
||||
-D glx=disabled
|
||||
@@ -609,21 +456,21 @@ debian-vulkan:
|
||||
GALLIUM_ST: >
|
||||
-D dri3=enabled
|
||||
-D gallium-vdpau=disabled
|
||||
-D gallium-xvmc=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
|
||||
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,imagination-experimental
|
||||
EXTRA_OPTION: >
|
||||
-D vulkan-layers=device-select,overlay
|
||||
-D build-aco-tests=true
|
||||
-D intel-clc=disabled
|
||||
-D intel-clc=enabled
|
||||
-D imagination-srv=true
|
||||
|
||||
debian-i386:
|
||||
@@ -634,7 +481,6 @@ debian-i386:
|
||||
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
|
||||
|
||||
@@ -648,7 +494,8 @@ debian-s390x:
|
||||
variables:
|
||||
CROSS: s390x
|
||||
GALLIUM_DRIVERS: "swrast,zink"
|
||||
LLVM_VERSION: 13
|
||||
# The lp_test_blend test times out with LLVM 11
|
||||
LLVM_VERSION: 9
|
||||
VULKAN_DRIVERS: "swrast"
|
||||
|
||||
debian-ppc64el:
|
||||
@@ -661,39 +508,18 @@ debian-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
|
||||
debian-mingw32-x86_64:
|
||||
extends: .meson-build
|
||||
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
|
||||
-Wno-error=format-extra-args
|
||||
CPP_ARGS: $C_ARGS
|
||||
GALLIUM_DRIVERS: "swrast"
|
||||
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
|
||||
-Dllvm=disabled
|
||||
-Dzlib=disabled
|
||||
-Dosmesa=true
|
||||
--cross-file=.gitlab-ci/x86_64-w64-mingw32
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
for var in \
|
||||
ACO_DEBUG \
|
||||
ASAN_OPTIONS \
|
||||
BASE_SYSTEM_FORK_HOST_PREFIX \
|
||||
BASE_SYSTEM_MAINLINE_HOST_PREFIX \
|
||||
@@ -10,7 +9,6 @@ for var in \
|
||||
CI_COMMIT_TITLE \
|
||||
CI_JOB_ID \
|
||||
CI_JOB_JWT_FILE \
|
||||
CI_JOB_STARTED_AT \
|
||||
CI_JOB_NAME \
|
||||
CI_JOB_URL \
|
||||
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
|
||||
@@ -28,8 +26,9 @@ for var in \
|
||||
CI_SERVER_URL \
|
||||
CROSVM_GALLIUM_DRIVER \
|
||||
CROSVM_GPU_ARGS \
|
||||
CURRENT_SECTION \
|
||||
DEQP_BIN_DIR \
|
||||
DEQP_CASELIST_FILTER \
|
||||
DEQP_CASELIST_INV_FILTER \
|
||||
DEQP_CONFIG \
|
||||
DEQP_EXPECTED_RENDERER \
|
||||
DEQP_FRACTION \
|
||||
@@ -62,7 +61,6 @@ for var in \
|
||||
HWCI_FREQ_MAX \
|
||||
HWCI_KERNEL_MODULES \
|
||||
HWCI_KVM \
|
||||
HWCI_START_WESTON \
|
||||
HWCI_START_XORG \
|
||||
HWCI_TEST_SCRIPT \
|
||||
IR3_SHADER_DEBUG \
|
||||
@@ -82,7 +80,6 @@ for var in \
|
||||
MESA_IMAGE \
|
||||
MESA_IMAGE_PATH \
|
||||
MESA_IMAGE_TAG \
|
||||
MESA_LOADER_DRIVER_OVERRIDE \
|
||||
MESA_TEMPLATES_COMMIT \
|
||||
MESA_VK_IGNORE_CONFORMANCE_WARNING \
|
||||
MESA_SPIRV_LOG_LEVEL \
|
||||
@@ -106,19 +103,13 @@ for var in \
|
||||
PIGLIT_RESULTS \
|
||||
PIGLIT_TESTS \
|
||||
PIPELINE_ARTIFACTS_BASE \
|
||||
RADV_DEBUG \
|
||||
RADV_PERFTEST \
|
||||
SKQP_ASSETS_DIR \
|
||||
SKQP_BACKENDS \
|
||||
TU_DEBUG \
|
||||
VIRGL_HOST_API \
|
||||
WAFFLE_PLATFORM \
|
||||
VK_CPU \
|
||||
VK_DRIVER \
|
||||
VK_ICD_FILENAMES \
|
||||
VKD3D_PROTON_RESULTS \
|
||||
ZINK_DESCRIPTORS \
|
||||
LVP_POISON_MEMORY \
|
||||
; do
|
||||
if [ -n "${!var+x}" ]; then
|
||||
echo "export $var=${!var@Q}"
|
||||
|
@@ -1,45 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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=
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# Second-stage init, used to set up devices and our job environment before
|
||||
# running tests.
|
||||
|
||||
for path in '/set-job-env-vars.sh' './set-job-env-vars.sh'; do
|
||||
[ -f "$path" ] && source "$path"
|
||||
done
|
||||
. "$SCRIPTS_DIR"/setup-test-env.sh
|
||||
. /set-job-env-vars.sh
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -48,16 +12,6 @@ set -ex
|
||||
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
|
||||
@@ -76,8 +30,7 @@ if [ "$HWCI_KVM" = "true" ]; then
|
||||
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}" \
|
||||
wget -S --progress=dot:giga -O /lava-files/${KERNEL_IMAGE_NAME} \
|
||||
"${KERNEL_IMAGE_BASE_URL}/${KERNEL_IMAGE_NAME}"
|
||||
fi
|
||||
|
||||
@@ -107,11 +60,10 @@ if [ "$HWCI_FREQ_MAX" = "true" ]; then
|
||||
# Disable GPU runtime power management
|
||||
GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
|
||||
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
|
||||
./intel-gpu-freq.sh -s 70% -g all -d
|
||||
fi
|
||||
|
||||
# Increase freedreno hangcheck timer because it's right at the edge of the
|
||||
@@ -122,8 +74,7 @@ fi
|
||||
|
||||
# Start a little daemon to capture the first devcoredump we encounter. (They
|
||||
# expire after 5 minutes, so we poll for them).
|
||||
/capture-devcoredump.sh &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
./capture-devcoredump.sh &
|
||||
|
||||
# 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
|
||||
@@ -132,9 +83,7 @@ BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
if [ -n "$HWCI_START_XORG" ]; then
|
||||
echo "touch /xorg-started; sleep 100000" > /xorg-script
|
||||
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 &
|
||||
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
|
||||
|
||||
# Wait for xorg to be ready for connections.
|
||||
for i in 1 2 3 4 5; do
|
||||
@@ -146,53 +95,18 @@ if [ -n "$HWCI_START_XORG" ]; then
|
||||
export DISPLAY=:0
|
||||
fi
|
||||
|
||||
if [ -n "$HWCI_START_WESTON" ]; then
|
||||
WESTON_X11_SOCK="/tmp/.X11-unix/X0"
|
||||
if [ -n "$HWCI_START_XORG" ]; then
|
||||
echo "Please consider dropping HWCI_START_XORG and instead using Weston XWayland for testing."
|
||||
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
|
||||
|
||||
set +e
|
||||
bash -c ". $SCRIPTS_DIR/setup-test-env.sh && $HWCI_TEST_SCRIPT"
|
||||
EXIT_CODE=$?
|
||||
set -e
|
||||
sh -c "$HWCI_TEST_SCRIPT" && RESULT=pass || RESULT=fail
|
||||
|
||||
# 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
|
||||
[ "${RESULT}" = "fail" ] || rm -rf results/trace/$PIGLIT_REPLAY_DEVICE_NAME
|
||||
|
||||
# upload artifacts
|
||||
if [ -n "$MINIO_RESULTS_UPLOAD" ]; then
|
||||
tar --zstd -cf results.tar.zst results/;
|
||||
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_UPLOAD"/results.tar.gz;
|
||||
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"
|
||||
# Sleep a bit to avoid kernel dump message interleave from LAVA ENDTC signal
|
||||
sleep 1
|
||||
exit $EXIT_CODE
|
||||
|
@@ -1,15 +1,8 @@
|
||||
#!/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:
|
||||
# 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)
|
||||
@@ -25,11 +18,6 @@
|
||||
# - 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>
|
||||
#
|
||||
@@ -39,8 +27,6 @@
|
||||
#
|
||||
# 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"
|
||||
@@ -48,14 +34,6 @@ 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.
|
||||
#
|
||||
@@ -63,7 +41,6 @@ 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
|
||||
|
||||
@@ -121,16 +98,14 @@ identify_intel_gpu() {
|
||||
# return: Global variable(s) FREQ_${arg} containing the requested information
|
||||
#
|
||||
read_freq_info() {
|
||||
local var val info path print=0 ret=0
|
||||
local var val 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}")
|
||||
var=FREQ_$1
|
||||
path=$(print_freq_sysfs_path "$1")
|
||||
|
||||
[ -r ${path} ] && read ${var} < ${path} || {
|
||||
log ERROR "Failed to read freq info from: %s" "${path}"
|
||||
@@ -146,8 +121,10 @@ read_freq_info() {
|
||||
|
||||
[ ${print} -eq 1 ] && {
|
||||
eval val=\$${var}
|
||||
printf "%6s: %4s MHz\n" "${info}" "${val}"
|
||||
printf "%6s: %4s MHz\n" "$1" "${val}"
|
||||
}
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
return ${ret}
|
||||
@@ -415,156 +392,6 @@ detect_throttling() {
|
||||
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.
|
||||
#
|
||||
@@ -599,12 +426,6 @@ Options:
|
||||
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.
|
||||
|
||||
@@ -640,8 +461,6 @@ parse_option_get() {
|
||||
|
||||
#
|
||||
# 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
|
||||
@@ -653,8 +472,6 @@ validate_option_set() {
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -z "$2" ] || { print_usage; exit 1; }
|
||||
}
|
||||
|
||||
#
|
||||
@@ -708,12 +525,6 @@ while [ $# -gt 0 ]; do
|
||||
esac
|
||||
;;
|
||||
|
||||
--cpu-set-max)
|
||||
shift
|
||||
CPU_SET_MAX_FREQ=$1
|
||||
validate_option_set "${CPU_SET_MAX_FREQ}" restricted
|
||||
;;
|
||||
|
||||
--dry-run)
|
||||
DRY_RUN=1
|
||||
;;
|
||||
@@ -747,8 +558,6 @@ 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
|
||||
|
@@ -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_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
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
|
||||
@@ -61,9 +55,3 @@ CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_RTL8152=y
|
||||
CONFIG_USB_NET_AX8817X=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_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
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
|
||||
@@ -22,7 +16,6 @@ CONFIG_DRM_LIMA=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_PANEL_EDP=y
|
||||
CONFIG_DRM_MSM=y
|
||||
CONFIG_DRM_ETNAVIV=y
|
||||
CONFIG_DRM_I2C_ADV7511=y
|
||||
CONFIG_PWM_CROS_EC=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
@@ -46,7 +39,6 @@ CONFIG_OF=y
|
||||
CONFIG_QCOM_COMMAND_DB=y
|
||||
CONFIG_QCOM_RPMHPD=y
|
||||
CONFIG_QCOM_RPMPD=y
|
||||
CONFIG_QCOM_OCMEM=y
|
||||
CONFIG_SDM_GPUCC_845=y
|
||||
CONFIG_SDM_VIDEOCC_845=y
|
||||
CONFIG_SDM_DISPCC_845=y
|
||||
@@ -67,7 +59,6 @@ CONFIG_POWER_RESET_QCOM_PON=y
|
||||
CONFIG_RTC_DRV_PM8XXX=y
|
||||
CONFIG_INTERCONNECT=y
|
||||
CONFIG_INTERCONNECT_QCOM=y
|
||||
CONFIG_INTERCONNECT_QCOM_MSM8996=y
|
||||
CONFIG_INTERCONNECT_QCOM_SDM845=y
|
||||
CONFIG_INTERCONNECT_QCOM_MSM8916=y
|
||||
CONFIG_INTERCONNECT_QCOM_OSM_L3=y
|
||||
@@ -75,16 +66,11 @@ CONFIG_INTERCONNECT_QCOM_SC7180=y
|
||||
CONFIG_CRYPTO_DEV_QCOM_RNG=y
|
||||
CONFIG_SC_DISPCC_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
|
||||
CONFIG_USB_RTL8152=y
|
||||
# db820c ethernet
|
||||
CONFIG_ATL1C=y
|
||||
# Chromebooks ethernet
|
||||
CONFIG_USB_ONBOARD_HUB=y
|
||||
|
||||
CONFIG_ARCH_ALPINE=n
|
||||
CONFIG_ARCH_BCM2835=n
|
||||
|
@@ -6,39 +6,32 @@ set -o xtrace
|
||||
# Fetch the arm-built rootfs image and unpack it in our x86 container (saves
|
||||
# network transfer, disk usage, and runtime on test jobs)
|
||||
|
||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
||||
if curl -X HEAD -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
|
||||
if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
|
||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||
else
|
||||
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
|
||||
fi
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"${ARTIFACTS_URL}"/lava-rootfs.tar.zst -o rootfs.tar.zst
|
||||
mkdir -p /rootfs-"$arch"
|
||||
tar -C /rootfs-"$arch" '--exclude=./dev/*' --zstd -xf rootfs.tar.zst
|
||||
rm rootfs.tar.zst
|
||||
wget ${ARTIFACTS_URL}/lava-rootfs.tgz -O rootfs.tgz
|
||||
mkdir -p /rootfs-$arch
|
||||
tar -C /rootfs-$arch '--exclude=./dev/*' -zxf rootfs.tgz
|
||||
rm rootfs.tgz
|
||||
|
||||
if [[ $arch == "arm64" ]]; then
|
||||
mkdir -p /baremetal-files
|
||||
pushd /baremetal-files
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${ARTIFACTS_URL}"/Image
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${ARTIFACTS_URL}"/Image.gz
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${ARTIFACTS_URL}"/cheza-kernel
|
||||
wget ${ARTIFACTS_URL}/Image
|
||||
wget ${ARTIFACTS_URL}/Image.gz
|
||||
wget ${ARTIFACTS_URL}/cheza-kernel
|
||||
|
||||
DEVICE_TREES=""
|
||||
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
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${ARTIFACTS_URL}/$DTB"
|
||||
wget ${ARTIFACTS_URL}/$DTB
|
||||
done
|
||||
|
||||
popd
|
||||
@@ -46,16 +39,12 @@ elif [[ $arch == "armhf" ]]; then
|
||||
mkdir -p /baremetal-files
|
||||
pushd /baremetal-files
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${ARTIFACTS_URL}"/zImage
|
||||
wget ${ARTIFACTS_URL}/zImage
|
||||
|
||||
DEVICE_TREES=""
|
||||
DEVICE_TREES="$DEVICE_TREES imx6q-cubox-i.dtb"
|
||||
DEVICE_TREES="$DEVICE_TREES tegra124-jetson-tk1.dtb"
|
||||
DEVICE_TREES="imx6q-cubox-i.dtb"
|
||||
|
||||
for DTB in $DEVICE_TREES; do
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O "${ARTIFACTS_URL}/$DTB"
|
||||
wget ${ARTIFACTS_URL}/$DTB
|
||||
done
|
||||
|
||||
popd
|
||||
|
@@ -1,16 +1,15 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
APITRACE_VERSION="790380e05854d5c9d315555444ffcc7acb8f4037"
|
||||
APITRACE_VERSION="170424754bb46002ba706e16ee5404b61988d74a"
|
||||
|
||||
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
|
||||
pushd /apitrace
|
||||
git checkout "$APITRACE_VERSION"
|
||||
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 --build _build --parallel --target apitrace eglretrace
|
||||
ninja -C _build
|
||||
mkdir build
|
||||
cp _build/apitrace build
|
||||
cp _build/eglretrace build
|
||||
|
@@ -1,31 +1,31 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
SCRIPT_DIR="$(pwd)"
|
||||
|
||||
CROSVM_VERSION=00af43e1b565e1ae0047ba84b970da5e089e4f48
|
||||
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm
|
||||
CROSVM_VERSION=c7cd0e0114c8363b884ba56d8e12adee718dcc93
|
||||
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/chromiumos/platform/crosvm /platform/crosvm
|
||||
pushd /platform/crosvm
|
||||
git checkout "$CROSVM_VERSION"
|
||||
git submodule update --init
|
||||
# Apply all crosvm patches for Mesa CI
|
||||
cat "$SCRIPT_DIR"/.gitlab-ci/container/build-crosvm_*.patch |
|
||||
patch -p1
|
||||
|
||||
VIRGLRENDERER_VERSION=fc2ad36998f8af8ea3cc68fb9c747dfec9cb4635
|
||||
VIRGLRENDERER_VERSION=0564c9a0c2f584e004a7d4864aee3b8ec9692105
|
||||
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
|
||||
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
|
||||
popd
|
||||
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
bindgen-cli \
|
||||
bindgen \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local \
|
||||
--version 0.63.0 \
|
||||
$EXTRA_CARGO_ARGS
|
||||
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
|
43
.gitlab-ci/container/build-crosvm_no-syslog.patch
Normal file
43
.gitlab-ci/container/build-crosvm_no-syslog.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From 3c57ec558bccc67fd53363c23deea20646be5c47 Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
||||
Date: Wed, 17 Nov 2021 10:18:04 +0100
|
||||
Subject: [PATCH] Hack syslog out
|
||||
|
||||
It's causing stability problems when running several Crosvm instances in
|
||||
parallel.
|
||||
|
||||
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
||||
---
|
||||
base/src/unix/linux/syslog.rs | 2 +-
|
||||
common/sys_util/src/linux/syslog.rs | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/base/src/unix/linux/syslog.rs b/base/src/unix/linux/syslog.rs
|
||||
index 05972a3a..f0db3781 100644
|
||||
--- a/base/src/unix/linux/syslog.rs
|
||||
+++ b/base/src/unix/linux/syslog.rs
|
||||
@@ -35,7 +35,7 @@ pub struct PlatformSyslog {
|
||||
impl Syslog for PlatformSyslog {
|
||||
fn new() -> Result<Self, Error> {
|
||||
Ok(Self {
|
||||
- socket: Some(openlog_and_get_socket()?),
|
||||
+ socket: None,
|
||||
})
|
||||
}
|
||||
|
||||
diff --git a/common/sys_util/src/linux/syslog.rs b/common/sys_util/src/linux/syslog.rs
|
||||
index 05972a3a..f0db3781 100644
|
||||
--- a/common/sys_util/src/linux/syslog.rs
|
||||
+++ b/common/sys_util/src/linux/syslog.rs
|
||||
@@ -35,7 +35,7 @@ pub struct PlatformSyslog {
|
||||
impl Syslog for PlatformSyslog {
|
||||
fn new() -> Result<Self, Error> {
|
||||
Ok(Self {
|
||||
- socket: Some(openlog_and_get_socket()?),
|
||||
+ socket: None,
|
||||
})
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -16,41 +15,10 @@ if [ -n "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
||||
DEQP_RUNNER_CARGO_ARGS="${DEQP_RUNNER_CARGO_ARGS} ${EXTRA_CARGO_ARGS}"
|
||||
else
|
||||
# Install from package registry
|
||||
DEQP_RUNNER_CARGO_ARGS="--version 0.16.0 ${EXTRA_CARGO_ARGS} -- deqp-runner"
|
||||
DEQP_RUNNER_CARGO_ARGS="--version 0.13.1 ${EXTRA_CARGO_ARGS} -- deqp-runner"
|
||||
fi
|
||||
|
||||
if [ -z "$ANDROID_NDK_HOME" ]; then
|
||||
cargo install --locked \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local \
|
||||
${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
|
||||
cargo install --locked \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local \
|
||||
${DEQP_RUNNER_CARGO_ARGS}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -7,25 +6,14 @@ git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
https://github.com/KhronosGroup/VK-GL-CTS.git \
|
||||
-b vulkan-cts-1.3.5.0 \
|
||||
-b vulkan-cts-1.3.1.1 \
|
||||
--depth 1 \
|
||||
/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
|
||||
# Cherry-pick fix for zlib dependency
|
||||
git fetch origin main
|
||||
git cherry-pick -x ec1804831b654ac55bd2a7a5dd27a556afe05030
|
||||
|
||||
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
|
||||
# libpng (sigh). The archives get their checksums checked anyway, and git
|
||||
@@ -39,24 +27,15 @@ cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
|
||||
popd
|
||||
|
||||
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 \
|
||||
-DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \
|
||||
@@ -64,41 +43,34 @@ cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||
$EXTRA_CMAKE_ARGS
|
||||
ninja
|
||||
|
||||
if [ "${DEQP_TARGET}" != 'android' ]; then
|
||||
mv /deqp/modules/egl/deqp-egl-x11 /deqp/modules/egl/deqp-egl
|
||||
fi
|
||||
mv /deqp/modules/egl/deqp-egl-x11 /deqp/modules/egl/deqp-egl
|
||||
|
||||
# Copy out the mustpass lists we want.
|
||||
mkdir /deqp/mustpass
|
||||
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
|
||||
cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
|
||||
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/master/vk-default.txt) ; do
|
||||
cat /VK-GL-CTS/external/vulkancts/mustpass/master/$mustpass \
|
||||
>> /deqp/mustpass/vk-master.txt
|
||||
done
|
||||
|
||||
if [ "${DEQP_TARGET}" != 'android' ]; then
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass_single/4.6.1.x/*-single.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-master.txt \
|
||||
/deqp/mustpass/.
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \
|
||||
/deqp/mustpass/.
|
||||
|
||||
# Save *some* executor utils, but otherwise strip things down
|
||||
# to reduct deqp build size:
|
||||
mkdir /deqp/executor.save
|
||||
cp /deqp/executor/testlog-to-* /deqp/executor.save
|
||||
rm -rf /deqp/executor
|
||||
mv /deqp/executor.save /deqp/executor
|
||||
fi
|
||||
# Save *some* executor utils, but otherwise strip things down
|
||||
# to reduct deqp build size:
|
||||
mkdir /deqp/executor.save
|
||||
cp /deqp/executor/testlog-to-* /deqp/executor.save
|
||||
rm -rf /deqp/executor
|
||||
mv /deqp/executor.save /deqp/executor
|
||||
|
||||
# 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
|
||||
@@ -109,11 +81,10 @@ rm -rf /deqp/external/openglcts/modules/cts-runner
|
||||
rm -rf /deqp/modules/internal
|
||||
rm -rf /deqp/execserver
|
||||
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
|
||||
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
|
||||
${STRIP_CMD:-strip} external/openglcts/modules/glcts
|
||||
${STRIP_CMD:-strip} modules/*/deqp-*
|
||||
du -sh ./*
|
||||
du -sh *
|
||||
rm -rf /VK-GL-CTS
|
||||
popd
|
||||
|
@@ -2,18 +2,18 @@
|
||||
|
||||
set -ex
|
||||
|
||||
GFXRECONSTRUCT_VERSION=5ed3caeecc46e976c4df31e263df8451ae176c26
|
||||
GFXRECONSTRUCT_VERSION=3738decc2f4f9ff183818e5ab213a75a79fb7ab1
|
||||
|
||||
git clone https://github.com/LunarG/gfxreconstruct.git \
|
||||
--single-branch \
|
||||
-b master \
|
||||
--no-checkout \
|
||||
/gfxreconstruct
|
||||
git clone https://github.com/LunarG/gfxreconstruct.git --single-branch -b master --no-checkout /gfxreconstruct
|
||||
pushd /gfxreconstruct
|
||||
git checkout "$GFXRECONSTRUCT_VERSION"
|
||||
git submodule update --init
|
||||
git submodule update
|
||||
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/gfxreconstruct/build -DBUILD_WERROR=OFF
|
||||
cmake --build _build --parallel --target tools/{replay,info}/install/strip
|
||||
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
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
|
||||
popd
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
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
|
||||
pushd /parallel-deqp-runner
|
||||
|
@@ -1,11 +1,9 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
mkdir -p kernel
|
||||
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 ${KERNEL_URL} \
|
||||
| tar -xj --strip-components=1 -C kernel
|
||||
wget -qO- ${KERNEL_URL} | tar -xj --strip-components=1 -C kernel
|
||||
pushd kernel
|
||||
|
||||
# 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).
|
||||
mkdir -p ld-links
|
||||
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
|
||||
done
|
||||
export PATH=`pwd`/ld-links:$PATH
|
||||
|
||||
NEWPATH=$(pwd)/ld-links
|
||||
export PATH=$NEWPATH:$PATH
|
||||
|
||||
KERNEL_FILENAME=$(basename $KERNEL_URL)
|
||||
export LOCALVERSION="$KERNEL_FILENAME"
|
||||
export LOCALVERSION="`basename $KERNEL_URL`"
|
||||
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/container/${KERNEL_ARCH}.config
|
||||
make ${KERNEL_IMAGE_NAME}
|
||||
for image in ${KERNEL_IMAGE_NAME}; do
|
||||
@@ -33,8 +28,10 @@ if [[ -n ${DEVICE_TREES} ]]; then
|
||||
cp ${DEVICE_TREES} /lava-files/.
|
||||
fi
|
||||
|
||||
make modules
|
||||
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
|
||||
if [[ ${DEBIAN_ARCH} = "amd64" || ${DEBIAN_ARCH} = "arm64" ]]; then
|
||||
make modules
|
||||
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
|
||||
fi
|
||||
|
||||
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
|
||||
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/spirv-mesa3d-.spv /usr/lib/clc/
|
||||
|
||||
du -sh ./*
|
||||
du -sh *
|
||||
rm -rf /libclc /llvm-project
|
||||
|
@@ -1,15 +1,14 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
export LIBDRM_VERSION=libdrm-2.4.110
|
||||
|
||||
curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
https://dri.freedesktop.org/libdrm/"$LIBDRM_VERSION".tar.xz
|
||||
tar -xvf "$LIBDRM_VERSION".tar.xz && rm "$LIBDRM_VERSION".tar.xz
|
||||
cd "$LIBDRM_VERSION"
|
||||
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||
tar -xvf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
||||
cd $LIBDRM_VERSION
|
||||
meson build -D vc4=false -D freedreno=false -D etnaviv=false $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
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
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
REV="355ad6bcb2cb3d9e030b7c6eef2b076b0dfb4d63"
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
|
||||
pushd /piglit
|
||||
git checkout "$REV"
|
||||
git checkout 445711587d461539a4d8f9d35a7fe996a86d3c8d
|
||||
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
|
||||
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS $EXTRA_CMAKE_ARGS
|
||||
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
|
||||
rm -rf target_api
|
||||
if [ "$PIGLIT_BUILD_TARGETS" = "piglit_replayer" ]; then
|
||||
# shellcheck disable=SC2038,SC2185 # TODO: rewrite find
|
||||
if [ "x$PIGLIT_BUILD_TARGETS" = "xpiglit_replayer" ]; then
|
||||
find ! -regex "^\.$" \
|
||||
! -regex "^\.\/piglit.*" \
|
||||
! -regex "^\.\/framework.*" \
|
||||
|
@@ -8,25 +8,17 @@ set -ex
|
||||
# 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
|
||||
# are just available to all build jobs.
|
||||
mkdir -p "$HOME"/.cargo
|
||||
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
|
||||
mkdir -p $HOME/.cargo
|
||||
ln -s /usr/local/bin $HOME/.cargo/bin
|
||||
|
||||
# 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
|
||||
# with.
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
--proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
|
||||
--default-toolchain $RUST_VERSION \
|
||||
--profile minimal \
|
||||
-y
|
||||
|
||||
rustup component add rustfmt
|
||||
#
|
||||
# Pick the rust compiler (1.48) available in Debian stable, and pick a specific
|
||||
# snapshot from rustup so the compiler doesn't drift on us.
|
||||
wget https://sh.rustup.rs -O - | \
|
||||
sh -s -- -y --default-toolchain 1.49.0-2020-12-31
|
||||
|
||||
# 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.
|
||||
|
@@ -41,7 +41,7 @@ download_skia_source() {
|
||||
# Skia cloned from https://android.googlesource.com/platform/external/skqp
|
||||
# has all needed assets tracked on git-fs
|
||||
SKQP_REPO=https://android.googlesource.com/platform/external/skqp
|
||||
SKQP_BRANCH=android-cts-11.0_r7
|
||||
SKQP_BRANCH=android-cts-10.0_r11
|
||||
|
||||
git clone --branch "${SKQP_BRANCH}" --depth 1 "${SKQP_REPO}" "${SKIA_DIR}"
|
||||
}
|
||||
@@ -49,15 +49,15 @@ download_skia_source() {
|
||||
set -ex
|
||||
|
||||
SCRIPT_DIR=$(realpath "$(dirname "$0")")
|
||||
SKQP_PATCH_DIR="${SCRIPT_DIR}/patches"
|
||||
SKQP_PATCH_DIR="${SCRIPT_DIR}"
|
||||
BASE_ARGS_GN_FILE="${SCRIPT_DIR}/build-skqp_base.gn"
|
||||
|
||||
SKQP_ARCH=${SKQP_ARCH:-x64}
|
||||
SKIA_DIR=${SKIA_DIR:-$(mktemp -d)}
|
||||
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_BINARIES=(skqp list_gpu_unit_tests list_gms)
|
||||
SKQP_BINARIES=(skqp)
|
||||
|
||||
download_skia_source
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
|
@@ -2,7 +2,8 @@
|
||||
|
||||
set -ex
|
||||
|
||||
VKD3D_PROTON_COMMIT="507cb3195bae32395c69763afec2b1ac078d509a"
|
||||
VKD3D_PROTON_VERSION="2.6"
|
||||
VKD3D_PROTON_COMMIT="3e5aab6fb3e18f81a71b339be4cb5cdf55140980"
|
||||
|
||||
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
|
||||
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
|
||||
@@ -15,7 +16,7 @@ function build_arch {
|
||||
meson "$@" \
|
||||
-Denable_tests=true \
|
||||
--buildtype release \
|
||||
--prefix "$VKD3D_PROTON_DST_DIR" \
|
||||
--prefix "$VKD3D_PROTON_BUILD_DIR" \
|
||||
--strip \
|
||||
--bindir "x${arch}" \
|
||||
--libdir "x${arch}" \
|
||||
@@ -23,17 +24,20 @@ function build_arch {
|
||||
|
||||
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"
|
||||
git checkout "$VKD3D_PROTON_COMMIT"
|
||||
git submodule update --init --recursive
|
||||
git submodule update --recursive
|
||||
build_arch 64
|
||||
build_arch 86
|
||||
build_arch 64 --cross-file build-win64.txt
|
||||
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
|
||||
|
||||
"$VKD3D_PROTON_BUILD_DIR"/setup_vkd3d_proton.sh install
|
||||
rm -rf "$VKD3D_PROTON_BUILD_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
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -9,7 +8,7 @@ export WAYLAND_PROTOCOLS_VERSION="1.24"
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland
|
||||
cd wayland
|
||||
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
|
||||
cd ..
|
||||
rm -rf wayland
|
||||
@@ -17,7 +16,7 @@ rm -rf wayland
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols
|
||||
cd wayland-protocols
|
||||
git checkout "$WAYLAND_PROTOCOLS_VERSION"
|
||||
meson _build $EXTRA_MESON_ARGS
|
||||
meson _build
|
||||
ninja -C _build install
|
||||
cd ..
|
||||
rm -rf wayland-protocols
|
||||
|
@@ -7,6 +7,4 @@ fi
|
||||
# Clean up any build cache for rust.
|
||||
rm -rf /.cargo
|
||||
|
||||
if test -x /usr/bin/ccache; then
|
||||
ccache --show-stats
|
||||
fi
|
||||
ccache --show-stats
|
||||
|
@@ -1,52 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -x /usr/bin/ccache; then
|
||||
if test -f /etc/debian_version; then
|
||||
CCACHE_PATH=/usr/lib/ccache
|
||||
elif test -f /etc/alpine-release; then
|
||||
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
|
||||
if test -f /etc/debian_version; then
|
||||
CCACHE_PATH=/usr/lib/ccache
|
||||
else
|
||||
CCACHE_PATH=/usr/lib64/ccache
|
||||
fi
|
||||
|
||||
# When not using the mold linker (e.g. unsupported architecture), force
|
||||
# linkers to gold, since it's so much faster for building. We can't use
|
||||
# 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++"
|
||||
|
||||
# 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
|
||||
# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
|
||||
find /usr/bin -name \*-ld -o -name ld | \
|
||||
grep -v mingw | \
|
||||
xargs -n 1 -I '{}' ln -sf '{}.gold' '{}'
|
||||
|
||||
ccache --show-stats
|
||||
|
||||
# Make a wrapper script for ninja to always include the -j flags
|
||||
{
|
||||
echo '#!/bin/sh -x'
|
||||
# shellcheck disable=SC2016
|
||||
echo '/usr/bin/ninja -j${FDO_CI_CONCURRENT:-4} "$@"'
|
||||
} > /usr/local/bin/ninja
|
||||
echo '#!/bin/sh -x' > /usr/local/bin/ninja
|
||||
echo '/usr/bin/ninja -j${FDO_CI_CONCURRENT:-4} "$@"' >> /usr/local/bin/ninja
|
||||
chmod +x /usr/local/bin/ninja
|
||||
|
||||
# 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)
|
||||
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=$4
|
||||
cross_file="/cross_file-$arch.txt"
|
||||
sdk_version=$5
|
||||
|
||||
# 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,
|
||||
# and allowing it in code generation means we get unwind symbols that break
|
||||
# the libEGL and driver symbol tests.
|
||||
|
||||
cat > "$cross_file" <<EOF
|
||||
cat >$cross_file <<EOF
|
||||
[binaries]
|
||||
ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
|
||||
c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-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++']
|
||||
ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-ar'
|
||||
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}29-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
|
||||
c_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']
|
||||
|
||||
[host_machine]
|
||||
system = 'android'
|
||||
system = 'linux'
|
||||
cpu_family = '$cpu_family'
|
||||
cpu = '$cpu'
|
||||
endian = 'little'
|
||||
|
||||
[properties]
|
||||
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
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
# Makes a .pc file in the Android NDK for meson to find its libraries.
|
||||
|
||||
@@ -10,7 +9,6 @@ pc="$2"
|
||||
cflags="$3"
|
||||
libs="$4"
|
||||
version="$5"
|
||||
sdk_version="$6"
|
||||
|
||||
sysroot=$ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
||||
|
||||
@@ -25,7 +23,7 @@ for arch in \
|
||||
cat >$pcdir/$pc <<EOF
|
||||
prefix=$sysroot
|
||||
exec_prefix=$sysroot
|
||||
libdir=$sysroot/usr/lib/$arch/$sdk_version
|
||||
libdir=$sysroot/usr/lib/$arch/29
|
||||
sharedlibdir=$sysroot/usr/lib/$arch
|
||||
includedir=$sysroot/usr/include
|
||||
|
||||
@@ -34,7 +32,7 @@ Description: zlib compression library
|
||||
Version: $version
|
||||
|
||||
Requires:
|
||||
Libs: -L$sysroot/usr/lib/$arch/$sdk_version $libs
|
||||
Libs: -L$sysroot/usr/lib/$arch/29 $libs
|
||||
Cflags: -I$sysroot/usr/include $cflags
|
||||
EOF
|
||||
done
|
||||
|
@@ -2,18 +2,18 @@
|
||||
|
||||
arch=$1
|
||||
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
|
||||
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
|
||||
# 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"
|
||||
|
||||
# Add a line for rustc, which meson env2mfile is missing.
|
||||
cc=$(sed -n "s|^c\s*=\s*\[?'\(.*\)'\]?|\1|p" < "$cross_file")
|
||||
|
||||
# Add a line for rustc, which debcrossgen is missing.
|
||||
cc=`sed -n 's|c = .\(.*\).|\1|p' < $cross_file`
|
||||
if [[ "$arch" = "arm64" ]]; then
|
||||
rust_target=aarch64-unknown-linux-gnu
|
||||
elif [[ "$arch" = "armhf" ]]; then
|
||||
@@ -27,8 +27,6 @@ elif [[ "$arch" = "s390x" ]]; then
|
||||
else
|
||||
echo "Needs rustc target mapping"
|
||||
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"
|
||||
|
||||
# Set up cmake cross compile toolchain file for dEQP builds
|
||||
@@ -36,18 +34,18 @@ toolchain_file="/toolchain-$arch.cmake"
|
||||
if [[ "$arch" = "arm64" ]]; then
|
||||
GCC_ARCH="aarch64-linux-gnu"
|
||||
DE_CPU="DE_CPU_ARM_64"
|
||||
CMAKE_ARCH=arm
|
||||
elif [[ "$arch" = "armhf" ]]; then
|
||||
GCC_ARCH="arm-linux-gnueabihf"
|
||||
DE_CPU="DE_CPU_ARM"
|
||||
CMAKE_ARCH=arm
|
||||
fi
|
||||
|
||||
if [[ -n "$GCC_ARCH" ]]; then
|
||||
{
|
||||
echo "set(CMAKE_SYSTEM_NAME Linux)";
|
||||
echo "set(CMAKE_SYSTEM_PROCESSOR arm)";
|
||||
echo "set(CMAKE_C_COMPILER /usr/lib/ccache/$GCC_ARCH-gcc)";
|
||||
echo "set(CMAKE_CXX_COMPILER /usr/lib/ccache/$GCC_ARCH-g++)";
|
||||
echo "set(ENV{PKG_CONFIG} \"/usr/bin/$GCC_ARCH-pkg-config\")";
|
||||
echo "set(DE_CPU $DE_CPU)";
|
||||
} > "$toolchain_file"
|
||||
echo "set(CMAKE_SYSTEM_NAME Linux)" > "$toolchain_file"
|
||||
echo "set(CMAKE_SYSTEM_PROCESSOR arm)" >> "$toolchain_file"
|
||||
echo "set(CMAKE_C_COMPILER /usr/lib/ccache/$GCC_ARCH-gcc)" >> "$toolchain_file"
|
||||
echo "set(CMAKE_CXX_COMPILER /usr/lib/ccache/$GCC_ARCH-g++)" >> "$toolchain_file"
|
||||
echo "set(ENV{PKG_CONFIG} \"/usr/bin/$GCC_ARCH-pkg-config\")" >> "$toolchain_file"
|
||||
echo "set(DE_CPU $DE_CPU)" >> "$toolchain_file"
|
||||
fi
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#!/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
|
||||
|
||||
@@ -14,37 +11,19 @@ if [ $DEBIAN_ARCH = arm64 ]; then
|
||||
libvulkan-dev
|
||||
"
|
||||
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
|
||||
inetutils-syslogd
|
||||
iptables
|
||||
libcap2
|
||||
libfontconfig1
|
||||
libelf1
|
||||
libfdt1
|
||||
libgl1
|
||||
libglu1-mesa
|
||||
libllvm13
|
||||
libllvm11
|
||||
libva2
|
||||
libva-drm2
|
||||
libvulkan-dev
|
||||
socat
|
||||
spirv-tools
|
||||
sysvinit-core
|
||||
"
|
||||
|
||||
elif [ $DEBIAN_ARCH = armhf ]; then
|
||||
ARCH_PACKAGES="firmware-misc-nonfree
|
||||
"
|
||||
fi
|
||||
|
||||
INSTALL_CI_FAIRY_PACKAGES="git
|
||||
@@ -54,17 +33,14 @@ INSTALL_CI_FAIRY_PACKAGES="git
|
||||
python3-wheel
|
||||
"
|
||||
|
||||
apt-get update
|
||||
apt-get -y install --no-install-recommends \
|
||||
$ARCH_PACKAGES \
|
||||
$INSTALL_CI_FAIRY_PACKAGES \
|
||||
$EXTRA_LOCAL_PACKAGES \
|
||||
bash \
|
||||
ca-certificates \
|
||||
curl \
|
||||
firmware-realtek \
|
||||
initramfs-tools \
|
||||
jq \
|
||||
libasan6 \
|
||||
libexpat1 \
|
||||
libpng16-16 \
|
||||
@@ -103,32 +79,13 @@ apt-get -y install --no-install-recommends \
|
||||
sntp \
|
||||
strace \
|
||||
waffle-utils \
|
||||
weston \
|
||||
wget \
|
||||
xinit \
|
||||
xserver-xorg-core \
|
||||
xwayland \
|
||||
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
|
||||
xserver-xorg-core
|
||||
|
||||
# Needed for ci-fairy, this revision is able to upload files to
|
||||
# MinIO and doesn't depend on git
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
# Needed for manipulation with traces yaml files.
|
||||
pip3 install yq
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@34f4ade99434043f88e164933f570301fd18b125
|
||||
|
||||
apt-get purge -y \
|
||||
$INSTALL_CI_FAIRY_PACKAGES
|
||||
@@ -231,8 +188,6 @@ UNNEEDED_PACKAGES="apt libapt-pkg6.0 "\
|
||||
"libgles2-mesa-dev "\
|
||||
"libglx-mesa0 "\
|
||||
"mesa-common-dev "\
|
||||
"gnupg2 "\
|
||||
"software-properties-common " \
|
||||
|
||||
# Removing unneeded packages
|
||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||
@@ -257,7 +212,7 @@ rm -rf etc/dpkg
|
||||
# Drop directories not part of ostree
|
||||
# Note that /var needs to exist as ostree bind mounts the deployment /var over
|
||||
# it
|
||||
rm -rf var/* srv share
|
||||
rm -rf var/* opt srv share
|
||||
|
||||
# ca-certificates are in /etc drop the source
|
||||
rm -rf usr/share/ca-certificates
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
@@ -15,11 +14,9 @@ apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
curl \
|
||||
crossbuild-essential-$arch \
|
||||
libelf-dev:$arch \
|
||||
libexpat1-dev:$arch \
|
||||
libffi-dev:$arch \
|
||||
libpciaccess-dev:$arch \
|
||||
libstdc++6:$arch \
|
||||
libvulkan-dev:$arch \
|
||||
@@ -37,26 +34,21 @@ apt-get install -y --no-remove \
|
||||
libxrandr-dev:$arch \
|
||||
libxshmfence-dev:$arch \
|
||||
libxxf86vm-dev:$arch \
|
||||
libwayland-dev:$arch
|
||||
wget
|
||||
|
||||
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" ]] || [[ $arch == "i386" ]] || [[ $arch == "arm64" ]]; then
|
||||
LLVM=13
|
||||
if [[ $arch == "s390x" ]]; then
|
||||
LLVM=9
|
||||
else
|
||||
LLVM=11
|
||||
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
|
||||
# with apt-get, then force-install llvm-*-{dev,tools}:$arch with dpkg to get
|
||||
# around this.
|
||||
apt-get install -y --no-remove --no-install-recommends \
|
||||
apt-get install -y --no-remove \
|
||||
libclang-cpp${LLVM}:$arch \
|
||||
libffi-dev:$arch \
|
||||
libgcc-s1:$arch \
|
||||
libtinfo-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)"
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -12,29 +11,27 @@ EPHEMERAL="\
|
||||
apt-get install -y --no-remove $EPHEMERAL
|
||||
|
||||
# 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
|
||||
ndk=android-ndk-r21d
|
||||
wget -O $ndk.zip https://dl.google.com/android/repository/$ndk-linux-x86_64.zip
|
||||
unzip -d / $ndk.zip "$ndk/toolchains/llvm/*"
|
||||
rm $ndk.zip
|
||||
# Since it was packed as a zip file, symlinks/hardlinks got turned into
|
||||
# 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.
|
||||
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 i686-linux-android x86 x86 $ANDROID_SDK_VERSION
|
||||
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 arm-linux-androideabi arm armv7hl $ANDROID_SDK_VERSION armv7a-linux-androideabi
|
||||
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
|
||||
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 armv7a-linux-androideabi
|
||||
|
||||
# Not using build-libdrm.sh because we don't want its cleanup after building
|
||||
# each arch. Fetch and extract now.
|
||||
export LIBDRM_VERSION=libdrm-2.4.110
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||
tar -xf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
||||
|
||||
for arch in \
|
||||
@@ -63,8 +60,7 @@ done
|
||||
rm -rf $LIBDRM_VERSION
|
||||
|
||||
export LIBELF_VERSION=libelf-0.8.13
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O https://fossies.org/linux/misc/old/$LIBELF_VERSION.tar.gz
|
||||
wget https://fossies.org/linux/misc/old/$LIBELF_VERSION.tar.gz
|
||||
|
||||
# Not 100% sure who runs the mirror above so be extra careful
|
||||
if ! echo "4136d7b4c04df68b686570afa26988ac ${LIBELF_VERSION}.tar.gz" | md5sum -c -; then
|
||||
@@ -90,11 +86,11 @@ for arch in \
|
||||
ccarch=armv7a-linux-androideabi
|
||||
fi
|
||||
|
||||
export CC=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
|
||||
export CC=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}${ANDROID_SDK_VERSION}-clang
|
||||
export CXX=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}${ANDROID_SDK_VERSION}-clang++
|
||||
export LD=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ld
|
||||
export RANLIB=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
|
||||
export CC=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ar
|
||||
export CC=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}29-clang
|
||||
export CXX=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}29-clang++
|
||||
export LD=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ld
|
||||
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
|
||||
# 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
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
@@ -9,34 +8,25 @@ 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
|
||||
apt-get update
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at
|
||||
# the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
libssl-dev \
|
||||
"
|
||||
|
||||
apt-get -y install \
|
||||
${EXTRA_LOCAL_PACKAGES} \
|
||||
${STABLE_EPHEMERAL} \
|
||||
abootimg \
|
||||
autoconf \
|
||||
automake \
|
||||
bc \
|
||||
bison \
|
||||
ccache \
|
||||
cmake \
|
||||
curl \
|
||||
debootstrap \
|
||||
fastboot \
|
||||
flex \
|
||||
g++ \
|
||||
git \
|
||||
glslang-tools \
|
||||
kmod \
|
||||
libasan6 \
|
||||
libdrm-dev \
|
||||
libelf-dev \
|
||||
libexpat1-dev \
|
||||
libvulkan-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
@@ -51,9 +41,8 @@ apt-get -y install \
|
||||
libxrandr-dev \
|
||||
libxshmfence-dev \
|
||||
libxxf86vm-dev \
|
||||
libwayland-dev \
|
||||
llvm-11-dev \
|
||||
ninja-build \
|
||||
meson \
|
||||
pkg-config \
|
||||
python3-mako \
|
||||
python3-pil \
|
||||
@@ -61,32 +50,23 @@ apt-get -y install \
|
||||
python3-requests \
|
||||
python3-setuptools \
|
||||
u-boot-tools \
|
||||
wget \
|
||||
xz-utils \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
zlib1g-dev
|
||||
|
||||
# Not available anymore in bullseye
|
||||
apt-get install -y --no-remove -t buster \
|
||||
android-sdk-ext4-utils
|
||||
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
# We need at least 0.61.4 for proper Rust; 0.62 for modern meson env2mfile
|
||||
pip3 install meson==0.63.3
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@34f4ade99434043f88e164933f570301fd18b125
|
||||
|
||||
arch=armhf
|
||||
. .gitlab-ci/container/cross_build.sh
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
. .gitlab-ci/container/build-mold.sh
|
||||
|
||||
# dependencies where we want a specific version
|
||||
EXTRA_MESON_ARGS=
|
||||
. .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
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2154 # arch is assigned in previous scripts
|
||||
|
||||
set -e
|
||||
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 install -y --no-remove \
|
||||
abootimg \
|
||||
cpio \
|
||||
curl \
|
||||
fastboot \
|
||||
netcat \
|
||||
procps \
|
||||
@@ -20,30 +19,21 @@ apt-get install -y --no-remove \
|
||||
python3-serial \
|
||||
rsync \
|
||||
snmp \
|
||||
zstd
|
||||
wget
|
||||
|
||||
# setup SNMPv2 SMI MIB
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
https://raw.githubusercontent.com/net-snmp/net-snmp/master/mibs/SNMPv2-SMI.txt \
|
||||
-o /usr/share/snmp/mibs/SNMPv2-SMI.txt
|
||||
wget https://raw.githubusercontent.com/net-snmp/net-snmp/master/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
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
"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
|
||||
# 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 \
|
||||
-O /rootfs-arm64/lib/firmware/qcom/a530_pfp.fw
|
||||
|
||||
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
|
||||
|
||||
set -e
|
||||
|
||||
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
|
||||
|
@@ -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
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get install -y ca-certificates gnupg2 software-properties-common
|
||||
|
||||
# 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 install -y ca-certificates
|
||||
|
||||
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 \
|
||||
bison \
|
||||
ccache \
|
||||
curl \
|
||||
clang-format-13 \
|
||||
dpkg-cross \
|
||||
findutils \
|
||||
flex \
|
||||
g++ \
|
||||
cmake \
|
||||
g++-mingw-w64-x86-64 \
|
||||
gcc \
|
||||
git \
|
||||
glslang-tools \
|
||||
kmod \
|
||||
libclang-13-dev \
|
||||
libclang-11-dev \
|
||||
libclang-9-dev \
|
||||
libclc-dev \
|
||||
libelf-dev \
|
||||
libepoxy-dev \
|
||||
libexpat1-dev \
|
||||
libgtk-3-dev \
|
||||
libllvm13 \
|
||||
libllvm11 \
|
||||
libllvm9 \
|
||||
libomxil-bellagio-dev \
|
||||
libpciaccess-dev \
|
||||
libunwind-dev \
|
||||
@@ -59,32 +52,27 @@ apt-get install -y --no-remove \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
libxshmfence-dev \
|
||||
libxvmc-dev \
|
||||
libxxf86vm-dev \
|
||||
libz-mingw-w64-dev \
|
||||
make \
|
||||
ninja-build \
|
||||
meson \
|
||||
pkg-config \
|
||||
python3-mako \
|
||||
python3-pil \
|
||||
python3-ply \
|
||||
python3-requests \
|
||||
qemu-user \
|
||||
valgrind \
|
||||
wget \
|
||||
wine64 \
|
||||
x11proto-dri2-dev \
|
||||
x11proto-gl-dev \
|
||||
x11proto-randr-dev \
|
||||
xz-utils \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
zlib1g-dev
|
||||
|
||||
# Needed for ci-fairy, this revision is able to upload files to MinIO
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
# 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
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@34f4ade99434043f88e164933f570301fd18b125
|
||||
|
||||
############### 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
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
@@ -13,21 +12,24 @@ STABLE_EPHEMERAL=" \
|
||||
autotools-dev \
|
||||
bzip2 \
|
||||
libtool \
|
||||
libssl-dev \
|
||||
python3-pip \
|
||||
"
|
||||
|
||||
# We need multiarch for Wine
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
check \
|
||||
clang \
|
||||
cmake \
|
||||
libasan6 \
|
||||
libarchive-dev \
|
||||
libclang-cpp13-dev \
|
||||
libclang-cpp11-dev \
|
||||
libgbm-dev \
|
||||
libglvnd-dev \
|
||||
libllvmspirvlib-dev \
|
||||
liblua5.3-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxcb-dri3-dev \
|
||||
@@ -39,39 +41,43 @@ apt-get install -y --no-remove \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxml2-dev \
|
||||
llvm-13-dev \
|
||||
llvm-11-dev \
|
||||
llvm-9-dev \
|
||||
ocl-icd-opencl-dev \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
python3-freezegun \
|
||||
python3-pytest \
|
||||
procps \
|
||||
spirv-tools \
|
||||
shellcheck \
|
||||
strace \
|
||||
time \
|
||||
yamllint \
|
||||
zstd
|
||||
wine \
|
||||
wine32
|
||||
|
||||
|
||||
. .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
|
||||
export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
|
||||
|
||||
export XORGMACROS_VERSION=util-macros-1.19.0
|
||||
|
||||
. .gitlab-ci/container/build-mold.sh
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -O \
|
||||
$XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
||||
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
||||
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
||||
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
||||
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-wayland.sh
|
||||
@@ -83,22 +89,17 @@ cd shader-db
|
||||
make
|
||||
popd
|
||||
|
||||
git clone https://github.com/microsoft/DirectX-Headers -b v1.606.4 --depth 1
|
||||
mkdir -p DirectX-Headers/build
|
||||
pushd DirectX-Headers/build
|
||||
git clone https://github.com/microsoft/DirectX-Headers -b v1.0.1 --depth 1
|
||||
pushd DirectX-Headers
|
||||
mkdir build
|
||||
cd build
|
||||
meson .. --backend=ninja --buildtype=release -Dbuild-test=false
|
||||
ninja
|
||||
ninja install
|
||||
popd
|
||||
rm -rf DirectX-Headers
|
||||
|
||||
python3 -m pip install -r .gitlab-ci/lava/requirements.txt
|
||||
|
||||
# install bindgen
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
bindgen --version 0.59.2 \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local
|
||||
pip3 install git+https://git.lavasoftware.org/lava/lavacli@3db3ddc45e5358908bc6a17448059ea2340492b7
|
||||
|
||||
############### 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
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
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
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at
|
||||
# the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
autoconf \
|
||||
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 \
|
||||
cargo \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
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 dist-upgrade -y
|
||||
|
||||
apt-get install -y \
|
||||
sysvinit-core
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
curl \
|
||||
git \
|
||||
git-lfs \
|
||||
inetutils-syslogd \
|
||||
iptables \
|
||||
jq \
|
||||
libasan6 \
|
||||
libexpat1 \
|
||||
libllvm13 \
|
||||
libllvm11 \
|
||||
libllvm9 \
|
||||
liblz4-1 \
|
||||
libpng16-16 \
|
||||
libpython3.9 \
|
||||
@@ -92,68 +48,22 @@ apt-get install -y --no-remove \
|
||||
python3-requests \
|
||||
python3-six \
|
||||
python3-yaml \
|
||||
socat \
|
||||
vulkan-tools \
|
||||
waffle-utils \
|
||||
xauth \
|
||||
xvfb \
|
||||
zlib1g \
|
||||
zstd
|
||||
zlib1g
|
||||
|
||||
apt-get install -y --no-install-recommends \
|
||||
$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
|
||||
# and doesn't depend on git
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
|
||||
|
||||
# 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
|
||||
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@34f4ade99434043f88e164933f570301fd18b125
|
||||
|
||||
############### Build dEQP runner
|
||||
. .gitlab-ci/container/build-deqp-runner.sh
|
||||
|
||||
rm -rf /root/.cargo
|
||||
rm -rf /root/.rustup
|
||||
|
||||
ccache --show-stats
|
||||
rm -rf ~/.cargo
|
||||
|
||||
apt-get purge -y $STABLE_EPHEMERAL
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
@@ -8,31 +7,38 @@ export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
autoconf \
|
||||
automake \
|
||||
bc \
|
||||
bison \
|
||||
bzip2 \
|
||||
ccache \
|
||||
clang-13 \
|
||||
clang-11 \
|
||||
cmake \
|
||||
flex \
|
||||
g++ \
|
||||
glslang-tools \
|
||||
libasound2-dev \
|
||||
libcap-dev \
|
||||
libclang-cpp13-dev \
|
||||
libclang-cpp11-dev \
|
||||
libelf-dev \
|
||||
libexpat1-dev \
|
||||
libfdt-dev \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
libllvmspirvlib-dev \
|
||||
libpciaccess-dev \
|
||||
libpng-dev \
|
||||
libudev-dev \
|
||||
libvulkan-dev \
|
||||
libwaffle-dev \
|
||||
libwayland-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxext-dev \
|
||||
libxkbcommon-dev \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
llvm-13-dev \
|
||||
llvm-11-dev \
|
||||
llvm-spirv \
|
||||
make \
|
||||
meson \
|
||||
ocl-icd-opencl-dev \
|
||||
@@ -42,34 +48,62 @@ STABLE_EPHEMERAL=" \
|
||||
xz-utils \
|
||||
"
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
clinfo \
|
||||
iptables \
|
||||
libclang-common-13-dev \
|
||||
libclang-common-11-dev \
|
||||
libclang-cpp13 \
|
||||
libclang-cpp11 \
|
||||
libcap2 \
|
||||
libegl1 \
|
||||
libepoxy0 \
|
||||
libepoxy-dev \
|
||||
libfdt1 \
|
||||
libllvmspirvlib11 \
|
||||
libxcb-shm0 \
|
||||
ocl-icd-libopencl1 \
|
||||
python3-lxml \
|
||||
python3-renderdoc \
|
||||
python3-simplejson \
|
||||
socat \
|
||||
spirv-tools \
|
||||
weston
|
||||
sysvinit-core \
|
||||
wget
|
||||
|
||||
|
||||
. .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
|
||||
|
||||
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
|
||||
|
||||
@@ -79,10 +113,6 @@ DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
. .gitlab-ci/container/build-apitrace.sh
|
||||
|
||||
############### Build validation layer for zink
|
||||
|
||||
. .gitlab-ci/container/build-vulkan-validation.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
ccache --show-stats
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#!/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 -o xtrace
|
||||
@@ -17,7 +14,6 @@ STABLE_EPHEMERAL=" \
|
||||
g++-mingw-w64-x86-64-posix \
|
||||
glslang-tools \
|
||||
libexpat1-dev \
|
||||
gnupg2 \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
liblz4-dev \
|
||||
@@ -39,54 +35,81 @@ STABLE_EPHEMERAL=" \
|
||||
p7zip \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
python3-distutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
software-properties-common \
|
||||
wine64-tools \
|
||||
wget \
|
||||
xz-utils \
|
||||
"
|
||||
|
||||
apt-get install -y --no-remove --no-install-recommends \
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
curl \
|
||||
libepoxy0 \
|
||||
libxcb-shm0 \
|
||||
pciutils \
|
||||
python3-lxml \
|
||||
python3-simplejson \
|
||||
xinit \
|
||||
xserver-xorg-video-amdgpu \
|
||||
xserver-xorg-video-ati
|
||||
|
||||
# Install a more recent version of Wine than exists in Debian.
|
||||
apt-key add .gitlab-ci/container/debian/winehq.gpg.key
|
||||
apt-add-repository https://dl.winehq.org/wine-builds/debian/
|
||||
apt-get update -q
|
||||
# We need multiarch for Wine
|
||||
dpkg --add-architecture i386
|
||||
|
||||
# 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-get 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
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
wine \
|
||||
wine32 \
|
||||
wine64
|
||||
|
||||
function setup_wine() {
|
||||
export WINEDEBUG="-all"
|
||||
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
|
||||
|
||||
. .gitlab-ci/container/setup-wine.sh "/dxvk-wine64"
|
||||
. .gitlab-ci/container/install-wine-dxvk.sh
|
||||
DXVK_VERSION="1.8.1"
|
||||
|
||||
############### 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
|
||||
wine64 \
|
||||
wine \
|
||||
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
|
||||
/v Path \
|
||||
/t REG_EXPAND_SZ \
|
||||
@@ -97,11 +120,19 @@ wine64 \
|
||||
|
||||
. .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
|
||||
|
||||
. .gitlab-ci/container/build-hang-detection.sh
|
||||
|
||||
############### Build piglit replayer
|
||||
############### Build piglit
|
||||
|
||||
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
|
||||
|
||||
############### Build apitrace
|
||||
|
||||
. .gitlab-ci/container/build-apitrace.sh
|
||||
|
||||
############### Build gfxreconstruct
|
||||
|
||||
. .gitlab-ci/container/build-gfxreconstruct.sh
|
||||
|
||||
############### Build VKD3D-Proton
|
||||
|
||||
. .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64"
|
||||
setup_wine "/vkd3d-proton-wine64"
|
||||
|
||||
. .gitlab-ci/container/build-vkd3d-proton.sh
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2086 # we want word splitting
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
@@ -9,26 +8,26 @@ EPHEMERAL="
|
||||
autoconf
|
||||
automake
|
||||
bzip2
|
||||
cmake
|
||||
git
|
||||
libtool
|
||||
pkgconfig(epoxy)
|
||||
pkgconfig(gbm)
|
||||
pkgconfig(openssl)
|
||||
unzip
|
||||
wget
|
||||
xz
|
||||
"
|
||||
|
||||
dnf install -y --setopt=install_weak_deps=False \
|
||||
bison \
|
||||
ccache \
|
||||
clang-devel \
|
||||
flex \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gettext \
|
||||
glslang \
|
||||
kernel-headers \
|
||||
llvm-devel \
|
||||
clang-devel \
|
||||
meson \
|
||||
"pkgconfig(dri2proto)" \
|
||||
"pkgconfig(expat)" \
|
||||
@@ -59,11 +58,11 @@ dnf install -y --setopt=install_weak_deps=False \
|
||||
"pkgconfig(xshmfence)" \
|
||||
"pkgconfig(xxf86vm)" \
|
||||
"pkgconfig(zlib)" \
|
||||
procps-ng \
|
||||
python-unversioned-command \
|
||||
python3-devel \
|
||||
python3-mako \
|
||||
python3-ply \
|
||||
python3-devel \
|
||||
python3-mako \
|
||||
vulkan-headers \
|
||||
spirv-tools-devel \
|
||||
spirv-llvm-translator-devel \
|
||||
@@ -78,14 +77,11 @@ export XORG_RELEASES=https://xorg.freedesktop.org/releases/individu
|
||||
|
||||
export XORGMACROS_VERSION=util-macros-1.19.0
|
||||
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-O $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
||||
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
|
||||
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
|
||||
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
|
||||
rm -rf $XORGMACROS_VERSION
|
||||
|
||||
. .gitlab-ci/container/build-mold.sh
|
||||
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
@@ -23,9 +23,6 @@
|
||||
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.
|
||||
#
|
||||
@@ -49,11 +46,10 @@
|
||||
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'
|
||||
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
|
||||
# no need to pull the whole repo to build the container image
|
||||
GIT_STRATEGY: none
|
||||
|
||||
@@ -62,7 +58,7 @@
|
||||
- .container
|
||||
- .incorporate-base-tag+templates-commit
|
||||
# Don't want the .container rules
|
||||
- .build-rules
|
||||
- .ci-run-policy
|
||||
|
||||
# Debian 11 based x86 build image base
|
||||
debian/x86_build-base:
|
||||
@@ -117,23 +113,6 @@ 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:
|
||||
@@ -174,8 +153,6 @@ debian/android_build:
|
||||
- .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:
|
||||
@@ -191,7 +168,6 @@ debian/android_build:
|
||||
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:
|
||||
@@ -208,6 +184,8 @@ debian/x86_test-base:
|
||||
debian/x86_test-gl:
|
||||
extends: .use-debian/x86_test-base
|
||||
variables:
|
||||
FDO_DISTRIBUTION_EXEC: 'env KERNEL_URL=${KERNEL_URL} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
|
||||
KERNEL_URL: &kernel-rootfs-url "https://gitlab.freedesktop.org/gfx-ci/linux/-/archive/v5.16-for-mesa-ci-991fec6622591/linux-v5.16-for-mesa-ci-991fec6622591.tar.bz2"
|
||||
MESA_IMAGE_TAG: &debian-x86_test-gl ${DEBIAN_X86_TEST_GL_TAG}
|
||||
|
||||
.use-debian/x86_test-gl:
|
||||
@@ -215,7 +193,7 @@ debian/x86_test-gl:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_test-base
|
||||
MESA_IMAGE_PATH: ${DEBIAN_X86_TEST_IMAGE_GL_PATH}
|
||||
MESA_IMAGE_PATH: ${DEBIAN_X86_TEST_IMAGE_PATH}
|
||||
MESA_IMAGE_TAG: *debian-x86_test-gl
|
||||
needs:
|
||||
- debian/x86_test-gl
|
||||
@@ -231,28 +209,11 @@ debian/x86_test-vk:
|
||||
- .set-image-base-tag
|
||||
variables:
|
||||
MESA_BASE_TAG: *debian-x86_test-base
|
||||
MESA_IMAGE_PATH: ${DEBIAN_X86_TEST_IMAGE_VK_PATH}
|
||||
MESA_IMAGE_PATH: "debian/x86_test-vk"
|
||||
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:
|
||||
@@ -274,31 +235,13 @@ debian/arm_build:
|
||||
- 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 34 based x86 build image
|
||||
fedora/x86_build:
|
||||
extends:
|
||||
- .fdo.container-build@fedora
|
||||
- .container
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: 36
|
||||
FDO_DISTRIBUTION_VERSION: 34
|
||||
MESA_IMAGE_TAG: &fedora-x86_build ${FEDORA_X86_BUILD_TAG}
|
||||
|
||||
.use-fedora/x86_build:
|
||||
@@ -313,7 +256,7 @@ fedora/x86_build:
|
||||
|
||||
.kernel+rootfs:
|
||||
extends:
|
||||
- .build-rules
|
||||
- .ci-run-policy
|
||||
stage: container
|
||||
variables:
|
||||
GIT_STRATEGY: fetch
|
||||
@@ -359,56 +302,29 @@ kernel+rootfs_armhf:
|
||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
||||
|
||||
# x86 image with ARM64 & armhf kernel & rootfs for baremetal testing
|
||||
.debian/arm_test:
|
||||
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
|
||||
- .ci-run-policy
|
||||
needs:
|
||||
- kernel+rootfs_arm64
|
||||
- kernel+rootfs_armhf
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-arm64_test ${DEBIAN_BASE_TAG}
|
||||
|
||||
.use-debian/arm_test:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_EXEC: 'env ARTIFACTS_PREFIX=https://${MINIO_HOST}/mesa-lava ARTIFACTS_SUFFIX=${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT} CI_PROJECT_PATH=${CI_PROJECT_PATH} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
|
||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
MESA_ARM_BUILD_TAG: *debian-arm_build
|
||||
MESA_IMAGE_TAG: &debian-arm_test ${DEBIAN_BASE_TAG}
|
||||
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
|
||||
.use-debian/arm_test:
|
||||
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
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
|
||||
MESA_ARM_BUILD_TAG: *debian-arm_build
|
||||
MESA_IMAGE_PATH: "debian/arm_test"
|
||||
MESA_IMAGE_TAG: *debian-arm_test
|
||||
MESA_ROOTFS_TAG: *kernel-rootfs
|
||||
needs:
|
||||
- debian/arm_test
|
||||
|
||||
@@ -431,7 +347,7 @@ debian/arm64_test:
|
||||
|
||||
.windows_container_build:
|
||||
inherit:
|
||||
default: [retry]
|
||||
default: false
|
||||
extends:
|
||||
- .container
|
||||
- .windows-docker-vs2019
|
||||
@@ -445,80 +361,60 @@ debian/arm64_test:
|
||||
tags:
|
||||
- windows
|
||||
- shell
|
||||
- "2022"
|
||||
- "1809"
|
||||
- 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]
|
||||
default: false
|
||||
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}
|
||||
MESA_IMAGE_TAG: &windows_build_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]
|
||||
default: false
|
||||
extends:
|
||||
- .windows_container_build
|
||||
rules:
|
||||
- if: '$MICROSOFT_FARM == "offline"'
|
||||
when: never
|
||||
- !reference [.build-rules, rules]
|
||||
- !reference [.ci-run-policy, 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}
|
||||
MESA_IMAGE_TAG: &windows_test_image_tag ${WINDOWS_X64_BUILD_TAG}--${WINDOWS_X64_TEST_TAG}
|
||||
DOCKERFILE: Dockerfile_test
|
||||
MESA_BASE_IMAGE_PATH: *windows_vs_image_path
|
||||
MESA_BASE_IMAGE_TAG: *windows_vs_image_tag
|
||||
# Right now this only needs the VS install to get DXIL.dll. Maybe see about decoupling this at some point
|
||||
MESA_BASE_IMAGE_PATH: *windows_build_image_path
|
||||
MESA_BASE_IMAGE_TAG: *windows_build_image_tag
|
||||
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${MESA_BASE_IMAGE_TAG}"
|
||||
timeout: 2h 30m
|
||||
script:
|
||||
- .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $MESA_IMAGE $MESA_UPSTREAM_IMAGE Dockerfile_test ${MESA_BASE_IMAGE}
|
||||
needs:
|
||||
- windows_vs2019
|
||||
- windows_build_vs2019
|
||||
|
||||
.use-windows_build_vs2019:
|
||||
inherit:
|
||||
default: [retry]
|
||||
default: false
|
||||
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]
|
||||
default: false
|
||||
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
|
||||
# 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 -o xtrace
|
||||
@@ -11,8 +8,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||
check_minio()
|
||||
{
|
||||
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 \
|
||||
"https://${MINIO_PATH}/done"; then
|
||||
if wget -q --method=HEAD "https://${MINIO_PATH}/done"; then
|
||||
exit
|
||||
fi
|
||||
}
|
||||
@@ -29,7 +25,6 @@ check_minio "${CI_PROJECT_PATH}"
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||
GCC_ARCH="aarch64-linux-gnu"
|
||||
KERNEL_ARCH="arm64"
|
||||
SKQP_ARCH="arm64"
|
||||
DEFCONFIG="arch/arm64/configs/defconfig"
|
||||
DEVICE_TREES="arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb"
|
||||
DEVICE_TREES+=" arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dtb"
|
||||
@@ -40,31 +35,24 @@ if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||
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/nvidia/tegra210-p3450-0000.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"
|
||||
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots.dtb"
|
||||
KERNEL_IMAGE_NAME="Image"
|
||||
|
||||
elif [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||
GCC_ARCH="arm-linux-gnueabihf"
|
||||
KERNEL_ARCH="arm"
|
||||
SKQP_ARCH="arm"
|
||||
DEFCONFIG="arch/arm/configs/multi_v7_defconfig"
|
||||
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/imx6q-cubox-i.dtb"
|
||||
DEVICE_TREES+=" arch/arm/boot/dts/tegra124-jetson-tk1.dtb"
|
||||
KERNEL_IMAGE_NAME="zImage"
|
||||
. .gitlab-ci/container/create-cross-file.sh armhf
|
||||
else
|
||||
GCC_ARCH="x86_64-linux-gnu"
|
||||
KERNEL_ARCH="x86_64"
|
||||
SKQP_ARCH="x64"
|
||||
DEFCONFIG="arch/x86/configs/x86_64_defconfig"
|
||||
DEVICE_TREES=""
|
||||
KERNEL_IMAGE_NAME="bzImage"
|
||||
ARCH_PACKAGES="libasound2-dev libcap-dev libfdt-dev libva-dev wayland-protocols p7zip"
|
||||
ARCH_PACKAGES="libasound2-dev libcap-dev libfdt-dev libva-dev wayland-protocols"
|
||||
fi
|
||||
|
||||
# Determine if we're in a cross build.
|
||||
@@ -86,13 +74,11 @@ fi
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-remove \
|
||||
-o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' \
|
||||
${ARCH_PACKAGES} \
|
||||
automake \
|
||||
bc \
|
||||
clang \
|
||||
cmake \
|
||||
curl \
|
||||
debootstrap \
|
||||
git \
|
||||
glslang-tools \
|
||||
@@ -114,17 +100,15 @@ apt-get install -y --no-remove \
|
||||
libx11-xcb-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxkbcommon-dev \
|
||||
libwayland-dev \
|
||||
ninja-build \
|
||||
patch \
|
||||
protobuf-compiler \
|
||||
python-is-python3 \
|
||||
python3-distutils \
|
||||
python3-mako \
|
||||
python3-numpy \
|
||||
python3-serial \
|
||||
unzip \
|
||||
zstd
|
||||
wget
|
||||
|
||||
|
||||
if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||
@@ -142,20 +126,6 @@ if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||
libxkbcommon-dev:armhf
|
||||
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
|
||||
STRIP_CMD="${GCC_ARCH}-strip"
|
||||
@@ -182,14 +152,14 @@ mv /deqp /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||
|
||||
|
||||
############### Build SKQP
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]] \
|
||||
|| [[ "$DEBIAN_ARCH" = "amd64" ]]; then
|
||||
. .gitlab-ci/container/build-skqp.sh
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||
SKQP_ARCH="arm64" . .gitlab-ci/container/build-skqp.sh
|
||||
mv /skqp /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||
fi
|
||||
|
||||
|
||||
############### 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}/.
|
||||
|
||||
############### Build libva tests
|
||||
@@ -203,8 +173,6 @@ 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
|
||||
@@ -242,20 +210,15 @@ fi
|
||||
set -e
|
||||
|
||||
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
|
||||
rm /lava-files/rootfs-${DEBIAN_ARCH}/{llvm-snapshot,winehq}.gpg.key
|
||||
rm /lava-files/rootfs-${DEBIAN_ARCH}/create-rootfs.sh
|
||||
cp /etc/wgetrc /lava-files/rootfs-${DEBIAN_ARCH}/etc/.
|
||||
|
||||
|
||||
############### Install the built libdrm
|
||||
# Dependencies pulled during the creation of the rootfs may overwrite
|
||||
# the built libdrm. Hence, we add it after the rootfs has been already
|
||||
# created.
|
||||
find /libdrm/ -name lib\*\.so\* \
|
||||
-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/
|
||||
cp -Rp /libdrm/share /lava-files/rootfs-${DEBIAN_ARCH}/libdrm/share
|
||||
rm -rf /libdrm
|
||||
@@ -269,13 +232,14 @@ fi
|
||||
|
||||
du -ah /lava-files/rootfs-${DEBIAN_ARCH} | sort -h | tail -100
|
||||
pushd /lava-files/rootfs-${DEBIAN_ARCH}
|
||||
tar --zstd -cf /lava-files/lava-rootfs.tar.zst .
|
||||
tar czf /lava-files/lava-rootfs.tgz .
|
||||
popd
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
############### 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"
|
||||
|
||||
if [[ -n $DEVICE_TREES ]]; then
|
||||
@@ -283,9 +247,9 @@ if [[ -n $DEVICE_TREES ]]; then
|
||||
fi
|
||||
|
||||
for f in $FILES_TO_UPLOAD; do
|
||||
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/$f \
|
||||
https://${MINIO_PATH}/$f
|
||||
ci-fairy minio cp /lava-files/$f \
|
||||
minio://${MINIO_PATH}/$f
|
||||
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,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,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_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_PM_DEVFREQ=y
|
||||
CONFIG_OF=y
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
VSOCK_STDOUT=$1
|
||||
VSOCK_STDERR=$2
|
||||
VM_TEMP_DIR=$3
|
||||
VSOCK_TEMP_DIR=$3
|
||||
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
@@ -12,8 +12,7 @@ mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
|
||||
. ${VM_TEMP_DIR}/crosvm-env.sh
|
||||
. ${VM_TEMP_DIR}/setup-test-env.sh
|
||||
. ${VSOCK_TEMP_DIR}/crosvm-env.sh
|
||||
|
||||
# .gitlab-ci.yml script variable is using relative paths to install directory,
|
||||
# so change to that dir before running `crosvm-script`
|
||||
@@ -32,7 +31,7 @@ DMESG_PID=$!
|
||||
# Transfer the errors and crosvm-script output via a pair of virtio-vsocks
|
||||
socat -d -u pipe:${STDERR_FIFO} vsock-listen:${VSOCK_STDERR} &
|
||||
socat -d -U vsock-listen:${VSOCK_STDOUT} \
|
||||
system:"stdbuf -eL bash ${VM_TEMP_DIR}/crosvm-script.sh 2> ${STDERR_FIFO}; echo \$? > ${VM_TEMP_DIR}/exit_code",nofork
|
||||
system:"stdbuf -eL sh ${VSOCK_TEMP_DIR}/crosvm-script.sh 2> ${STDERR_FIFO}; echo \$? > ${VSOCK_TEMP_DIR}/exit_code",nofork
|
||||
|
||||
kill ${DMESG_PID}
|
||||
wait
|
||||
|
@@ -2,10 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
# If run outside of a deqp-runner invoction (e.g. piglit trace replay), then act
|
||||
# the same as the first thread in its threadpool.
|
||||
THREAD=${DEQP_RUNNER_THREAD:-0}
|
||||
|
||||
#
|
||||
# Helper to generate CIDs for virtio-vsock based communication with processes
|
||||
# running inside crosvm guests.
|
||||
@@ -21,7 +17,7 @@ THREAD=${DEQP_RUNNER_THREAD:-0}
|
||||
# - VSOCK_STDOUT, VSOCK_STDERR: the port numbers the guest should accept
|
||||
# vsock connections on in order to transfer output messages
|
||||
#
|
||||
# - VM_TEMP_DIR: the temporary directory path used to pass additional
|
||||
# - VSOCK_TEMP_DIR: the temporary directory path used to pass additional
|
||||
# context data towards the guest
|
||||
#
|
||||
set_vsock_context() {
|
||||
@@ -30,12 +26,19 @@ set_vsock_context() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
VM_TEMP_DIR="/tmp-vm.${THREAD}"
|
||||
# Clear out any leftover files from a previous run.
|
||||
rm -rf $VM_TEMP_DIR
|
||||
mkdir $VM_TEMP_DIR || return 1
|
||||
local dir_prefix="/tmp-vsock."
|
||||
local cid_prefix=0
|
||||
unset VSOCK_TEMP_DIR
|
||||
|
||||
VSOCK_CID=$(((CI_JOB_ID & 0x1ffffff) | ((${THREAD} & 0x7f) << 25)))
|
||||
while [ ${cid_prefix} -lt 128 ]; do
|
||||
VSOCK_TEMP_DIR=${dir_prefix}${cid_prefix}
|
||||
mkdir "${VSOCK_TEMP_DIR}" >/dev/null 2>&1 && break || unset VSOCK_TEMP_DIR
|
||||
cid_prefix=$((cid_prefix + 1))
|
||||
done
|
||||
|
||||
[ -n "${VSOCK_TEMP_DIR}" ] || return 1
|
||||
|
||||
VSOCK_CID=$(((CI_JOB_ID & 0x1ffffff) | ((cid_prefix & 0x7f) << 25)))
|
||||
VSOCK_STDOUT=5001
|
||||
VSOCK_STDERR=5002
|
||||
|
||||
@@ -48,29 +51,19 @@ if [ -n "${1##*.sh}" ] && [ -z "${1##*"deqp"*}" ]; then
|
||||
export DEQP_BIN_DIR
|
||||
fi
|
||||
|
||||
VM_SOCKET=crosvm-${THREAD}.sock
|
||||
|
||||
# Terminate any existing crosvm, if a previous invocation of this shell script
|
||||
# was terminated due to timeouts. This "vm stop" may fail if the crosvm died
|
||||
# without cleaning itself up.
|
||||
if [ -e $VM_SOCKET ]; then
|
||||
crosvm stop $VM_SOCKET || true
|
||||
# Wait for socats from that invocation to drain
|
||||
sleep 5
|
||||
rm -rf $VM_SOCKET || true
|
||||
fi
|
||||
|
||||
set_vsock_context || { echo "Could not generate crosvm vsock CID" >&2; exit 1; }
|
||||
|
||||
# Ensure cleanup on script exit
|
||||
trap 'exit ${exit_code}' INT TERM
|
||||
trap 'exit_code=$?; [ -z "${CROSVM_PID}${SOCAT_PIDS}" ] || kill ${CROSVM_PID} ${SOCAT_PIDS} >/dev/null 2>&1 || true; rm -rf ${VSOCK_TEMP_DIR}' EXIT
|
||||
|
||||
# Securely pass the current variables to the crosvm environment
|
||||
echo "Variables passed through:"
|
||||
SCRIPT_DIR=$(readlink -en "${0%/*}")
|
||||
${SCRIPT_DIR}/common/generate-env.sh | tee ${VM_TEMP_DIR}/crosvm-env.sh
|
||||
cp ${SCRIPTS_DIR}/setup-test-env.sh ${VM_TEMP_DIR}/setup-test-env.sh
|
||||
${SCRIPT_DIR}/common/generate-env.sh | tee ${VSOCK_TEMP_DIR}/crosvm-env.sh
|
||||
|
||||
# Set the crosvm-script as the arguments of the current script
|
||||
echo ". ${VM_TEMP_DIR}/setup-test-env.sh" > ${VM_TEMP_DIR}/crosvm-script.sh
|
||||
echo "$@" >> ${VM_TEMP_DIR}/crosvm-script.sh
|
||||
echo "$@" > ${VSOCK_TEMP_DIR}/crosvm-script.sh
|
||||
|
||||
# Setup networking
|
||||
/usr/sbin/iptables-legacy -w -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
||||
@@ -78,14 +71,16 @@ echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
|
||||
# Start background processes to receive output from guest
|
||||
socat -u vsock-connect:${VSOCK_CID}:${VSOCK_STDERR},retry=200,interval=0.1 stderr &
|
||||
SOCAT_PIDS=$!
|
||||
socat -u vsock-connect:${VSOCK_CID}:${VSOCK_STDOUT},retry=200,interval=0.1 stdout &
|
||||
SOCAT_PIDS="${SOCAT_PIDS} $!"
|
||||
|
||||
# Prepare to start crosvm
|
||||
unset DISPLAY
|
||||
unset XDG_RUNTIME_DIR
|
||||
|
||||
CROSVM_KERN_ARGS="quiet console=null root=my_root rw rootfstype=virtiofs ip=192.168.30.2::192.168.30.1:255.255.255.0:crosvm:eth0"
|
||||
CROSVM_KERN_ARGS="${CROSVM_KERN_ARGS} init=${SCRIPT_DIR}/crosvm-init.sh -- ${VSOCK_STDOUT} ${VSOCK_STDERR} ${VM_TEMP_DIR}"
|
||||
CROSVM_KERN_ARGS="${CROSVM_KERN_ARGS} init=${SCRIPT_DIR}/crosvm-init.sh -- ${VSOCK_STDOUT} ${VSOCK_STDERR} ${VSOCK_TEMP_DIR}"
|
||||
|
||||
[ "${CROSVM_GALLIUM_DRIVER}" = "llvmpipe" ] && \
|
||||
CROSVM_LIBGL_ALWAYS_SOFTWARE=true || CROSVM_LIBGL_ALWAYS_SOFTWARE=false
|
||||
@@ -96,21 +91,25 @@ set +e -x
|
||||
NIR_DEBUG="novalidate" \
|
||||
LIBGL_ALWAYS_SOFTWARE=${CROSVM_LIBGL_ALWAYS_SOFTWARE} \
|
||||
GALLIUM_DRIVER=${CROSVM_GALLIUM_DRIVER} \
|
||||
VK_ICD_FILENAMES=$CI_PROJECT_DIR/install/share/vulkan/icd.d/${CROSVM_VK_DRIVER}_icd.x86_64.json \
|
||||
crosvm --no-syslog run \
|
||||
--gpu "${CROSVM_GPU_ARGS}" --gpu-render-server "path=/usr/local/libexec/virgl_render_server" \
|
||||
-m "${CROSVM_MEMORY:-4096}" -c "${CROSVM_CPU:-2}" --disable-sandbox \
|
||||
crosvm run \
|
||||
--gpu "${CROSVM_GPU_ARGS}" -m 4096 -c 2 --disable-sandbox \
|
||||
--shared-dir /:my_root:type=fs:writeback=true:timeout=60:cache=always \
|
||||
--host-ip "192.168.30.1" --netmask "255.255.255.0" --mac "AA:BB:CC:00:00:12" \
|
||||
-s $VM_SOCKET \
|
||||
--host_ip "192.168.30.1" --netmask "255.255.255.0" --mac "AA:BB:CC:00:00:12" \
|
||||
--cid ${VSOCK_CID} -p "${CROSVM_KERN_ARGS}" \
|
||||
/lava-files/${KERNEL_IMAGE_NAME:-bzImage} > ${VM_TEMP_DIR}/crosvm 2>&1
|
||||
/lava-files/${KERNEL_IMAGE_NAME:-bzImage} > ${VSOCK_TEMP_DIR}/crosvm 2>&1 &
|
||||
|
||||
# Wait for crosvm process to terminate
|
||||
CROSVM_PID=$!
|
||||
wait ${CROSVM_PID}
|
||||
CROSVM_RET=$?
|
||||
unset CROSVM_PID
|
||||
|
||||
[ ${CROSVM_RET} -eq 0 ] && {
|
||||
# socat background processes terminate gracefully on remote peers exit
|
||||
wait
|
||||
unset SOCAT_PIDS
|
||||
# The actual return code is the crosvm guest script's exit code
|
||||
CROSVM_RET=$(cat ${VM_TEMP_DIR}/exit_code 2>/dev/null)
|
||||
CROSVM_RET=$(cat ${VSOCK_TEMP_DIR}/exit_code 2>/dev/null)
|
||||
# Force error when the guest script's exit code is not available
|
||||
CROSVM_RET=${CROSVM_RET:-1}
|
||||
}
|
||||
@@ -119,7 +118,7 @@ CROSVM_RET=$?
|
||||
[ ${CROSVM_RET} -eq 0 ] || {
|
||||
set +x
|
||||
echo "Dumping crosvm output.." >&2
|
||||
cat ${VM_TEMP_DIR}/crosvm >&2
|
||||
cat ${VSOCK_TEMP_DIR}/crosvm >&2
|
||||
set -x
|
||||
}
|
||||
|
||||
|
@@ -1,115 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
section_start cuttlefish_setup "cuttlefish: setup"
|
||||
set -xe
|
||||
|
||||
export HOME=/cuttlefish
|
||||
export PATH=$PATH:/cuttlefish/bin
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${CI_PROJECT_DIR}/install/lib/:/cuttlefish/lib64
|
||||
export EGL_PLATFORM=surfaceless
|
||||
|
||||
syslogd
|
||||
|
||||
chown root.kvm /dev/kvm
|
||||
|
||||
/etc/init.d/cuttlefish-host-resources start
|
||||
|
||||
cd /cuttlefish
|
||||
|
||||
launch_cvd --verbosity=DEBUG --report_anonymous_usage_stats=n --cpus=8 --memory_mb=8192 --gpu_mode="$ANDROID_GPU_MODE" --daemon --enable_minimal_mode=true --guest_enforce_security=false --use_overlay=false
|
||||
sleep 1
|
||||
|
||||
cd -
|
||||
|
||||
adb connect vsock:3:5555
|
||||
ADB="adb -s vsock:3:5555"
|
||||
|
||||
$ADB root
|
||||
sleep 1
|
||||
$ADB shell echo Hi from Android
|
||||
$ADB logcat dEQP:D *:S &
|
||||
|
||||
# overlay vendor
|
||||
|
||||
OV_TMPFS="/data/overlay-remount"
|
||||
$ADB shell mkdir -p "$OV_TMPFS"
|
||||
$ADB shell mount -t tmpfs none "$OV_TMPFS"
|
||||
|
||||
$ADB shell mkdir -p "$OV_TMPFS/vendor-upper"
|
||||
$ADB shell mkdir -p "$OV_TMPFS/vendor-work"
|
||||
|
||||
opts="lowerdir=/vendor,upperdir=$OV_TMPFS/vendor-upper,workdir=$OV_TMPFS/vendor-work"
|
||||
$ADB shell mount -t overlay -o "$opts" none /vendor
|
||||
|
||||
$ADB shell setenforce 0
|
||||
|
||||
# deqp
|
||||
|
||||
$ADB push /deqp/modules/egl/deqp-egl /data/.
|
||||
$ADB push /deqp/assets/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt /data/.
|
||||
$ADB push /deqp-runner/deqp-runner /data/.
|
||||
|
||||
# download mesa-x86_64-android.tar.zst
|
||||
|
||||
MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}.tar.zst
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${MINIO_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL}
|
||||
tar -xvf ${MINIO_ARTIFACT_NAME}.tar.zst
|
||||
|
||||
$ADB push install/all-skips.txt /data/.
|
||||
$ADB push install/$GPU_VERSION-flakes.txt /data/.
|
||||
$ADB push install/deqp-$DEQP_SUITE.toml /data/.
|
||||
|
||||
# remove 32 bits libs from /vendor/lib
|
||||
|
||||
$ADB shell rm /vendor/lib/dri/${ANDROID_DRIVER}_dri.so
|
||||
$ADB shell rm /vendor/lib/libglapi.so
|
||||
$ADB shell rm /vendor/lib/egl/libGLES_mesa.so
|
||||
|
||||
$ADB shell rm /vendor/lib/egl/libEGL_angle.so
|
||||
$ADB shell rm /vendor/lib/egl/libEGL_emulation.so
|
||||
$ADB shell rm /vendor/lib/egl/libGLESv1_CM_angle.so
|
||||
$ADB shell rm /vendor/lib/egl/libGLESv1_CM_emulation.so
|
||||
$ADB shell rm /vendor/lib/egl/libGLESv2_angle.so
|
||||
$ADB shell rm /vendor/lib/egl/libGLESv2_emulation.so
|
||||
|
||||
# replace on /vendor/lib64
|
||||
|
||||
$ADB push install/lib/dri/${ANDROID_DRIVER}_dri.so /vendor/lib64/dri/${ANDROID_DRIVER}_dri.so
|
||||
$ADB push install/lib/libglapi.so /vendor/lib64/libglapi.so
|
||||
$ADB push install/lib/libEGL.so /vendor/lib64/egl/libEGL_mesa.so
|
||||
|
||||
$ADB shell rm /vendor/lib64/egl/libEGL_angle.so
|
||||
$ADB shell rm /vendor/lib64/egl/libEGL_emulation.so
|
||||
$ADB shell rm /vendor/lib64/egl/libGLESv1_CM_angle.so
|
||||
$ADB shell rm /vendor/lib64/egl/libGLESv1_CM_emulation.so
|
||||
$ADB shell rm /vendor/lib64/egl/libGLESv2_angle.so
|
||||
$ADB shell rm /vendor/lib64/egl/libGLESv2_emulation.so
|
||||
|
||||
|
||||
RESULTS=/data/results
|
||||
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
|
||||
|
||||
set +e
|
||||
$ADB shell "mkdir /data/results; cd /data; ./deqp-runner \
|
||||
suite \
|
||||
--suite /data/deqp-$DEQP_SUITE.toml \
|
||||
--output $RESULTS \
|
||||
--skips /data/all-skips.txt $DEQP_SKIPS \
|
||||
--flakes /data/$GPU_VERSION-flakes.txt \
|
||||
--testlog-to-xml /deqp/executor/testlog-to-xml \
|
||||
--fraction-start $CI_NODE_INDEX \
|
||||
--fraction `expr $CI_NODE_TOTAL \* ${DEQP_FRACTION:-1}` \
|
||||
--jobs ${FDO_CI_CONCURRENT:-4} \
|
||||
$DEQP_RUNNER_OPTIONS"
|
||||
|
||||
EXIT_CODE=$?
|
||||
set -e
|
||||
section_switch cuttlefish_results "cuttlefish: gathering the results"
|
||||
|
||||
$ADB pull $RESULTS results
|
||||
|
||||
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat results
|
||||
cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log results
|
||||
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log results
|
||||
|
||||
section_end cuttlefish_results
|
||||
exit $EXIT_CODE
|
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
section_start test_setup "deqp: preparing test setup"
|
||||
echo -e "\e[0Ksection_start:$(date +%s):test_setup[collapsed=true]\r\e[0Kpreparing test setup"
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -18,7 +18,6 @@ INSTALL=`pwd`/install
|
||||
export LD_LIBRARY_PATH=`pwd`/install/lib/
|
||||
export EGL_PLATFORM=surfaceless
|
||||
export VK_ICD_FILENAMES=`pwd`/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.${VK_CPU:-`uname -m`}.json
|
||||
export OCL_ICD_VENDORS=`pwd`/install/etc/OpenCL/vendors/
|
||||
|
||||
RESULTS=`pwd`/${DEQP_RESULTS_DIR:-results}
|
||||
mkdir -p $RESULTS
|
||||
@@ -86,6 +85,14 @@ if [ -z "$DEQP_SUITE" ]; then
|
||||
sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" /tmp/case-list.txt
|
||||
fi
|
||||
|
||||
if [ -n "$DEQP_CASELIST_FILTER" ]; then
|
||||
sed -ni "/$DEQP_CASELIST_FILTER/p" /tmp/case-list.txt
|
||||
fi
|
||||
|
||||
if [ -n "$DEQP_CASELIST_INV_FILTER" ]; then
|
||||
sed -ni "/$DEQP_CASELIST_INV_FILTER/!p" /tmp/case-list.txt
|
||||
fi
|
||||
|
||||
if [ ! -s /tmp/case-list.txt ]; then
|
||||
echo "Caselist generation failed"
|
||||
exit 1
|
||||
@@ -116,19 +123,18 @@ if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
|
||||
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$GPU_VERSION-skips.txt"
|
||||
fi
|
||||
|
||||
if [ "$PIGLIT_PLATFORM" != "gbm" ] ; then
|
||||
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/x11-skips.txt"
|
||||
fi
|
||||
|
||||
if [ "$PIGLIT_PLATFORM" = "gbm" ]; then
|
||||
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/gbm-skips.txt"
|
||||
fi
|
||||
|
||||
report_load() {
|
||||
echo "System load: $(cut -d' ' -f1-3 < /proc/loadavg)"
|
||||
echo "# of CPU cores: $(cat /proc/cpuinfo | grep processor | wc -l)"
|
||||
}
|
||||
|
||||
# wrapper to supress +x to avoid spamming the log
|
||||
quiet() {
|
||||
set +x
|
||||
"$@"
|
||||
set -x
|
||||
}
|
||||
|
||||
if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
|
||||
# deqp is to use virpipe, and virgl_test_server llvmpipe
|
||||
export GALLIUM_DRIVER="$GALLIUM_DRIVER"
|
||||
@@ -153,7 +159,11 @@ if [ -z "$DEQP_SUITE" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
uncollapsed_section_switch deqp "deqp: deqp-runner"
|
||||
set +x
|
||||
echo -e "\e[0Ksection_end:$(date +%s):test_setup\r\e[0K"
|
||||
|
||||
echo -e "\e[0Ksection_start:$(date +%s):deqp[collapsed=false]\r\e[0Kdeqp-runner"
|
||||
set -x
|
||||
|
||||
set +e
|
||||
if [ -z "$DEQP_SUITE" ]; then
|
||||
@@ -186,10 +196,11 @@ fi
|
||||
DEQP_EXITCODE=$?
|
||||
|
||||
set +x
|
||||
echo -e "\e[0Ksection_end:$(date +%s):deqp\r\e[0K"
|
||||
|
||||
report_load
|
||||
|
||||
section_switch test_post_process "deqp: post-processing test results"
|
||||
echo -e "\e[0Ksection_start:$(date +%s):test_post_process[collapsed=true]\r\e[0Kpost-processing test results"
|
||||
set -x
|
||||
|
||||
# Remove all but the first 50 individual XML files uploaded as artifacts, to
|
||||
@@ -226,11 +237,6 @@ if [ -n "$FLAKES_CHANNEL" ]; then
|
||||
--branch-title "${CI_MERGE_REQUEST_TITLE:-$CI_COMMIT_TITLE}"
|
||||
fi
|
||||
|
||||
# Compress results.csv to save on bandwidth during the upload of artifacts to
|
||||
# GitLab. This reduces the size in a VKCTS run from 135 to 7.6MB, and takes
|
||||
# 0.17s on a Ryzen 5950X (16 threads, 0.95s when limited to 1 thread).
|
||||
zstd --rm -T0 -8q "$RESULTS/results.csv" -o "$RESULTS/results.csv.zst"
|
||||
|
||||
section_end test_post_process
|
||||
echo -e "\e[0Ksection_end:$(date +%s):test_post_process\r\e[0K"
|
||||
|
||||
exit $DEQP_EXITCODE
|
||||
|
@@ -16,9 +16,8 @@ fi
|
||||
TMP_DIR=$(mktemp -d)
|
||||
|
||||
echo "Downloading archived master..."
|
||||
/usr/bin/wget \
|
||||
-O "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \
|
||||
"https://${MINIO_HOST}/git-cache/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz"
|
||||
/usr/bin/wget -O $TMP_DIR/$CI_PROJECT_NAME.tar.gz \
|
||||
https://${MINIO_HOST}/git-cache/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz
|
||||
|
||||
# check wget error code
|
||||
if [[ $? -ne 0 ]]
|
||||
|
@@ -1,7 +0,0 @@
|
||||
# gbm does not support reading the front buffer after a swapbuffers, and that's
|
||||
# intentional. Don't bother running these tests when PIGLIT_PLATFORM=gbm.
|
||||
#
|
||||
# Note that this doesn't include tests like fbo-sys-blit, which draw/read front
|
||||
# but don't swap.
|
||||
spec@!opengl 1.0@gl-1.0-swapbuffers-behavior
|
||||
spec@!opengl 1.1@read-front
|
@@ -1,33 +1,21 @@
|
||||
variables:
|
||||
DEBIAN_X86_BUILD_BASE_IMAGE: "debian/x86_build-base"
|
||||
DEBIAN_BASE_TAG: "2023-06-07-rust-bump"
|
||||
DEBIAN_BASE_TAG: "2022-02-21-libdrm"
|
||||
|
||||
DEBIAN_X86_BUILD_IMAGE_PATH: "debian/x86_build"
|
||||
DEBIAN_BUILD_TAG: "2023-04-03-android-meson-aarch64"
|
||||
|
||||
DEBIAN_X86_BUILD_MINGW_IMAGE_PATH: "debian/x86_build-mingw"
|
||||
DEBIAN_BUILD_MINGW_TAG: "2023-01-03-ci-libva-2.17"
|
||||
DEBIAN_BUILD_TAG: "2022-02-21-libdrm"
|
||||
|
||||
DEBIAN_X86_TEST_BASE_IMAGE: "debian/x86_test-base"
|
||||
|
||||
DEBIAN_X86_TEST_IMAGE_GL_PATH: "debian/x86_test-gl"
|
||||
DEBIAN_X86_TEST_IMAGE_VK_PATH: "debian/x86_test-vk"
|
||||
DEBIAN_X86_TEST_IMAGE_PATH: ${DEBIAN_X86_TEST_IMAGE_GL_PATH}
|
||||
DEBIAN_X86_TEST_ANDROID_IMAGE_PATH: "debian/x86_test-android"
|
||||
DEBIAN_X86_TEST_IMAGE_PATH: "debian/x86_test-gl"
|
||||
DEBIAN_X86_TEST_GL_TAG: "2022-04-07-virgl-crosvm"
|
||||
DEBIAN_X86_TEST_VK_TAG: "2022-04-05-deqp-runner"
|
||||
|
||||
DEBIAN_X86_TEST_ANDROID_TAG: "2023-02-20-uprev-deqp-v2"
|
||||
DEBIAN_X86_TEST_GL_TAG: "2023-04-11-piglit-355ad6bc"
|
||||
DEBIAN_X86_TEST_VK_TAG: "2023-04-11-piglit-355ad6bc"
|
||||
|
||||
ALPINE_X86_BUILD_TAG: "2023-03-20-3.17-bump"
|
||||
FEDORA_X86_BUILD_TAG: "2023-03-13-procps-ng"
|
||||
KERNEL_ROOTFS_TAG: "2023-04-11-piglit-355ad6bc"
|
||||
|
||||
WINDOWS_X64_VS_PATH: "windows/x64_vs"
|
||||
WINDOWS_X64_VS_TAG: "2022-10-20-upgrade-zlib"
|
||||
FEDORA_X86_BUILD_TAG: "2022-03-18-spirv-tools-5"
|
||||
KERNEL_ROOTFS_TAG: "2022-04-07-prefix-skqp"
|
||||
|
||||
WINDOWS_X64_BUILD_PATH: "windows/x64_build"
|
||||
WINDOWS_X64_BUILD_TAG: "2023-04-05-agility-710"
|
||||
WINDOWS_X64_BUILD_TAG: "2022-20-02-base_split"
|
||||
|
||||
WINDOWS_X64_TEST_PATH: "windows/x64_test"
|
||||
WINDOWS_X64_TEST_TAG: "2023-04-05-agility-710"
|
||||
WINDOWS_X64_TEST_TAG: "2022-04-13-dozen_ci"
|
||||
|
@@ -1,28 +0,0 @@
|
||||
from datetime import timedelta
|
||||
|
||||
|
||||
class MesaCIException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class MesaCITimeoutError(MesaCIException):
|
||||
def __init__(self, *args, timeout_duration: timedelta) -> None:
|
||||
super().__init__(*args)
|
||||
self.timeout_duration = timeout_duration
|
||||
|
||||
|
||||
class MesaCIRetryError(MesaCIException):
|
||||
def __init__(self, *args, retry_count: int) -> None:
|
||||
super().__init__(*args)
|
||||
self.retry_count = retry_count
|
||||
|
||||
|
||||
class MesaCIParseException(MesaCIException):
|
||||
pass
|
||||
|
||||
|
||||
class MesaCIKnownIssueException(MesaCIException):
|
||||
"""Exception raised when the Mesa CI script finds something in the logs that
|
||||
is known to cause the LAVA job to eventually fail"""
|
||||
|
||||
pass
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user