Compare commits
216 Commits
mesa-21.3.
...
mesa-20.1.
Author | SHA1 | Date | |
---|---|---|---|
|
3e417e7cb6 | ||
|
34e61a2087 | ||
|
59ffb5f8bd | ||
|
44ed7fba6a | ||
|
3d42029c44 | ||
|
b0634507ea | ||
|
f95011ba91 | ||
|
3856293246 | ||
|
d664ba0b88 | ||
|
00975465ac | ||
|
5edad5682d | ||
|
836997bb27 | ||
|
9487fb561c | ||
|
921e3d7e32 | ||
|
052cc3a993 | ||
|
175b5ab5d3 | ||
|
c75710a988 | ||
|
7b803432e4 | ||
|
c80086b494 | ||
|
94a94e1a09 | ||
|
c133b1ba0d | ||
|
0f6ba73d3b | ||
|
86424d8d26 | ||
|
be4a86c9ef | ||
|
7c1ddbc447 | ||
|
2e1ecdc21c | ||
|
84a2442ebf | ||
|
b8539e6c80 | ||
|
ee4e70e314 | ||
|
220775b492 | ||
|
b39f1c6a5e | ||
|
1f72235901 | ||
|
f79fa7b8e4 | ||
|
6fdd0b39a9 | ||
|
d837260276 | ||
|
4ba703cbf4 | ||
|
c4d1f29bc0 | ||
|
a0e35d8a41 | ||
|
127c2be9c5 | ||
|
834353e5eb | ||
|
05d10b257b | ||
|
bd61a3d1e6 | ||
|
bbfdd64865 | ||
|
63e7d62b24 | ||
|
de036fc662 | ||
|
d729e10c7c | ||
|
c2957cdece | ||
|
42cb15a7b3 | ||
|
57675526d6 | ||
|
cfd734ef4c | ||
|
9f67806f14 | ||
|
eedeee0094 | ||
|
ad81207d00 | ||
|
ffca750b2e | ||
|
84b7f9dbc5 | ||
|
4a503e35a1 | ||
|
e9da335d70 | ||
|
7416eae609 | ||
|
78ad12b6ab | ||
|
abac485961 | ||
|
9532790a66 | ||
|
5fcde355a5 | ||
|
76991f59e5 | ||
|
0db300ddea | ||
|
be8f4197e1 | ||
|
7f8305a2bf | ||
|
7a595a578e | ||
|
60b57b609f | ||
|
8e8a6abbdb | ||
|
3866616cf4 | ||
|
5c842f96fd | ||
|
b95bc0e07d | ||
|
d9a574b6f3 | ||
|
3601521a6d | ||
|
2e35ca295b | ||
|
fdd9b31fc1 | ||
|
8a039060c0 | ||
|
cc8ba60feb | ||
|
a4902d6b4b | ||
|
094668b7cc | ||
|
70681d4f9a | ||
|
265bfa08d5 | ||
|
4ebf0d11c2 | ||
|
e202645c9f | ||
|
2f659db2fd | ||
|
49ad117aef | ||
|
189fac5855 | ||
|
6e1c660ffd | ||
|
7ff34259f1 | ||
|
aa7b5b52c0 | ||
|
19d0759f19 | ||
|
9aebf03336 | ||
|
8b24f046ef | ||
|
b62098e106 | ||
|
7de17e2520 | ||
|
10f7779c54 | ||
|
9b7290d15c | ||
|
54db67ecb8 | ||
|
e81c43540c | ||
|
d043d24654 | ||
|
e5301cfeef | ||
|
bcab0cc6d8 | ||
|
f9c4314d35 | ||
|
9b3aa87227 | ||
|
f2dd854bfe | ||
|
ca0e70927d | ||
|
2e817d95e6 | ||
|
cf7dffbaae | ||
|
5dabdf3eef | ||
|
9f86183f50 | ||
|
167d4a5993 | ||
|
f6412c24b3 | ||
|
57f400b013 | ||
|
1fa0c121c8 | ||
|
0931bf60fd | ||
|
cb5d60b7d9 | ||
|
8cb8c7f0f1 | ||
|
cebdf2700f | ||
|
f9ecf907e4 | ||
|
c10e0616ed | ||
|
1a6c365774 | ||
|
511d89f0ad | ||
|
fc0124c711 | ||
|
a6dc18e874 | ||
|
2303be5ff1 | ||
|
a366c3f548 | ||
|
ad8cd753a1 | ||
|
d41ccffb63 | ||
|
6328352ae6 | ||
|
a18df71c67 | ||
|
6b7e48f160 | ||
|
5049d8518e | ||
|
1edaba5f4a | ||
|
b5a7d4b68b | ||
|
b195f77730 | ||
|
6e5158ff60 | ||
|
d358af0503 | ||
|
fa18ad0f64 | ||
|
04ff61811d | ||
|
4dac0c36a4 | ||
|
8142a52255 | ||
|
5a6f40fd34 | ||
|
a6c55b1a5b | ||
|
a31c646aee | ||
|
493eaebc99 | ||
|
906c933e12 | ||
|
178156b3e5 | ||
|
afdd3037b4 | ||
|
ab0eed45b1 | ||
|
404180c500 | ||
|
c49fbacd94 | ||
|
ed872abd56 | ||
|
d1e3c0b430 | ||
|
97e2965b07 | ||
|
8b409a429f | ||
|
fef7d3c73e | ||
|
67c3c06541 | ||
|
464bbd6aaa | ||
|
5c0738f967 | ||
|
750a0125df | ||
|
fa01a9397f | ||
|
c4b59dbe81 | ||
|
2ab0496842 | ||
|
c75ab0a241 | ||
|
7d5074f4a6 | ||
|
096e06c56a | ||
|
1e3e805b0c | ||
|
c22388ed7e | ||
|
be882b566b | ||
|
38f1cf4335 | ||
|
dd42e82586 | ||
|
a603ee96b3 | ||
|
4628e95920 | ||
|
77e06f9d4b | ||
|
f060438be0 | ||
|
1dfbdca81d | ||
|
a5d3bc88f4 | ||
|
e658e900bb | ||
|
f7d67c99a6 | ||
|
b896c506b8 | ||
|
fa1739113b | ||
|
d4c1cb59c2 | ||
|
1ed51096ac | ||
|
a36b7d8c97 | ||
|
ebb656bfb3 | ||
|
b4e46da708 | ||
|
f2a012f987 | ||
|
a25234047f | ||
|
ae44a916ec | ||
|
6486ac1a4c | ||
|
ad9b00ee4e | ||
|
de3a2b29bc | ||
|
12d23b4a08 | ||
|
33a086f44e | ||
|
00001525f5 | ||
|
86629193f5 | ||
|
e1e22e38e7 | ||
|
4af564cb92 | ||
|
7a93e75a41 | ||
|
4e07d00fa5 | ||
|
ec918aa04c | ||
|
afa6e8cc0b | ||
|
a63ca1776f | ||
|
263451f9c9 | ||
|
3668e27ec3 | ||
|
5a7b5ea470 | ||
|
e2037aea0c | ||
|
725f45bc63 | ||
|
16c3eca327 | ||
|
c98e895185 | ||
|
8c0ad1d2db | ||
|
4e710b3c37 | ||
|
8229d22234 | ||
|
6236c97699 | ||
|
1b0e98c295 | ||
|
0865c5107f |
66
.appveyor/appveyor_msvc.bat
Normal file
66
.appveyor/appveyor_msvc.bat
Normal file
@@ -0,0 +1,66 @@
|
||||
goto %1
|
||||
|
||||
:install
|
||||
rem Check pip
|
||||
if "%buildsystem%" == "scons" (
|
||||
python --version
|
||||
python -m pip --version
|
||||
rem Install Mako
|
||||
python -m pip install Mako==1.0.7
|
||||
rem Install pywin32 extensions, needed by SCons
|
||||
python -m pip install pypiwin32
|
||||
rem Install python wheels, necessary to install SCons via pip
|
||||
python -m pip install wheel
|
||||
rem Install SCons
|
||||
python -m pip install scons==3.0.1
|
||||
call scons --version
|
||||
) else (
|
||||
python --version
|
||||
python -m pip install Mako meson
|
||||
meson --version
|
||||
|
||||
rem Install pkg-config, which meson requires even on windows
|
||||
cinst -y pkgconfiglite
|
||||
)
|
||||
|
||||
rem Install flex/bison
|
||||
set WINFLEXBISON_ARCHIVE=win_flex_bison-%WINFLEXBISON_VERSION%.zip
|
||||
if not exist "%WINFLEXBISON_ARCHIVE%" appveyor DownloadFile "https://github.com/lexxmark/winflexbison/releases/download/v%WINFLEXBISON_VERSION%/%WINFLEXBISON_ARCHIVE%"
|
||||
7z x -y -owinflexbison\ "%WINFLEXBISON_ARCHIVE%" > nul
|
||||
set Path=%CD%\winflexbison;%Path%
|
||||
win_flex --version
|
||||
win_bison --version
|
||||
rem Download and extract LLVM
|
||||
if not exist "%LLVM_ARCHIVE%" appveyor DownloadFile "https://people.freedesktop.org/~jrfonseca/llvm/%LLVM_ARCHIVE%"
|
||||
7z x -y "%LLVM_ARCHIVE%" > nul
|
||||
if "%buildsystem%" == "scons" (
|
||||
mkdir llvm\bin
|
||||
set LLVM=%CD%\llvm
|
||||
) else (
|
||||
move llvm subprojects\
|
||||
copy .appveyor\llvm-wrap.meson subprojects\llvm\meson.build
|
||||
)
|
||||
goto :eof
|
||||
|
||||
:build_script
|
||||
if "%buildsystem%" == "scons" (
|
||||
call scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=14.1 llvm=1
|
||||
) else (
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=x86
|
||||
rem We use default-library as static to affect any wraps (such as expat and zlib)
|
||||
rem it would be better if we could set subprojects buildtype independently,
|
||||
rem but I haven't written that patch yet :)
|
||||
call meson builddir --backend=vs2017 --default-library=static -Dbuild-tests=true -Db_vscrt=mtd --buildtype=release -Dllvm=true -Dgallium-drivers=swrast -Dosmesa=gallium
|
||||
pushd builddir
|
||||
call msbuild mesa.sln /m
|
||||
popd
|
||||
)
|
||||
goto :eof
|
||||
|
||||
:test_script
|
||||
if "%buildsystem%" == "scons" (
|
||||
call scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=14.1 llvm=1 check
|
||||
) else (
|
||||
call meson test -C builddir
|
||||
)
|
||||
goto :eof
|
36
.appveyor/llvm-wrap.meson
Normal file
36
.appveyor/llvm-wrap.meson
Normal file
@@ -0,0 +1,36 @@
|
||||
# A meson.build file for binary wrapping the LLVM used in the appvyeor CI
|
||||
project('llvm', ['cpp'])
|
||||
|
||||
cpp = meson.get_compiler('cpp')
|
||||
|
||||
_deps = []
|
||||
_search = join_paths(meson.current_source_dir(), 'lib')
|
||||
foreach d : ['LLVMAnalysis', 'LLVMAsmParser', 'LLVMAsmPrinter',
|
||||
'LLVMBinaryFormat', 'LLVMBitReader', 'LLVMBitWriter',
|
||||
'LLVMCodeGen', 'LLVMCore', 'LLVMCoroutines', 'LLVMCoverage',
|
||||
'LLVMDebugInfoCodeView', 'LLVMDebugInfoDWARF',
|
||||
'LLVMDebugInfoMSF', 'LLVMDebugInfoPDB', 'LLVMDemangle',
|
||||
'LLVMDlltoolDriver', 'LLVMExecutionEngine', 'LLVMGlobalISel',
|
||||
'LLVMInstCombine', 'LLVMInstrumentation', 'LLVMInterpreter',
|
||||
'LLVMipo', 'LLVMIRReader', 'LLVMLibDriver', 'LLVMLineEditor',
|
||||
'LLVMLinker', 'LLVMLTO', 'LLVMMCDisassembler', 'LLVMMCJIT',
|
||||
'LLVMMC', 'LLVMMCParser', 'LLVMMIRParser', 'LLVMObjCARCOpts',
|
||||
'LLVMObject', 'LLVMObjectYAML', 'LLVMOption', 'LLVMOrcJIT',
|
||||
'LLVMPasses', 'LLVMProfileData', 'LLVMRuntimeDyld',
|
||||
'LLVMScalarOpts', 'LLVMSelectionDAG', 'LLVMSupport',
|
||||
'LLVMSymbolize', 'LLVMTableGen', 'LLVMTarget',
|
||||
'LLVMTransformUtils', 'LLVMVectorize', 'LLVMX86AsmParser',
|
||||
'LLVMX86AsmPrinter', 'LLVMX86CodeGen', 'LLVMX86Desc',
|
||||
'LLVMX86Disassembler', 'LLVMX86Info', 'LLVMX86Utils',
|
||||
'LLVMXRay']
|
||||
_deps += cpp.find_library(d, dirs : _search)
|
||||
endforeach
|
||||
|
||||
dep_llvm = declare_dependency(
|
||||
include_directories : include_directories('include'),
|
||||
dependencies : _deps,
|
||||
version : '5.0.1',
|
||||
)
|
||||
|
||||
has_rtti = false
|
||||
irbuilder_h = files('include/llvm/IR/IRBuilder.h')
|
@@ -36,10 +36,6 @@ indent_size = 2
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.rst]
|
||||
indent_style = space
|
||||
indent_size = 3
|
||||
|
||||
[*.patch]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
|
1534
.gitlab-ci.yml
1534
.gitlab-ci.yml
File diff suppressed because it is too large
Load Diff
212
.gitlab-ci/README.md
Normal file
212
.gitlab-ci/README.md
Normal file
@@ -0,0 +1,212 @@
|
||||
# Mesa testing
|
||||
|
||||
The goal of the "test" stage of the .gitlab-ci.yml is to do pre-merge
|
||||
testing of Mesa drivers on various platforms, so that we can ensure no
|
||||
regressions are merged, as long as developers are merging code using
|
||||
marge-bot.
|
||||
|
||||
There are currently 4 automated testing systems deployed for Mesa.
|
||||
LAVA and gitlab-runner on the DUTs are used in pre-merge testing and
|
||||
are described in this document. Managing bare metal using
|
||||
gitlab-runner is described under [bare-metal/README.md]. Intel also
|
||||
has a jenkins-based CI system with restricted access that isn't
|
||||
connected to gitlab.
|
||||
|
||||
## Mesa testing using LAVA
|
||||
|
||||
[LAVA](https://lavasoftware.org/) is a system for functional testing
|
||||
of boards including deploying custom bootloaders and kernels. This is
|
||||
particularly relevant to testing Mesa because we often need to change
|
||||
kernels for UAPI changes (and this lets us do full testing of a new
|
||||
kernel during development), and our workloads can easily take down
|
||||
boards when mistakes are made (kernel oopses, OOMs that take out
|
||||
critical system services).
|
||||
|
||||
### Mesa-LAVA software architecture
|
||||
|
||||
The gitlab-runner will run on some host that has access to the LAVA
|
||||
lab, with tags like "lava-mesa-boardname" to control only taking in
|
||||
jobs for the hardware that the LAVA lab contains. The gitlab-runner
|
||||
spawns a docker container with lava-cli in it, and connects to the
|
||||
LAVA lab using a predefined token to submit jobs under a specific
|
||||
device type.
|
||||
|
||||
The LAVA instance manages scheduling those jobs to the boards present.
|
||||
For a job, it will deploy the kernel, device tree, and the ramdisk
|
||||
containing the CTS.
|
||||
|
||||
### Deploying a new Mesa-LAVA lab
|
||||
|
||||
You'll want to start with setting up your LAVA instance and getting
|
||||
some boards booting using test jobs. Start with the stock QEMU
|
||||
examples to make sure your instance works at all. Then, you'll need
|
||||
to define your actual boards.
|
||||
|
||||
The device type in lava-gitlab-ci.yml is the device type you create in
|
||||
your LAVA instance, which doesn't have to match the board's name in
|
||||
`/etc/lava-dispatcher/device-types`. You create your boards under
|
||||
that device type and the Mesa jobs will be scheduled to any of them.
|
||||
Instantiate your boards by creating them in the UI or at the command
|
||||
line attached to that device type, then populate their dictionary
|
||||
(using an "extends" line probably referencing the board's template in
|
||||
`/etc/lava-dispatcher/device-types`). Now, go find a relevant
|
||||
healthcheck job for your board as a test job definition, or cobble
|
||||
something together from a board that boots using the same boot_method
|
||||
and some public images, and figure out how to get your boards booting.
|
||||
|
||||
Once you can boot your board using a custom job definition, it's time
|
||||
to connect Mesa CI to it. Install gitlab-runner and register as a
|
||||
shared runner (you'll need a gitlab admin for help with this). The
|
||||
runner *must* have a tag (like "mesa-lava-db410c") to restrict the
|
||||
jobs it takes or it will grab random jobs from tasks across fd.o, and
|
||||
your runner isn't ready for that.
|
||||
|
||||
The runner will be running an ARM docker image (we haven't done any
|
||||
x86 LAVA yet, so that isn't documented). If your host for the
|
||||
gitlab-runner is x86, then you'll need to install qemu-user-static and
|
||||
the binfmt support.
|
||||
|
||||
The docker image will need access to the lava instance. If it's on a
|
||||
public network it should be fine. If you're running the LAVA instance
|
||||
on localhost, you'll need to set `network_mode="host"` in
|
||||
`/etc/gitlab-runner/config.toml` so it can access localhost. Create a
|
||||
gitlab-runner user in your LAVA instance, log in under that user on
|
||||
the web interface, and create an API token. Copy that into a
|
||||
`lavacli.yaml`:
|
||||
|
||||
```
|
||||
default:
|
||||
token: <token contents>
|
||||
uri: <url to the instance>
|
||||
username: gitlab-runner
|
||||
```
|
||||
|
||||
Add a volume mount of that `lavacli.yaml` to
|
||||
`/etc/gitlab-runner/config.toml` so that the docker container can
|
||||
access it. You probably have a `volumes = ["/cache"]` already, so now it would be
|
||||
|
||||
```
|
||||
volumes = ["/home/anholt/lava-config/lavacli.yaml:/root/.config/lavacli.yaml", "/cache"]
|
||||
```
|
||||
|
||||
Note that this token is visible to anybody that can submit MRs to
|
||||
Mesa! It is not an actual secret. We could just bake it into the
|
||||
gitlab CI yml, but this way the current method of connecting to the
|
||||
LAVA instance is separated from the Mesa branches (particularly
|
||||
relevant as we have many stable branches all using CI).
|
||||
|
||||
Now it's time to define your test runner in
|
||||
`.gitlab-ci/lava-gitlab-ci.yml`.
|
||||
|
||||
## Mesa testing using gitlab-runner on DUTs
|
||||
|
||||
### Software architecture
|
||||
|
||||
For freedreno and llvmpipe CI, we're using gitlab-runner on the test
|
||||
devices (DUTs), cached docker containers with VK-GL-CTS, and the
|
||||
normal shared x86_64 runners to build the Mesa drivers to be run
|
||||
inside of those containers on the DUTs.
|
||||
|
||||
The docker containers are rebuilt from the debian-install.sh script
|
||||
when DEBIAN\_TAG is changed in .gitlab-ci.yml, and
|
||||
debian-test-install.sh when DEBIAN\_ARM64\_TAG is changed in
|
||||
.gitlab-ci.yml. The resulting images are around 500MB, and are
|
||||
expected to change approximately weekly (though an individual
|
||||
developer working on them may produce many more images while trying to
|
||||
come up with a working MR!).
|
||||
|
||||
gitlab-runner is a client that polls gitlab.freedesktop.org for
|
||||
available jobs, with no inbound networking requirements. Jobs can
|
||||
have tags, so we can have DUT-specific jobs that only run on runners
|
||||
with that tag marked in the gitlab UI.
|
||||
|
||||
Since dEQP takes a long time to run, we mark the job as "parallel" at
|
||||
some level, which spawns multiple jobs from one definition, and then
|
||||
deqp-runner.sh takes the corresponding fraction of the test list for
|
||||
that job.
|
||||
|
||||
To reduce dEQP runtime (or avoid tests with unreliable results), a
|
||||
deqp-runner.sh invocation can provide a list of tests to skip. If
|
||||
your driver is not yet conformant, you can pass a list of expected
|
||||
failures, and the job will only fail on tests that aren't listed (look
|
||||
at the job's log for which specific tests failed).
|
||||
|
||||
### DUT requirements
|
||||
|
||||
#### DUTs must have a stable kernel and GPU reset.
|
||||
|
||||
If the system goes down during a test run, that job will eventually
|
||||
time out and fail (default 1 hour). However, if the kernel can't
|
||||
reliably reset the GPU on failure, bugs in one MR may leak into
|
||||
spurious failures in another MR. This would be an unacceptable impact
|
||||
on Mesa developers working on other drivers.
|
||||
|
||||
#### DUTs must be able to run docker
|
||||
|
||||
The Mesa gitlab-runner based test architecture is built around docker,
|
||||
so that we can cache the debian package installation and CTS build
|
||||
step across multiple test runs. Since the images are large and change
|
||||
approximately weekly, the DUTs also need to be running some script to
|
||||
prune stale docker images periodically in order to not run out of disk
|
||||
space as we rev those containers (perhaps [this
|
||||
script](https://gitlab.com/gitlab-org/gitlab-runner/issues/2980#note_169233611)).
|
||||
|
||||
Note that docker doesn't allow containers to be stored on NFS, and
|
||||
doesn't allow multiple docker daemons to interact with the same
|
||||
network block device, so you will probably need some sort of physical
|
||||
storage on your DUTs.
|
||||
|
||||
#### DUTs must be public
|
||||
|
||||
By including your device in .gitlab-ci.yml, you're effectively letting
|
||||
anyone on the internet run code on your device. docker containers may
|
||||
provide some limited protection, but how much you trust that and what
|
||||
you do to mitigate hostile access is up to you.
|
||||
|
||||
#### DUTs must expose the dri device nodes to the containers.
|
||||
|
||||
Obviously, to get access to the HW, we need to pass the render node
|
||||
through. This is done by adding `devices = ["/dev/dri"]` to the
|
||||
`runners.docker` section of /etc/gitlab-runner/config.toml.
|
||||
|
||||
### HW CI farm expectations
|
||||
|
||||
To make sure that testing of one vendor's drivers doesn't block
|
||||
unrelated work by other vendors, we require that a given driver's test
|
||||
farm produces a spurious failure no more than once a week. If every
|
||||
driver had CI and failed once a week, we would be seeing someone's
|
||||
code getting blocked on a spurious failure daily, which is an
|
||||
unacceptable cost to the project.
|
||||
|
||||
Additionally, the test farm needs to be able to provide a short enough
|
||||
turnaround time that people can regularly use the "Merge when pipeline
|
||||
succeeds" button successfully (until we get
|
||||
[marge-bot](https://github.com/smarkets/marge-bot) in place on
|
||||
freedesktop.org). As a result, we require that the test farm be able
|
||||
to handle a whole pipeline's worth of jobs in less than 5 minutes (to
|
||||
compare, the build stage is about 10 minutes, if you could get all
|
||||
your jobs scheduled on the shared runners in time.).
|
||||
|
||||
If a test farm is short the HW to provide these guarantees, consider
|
||||
dropping tests to reduce runtime.
|
||||
`VK-GL-CTS/scripts/log/bottleneck_report.py` can help you find what
|
||||
tests were slow in a `results.qpa` file. Or, you can have a job with
|
||||
no `parallel` field set and:
|
||||
|
||||
```
|
||||
variables:
|
||||
CI_NODE_INDEX: 1
|
||||
CI_NODE_TOTAL: 10
|
||||
```
|
||||
|
||||
to just run 1/10th of the test list.
|
||||
|
||||
If a HW CI farm goes offline (network dies and all CI pipelines end up
|
||||
stalled) or its runners are consistenly spuriously failing (disk
|
||||
full?), and the maintainer is not immediately available to fix the
|
||||
issue, please push through an MR disabling that farm's jobs by adding
|
||||
'.' to the front of the jobs names until the maintainer can bring
|
||||
things back up. If this happens, the farm maintainer should provide a
|
||||
report to mesa-dev@lists.freedesktop.org after the fact explaining
|
||||
what happened and what the mitigation plan is for that failure next
|
||||
time.
|
@@ -1,8 +1,6 @@
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_LOCALVERSION="ccu"
|
||||
|
||||
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
@@ -11,7 +9,6 @@ CONFIG_DEVFREQ_GOV_PASSIVE=y
|
||||
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
|
||||
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_ETNAVIV=y
|
||||
CONFIG_DRM_ROCKCHIP=y
|
||||
CONFIG_DRM_PANFROST=y
|
||||
CONFIG_DRM_LIMA=y
|
||||
@@ -48,10 +45,3 @@ CONFIG_SOFTLOCKUP_DETECTOR=n
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=n
|
||||
|
||||
CONFIG_FW_LOADER_COMPRESS=y
|
||||
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_RTL8152=y
|
||||
CONFIG_USB_NET_AX8817X=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
96
.gitlab-ci/arm64.config
Normal file
96
.gitlab-ci/arm64.config
Normal file
@@ -0,0 +1,96 @@
|
||||
CONFIG_LOCALVERSION="ccu"
|
||||
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
CONFIG_DEVFREQ_GOV_PASSIVE=y
|
||||
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_ROCKCHIP=y
|
||||
CONFIG_DRM_PANFROST=y
|
||||
CONFIG_DRM_LIMA=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_MSM=y
|
||||
CONFIG_DRM_I2C_ADV7511=y
|
||||
CONFIG_DRM_I2C_ADV7533=y
|
||||
CONFIG_PWM_CROS_EC=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
|
||||
CONFIG_ROCKCHIP_CDN_DP=n
|
||||
|
||||
CONFIG_SPI_ROCKCHIP=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_DP=y
|
||||
CONFIG_DWMAC_ROCKCHIP=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_TYPEC_FUSB302=y
|
||||
CONFIG_TYPEC=y
|
||||
CONFIG_TYPEC_TCPM=y
|
||||
|
||||
# db410c ethernet
|
||||
CONFIG_USB_RTL8152=y
|
||||
|
||||
CONFIG_ARCH_ALPINE=n
|
||||
CONFIG_ARCH_BCM2835=n
|
||||
CONFIG_ARCH_BCM_IPROC=n
|
||||
CONFIG_ARCH_BERLIN=n
|
||||
CONFIG_ARCH_BRCMSTB=n
|
||||
CONFIG_ARCH_EXYNOS=n
|
||||
CONFIG_ARCH_K3=n
|
||||
CONFIG_ARCH_LAYERSCAPE=n
|
||||
CONFIG_ARCH_LG1K=n
|
||||
CONFIG_ARCH_HISI=n
|
||||
CONFIG_ARCH_MEDIATEK=n
|
||||
CONFIG_ARCH_MVEBU=n
|
||||
CONFIG_ARCH_SEATTLE=n
|
||||
CONFIG_ARCH_SYNQUACER=n
|
||||
CONFIG_ARCH_RENESAS=n
|
||||
CONFIG_ARCH_R8A774A1=n
|
||||
CONFIG_ARCH_R8A774C0=n
|
||||
CONFIG_ARCH_R8A7795=n
|
||||
CONFIG_ARCH_R8A7796=n
|
||||
CONFIG_ARCH_R8A77965=n
|
||||
CONFIG_ARCH_R8A77970=n
|
||||
CONFIG_ARCH_R8A77980=n
|
||||
CONFIG_ARCH_R8A77990=n
|
||||
CONFIG_ARCH_R8A77995=n
|
||||
CONFIG_ARCH_STRATIX10=n
|
||||
CONFIG_ARCH_TEGRA=n
|
||||
CONFIG_ARCH_SPRD=n
|
||||
CONFIG_ARCH_THUNDER=n
|
||||
CONFIG_ARCH_THUNDER2=n
|
||||
CONFIG_ARCH_UNIPHIER=n
|
||||
CONFIG_ARCH_VEXPRESS=n
|
||||
CONFIG_ARCH_XGENE=n
|
||||
CONFIG_ARCH_ZX=n
|
||||
CONFIG_ARCH_ZYNQMP=n
|
||||
|
||||
# Strip out some stuff we don't need for graphics testing, to reduce
|
||||
# the build.
|
||||
CONFIG_CAN=n
|
||||
CONFIG_SPI=n
|
||||
CONFIG_WIRELESS=n
|
||||
CONFIG_RFKILL=n
|
||||
CONFIG_WLAN=n
|
||||
|
||||
CONFIG_REGULATOR_FAN53555=y
|
||||
CONFIG_REGULATOR=y
|
||||
|
||||
CONFIG_REGULATOR_VCTRL=y
|
||||
|
||||
CONFIG_KASAN=n
|
||||
CONFIG_KASAN_INLINE=n
|
||||
CONFIG_STACKTRACE=n
|
||||
|
||||
CONFIG_TMPFS=y
|
||||
|
||||
CONFIG_PROVE_LOCKING=n
|
||||
CONFIG_DEBUG_LOCKDEP=n
|
||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
|
||||
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
|
||||
CONFIG_FW_LOADER_COMPRESS=y
|
80
.gitlab-ci/bare-metal/README.md
Normal file
80
.gitlab-ci/bare-metal/README.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# bare-metal Mesa testing
|
||||
|
||||
Testing Mesa with gitlab-runner running on the devices being tested
|
||||
(DUTs) proved to be too unstable, so this set of scripts is for
|
||||
running Mesa testing on bare-metal boards connected to a separate
|
||||
system using gitlab-runner. Currently only "fastboot" devices are
|
||||
supported.
|
||||
|
||||
In comparison with LAVA, this doesn't involve maintaining a separate
|
||||
webservice with its own job scheduler and replicating jobs between the
|
||||
two. It also places more of the board support in git, instead of
|
||||
webservice configuration. Most importantly, it doesn't download the
|
||||
rootfs as artifacts on each job, so we can avoid traffic to
|
||||
freedesktop.org. On the other hand, the serial interactions and
|
||||
bootloader support are more primitive.
|
||||
|
||||
## Requirements
|
||||
|
||||
This testing requires power control of the DUTs by the gitlab-runner
|
||||
machine, since this is what we use to reset the system and get back to
|
||||
a pristine state at the start of testing.
|
||||
|
||||
We require access to the console output from the gitlb-runner system,
|
||||
since that is how we get the final results back from te tests. You
|
||||
should probably have the console on a serial connection, so that you
|
||||
can see bootloader progress.
|
||||
|
||||
The boards need to be able to have a kernel/initramfs supplied by the
|
||||
gitlab-runner system, since the initramfs is what contains the Mesa
|
||||
testing payload. Currently only "fastboot" devices are supported.
|
||||
|
||||
The boards should have networking, so that (in a future iteration of
|
||||
this code) we can extract the dEQP .xml results to artifacts on
|
||||
gitlab.
|
||||
|
||||
## Setup
|
||||
|
||||
Each board will be registered in fd.o gitlab. You'll want something
|
||||
like this to register:
|
||||
|
||||
```
|
||||
sudo gitlab-runner register \
|
||||
--url https://gitlab.freedesktop.org \
|
||||
--registration-token $1 \
|
||||
--name MY_BOARD_NAME \
|
||||
--tag-list MY_BOARD_TAG \
|
||||
--executor docker \
|
||||
--docker-image "alpine:latest" \
|
||||
--docker-volumes "/dev:/dev" \
|
||||
--docker-network-mode "host" \
|
||||
--docker-privileged \
|
||||
--non-interactive
|
||||
```
|
||||
|
||||
The registration token has to come from a fd.o gitlab admin going to
|
||||
https://gitlab.freedesktop.org/admin/runners
|
||||
|
||||
The name scheme for Google's lab is google-freedreno-boardname-nn, and
|
||||
our tag is google-freedreno-db410c. The tag is what identifies a
|
||||
board type so that board-specific jobs can be dispatched into that
|
||||
pool.
|
||||
|
||||
We need privileged mode and the /dev bind mount in order to get at the
|
||||
serial console and fastboot USB devices (--device arguments don't
|
||||
apply to devices that show up after container start, which is the case
|
||||
with fastboot). We use host network mode so that we can (in the
|
||||
future) spin up a server to collect XML results.
|
||||
|
||||
Once you've added your boards, you're going to need to specify the
|
||||
board-specific env vars, adding something like this `environment` line
|
||||
to each runner in `/etc/gitlab-runner/config.toml`
|
||||
|
||||
```
|
||||
[[runners]]
|
||||
name = "google-freedreno-db410c-01"
|
||||
environment = ["BM_SERIAL=/dev/ttyDB410c8", "BM_POWERUP=google-power-up.sh 8", "BM_FASTBOOT_SERIAL=15e9e390"]
|
||||
```
|
||||
|
||||
Once you've updated your runners' configs, restart with `sudo service
|
||||
gitlab-runner restart`
|
@@ -1,26 +0,0 @@
|
||||
#!/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 \
|
||||
DEQP_PARALLEL=1 \
|
||||
DEQP_CASELIST_FILTER='.*reset.*' \
|
||||
/install/deqp-runner.sh; then
|
||||
EXIT=1
|
||||
fi
|
||||
|
||||
# Then run everything else with parallelism:
|
||||
if ! env \
|
||||
DEQP_RESULTS_DIR=results/nonrobustness \
|
||||
DEQP_CASELIST_INV_FILTER='.*reset.*' \
|
||||
/install/deqp-runner.sh; then
|
||||
EXIT=1
|
||||
fi
|
||||
|
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Init entrypoint for bare-metal devices; calls common init code.
|
||||
|
||||
# First stage: very basic setup to bring up network and /dev etc
|
||||
/init-stage1.sh
|
||||
|
||||
# Second stage: run jobs
|
||||
test $? -eq 0 && /init-stage2.sh
|
||||
|
||||
# Wait until the job would have timed out anyway, so we don't spew a "init
|
||||
# exited" panic.
|
||||
sleep 6000
|
@@ -1,101 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Boot script for Chrome OS devices attached to a servo debug connector, using
|
||||
# NFS and TFTP to boot.
|
||||
|
||||
# We're run from the root of the repo, make a helper var for our paths
|
||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||
CI_COMMON=$CI_PROJECT_DIR/install/common
|
||||
|
||||
# Runner config checks
|
||||
if [ -z "$BM_SERIAL" ]; then
|
||||
echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the CPU serial device."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_SERIAL_EC" ]; then
|
||||
echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the EC serial device for controlling board power"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d /nfs ]; then
|
||||
echo "NFS rootfs directory needs to be mounted at /nfs by the gitlab runner"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d /tftp ]; then
|
||||
echo "TFTP directory for this board needs to be mounted at /tftp by the gitlab runner"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# job config checks
|
||||
if [ -z "$BM_KERNEL" ]; then
|
||||
echo "Must set BM_KERNEL to your board's kernel FIT image"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_ROOTFS" ]; then
|
||||
echo "Must set BM_ROOTFS to your board's rootfs directory in the job's variables"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_CMDLINE" ]; then
|
||||
echo "Must set BM_CMDLINE to your board's kernel command line arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
# Clear out any previous run's artifacts.
|
||||
rm -rf results/
|
||||
mkdir -p results
|
||||
|
||||
# Create the rootfs in the NFS directory. rm to make sure it's in a pristine
|
||||
# state, since it's volume-mounted on the host.
|
||||
rsync -a --delete $BM_ROOTFS/ /nfs/
|
||||
mkdir -p /nfs/results
|
||||
. $BM/rootfs-setup.sh /nfs
|
||||
|
||||
# Put the kernel/dtb image and the boot command line in the tftp directory for
|
||||
# the board to find. For normal Mesa development, we build the kernel and
|
||||
# store it in the docker container that this script is running in.
|
||||
#
|
||||
# However, container builds are expensive, so when you're hacking on the
|
||||
# kernel, it's nice to be able to skip the half hour container build and plus
|
||||
# moving that container to the runner. So, if BM_KERNEL is a URL, fetch it
|
||||
# instead of looking in the container. Note that the kernel build should be
|
||||
# the output of:
|
||||
#
|
||||
# make Image.lzma
|
||||
#
|
||||
# mkimage \
|
||||
# -A arm64 \
|
||||
# -f auto \
|
||||
# -C lzma \
|
||||
# -d arch/arm64/boot/Image.lzma \
|
||||
# -b arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dtb \
|
||||
# cheza-image.img
|
||||
|
||||
rm -rf /tftp/*
|
||||
if echo "$BM_KERNEL" | grep -q http; then
|
||||
apt install -y wget
|
||||
wget $BM_KERNEL -O /tftp/vmlinuz
|
||||
else
|
||||
cp $BM_KERNEL /tftp/vmlinuz
|
||||
fi
|
||||
echo "$BM_CMDLINE" > /tftp/cmdline
|
||||
|
||||
set +e
|
||||
python3 $BM/cros_servo_run.py \
|
||||
--cpu $BM_SERIAL \
|
||||
--ec $BM_SERIAL_EC
|
||||
ret=$?
|
||||
set -e
|
||||
|
||||
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
|
||||
# will look for them.
|
||||
cp -Rp /nfs/results/. results/
|
||||
|
||||
exit $ret
|
@@ -1,186 +0,0 @@
|
||||
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright © 2020 Google LLC
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
import argparse
|
||||
import queue
|
||||
import re
|
||||
from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
|
||||
class CrosServoRun:
|
||||
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> ")
|
||||
|
||||
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()
|
||||
|
||||
# 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(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)
|
||||
self.ec_ser.serial.write(s.encode())
|
||||
|
||||
def cpu_write(self, s):
|
||||
print("W SERIAL-CPU> %s" % s)
|
||||
self.cpu_ser.serial.write(s.encode())
|
||||
|
||||
def print_error(self, message):
|
||||
RED = '\033[0;31m'
|
||||
NO_COLOR = '\033[0m'
|
||||
print(RED + message + NO_COLOR)
|
||||
|
||||
def run(self):
|
||||
# Flush any partial commands in the EC's prompt, then ask for a reboot.
|
||||
self.ec_write("\n")
|
||||
self.ec_write("reboot\n")
|
||||
|
||||
# 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.serial_queue_lines():
|
||||
if re.search("load_archive: loading locale_en.bin", line):
|
||||
self.cpu_write("\016")
|
||||
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...")
|
||||
return 2
|
||||
|
||||
tftp_failures = 0
|
||||
for line in self.serial_queue_lines():
|
||||
if re.search("---. end Kernel panic", line):
|
||||
return 1
|
||||
|
||||
# The Cheza firmware seems to occasionally get stuck looping in
|
||||
# this error state during TFTP booting, possibly based on amount of
|
||||
# network traffic around it, but it'll usually recover after a
|
||||
# reboot.
|
||||
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...")
|
||||
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...")
|
||||
return 2
|
||||
|
||||
# If the network device dies, it's probably not graphics's fault, just try again.
|
||||
if re.search("NETDEV WATCHDOG", line):
|
||||
self.print_error(
|
||||
"Detected network device failure, restarting run...")
|
||||
return 2
|
||||
|
||||
# These HFI response errors started appearing with the introduction
|
||||
# of piglit runs. CosmicPenguin says:
|
||||
#
|
||||
# "message ID 106 isn't a thing, so likely what happened is that we
|
||||
# got confused when parsing the HFI queue. If it happened on only
|
||||
# one run, then memory corruption could be a possible clue"
|
||||
#
|
||||
# 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...")
|
||||
return 2
|
||||
|
||||
if re.search("coreboot.*bootblock starting", line):
|
||||
self.print_error(
|
||||
"Detected spontaneous reboot, restarting run...")
|
||||
return 2
|
||||
|
||||
result = re.search("hwci: mesa: (\S*)", line)
|
||||
if result:
|
||||
if result.group(1) == "pass":
|
||||
return 0
|
||||
else:
|
||||
return 1
|
||||
|
||||
self.print_error("Reached the end of the CPU serial log without finding a result")
|
||||
return 1
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--cpu', type=str,
|
||||
help='CPU Serial device', required=True)
|
||||
parser.add_argument(
|
||||
'--ec', type=str, help='EC Serial device', required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
servo = CrosServoRun(args.cpu, args.ec)
|
||||
|
||||
while True:
|
||||
retval = servo.run()
|
||||
if retval != 2:
|
||||
break
|
||||
|
||||
# power down the CPU on the device
|
||||
servo.ec_write("power off\n")
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
relay=$1
|
||||
|
||||
if [ -z "$relay" ]; then
|
||||
echo "Must supply a relay arg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$CI_PROJECT_DIR/install/bare-metal/eth008-power-relay.py $ETH_HOST $ETH_PORT off $relay
|
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import socket
|
||||
|
||||
host = sys.argv[1]
|
||||
port = sys.argv[2]
|
||||
mode = sys.argv[3]
|
||||
relay = sys.argv[4]
|
||||
msg = None
|
||||
|
||||
if mode == "on":
|
||||
msg = b'\x20'
|
||||
else:
|
||||
msg = b'\x21'
|
||||
|
||||
msg += int(relay).to_bytes(1, 'big')
|
||||
msg += b'\x00'
|
||||
|
||||
c = socket.create_connection((host, int(port)))
|
||||
c.sendall(msg)
|
||||
|
||||
data = c.recv(1)
|
||||
c.close()
|
||||
|
||||
if data[0] == b'\x01':
|
||||
print('Command failed')
|
||||
sys.exit(1)
|
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
relay=$1
|
||||
|
||||
if [ -z "$relay" ]; then
|
||||
echo "Must supply a relay arg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$CI_PROJECT_DIR/install/bare-metal/eth008-power-relay.py $ETH_HOST $ETH_PORT off $relay
|
||||
sleep 5
|
||||
$CI_PROJECT_DIR/install/bare-metal/eth008-power-relay.py $ETH_HOST $ETH_PORT on $relay
|
@@ -2,29 +2,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
STRINGS=$(mktemp)
|
||||
ERRORS=$(mktemp)
|
||||
echo "Waiting for $1 to say '$2'"
|
||||
|
||||
trap "rm $STRINGS; rm $ERRORS;" EXIT
|
||||
|
||||
FILE=$1
|
||||
shift 1
|
||||
|
||||
while getopts "f:e:" opt; do
|
||||
case $opt in
|
||||
f) echo "$OPTARG" >> $STRINGS;;
|
||||
e) echo "$OPTARG" >> $STRINGS ; echo "$OPTARG" >> $ERRORS;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND -1))
|
||||
|
||||
echo "Waiting for $FILE to say one of following strings"
|
||||
cat $STRINGS
|
||||
|
||||
while ! egrep -wf $STRINGS $FILE; do
|
||||
while ! grep -q "$2" $1; do
|
||||
sleep 2
|
||||
done
|
||||
|
||||
if egrep -wf $ERRORS $FILE; then
|
||||
exit 1
|
||||
fi
|
||||
|
@@ -1,14 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||
CI_COMMON=$CI_PROJECT_DIR/install/common
|
||||
BM=$CI_PROJECT_DIR/.gitlab-ci/bare-metal
|
||||
|
||||
if [ -z "$BM_SERIAL" -a -z "$BM_SERIAL_SCRIPT" ]; then
|
||||
echo "Must set BM_SERIAL OR BM_SERIAL_SCRIPT in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "BM_SERIAL:"
|
||||
echo " This is the serial device to talk to for waiting for fastboot to be ready and logging from the kernel."
|
||||
echo "BM_SERIAL_SCRIPT:"
|
||||
echo " This is a shell script to talk to for waiting for fastboot to be ready and logging from the kernel."
|
||||
if [ -z "$BM_SERIAL" ]; then
|
||||
echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the serial device to talk to for waiting for fastboot to be ready and logging from the kernel."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -46,72 +42,39 @@ if [ -z "$BM_ROOTFS" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if echo $BM_CMDLINE | grep -q "root=/dev/nfs"; then
|
||||
BM_FASTBOOT_NFSROOT=1
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
# Clear out any previous run's artifacts.
|
||||
rm -rf results/
|
||||
mkdir -p results/
|
||||
# Copy the rootfs to a temporary for our setup, as I believe changes to the
|
||||
# container can end up impacting future runs.
|
||||
cp -Rp $BM_ROOTFS rootfs
|
||||
|
||||
if [ -n "$BM_FASTBOOT_NFSROOT" ]; then
|
||||
# Create the rootfs in the NFS directory. rm to make sure it's in a pristine
|
||||
# state, since it's volume-mounted on the host.
|
||||
rsync -a --delete $BM_ROOTFS/ /nfs/
|
||||
mkdir -p /nfs/results
|
||||
. $BM/rootfs-setup.sh /nfs
|
||||
# Set up the init script that brings up the system.
|
||||
cp $BM/init.sh rootfs/init
|
||||
sed -i "s|DEQP_VER_REPLACE|$DEQP_VER|g" rootfs/init
|
||||
sed -i "s|DEQP_PARALLEL_REPLACE|$DEQP_PARALLEL|g" rootfs/init
|
||||
sed -i "s|DEQP_EXPECTED_RENDERER_REPLACE|$DEQP_EXPECTED_RENDERER|g" rootfs/init
|
||||
sed -i "s|CI_NODE_INDEX_REPLACE|$CI_NODE_INDEX|g" rootfs/init
|
||||
sed -i "s|CI_NODE_TOTAL_REPLACE|$CI_NODE_TOTAL|g" rootfs/init
|
||||
|
||||
# Root on NFS, no need for an inintramfs.
|
||||
rm -f rootfs.cpio.gz
|
||||
touch rootfs.cpio
|
||||
gzip rootfs.cpio
|
||||
else
|
||||
# Create the rootfs in a temp dir
|
||||
rsync -a --delete $BM_ROOTFS/ rootfs/
|
||||
. $BM/rootfs-setup.sh rootfs
|
||||
# Add the Mesa drivers we built, and make a consistent symlink to them.
|
||||
mkdir -p rootfs/$CI_PROJECT_DIR
|
||||
tar -C rootfs/$CI_PROJECT_DIR/ -xf $CI_PROJECT_DIR/artifacts/install.tar
|
||||
ln -sf $CI_PROJECT_DIR/install rootfs/install
|
||||
|
||||
# Finally, pack it up into a cpio rootfs. Skip the vulkan CTS since none of
|
||||
# these devices use it and it would take up space in the initrd.
|
||||
|
||||
if [ -n "$PIGLIT_PROFILES" ]; then
|
||||
EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
|
||||
else
|
||||
EXCLUDE_FILTER="piglit|python"
|
||||
fi
|
||||
|
||||
pushd rootfs
|
||||
find -H | \
|
||||
egrep -v "external/(openglcts|vulkancts|amber|glslang|spirv-tools)" |
|
||||
egrep -v "traces-db|apitrace|renderdoc" | \
|
||||
egrep -v $EXCLUDE_FILTER | \
|
||||
cpio -H newc -o | \
|
||||
xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
|
||||
popd
|
||||
# Copy the deqp runner script and metadata.
|
||||
cp .gitlab-ci/deqp-runner.sh rootfs/deqp/.
|
||||
cp .gitlab-ci/$DEQP_SKIPS rootfs/$CI_PROJECT_DIR/install/deqp-skips.txt
|
||||
if [ -n "$DEQP_EXPECTED_FAILS" ]; then
|
||||
cp .gitlab-ci/$DEQP_EXPECTED_FAILS rootfs/$CI_PROJECT_DIR/install/deqp-expected-fails.txt
|
||||
fi
|
||||
|
||||
# Make the combined kernel image and dtb for passing to fastboot. For normal
|
||||
# Mesa development, we build the kernel and store it in the docker container
|
||||
# that this script is running in.
|
||||
#
|
||||
# However, container builds are expensive, so when you're hacking on the
|
||||
# kernel, it's nice to be able to skip the half hour container build and plus
|
||||
# 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 install -y wget
|
||||
# Finally, pack it up into a cpio rootfs.
|
||||
pushd rootfs
|
||||
find -H | cpio -H newc -o | xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
|
||||
popd
|
||||
|
||||
wget $BM_KERNEL -O kernel
|
||||
wget $BM_DTB -O dtb
|
||||
cat $BM_KERNEL $BM_DTB > Image.gz-dtb
|
||||
|
||||
cat kernel dtb > Image.gz-dtb
|
||||
rm kernel dtb
|
||||
else
|
||||
cat $BM_KERNEL $BM_DTB > Image.gz-dtb
|
||||
fi
|
||||
|
||||
mkdir -p artifacts
|
||||
abootimg \
|
||||
--create artifacts/fastboot.img \
|
||||
-k Image.gz-dtb \
|
||||
@@ -119,30 +82,27 @@ abootimg \
|
||||
-c cmdline="$BM_CMDLINE"
|
||||
rm Image.gz-dtb
|
||||
|
||||
export PATH=$BM:$PATH
|
||||
# Start watching serial, and power up the device.
|
||||
$BM/serial-buffer.py $BM_SERIAL | tee artifacts/serial-output.txt &
|
||||
while [ ! -e artifacts/serial-output.txt ]; do
|
||||
sleep 1
|
||||
done
|
||||
PATH=$BM:$PATH $BM_POWERUP
|
||||
|
||||
# Start background command for talking to serial if we have one.
|
||||
if [ -n "$BM_SERIAL_SCRIPT" ]; then
|
||||
$BM_SERIAL_SCRIPT > results/serial-output.txt &
|
||||
# Once fastboot is ready, boot our image.
|
||||
$BM/expect-output.sh artifacts/serial-output.txt "fastboot: processing commands"
|
||||
fastboot boot -s $BM_FASTBOOT_SERIAL artifacts/fastboot.img
|
||||
|
||||
while [ ! -e results/serial-output.txt ]; do
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
# Wait for the device to complete the deqp run
|
||||
$BM/expect-output.sh artifacts/serial-output.txt "DEQP RESULT"
|
||||
|
||||
# power down the device
|
||||
PATH=$BM:$PATH $BM_POWERDOWN
|
||||
|
||||
set +e
|
||||
$BM/fastboot_run.py \
|
||||
--dev="$BM_SERIAL" \
|
||||
--fbserial="$BM_FASTBOOT_SERIAL" \
|
||||
--powerup="$BM_POWERUP" \
|
||||
--powerdown="$BM_POWERDOWN"
|
||||
ret=$?
|
||||
set -e
|
||||
|
||||
if [ -n "$BM_FASTBOOT_NFSROOT" ]; then
|
||||
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
|
||||
# will look for them.
|
||||
cp -Rp /nfs/results/. results/
|
||||
if grep -q "DEQP RESULT: pass" artifacts/serial-output.txt; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit $ret
|
||||
|
@@ -1,124 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright © 2020 Google LLC
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
class FastbootRun:
|
||||
def __init__(self, args):
|
||||
self.powerup = args.powerup
|
||||
# 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 print_error(self, message):
|
||||
RED = '\033[0;31m'
|
||||
NO_COLOR = '\033[0m'
|
||||
print(RED + message + NO_COLOR)
|
||||
|
||||
def logged_system(self, cmd):
|
||||
print("Running '{}'".format(cmd))
|
||||
return os.system(cmd)
|
||||
|
||||
def run(self):
|
||||
if self.logged_system(self.powerup) != 0:
|
||||
return 1
|
||||
|
||||
fastboot_ready = False
|
||||
for line in self.ser.lines():
|
||||
if re.search("fastboot: processing commands", line) or \
|
||||
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...")
|
||||
return 2
|
||||
|
||||
if not fastboot_ready:
|
||||
self.print_error("Failed to get to fastboot prompt, restarting run...")
|
||||
return 2
|
||||
|
||||
if self.logged_system(self.fastboot) != 0:
|
||||
return 1
|
||||
|
||||
for line in self.ser.lines():
|
||||
if re.search("---. end Kernel panic", line):
|
||||
return 1
|
||||
|
||||
# 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...")
|
||||
return 2
|
||||
|
||||
# db820c sometimes wedges around iommu fault recovery
|
||||
if re.search("watchdog: BUG: soft lockup - CPU.* stuck", line):
|
||||
self.print_error(
|
||||
"Detected kernel soft lockup, restarting run...")
|
||||
return 2
|
||||
|
||||
# If the network device dies, it's probably not graphics's fault, just try again.
|
||||
if re.search("NETDEV WATCHDOG", line):
|
||||
self.print_error(
|
||||
"Detected network device failure, restarting run...")
|
||||
return 2
|
||||
|
||||
result = re.search("hwci: mesa: (\S*)", line)
|
||||
if result:
|
||||
if result.group(1) == "pass":
|
||||
return 0
|
||||
else:
|
||||
return 1
|
||||
|
||||
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)
|
||||
args = parser.parse_args()
|
||||
|
||||
fastboot = FastbootRun(args)
|
||||
|
||||
while True:
|
||||
retval = fastboot.run()
|
||||
if retval != 2:
|
||||
break
|
||||
|
||||
fastboot = FastbootRun(args)
|
||||
|
||||
fastboot.logged_system(args.powerdown)
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -7,4 +7,4 @@ if [ -z "$relay" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$CI_PROJECT_DIR/install/bare-metal/google-power-relay.py off $relay
|
||||
$CI_PROJECT_DIR/.gitlab-ci/bare-metal/google-power-relay.py off $relay
|
||||
|
@@ -7,6 +7,6 @@ if [ -z "$relay" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$CI_PROJECT_DIR/install/bare-metal/google-power-relay.py off $relay
|
||||
$CI_PROJECT_DIR/.gitlab-ci/bare-metal/google-power-relay.py off $relay
|
||||
sleep 5
|
||||
$CI_PROJECT_DIR/install/bare-metal/google-power-relay.py on $relay
|
||||
$CI_PROJECT_DIR/.gitlab-ci/bare-metal/google-power-relay.py on $relay
|
||||
|
30
.gitlab-ci/bare-metal/init.sh
Normal file
30
.gitlab-ci/bare-metal/init.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
mount -t devtmpfs none /dev || echo possibly already mounted
|
||||
mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
|
||||
export DEQP_NO_SAVE_RESULTS=1
|
||||
export DEQP_VER=DEQP_VER_REPLACE
|
||||
export DEQP_PARALLEL=DEQP_PARALLEL_REPLACE
|
||||
export DEQP_EXPECTED_RENDERER=DEQP_EXPECTED_RENDERER_REPLACE
|
||||
export CI_NODE_INDEX=CI_NODE_INDEX_REPLACE
|
||||
export CI_NODE_TOTAL=CI_NODE_TOTAL_REPLACE
|
||||
export DEQP_SKIPS=deqp-skips.txt
|
||||
if [ -e /install/deqp-expected-fails.txt ]; then
|
||||
export DEQP_EXPECTED_FAILS=deqp-expected-fails.txt
|
||||
fi
|
||||
|
||||
if sh /deqp/deqp-runner.sh; then
|
||||
echo "DEQP RESULT: pass"
|
||||
else
|
||||
echo "DEQP RESULT: fail"
|
||||
fi
|
||||
|
||||
# Wait until the job would have timed out anyway, so we don't spew a "init
|
||||
# exited" panic.
|
||||
sleep 6000
|
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
||||
echo "Must supply the PoE Interface to power up"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_ADDRESS" ]; then
|
||||
echo "Must supply the PoE Switch host"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.`expr 48 + $BM_POE_INTERFACE`"
|
||||
SNMP_ON="i 1"
|
||||
SNMP_OFF="i 2"
|
||||
|
||||
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF"
|
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
||||
echo "Must supply the PoE Interface to power up"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_ADDRESS" ]; then
|
||||
echo "Must supply the PoE Switch host"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.`expr 48 + $BM_POE_INTERFACE`"
|
||||
SNMP_ON="i 1"
|
||||
SNMP_OFF="i 2"
|
||||
|
||||
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF"
|
||||
sleep 3s
|
||||
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_ON"
|
@@ -1,147 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Boot script for devices attached to a PoE switch, using NFS for the root
|
||||
# filesystem.
|
||||
|
||||
# We're run from the root of the repo, make a helper var for our paths
|
||||
BM=$CI_PROJECT_DIR/install/bare-metal
|
||||
CI_COMMON=$CI_PROJECT_DIR/install/common
|
||||
|
||||
# Runner config checks
|
||||
if [ -z "$BM_SERIAL" ]; then
|
||||
echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the serial port to listen the device."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_ADDRESS" ]; then
|
||||
echo "Must set BM_POE_ADDRESS in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the PoE switch address to connect for powering up/down devices."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_USERNAME" ]; then
|
||||
echo "Must set BM_POE_USERNAME in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the PoE switch username."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_PASSWORD" ]; then
|
||||
echo "Must set BM_POE_PASSWORD in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the PoE switch password."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POE_INTERFACE" ]; then
|
||||
echo "Must set BM_POE_INTERFACE in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is the PoE switch interface where the device is connected."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POWERUP" ]; then
|
||||
echo "Must set BM_POWERUP in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is a shell script that should power up the device and begin its boot sequence."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POWERDOWN" ]; then
|
||||
echo "Must set BM_POWERDOWN in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is a shell script that should power off the device."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d /nfs ]; then
|
||||
echo "NFS rootfs directory needs to be mounted at /nfs by the gitlab runner"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d /tftp ]; then
|
||||
echo "TFTP directory for this board needs to be mounted at /tftp by the gitlab runner"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# job config checks
|
||||
if [ -z "$BM_ROOTFS" ]; then
|
||||
echo "Must set BM_ROOTFS to your board's rootfs directory in the job's variables"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_BOOTFS" ]; then
|
||||
echo "Must set /boot files for the TFTP boot in the job's variables"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_CMDLINE" ]; then
|
||||
echo "Must set BM_CMDLINE to your board's kernel command line arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_BOOTCONFIG" ]; then
|
||||
echo "Must set BM_BOOTCONFIG to your board's required boot configuration arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
# Clear out any previous run's artifacts.
|
||||
rm -rf results/
|
||||
mkdir -p results
|
||||
|
||||
# Create the rootfs in the NFS directory. rm to make sure it's in a pristine
|
||||
# state, since it's volume-mounted on the host.
|
||||
rsync -a --delete $BM_ROOTFS/ /nfs/
|
||||
|
||||
# If BM_BOOTFS is an URL, download it
|
||||
if echo $BM_BOOTFS | grep -q http; then
|
||||
apt install -y wget
|
||||
wget ${FDO_HTTP_CACHE_URI:-}$BM_BOOTFS -O /tmp/bootfs.tar
|
||||
BM_BOOTFS=/tmp/bootfs.tar
|
||||
fi
|
||||
|
||||
# If BM_BOOTFS is a file, assume it is a tarball and uncompress it
|
||||
if [ -f $BM_BOOTFS ]; then
|
||||
mkdir -p /tmp/bootfs
|
||||
tar xf $BM_BOOTFS -C /tmp/bootfs
|
||||
BM_BOOTFS=/tmp/bootfs
|
||||
fi
|
||||
|
||||
# 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 --delete $BM_BOOTFS/usr/lib/modules/ /nfs/usr/lib/modules/
|
||||
[ -d $BM_BOOTFS/lib/modules ] && rsync -a --delete $BM_BOOTFS/lib/modules/ /nfs/usr/lib/modules/
|
||||
|
||||
# Install kernel image + bootloader files
|
||||
rsync -a --delete $BM_BOOTFS/boot/ /tftp/
|
||||
|
||||
# Create the rootfs in the NFS directory
|
||||
mkdir -p /nfs/results
|
||||
. $BM/rootfs-setup.sh /nfs
|
||||
|
||||
echo "$BM_CMDLINE" > /tftp/cmdline.txt
|
||||
|
||||
# Add some required options in config.txt
|
||||
printf "$BM_BOOTCONFIG" >> /tftp/config.txt
|
||||
|
||||
set +e
|
||||
ATTEMPTS=2
|
||||
while [ $((ATTEMPTS--)) -gt 0 ]; do
|
||||
python3 $BM/poe_run.py \
|
||||
--dev="$BM_SERIAL" \
|
||||
--powerup="$BM_POWERUP" \
|
||||
--powerdown="$BM_POWERDOWN" \
|
||||
--timeout="${BM_POE_TIMEOUT:-60}"
|
||||
ret=$?
|
||||
|
||||
if [ $ret -eq 2 ]; then
|
||||
echo "Did not detect boot sequence, retrying..."
|
||||
else
|
||||
ATTEMPTS=0
|
||||
fi
|
||||
done
|
||||
set -e
|
||||
|
||||
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
|
||||
# will look for them.
|
||||
cp -Rp /nfs/results/. results/
|
||||
|
||||
exit $ret
|
@@ -1,96 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright © 2020 Igalia, S.L.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
from serial_buffer import SerialBuffer
|
||||
import sys
|
||||
import threading
|
||||
|
||||
class PoERun:
|
||||
def __init__(self, args):
|
||||
self.powerup = args.powerup
|
||||
self.powerdown = args.powerdown
|
||||
self.ser = SerialBuffer(args.dev, "results/serial-output.txt", "", args.timeout)
|
||||
|
||||
def print_error(self, message):
|
||||
RED = '\033[0;31m'
|
||||
NO_COLOR = '\033[0m'
|
||||
print(RED + message + NO_COLOR)
|
||||
|
||||
def logged_system(self, cmd):
|
||||
print("Running '{}'".format(cmd))
|
||||
return os.system(cmd)
|
||||
|
||||
def run(self):
|
||||
if self.logged_system(self.powerup) != 0:
|
||||
return 1
|
||||
|
||||
boot_detected = False
|
||||
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")
|
||||
return 2
|
||||
|
||||
for line in self.ser.lines():
|
||||
if re.search("---. end Kernel panic", line):
|
||||
return 1
|
||||
|
||||
# Binning memory problems
|
||||
if re.search("binner overflow mem", line):
|
||||
self.print_error("Memory overflow in the binner; GPU hang")
|
||||
return 1
|
||||
|
||||
result = re.search("hwci: mesa: (\S*)", line)
|
||||
if result:
|
||||
if result.group(1) == "pass":
|
||||
return 0
|
||||
else:
|
||||
return 1
|
||||
|
||||
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('--timeout', type=int, default=60,
|
||||
help='time in seconds to wait for activity', required=False)
|
||||
args = parser.parse_args()
|
||||
|
||||
poe = PoERun(args)
|
||||
retval = poe.run()
|
||||
|
||||
poe.logged_system(args.powerdown)
|
||||
|
||||
sys.exit(retval)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rootfs_dst=$1
|
||||
|
||||
mkdir -p $rootfs_dst/results
|
||||
|
||||
# Set up the init script that brings up the system.
|
||||
cp $BM/bm-init.sh $rootfs_dst/init
|
||||
cp $CI_COMMON/init*.sh $rootfs_dst/
|
||||
|
||||
cp $CI_COMMON/capture-devcoredump.sh $rootfs_dst/
|
||||
|
||||
set +x
|
||||
# Pass through relevant env vars from the gitlab job to the baremetal init script
|
||||
"$CI_COMMON"/generate-env.sh > $rootfs_dst/set-job-env-vars.sh
|
||||
chmod +x $rootfs_dst/set-job-env-vars.sh
|
||||
echo "Variables passed through:"
|
||||
cat $rootfs_dst/set-job-env-vars.sh
|
||||
echo "export CI_JOB_JWT=${CI_JOB_JWT@Q}" >> $rootfs_dst/set-job-env-vars.sh
|
||||
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/
|
46
.gitlab-ci/bare-metal/serial-buffer.py
Executable file
46
.gitlab-ci/bare-metal/serial-buffer.py
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# Copyright © 2020 Google LLC
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Tiny script to read bytes from serial, and write the output to stdout, with a
|
||||
# buffer in between so we don't lose serial output from its buffer.
|
||||
#
|
||||
# We don't use 'cu' because it requires stdin to be hooked up and I never
|
||||
# managed to make that work without getting blocked somewhere. We don't use
|
||||
# 'conserver' because it's non-free.
|
||||
|
||||
import sys
|
||||
import serial
|
||||
import select
|
||||
import os
|
||||
import posix
|
||||
|
||||
dev=sys.argv[1]
|
||||
|
||||
ser = serial.Serial(dev, 115200, timeout=10)
|
||||
|
||||
while True:
|
||||
bytes = ser.read()
|
||||
sys.stdout.buffer.write(bytes)
|
||||
sys.stdout.flush()
|
||||
|
||||
ser.close()
|
@@ -1,153 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright © 2020 Google LLC
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
import argparse
|
||||
from datetime import datetime, timezone
|
||||
import queue
|
||||
import serial
|
||||
import threading
|
||||
import time
|
||||
|
||||
|
||||
class SerialBuffer:
|
||||
def __init__(self, dev, filename, prefix, timeout = None):
|
||||
self.filename = filename
|
||||
self.dev = dev
|
||||
|
||||
if dev:
|
||||
self.f = open(filename, "wb+")
|
||||
self.serial = serial.Serial(dev, 115200, timeout=timeout if timeout else 10)
|
||||
else:
|
||||
self.f = open(filename, "rb")
|
||||
|
||||
self.byte_queue = queue.Queue()
|
||||
self.line_queue = queue.Queue()
|
||||
self.prefix = prefix
|
||||
self.timeout = timeout
|
||||
self.sentinel = object()
|
||||
|
||||
if self.dev:
|
||||
self.read_thread = threading.Thread(
|
||||
target=self.serial_read_thread_loop, daemon=True)
|
||||
else:
|
||||
self.read_thread = threading.Thread(
|
||||
target=self.serial_file_read_thread_loop, daemon=True)
|
||||
self.read_thread.start()
|
||||
|
||||
self.lines_thread = threading.Thread(
|
||||
target=self.serial_lines_thread_loop, daemon=True)
|
||||
self.lines_thread.start()
|
||||
|
||||
# Thread that just reads the bytes from the serial device to try to keep from
|
||||
# buffer overflowing it. If nothing is received in 1 minute, it finalizes.
|
||||
def serial_read_thread_loop(self):
|
||||
greet = "Serial thread reading from %s\n" % self.dev
|
||||
self.byte_queue.put(greet.encode())
|
||||
|
||||
while True:
|
||||
try:
|
||||
b = self.serial.read()
|
||||
if len(b) > 0:
|
||||
self.byte_queue.put(b)
|
||||
elif self.timeout:
|
||||
self.byte_queue.put(self.sentinel)
|
||||
break
|
||||
except Exception as err:
|
||||
print(self.prefix + str(err))
|
||||
self.byte_queue.put(self.sentinel)
|
||||
break
|
||||
|
||||
# Thread that just reads the bytes from the file of serial output that some
|
||||
# other process is appending to.
|
||||
def serial_file_read_thread_loop(self):
|
||||
greet = "Serial thread reading from %s\n" % self.filename
|
||||
self.byte_queue.put(greet.encode())
|
||||
|
||||
while True:
|
||||
line = self.f.readline()
|
||||
if line:
|
||||
self.byte_queue.put(line)
|
||||
else:
|
||||
time.sleep(0.1)
|
||||
|
||||
# Thread that processes the stream of bytes to 1) log to stdout, 2) log to
|
||||
# file, 3) add to the queue of lines to be read by program logic
|
||||
|
||||
def serial_lines_thread_loop(self):
|
||||
line = bytearray()
|
||||
while True:
|
||||
bytes = self.byte_queue.get(block=True)
|
||||
|
||||
if bytes == self.sentinel:
|
||||
self.read_thread.join()
|
||||
self.line_queue.put(self.sentinel)
|
||||
break
|
||||
|
||||
# Write our data to the output file if we're the ones reading from
|
||||
# the serial device
|
||||
if self.dev:
|
||||
self.f.write(bytes)
|
||||
self.f.flush()
|
||||
|
||||
for b in bytes:
|
||||
line.append(b)
|
||||
if b == b'\n'[0]:
|
||||
line = line.decode(errors="replace")
|
||||
|
||||
time = datetime.now().strftime('%y-%m-%d %H:%M:%S')
|
||||
print("{endc}{time} {prefix}{line}".format(
|
||||
time=time, prefix=self.prefix, line=line, endc='\033[0m'), flush=True, end='')
|
||||
|
||||
self.line_queue.put(line)
|
||||
line = bytearray()
|
||||
|
||||
def get_line(self):
|
||||
line = self.line_queue.get()
|
||||
if line == self.sentinel:
|
||||
self.lines_thread.join()
|
||||
return line
|
||||
|
||||
def lines(self):
|
||||
return iter(self.get_line, self.sentinel)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument('--dev', type=str, help='Serial device')
|
||||
parser.add_argument('--file', type=str,
|
||||
help='Filename for serial output', required=True)
|
||||
parser.add_argument('--prefix', type=str,
|
||||
help='Prefix for logging serial to stdout', nargs='?')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
ser = SerialBuffer(args.dev, args.file, args.prefix or "")
|
||||
for line in ser.lines():
|
||||
# We're just using this as a logger, so eat the produced lines and drop
|
||||
# them
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -1,41 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# Copyright © 2020 Christian Gmeiner
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
#
|
||||
# Tiny script to read bytes from telnet, and write the output to stdout, with a
|
||||
# buffer in between so we don't lose serial output from its buffer.
|
||||
#
|
||||
|
||||
import sys
|
||||
import telnetlib
|
||||
|
||||
host=sys.argv[1]
|
||||
port=sys.argv[2]
|
||||
|
||||
tn = telnetlib.Telnet(host, port, 1000000)
|
||||
|
||||
while True:
|
||||
bytes = tn.read_some()
|
||||
sys.stdout.buffer.write(bytes)
|
||||
sys.stdout.flush()
|
||||
|
||||
tn.close()
|
30
.gitlab-ci/build-apitrace.sh
Normal file
30
.gitlab-ci/build-apitrace.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# Need an unreleased version of Waffle for surfaceless support in apitrace
|
||||
# Replace this build with the Debian package once that's possible
|
||||
|
||||
WAFFLE_VERSION="e3c995d9a2693b687501715b6550619922346089"
|
||||
git clone https://gitlab.freedesktop.org/mesa/waffle.git --single-branch --no-checkout /waffle
|
||||
pushd /waffle
|
||||
git checkout "$WAFFLE_VERSION"
|
||||
cmake -B_build -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release .
|
||||
make -C _build -j4 install
|
||||
popd
|
||||
rm -rf /waffle
|
||||
|
||||
APITRACE_VERSION="9.0"
|
||||
|
||||
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
|
||||
pushd /apitrace
|
||||
git checkout "$APITRACE_VERSION"
|
||||
cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/
|
||||
ninja -C _build
|
||||
mkdir build
|
||||
cp _build/apitrace build
|
||||
cp _build/glretrace build
|
||||
cp _build/eglretrace build
|
||||
strip build/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
10
.gitlab-ci/build-cts-runner.sh
Normal file
10
.gitlab-ci/build-cts-runner.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/parallel-deqp-runner.git --depth 1 -b mesa-ci-2019-12-17 /parallel-deqp-runner
|
||||
pushd /parallel-deqp-runner
|
||||
meson build/ $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
popd
|
||||
rm -rf /parallel-deqp-runner
|
60
.gitlab-ci/build-deqp-gl.sh
Normal file
60
.gitlab-ci/build-deqp-gl.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
--depth 1 \
|
||||
https://github.com/KhronosGroup/VK-GL-CTS.git \
|
||||
-b opengl-es-cts-3.2.6.1 \
|
||||
/VK-GL-CTS
|
||||
pushd /VK-GL-CTS
|
||||
|
||||
# surfaceless links against libkms and such despite not using it.
|
||||
sed -i '/gbm/d' targets/surfaceless/surfaceless.cmake
|
||||
sed -i '/libkms/d' targets/surfaceless/surfaceless.cmake
|
||||
sed -i '/libgbm/d' targets/surfaceless/surfaceless.cmake
|
||||
|
||||
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
|
||||
# libpng (sigh). The archives get their checksums checked anyway, and git
|
||||
# always goes through ssh or https.
|
||||
python3 external/fetch_sources.py --insecure
|
||||
|
||||
mkdir -p /deqp
|
||||
|
||||
# Save the testlog stylesheets:
|
||||
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
|
||||
popd
|
||||
|
||||
pushd /deqp
|
||||
cmake -G Ninja \
|
||||
-DDEQP_TARGET=surfaceless \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
$EXTRA_CMAKE_ARGS \
|
||||
/VK-GL-CTS
|
||||
ninja
|
||||
|
||||
# Copy out the mustpass lists we want from a bunch of other junk.
|
||||
mkdir /deqp/mustpass
|
||||
for gles in gles2 gles3 gles31; do
|
||||
cp \
|
||||
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/$gles-master.txt \
|
||||
/deqp/mustpass/$gles-master.txt
|
||||
done
|
||||
|
||||
# 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
|
||||
|
||||
rm -rf /deqp/external
|
||||
rm -rf /deqp/modules/internal
|
||||
rm -rf /deqp/execserver
|
||||
rm -rf /deqp/modules/egl
|
||||
rm -rf /deqp/framework
|
||||
find -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs rm -rf
|
||||
${STRIP_CMD:-strip} modules/*/deqp-*
|
||||
du -sh *
|
||||
rm -rf /VK-GL-CTS
|
||||
popd
|
42
.gitlab-ci/build-deqp-vk.sh
Normal file
42
.gitlab-ci/build-deqp-vk.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone \
|
||||
--depth 1 \
|
||||
https://github.com/KhronosGroup/VK-GL-CTS.git \
|
||||
-b vulkan-cts-1.2.1.0 \
|
||||
/VK-GL-CTS
|
||||
pushd /VK-GL-CTS
|
||||
|
||||
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
|
||||
# libpng (sigh). The archives get their checksums checked anyway, and git
|
||||
# always goes through ssh or https.
|
||||
python3 external/fetch_sources.py --insecure
|
||||
|
||||
mkdir -p /deqp
|
||||
|
||||
popd
|
||||
|
||||
pushd /deqp
|
||||
cmake -G Ninja \
|
||||
-DDEQP_TARGET=x11_glx \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
/VK-GL-CTS
|
||||
ninja
|
||||
|
||||
# Copy out the mustpass list we want.
|
||||
mkdir /deqp/mustpass
|
||||
cp /VK-GL-CTS/external/vulkancts/mustpass/master/vk-default.txt \
|
||||
/deqp/mustpass/vk-master.txt
|
||||
|
||||
rm -rf /deqp/modules/internal
|
||||
rm -rf /deqp/executor
|
||||
rm -rf /deqp/execserver
|
||||
rm -rf /deqp/modules/egl
|
||||
rm -rf /deqp/framework
|
||||
find -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs rm -rf
|
||||
strip external/vulkancts/modules/vulkan/deqp-vk
|
||||
du -sh *
|
||||
rm -rf /VK-GL-CTS
|
||||
popd
|
14
.gitlab-ci/build-fossilize.sh
Normal file
14
.gitlab-ci/build-fossilize.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone https://github.com/ValveSoftware/Fossilize.git
|
||||
cd Fossilize
|
||||
git checkout 6b5b570008c9ab5269e341f04c811fe49a1bb72c
|
||||
git submodule update --init
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
ninja -C . install
|
||||
cd ../..
|
||||
rm -rf Fossilize
|
19
.gitlab-ci/build-gfxreconstruct.sh
Normal file
19
.gitlab-ci/build-gfxreconstruct.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# https://github.com/LunarG/gfxreconstruct/issues/328
|
||||
GFXRECONSTRUCT_VERSION=b66cd392a84b226cb60ad9d4130ddeb58a1559cb
|
||||
|
||||
git clone https://github.com/LunarG/gfxreconstruct.git --single-branch --no-checkout /gfxreconstruct
|
||||
pushd /gfxreconstruct
|
||||
git checkout "$GFXRECONSTRUCT_VERSION"
|
||||
git submodule update --init
|
||||
git submodule update
|
||||
cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release
|
||||
ninja -C _build gfxrecon-replay
|
||||
mkdir -p build/bin
|
||||
install _build/tools/replay/gfxrecon-replay build/bin
|
||||
strip build/bin/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
13
.gitlab-ci/build-piglit.sh
Normal file
13
.gitlab-ci/build-piglit.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
|
||||
pushd /piglit
|
||||
git checkout 8771c3860505db2bcf4877216221d774bf90af6b
|
||||
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
ninja
|
||||
find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | xargs rm -rf
|
||||
rm -rf target_api
|
||||
popd
|
17
.gitlab-ci/build-renderdoc.sh
Normal file
17
.gitlab-ci/build-renderdoc.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
RENDERDOC_VERSION=da02e88201dc3b64316fc33ce6ff69cc729689aa
|
||||
|
||||
git clone https://github.com/baldurk/renderdoc.git --single-branch --no-checkout /renderdoc
|
||||
pushd /renderdoc
|
||||
git checkout "$RENDERDOC_VERSION"
|
||||
cmake -G Ninja -B_build -H. -DENABLE_QRENDERDOC=false -DCMAKE_BUILD_TYPE=Release
|
||||
ninja -C _build
|
||||
mkdir -p build/lib
|
||||
cp _build/lib/renderdoc.so build/lib
|
||||
cp _build/lib/librenderdoc.so build/lib
|
||||
strip build/lib/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -4,13 +4,13 @@ set -ex
|
||||
|
||||
mkdir -p /epoxy
|
||||
pushd /epoxy
|
||||
wget -qO- https://github.com/anholt/libepoxy/releases/download/1.5.8/libepoxy-1.5.8.tar.xz | tar -xJ --strip-components=1
|
||||
wget -qO- https://github.com/anholt/libepoxy/releases/download/1.5.4/libepoxy-1.5.4.tar.xz | tar -xJ --strip-components=1
|
||||
meson build/ $EXTRA_MESON_ARGS
|
||||
ninja -C build install
|
||||
popd
|
||||
rm -rf /epoxy
|
||||
|
||||
VIRGLRENDERER_VERSION=f2ab66c6c00065b2944f4cd9d965ee455c535271
|
||||
VIRGLRENDERER_VERSION=70b18e56d5c3ed69c561c36e098e8aea71ebffc2
|
||||
git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git --single-branch --no-checkout /virglrenderer
|
||||
pushd /virglrenderer
|
||||
git checkout "$VIRGLRENDERER_VERSION"
|
29
.gitlab-ci/build-vulkantools.sh
Normal file
29
.gitlab-ci/build-vulkantools.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
VULKANTOOLS_VERSION=1862c6a47b64cd09156205d7f7e6b3bfcea76390
|
||||
|
||||
git clone https://github.com/LunarG/VulkanTools.git --single-branch --no-checkout /VulkanTools
|
||||
pushd /VulkanTools
|
||||
git checkout "$VULKANTOOLS_VERSION"
|
||||
./update_external_sources.sh
|
||||
mkdir _build
|
||||
./scripts/update_deps.py --dir=_build --config=release --generator=Ninja
|
||||
cmake -G Ninja -B_build -H. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/VulkanTools/build \
|
||||
-DBUILD_TESTS=OFF \
|
||||
-DBUILD_VLF=OFF \
|
||||
-DBUILD_VKTRACE=OFF \
|
||||
-DBUILD_VIA=OFF \
|
||||
-DBUILD_VKTRACE_REPLAY=OFF \
|
||||
-C_build/helper.cmake
|
||||
ninja -C _build VkLayer_screenshot VkLayer_screenshot-staging-json
|
||||
mkdir -p build/etc/vulkan/explicit_layer.d
|
||||
mkdir build/lib
|
||||
install _build/layersvt/staging-json/VkLayer_screenshot.json build/etc/vulkan/explicit_layer.d
|
||||
install _build/layersvt/libVkLayer_screenshot.so build/lib
|
||||
strip build/lib/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
while true; do
|
||||
devcds=`find /sys/devices/virtual/devcoredump/ -name data 2>/dev/null`
|
||||
for i in $devcds; do
|
||||
echo "Found a devcoredump at $i."
|
||||
if cp $i /results/first.devcore; then
|
||||
echo 1 > $i
|
||||
echo "Saved to the job artifacts at /first.devcore"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
sleep 10
|
||||
done
|
@@ -1,86 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
for var in \
|
||||
ASAN_OPTIONS \
|
||||
BASE_SYSTEM_FORK_HOST_PREFIX \
|
||||
BASE_SYSTEM_MAINLINE_HOST_PREFIX \
|
||||
CI_COMMIT_BRANCH \
|
||||
CI_COMMIT_TITLE \
|
||||
CI_JOB_ID \
|
||||
CI_JOB_URL \
|
||||
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
|
||||
CI_MERGE_REQUEST_TITLE \
|
||||
CI_NODE_INDEX \
|
||||
CI_NODE_TOTAL \
|
||||
CI_PAGES_DOMAIN \
|
||||
CI_PIPELINE_ID \
|
||||
CI_PROJECT_DIR \
|
||||
CI_PROJECT_NAME \
|
||||
CI_PROJECT_PATH \
|
||||
CI_PROJECT_ROOT_NAMESPACE \
|
||||
CI_RUNNER_DESCRIPTION \
|
||||
CI_SERVER_URL \
|
||||
DEQP_CASELIST_FILTER \
|
||||
DEQP_CASELIST_INV_FILTER \
|
||||
DEQP_CONFIG \
|
||||
DEQP_EXPECTED_RENDERER \
|
||||
DEQP_FRACTION \
|
||||
DEQP_HEIGHT \
|
||||
DEQP_PARALLEL \
|
||||
DEQP_RESULTS_DIR \
|
||||
DEQP_RUNNER_OPTIONS \
|
||||
DEQP_SUITE \
|
||||
DEQP_VARIANT \
|
||||
DEQP_VER \
|
||||
DEQP_WIDTH \
|
||||
DEVICE_NAME \
|
||||
DRIVER_NAME \
|
||||
EGL_PLATFORM \
|
||||
ETNA_MESA_DEBUG \
|
||||
FDO_CI_CONCURRENT \
|
||||
FDO_UPSTREAM_REPO \
|
||||
FD_MESA_DEBUG \
|
||||
FLAKES_CHANNEL \
|
||||
GPU_VERSION \
|
||||
HWCI_FREQ_MAX \
|
||||
HWCI_KERNEL_MODULES \
|
||||
HWCI_START_XORG \
|
||||
HWCI_TEST_SCRIPT \
|
||||
IR3_SHADER_DEBUG \
|
||||
JOB_ARTIFACTS_BASE \
|
||||
JOB_RESULTS_PATH \
|
||||
JOB_ROOTFS_OVERLAY_PATH \
|
||||
MESA_BUILD_PATH \
|
||||
MESA_GL_VERSION_OVERRIDE \
|
||||
MESA_GLSL_VERSION_OVERRIDE \
|
||||
MESA_GLES_VERSION_OVERRIDE \
|
||||
MESA_VK_IGNORE_CONFORMANCE_WARNING \
|
||||
MINIO_HOST \
|
||||
NIR_VALIDATE \
|
||||
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER \
|
||||
PAN_MESA_DEBUG \
|
||||
PIGLIT_FRACTION \
|
||||
PIGLIT_JUNIT_RESULTS \
|
||||
PIGLIT_NO_WINDOW \
|
||||
PIGLIT_OPTIONS \
|
||||
PIGLIT_PLATFORM \
|
||||
PIGLIT_PROFILES \
|
||||
PIGLIT_REPLAY_ARTIFACTS_BASE_URL \
|
||||
PIGLIT_REPLAY_SUBCOMMAND \
|
||||
PIGLIT_REPLAY_DESCRIPTION_FILE \
|
||||
PIGLIT_REPLAY_DEVICE_NAME \
|
||||
PIGLIT_REPLAY_EXTRA_ARGS \
|
||||
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE \
|
||||
PIGLIT_REPLAY_UPLOAD_TO_MINIO \
|
||||
PIGLIT_RESULTS \
|
||||
PIGLIT_TESTS \
|
||||
PIPELINE_ARTIFACTS_BASE \
|
||||
TEST_LD_PRELOAD \
|
||||
TU_DEBUG \
|
||||
VK_CPU \
|
||||
VK_DRIVER \
|
||||
; do
|
||||
if [ -n "${!var+x}" ]; then
|
||||
echo "export $var=${!var@Q}"
|
||||
fi
|
||||
done
|
@@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Very early init, used to make sure devices and network are set up and
|
||||
# reachable.
|
||||
|
||||
set -ex
|
||||
|
||||
cd /
|
||||
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
mount -t devtmpfs none /dev || echo possibly already mounted
|
||||
mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
|
||||
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||
[ -z "$NFS_SERVER_IP" ] || echo "$NFS_SERVER_IP caching-proxy" >> /etc/hosts
|
||||
|
||||
# Set the time so we can validate certificates before we fetch anything;
|
||||
# however as not all DUTs have network, make this non-fatal.
|
||||
for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true
|
@@ -1,78 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Second-stage init, used to set up devices and our job environment before
|
||||
# running tests.
|
||||
|
||||
. /set-job-env-vars.sh
|
||||
|
||||
set -ex
|
||||
|
||||
# Set up any devices required by the jobs
|
||||
[ -z "$HWCI_KERNEL_MODULES" ] || (echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe)
|
||||
|
||||
# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
|
||||
# it in /install
|
||||
ln -sf $CI_PROJECT_DIR/install /install
|
||||
export LD_LIBRARY_PATH=/install/lib
|
||||
export LIBGL_DRIVERS_PATH=/install/lib/dri
|
||||
|
||||
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
|
||||
export XDG_CACHE_HOME=/tmp
|
||||
|
||||
# Make sure Python can find all our imports
|
||||
export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))")
|
||||
|
||||
if [ "$HWCI_FREQ_MAX" = "true" ]; then
|
||||
# Ensure initialization of the DRM device (needed by MSM)
|
||||
head -0 /dev/dri/renderD128
|
||||
|
||||
# Disable GPU frequency scaling
|
||||
DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
|
||||
test -z "$DEVFREQ_GOVERNOR" || echo performance > $DEVFREQ_GOVERNOR || true
|
||||
|
||||
# Disable CPU frequency scaling
|
||||
echo performance | tee -a /sys/devices/system/cpu/cpufreq/policy*/scaling_governor || true
|
||||
|
||||
# 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
|
||||
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 &
|
||||
|
||||
# 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
|
||||
# without using -displayfd you can race with Xorg's startup), but xinit will eat
|
||||
# your client's return code
|
||||
if [ -n "$HWCI_START_XORG" ]; then
|
||||
echo "touch /xorg-started; sleep 100000" > /xorg-script
|
||||
env \
|
||||
xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
||||
|
||||
# Wait for xorg to be ready for connections.
|
||||
for i in 1 2 3 4 5; do
|
||||
if [ -e /xorg-started ]; then
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
export DISPLAY=:0
|
||||
fi
|
||||
|
||||
RESULT=fail
|
||||
if sh $HWCI_TEST_SCRIPT; then
|
||||
RESULT=pass
|
||||
rm -rf results/trace/$PIGLIT_REPLAY_DEVICE_NAME
|
||||
fi
|
||||
|
||||
# upload artifacts
|
||||
MINIO=$(cat /proc/cmdline | tr ' ' '\n' | grep minio_results | cut -d '=' -f 2 || true)
|
||||
if [ -n "$MINIO" ]; then
|
||||
tar -czf results.tar.gz results/;
|
||||
ci-fairy minio login "$CI_JOB_JWT";
|
||||
ci-fairy minio cp results.tar.gz minio://"$MINIO"/results.tar.gz;
|
||||
fi
|
||||
|
||||
echo "hwci: mesa: $RESULT"
|
@@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
_XORG_SCRIPT="/xorg-script"
|
||||
_FLAG_FILE="/xorg-started"
|
||||
|
||||
echo "touch ${_FLAG_FILE}; sleep 100000" > "${_XORG_SCRIPT}"
|
||||
if [ "x$1" != "x" ]; then
|
||||
export LD_LIBRARY_PATH="${1}/lib"
|
||||
export LIBGL_DRIVERS_PATH="${1}/lib/dri"
|
||||
fi
|
||||
xinit /bin/sh "${_XORG_SCRIPT}" -- /usr/bin/Xorg vt45 -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
||||
|
||||
# Wait for xorg to be ready for connections.
|
||||
for i in 1 2 3 4 5; do
|
||||
if [ -e "${_FLAG_FILE}" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
done
|
@@ -1,149 +0,0 @@
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
||||
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
CONFIG_DEVFREQ_GOV_PASSIVE=y
|
||||
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_ROCKCHIP=y
|
||||
CONFIG_DRM_PANFROST=y
|
||||
CONFIG_DRM_LIMA=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_MSM=y
|
||||
CONFIG_DRM_I2C_ADV7511=y
|
||||
CONFIG_DRM_I2C_ADV7533=y
|
||||
CONFIG_PWM_CROS_EC=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
|
||||
CONFIG_ROCKCHIP_CDN_DP=n
|
||||
|
||||
CONFIG_SPI_ROCKCHIP=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_DP=y
|
||||
CONFIG_DWMAC_ROCKCHIP=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_TYPEC_FUSB302=y
|
||||
CONFIG_TYPEC=y
|
||||
CONFIG_TYPEC_TCPM=y
|
||||
|
||||
# MSM platform bits
|
||||
CONFIG_QCOM_RPMHPD=y
|
||||
CONFIG_QCOM_RPMPD=y
|
||||
CONFIG_SDM_GPUCC_845=y
|
||||
CONFIG_SDM_VIDEOCC_845=y
|
||||
CONFIG_SDM_DISPCC_845=y
|
||||
CONFIG_SDM_LPASSCC_845=y
|
||||
CONFIG_SDM_CAMCC_845=y
|
||||
CONFIG_RESET_QCOM_PDC=y
|
||||
CONFIG_DRM_TI_SN65DSI86=y
|
||||
CONFIG_I2C_QCOM_GENI=y
|
||||
CONFIG_SPI_QCOM_GENI=y
|
||||
CONFIG_PHY_QCOM_QUSB2=y
|
||||
CONFIG_PHY_QCOM_QMP=y
|
||||
CONFIG_QCOM_LLCC=y
|
||||
CONFIG_QCOM_SPMI_TEMP_ALARM=y
|
||||
CONFIG_QCOM_CLK_APCC_MSM8996=y
|
||||
CONFIG_POWER_RESET_QCOM_PON=y
|
||||
CONFIG_RTC_DRV_PM8XXX=y
|
||||
CONFIG_INTERCONNECT=y
|
||||
CONFIG_INTERCONNECT_QCOM=y
|
||||
CONFIG_INTERCONNECT_QCOM_SDM845=y
|
||||
CONFIG_INTERCONNECT_QCOM_MSM8916=y
|
||||
CONFIG_INTERCONNECT_QCOM_OSM_L3=y
|
||||
CONFIG_INTERCONNECT_QCOM_SC7180=y
|
||||
CONFIG_QCOM_WDT=y
|
||||
CONFIG_CRYPTO_DEV_QCOM_RNG=y
|
||||
|
||||
# db410c ethernet
|
||||
CONFIG_USB_RTL8152=y
|
||||
# db820c ethernet
|
||||
CONFIG_ATL1C=y
|
||||
|
||||
CONFIG_ARCH_ALPINE=n
|
||||
CONFIG_ARCH_BCM2835=n
|
||||
CONFIG_ARCH_BCM_IPROC=n
|
||||
CONFIG_ARCH_BERLIN=n
|
||||
CONFIG_ARCH_BRCMSTB=n
|
||||
CONFIG_ARCH_EXYNOS=n
|
||||
CONFIG_ARCH_K3=n
|
||||
CONFIG_ARCH_LAYERSCAPE=n
|
||||
CONFIG_ARCH_LG1K=n
|
||||
CONFIG_ARCH_HISI=n
|
||||
CONFIG_ARCH_MVEBU=n
|
||||
CONFIG_ARCH_SEATTLE=n
|
||||
CONFIG_ARCH_SYNQUACER=n
|
||||
CONFIG_ARCH_RENESAS=n
|
||||
CONFIG_ARCH_R8A774A1=n
|
||||
CONFIG_ARCH_R8A774C0=n
|
||||
CONFIG_ARCH_R8A7795=n
|
||||
CONFIG_ARCH_R8A7796=n
|
||||
CONFIG_ARCH_R8A77965=n
|
||||
CONFIG_ARCH_R8A77970=n
|
||||
CONFIG_ARCH_R8A77980=n
|
||||
CONFIG_ARCH_R8A77990=n
|
||||
CONFIG_ARCH_R8A77995=n
|
||||
CONFIG_ARCH_STRATIX10=n
|
||||
CONFIG_ARCH_TEGRA=n
|
||||
CONFIG_ARCH_SPRD=n
|
||||
CONFIG_ARCH_THUNDER=n
|
||||
CONFIG_ARCH_THUNDER2=n
|
||||
CONFIG_ARCH_UNIPHIER=n
|
||||
CONFIG_ARCH_VEXPRESS=n
|
||||
CONFIG_ARCH_XGENE=n
|
||||
CONFIG_ARCH_ZX=n
|
||||
CONFIG_ARCH_ZYNQMP=n
|
||||
|
||||
# Strip out some stuff we don't need for graphics testing, to reduce
|
||||
# the build.
|
||||
CONFIG_CAN=n
|
||||
CONFIG_WIRELESS=n
|
||||
CONFIG_RFKILL=n
|
||||
CONFIG_WLAN=n
|
||||
|
||||
CONFIG_REGULATOR_FAN53555=y
|
||||
CONFIG_REGULATOR=y
|
||||
|
||||
CONFIG_REGULATOR_VCTRL=y
|
||||
|
||||
CONFIG_KASAN=n
|
||||
CONFIG_KASAN_INLINE=n
|
||||
CONFIG_STACKTRACE=n
|
||||
|
||||
CONFIG_TMPFS=y
|
||||
|
||||
CONFIG_PROVE_LOCKING=n
|
||||
CONFIG_DEBUG_LOCKDEP=n
|
||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
|
||||
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
|
||||
CONFIG_FW_LOADER_COMPRESS=y
|
||||
CONFIG_FW_LOADER_USER_HELPER=n
|
||||
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_RTL8152=y
|
||||
CONFIG_USB_NET_AX8817X=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
|
||||
# For amlogic
|
||||
CONFIG_MESON_GXL_PHY=y
|
||||
CONFIG_MDIO_BUS_MUX_MESON_G12A=y
|
||||
CONFIG_DRM_MESON=y
|
||||
|
||||
# For Mediatek
|
||||
CONFIG_DRM_MEDIATEK=y
|
||||
CONFIG_PWM_MEDIATEK=y
|
||||
CONFIG_DRM_MEDIATEK_HDMI=y
|
||||
CONFIG_GNSS_MTK_SERIAL=y
|
||||
CONFIG_HW_RANDOM_MTK=y
|
||||
CONFIG_MTK_DEVAPC=y
|
||||
CONFIG_PWM_MTK_DISP=y
|
||||
CONFIG_MTK_CMDQ=y
|
83
.gitlab-ci/container/arm_build.sh
Normal file
83
.gitlab-ci/container/arm_build.sh
Normal file
@@ -0,0 +1,83 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
############### Install packages for building
|
||||
apt-get -y install ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
|
||||
dpkg --add-architecture armhf
|
||||
apt-get update
|
||||
apt-get -y install \
|
||||
abootimg \
|
||||
android-sdk-ext4-utils \
|
||||
bc \
|
||||
bison \
|
||||
ccache \
|
||||
cmake \
|
||||
cpio \
|
||||
crossbuild-essential-armhf \
|
||||
debootstrap \
|
||||
fastboot \
|
||||
flex \
|
||||
g++ \
|
||||
gettext \
|
||||
git \
|
||||
lavacli \
|
||||
libdrm-dev:armhf \
|
||||
libegl1-mesa-dev \
|
||||
libegl1-mesa-dev:armhf \
|
||||
libelf-dev \
|
||||
libelf-dev:armhf \
|
||||
libexpat1-dev \
|
||||
libexpat1-dev:armhf \
|
||||
libgles2-mesa-dev \
|
||||
libgles2-mesa-dev:armhf \
|
||||
libpng-dev \
|
||||
libpng-dev:armhf \
|
||||
libssl-dev \
|
||||
libvulkan-dev \
|
||||
libvulkan-dev:armhf \
|
||||
llvm-7-dev:armhf \
|
||||
llvm-8-dev \
|
||||
meson \
|
||||
pkg-config \
|
||||
python \
|
||||
python3-distutils \
|
||||
python3-mako \
|
||||
python3-serial \
|
||||
unzip \
|
||||
wget \
|
||||
xz-utils \
|
||||
zlib1g-dev
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# dependencies where we want a specific version
|
||||
export LIBDRM_VERSION=libdrm-2.4.100
|
||||
|
||||
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
|
||||
tar -xvf $LIBDRM_VERSION.tar.bz2 && rm $LIBDRM_VERSION.tar.bz2
|
||||
cd $LIBDRM_VERSION; meson build -D vc4=true -D freedreno=true -D etnaviv=true; ninja -C build install; cd ..
|
||||
rm -rf $LIBDRM_VERSION
|
||||
|
||||
############### Generate cross build file for Meson
|
||||
|
||||
cross_file="/cross_file-armhf.txt"
|
||||
/usr/share/meson/debcrossgen --arch armhf -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"
|
||||
# Don't need wrapper for armhf executables
|
||||
sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
|
||||
|
||||
############### Generate kernel, ramdisk, test suites, etc for LAVA jobs
|
||||
|
||||
DEBIAN_ARCH=arm64 . .gitlab-ci/container/lava_arm.sh
|
||||
DEBIAN_ARCH=armhf . .gitlab-ci/container/lava_arm.sh
|
||||
|
||||
apt-get purge -y \
|
||||
python3-distutils \
|
||||
wget
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
72
.gitlab-ci/container/arm_test.sh
Normal file
72
.gitlab-ci/container/arm_test.sh
Normal file
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
############### Install packages for building
|
||||
apt-get -y install ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
|
||||
apt-get update
|
||||
apt-get -y install \
|
||||
bzip2 \
|
||||
ccache \
|
||||
cmake \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
libc6-dev \
|
||||
libdrm-nouveau2 \
|
||||
libexpat1 \
|
||||
libgbm-dev \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
libllvm8 \
|
||||
libpng16-16 \
|
||||
libpng-dev \
|
||||
libvulkan-dev \
|
||||
libvulkan1 \
|
||||
meson \
|
||||
netcat \
|
||||
pkg-config \
|
||||
procps \
|
||||
python \
|
||||
python3-distutils \
|
||||
waffle-utils \
|
||||
wget \
|
||||
zlib1g
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
############### Build dEQP runner
|
||||
|
||||
. .gitlab-ci/build-cts-runner.sh
|
||||
|
||||
############### Build dEQP GL
|
||||
|
||||
. .gitlab-ci/build-deqp-gl.sh
|
||||
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
ccache --show-stats
|
||||
|
||||
apt-get purge -y \
|
||||
bzip2 \
|
||||
ccache \
|
||||
cmake \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
libc6-dev \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
libpng-dev \
|
||||
libvulkan-dev \
|
||||
meson \
|
||||
pkg-config \
|
||||
python \
|
||||
python3-distutils \
|
||||
wget
|
||||
|
||||
apt-get autoremove -y --purge
|
@@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
wget ${ARTIFACTS_URL}/Image
|
||||
wget ${ARTIFACTS_URL}/Image.gz
|
||||
wget ${ARTIFACTS_URL}/cheza-kernel
|
||||
|
||||
DEVICE_TREES="apq8016-sbc.dtb apq8096-db820c.dtb"
|
||||
|
||||
for DTB in $DEVICE_TREES; do
|
||||
wget ${ARTIFACTS_URL}/$DTB
|
||||
done
|
||||
|
||||
popd
|
||||
elif [[ $arch == "armhf" ]]; then
|
||||
mkdir -p /baremetal-files
|
||||
pushd /baremetal-files
|
||||
|
||||
wget ${ARTIFACTS_URL}/zImage
|
||||
|
||||
DEVICE_TREES="imx6q-cubox-i.dtb"
|
||||
|
||||
for DTB in $DEVICE_TREES; do
|
||||
wget ${ARTIFACTS_URL}/$DTB
|
||||
done
|
||||
|
||||
popd
|
||||
fi
|
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
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
|
||||
ninja -C _build
|
||||
mkdir build
|
||||
cp _build/apitrace build
|
||||
cp _build/eglretrace build
|
||||
${STRIP_CMD:-strip} build/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -1,63 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# Pull down repositories that crosvm depends on to cros checkout-like locations.
|
||||
CROS_ROOT=/
|
||||
THIRD_PARTY_ROOT=$CROS_ROOT/third_party
|
||||
mkdir -p $THIRD_PARTY_ROOT
|
||||
AOSP_EXTERNAL_ROOT=$CROS_ROOT/aosp/external
|
||||
mkdir -p $AOSP_EXTERNAL_ROOT
|
||||
PLATFORM2_ROOT=/platform2
|
||||
|
||||
PLATFORM2_COMMIT=72e56e66ccf3d2ea48f5686bd1f772379c43628b
|
||||
git clone --single-branch --no-checkout https://chromium.googlesource.com/chromiumos/platform2 $PLATFORM2_ROOT
|
||||
pushd $PLATFORM2_ROOT
|
||||
git checkout $PLATFORM2_COMMIT
|
||||
popd
|
||||
|
||||
# minijail does not exist in upstream linux distros.
|
||||
MINIJAIL_COMMIT=debdf5de5a0ae3b667bee2f8fb1f755b0b3f5a6c
|
||||
git clone --single-branch --no-checkout https://android.googlesource.com/platform/external/minijail $AOSP_EXTERNAL_ROOT/minijail
|
||||
pushd $AOSP_EXTERNAL_ROOT/minijail
|
||||
git checkout $MINIJAIL_COMMIT
|
||||
make
|
||||
cp libminijail.so /usr/lib/x86_64-linux-gnu/
|
||||
popd
|
||||
|
||||
# Pull the cras library for audio access.
|
||||
ADHD_COMMIT=a1e0869b95c845c4fe6234a7b92fdfa6acc1e809
|
||||
git clone --single-branch --no-checkout https://chromium.googlesource.com/chromiumos/third_party/adhd $THIRD_PARTY_ROOT/adhd
|
||||
pushd $THIRD_PARTY_ROOT/adhd
|
||||
git checkout $ADHD_COMMIT
|
||||
popd
|
||||
|
||||
# Pull vHost (dataplane for virtio backend drivers)
|
||||
VHOST_COMMIT=3091854e27242d09453004b011f701fa29c0b8e8
|
||||
git clone --single-branch --no-checkout https://chromium.googlesource.com/chromiumos/third_party/rust-vmm/vhost $THIRD_PARTY_ROOT/rust-vmm/vhost
|
||||
pushd $THIRD_PARTY_ROOT/rust-vmm/vhost
|
||||
git checkout $VHOST_COMMIT
|
||||
popd
|
||||
|
||||
CROSVM_VERSION=e42a43d880b0364b55559dbeade3af174f929001
|
||||
git clone --single-branch --no-checkout https://chromium.googlesource.com/chromiumos/platform/crosvm /platform/crosvm
|
||||
pushd /platform/crosvm
|
||||
git checkout "$CROSVM_VERSION"
|
||||
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
bindgen \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--root /usr/local \
|
||||
$EXTRA_CARGO_ARGS
|
||||
|
||||
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--locked \
|
||||
--features 'default-no-sandbox gpu x virgl_renderer virgl_renderer_next' \
|
||||
--path . \
|
||||
--root /usr/local \
|
||||
$EXTRA_CARGO_ARGS
|
||||
|
||||
popd
|
||||
|
||||
rm -rf $PLATFORM2_ROOT $AOSP_EXTERNAL_ROOT/minijail $THIRD_PARTY_ROOT/adhd $THIRD_PARTY_ROOT/rust-vmm /platform/crosvm
|
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
cargo install --locked deqp-runner \
|
||||
-j ${FDO_CI_CONCURRENT:-4} \
|
||||
--version 0.9.0 \
|
||||
--root /usr/local \
|
||||
$EXTRA_CARGO_ARGS
|
@@ -1,82 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
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.2.7.1 \
|
||||
--depth 1 \
|
||||
/VK-GL-CTS
|
||||
pushd /VK-GL-CTS
|
||||
|
||||
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
|
||||
# libpng (sigh). The archives get their checksums checked anyway, and git
|
||||
# always goes through ssh or https.
|
||||
python3 external/fetch_sources.py --insecure
|
||||
|
||||
mkdir -p /deqp
|
||||
|
||||
# Save the testlog stylesheets:
|
||||
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
|
||||
|
||||
|
||||
cmake -S /VK-GL-CTS -B . -G Ninja \
|
||||
-DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
$EXTRA_CMAKE_ARGS
|
||||
ninja
|
||||
|
||||
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/master/vk-default.txt) ; do
|
||||
cat /VK-GL-CTS/external/vulkancts/mustpass/master/$mustpass \
|
||||
>> /deqp/mustpass/vk-master.txt
|
||||
done
|
||||
|
||||
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
|
||||
|
||||
rm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass
|
||||
rm -rf /deqp/external/openglcts/modules/cts-runner
|
||||
rm -rf /deqp/modules/internal
|
||||
rm -rf /deqp/execserver
|
||||
rm -rf /deqp/framework
|
||||
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 *
|
||||
rm -rf /VK-GL-CTS
|
||||
popd
|
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone https://github.com/ValveSoftware/Fossilize.git
|
||||
cd Fossilize
|
||||
git checkout 72088685d90bc814d14aad5505354ffa8a642789
|
||||
git submodule update --init
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -S .. -B . -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
ninja -C . install
|
||||
cd ../..
|
||||
rm -rf Fossilize
|
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
GFXRECONSTRUCT_VERSION=3738decc2f4f9ff183818e5ab213a75a79fb7ab1
|
||||
|
||||
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
|
||||
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
|
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
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
|
||||
git checkout "$PARALLEL_DEQP_RUNNER_VERSION"
|
||||
meson . _build
|
||||
ninja -C _build hang-detection
|
||||
mkdir -p build/bin
|
||||
install _build/hang-detection build/bin
|
||||
strip build/bin/*
|
||||
find . -not -path './build' -not -path './build/*' -delete
|
||||
popd
|
@@ -1,51 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
mkdir -p 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).
|
||||
# Sneak in some override symlinks during kernel build until we can update
|
||||
# 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`
|
||||
ln -sf /usr/bin/$i.bfd ld-links/$i
|
||||
done
|
||||
export PATH=`pwd`/ld-links:$PATH
|
||||
|
||||
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
|
||||
cp arch/${KERNEL_ARCH}/boot/${image} /lava-files/.
|
||||
done
|
||||
|
||||
if [[ -n ${DEVICE_TREES} ]]; then
|
||||
make dtbs
|
||||
cp ${DEVICE_TREES} /lava-files/.
|
||||
fi
|
||||
|
||||
if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
|
||||
make modules
|
||||
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
|
||||
fi
|
||||
|
||||
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
|
||||
make Image.lzma
|
||||
mkimage \
|
||||
-f auto \
|
||||
-A arm \
|
||||
-O linux \
|
||||
-d arch/arm64/boot/Image.lzma \
|
||||
-C lzma\
|
||||
-b arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dtb \
|
||||
/lava-files/cheza-kernel
|
||||
KERNEL_IMAGE_NAME+=" cheza-kernel"
|
||||
fi
|
||||
|
||||
popd
|
||||
rm -rf kernel
|
||||
|
@@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
export LLVM_CONFIG="llvm-config-11"
|
||||
|
||||
$LLVM_CONFIG --version
|
||||
|
||||
git config --global user.email "mesa@example.com"
|
||||
git config --global user.name "Mesa CI"
|
||||
git clone \
|
||||
https://github.com/llvm/llvm-project \
|
||||
--depth 1 \
|
||||
-b llvmorg-12.0.0-rc3 \
|
||||
/llvm-project
|
||||
|
||||
mkdir /libclc
|
||||
pushd /libclc
|
||||
cmake -S /llvm-project/libclc -B . -G Ninja -DLLVM_CONFIG=$LLVM_CONFIG -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_SPIRV=/usr/bin/llvm-spirv
|
||||
ninja
|
||||
ninja install
|
||||
popd
|
||||
|
||||
# workaroud cmake vs debian packaging.
|
||||
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 *
|
||||
rm -rf /libclc /llvm-project
|
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
export LIBDRM_VERSION=libdrm-2.4.107
|
||||
|
||||
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
|
||||
|
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
|
||||
pushd /piglit
|
||||
git checkout 7d7dd2688c214e1b3c00f37226500cbec4a58efb
|
||||
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
|
||||
find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | xargs rm -rf
|
||||
rm -rf target_api
|
||||
if [ "x$PIGLIT_BUILD_TARGETS" = "xpiglit_replayer" ]; then
|
||||
find ! -regex "^\.$" \
|
||||
! -regex "^\.\/piglit.*" \
|
||||
! -regex "^\.\/framework.*" \
|
||||
! -regex "^\.\/bin$" \
|
||||
! -regex "^\.\/bin\/replayer\.py" \
|
||||
! -regex "^\.\/templates.*" \
|
||||
! -regex "^\.\/tests$" \
|
||||
! -regex "^\.\/tests\/replay\.py" 2>/dev/null | xargs rm -rf
|
||||
fi
|
||||
popd
|
@@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Note that this script is not actually "building" rust, but build- is the
|
||||
# convention for the shared helpers for putting stuff in our containers.
|
||||
|
||||
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
|
||||
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
cat > /root/.cargo/config <<EOF
|
||||
[target.armv7-unknown-linux-gnueabihf]
|
||||
linker = "arm-linux-gnueabihf-gcc"
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
EOF
|
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
VKD3D_PROTON_VERSION="2.3.1"
|
||||
VKD3D_PROTON_COMMIT="3ed3526332f53d7d35cf1b685fa8096b01f26ff0"
|
||||
|
||||
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
|
||||
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
|
||||
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-$VKD3D_PROTON_VERSION"
|
||||
|
||||
function build_arch {
|
||||
local arch="$1"
|
||||
shift
|
||||
|
||||
meson "$@" \
|
||||
-Denable_tests=true \
|
||||
--buildtype release \
|
||||
--prefix "$VKD3D_PROTON_BUILD_DIR" \
|
||||
--strip \
|
||||
--bindir "x${arch}" \
|
||||
--libdir "x${arch}" \
|
||||
"$VKD3D_PROTON_BUILD_DIR/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/"*.exe
|
||||
}
|
||||
|
||||
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 --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,10 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -f /etc/debian_version; then
|
||||
apt-get autoremove -y --purge
|
||||
fi
|
||||
|
||||
# Clean up any build cache for rust.
|
||||
rm -rf /.cargo
|
||||
apt-get autoremove -y --purge
|
||||
|
||||
ccache --show-stats
|
||||
|
@@ -1,36 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -f /etc/debian_version; then
|
||||
CCACHE_PATH=/usr/lib/ccache
|
||||
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/mesa/ccache
|
||||
export PATH=$CCACHE_PATH:$PATH
|
||||
export PATH=/usr/lib/ccache:$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' '{}'
|
||||
# Watch out, you can't have spaces in here because the renderdoc build fails.
|
||||
export CC="/usr/lib/ccache/gcc"
|
||||
export CXX="/usr/lib/ccache/g++"
|
||||
|
||||
ccache --show-stats
|
||||
|
||||
if uname -m | grep -q arm || uname -m | grep -q aarch64; then
|
||||
export JFLAGS=-j8
|
||||
else
|
||||
export JFLAGS=-j4
|
||||
fi
|
||||
|
||||
# Make a wrapper script for ninja to always include the -j flags
|
||||
echo '#!/bin/sh -x' > /usr/local/bin/ninja
|
||||
echo '/usr/bin/ninja -j${FDO_CI_CONCURRENT:-4} "$@"' >> /usr/local/bin/ninja
|
||||
echo /usr/bin/ninja $JFLAGS '"$@"' > /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}"
|
||||
export MAKEFLAGS=$JFLAGS
|
||||
|
@@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
ndk=$1
|
||||
arch=$2
|
||||
cpu_family=$3
|
||||
cpu=$4
|
||||
cross_file="/cross_file-$arch.txt"
|
||||
|
||||
# armv7 has the toolchain split between two names.
|
||||
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
|
||||
[binaries]
|
||||
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', '-static-libstdc++']
|
||||
c_ld = 'lld'
|
||||
cpp_ld = 'lld'
|
||||
strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-strip'
|
||||
pkgconfig = ['/usr/bin/pkg-config']
|
||||
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = '$cpu_family'
|
||||
cpu = '$cpu'
|
||||
endian = 'little'
|
||||
|
||||
[properties]
|
||||
needs_exe_wrapper = true
|
||||
|
||||
EOF
|
@@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Makes a .pc file in the Android NDK for meson to find its libraries.
|
||||
|
||||
set -ex
|
||||
|
||||
ndk="$1"
|
||||
pc="$2"
|
||||
cflags="$3"
|
||||
libs="$4"
|
||||
version="$5"
|
||||
|
||||
sysroot=$ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
||||
|
||||
for arch in \
|
||||
x86_64-linux-android \
|
||||
i686-linux-android \
|
||||
aarch64-linux-android \
|
||||
arm-linux-androideabi; do
|
||||
pcdir=$sysroot/usr/lib/$arch/pkgconfig
|
||||
mkdir -p $pcdir
|
||||
|
||||
cat >$pcdir/$pc <<EOF
|
||||
prefix=$sysroot
|
||||
exec_prefix=$sysroot
|
||||
libdir=$sysroot/usr/lib/$arch/29
|
||||
sharedlibdir=$sysroot/usr/lib/$arch
|
||||
includedir=$sysroot/usr/include
|
||||
|
||||
Name: zlib
|
||||
Description: zlib compression library
|
||||
Version: $version
|
||||
|
||||
Requires:
|
||||
Libs: -L$sysroot/usr/lib/$arch/29 $libs
|
||||
Cflags: -I$sysroot/usr/include $cflags
|
||||
EOF
|
||||
done
|
@@ -1,51 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
arch=$1
|
||||
cross_file="/cross_file-$arch.txt"
|
||||
/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
|
||||
sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$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
|
||||
rust_target=armv7-unknown-linux-gnueabihf
|
||||
elif [[ "$arch" = "i386" ]]; then
|
||||
rust_target=i686-unknown-linux-gnu
|
||||
elif [[ "$arch" = "ppc64el" ]]; then
|
||||
rust_target=powerpc64le-unknown-linux-gnu
|
||||
elif [[ "$arch" = "s390x" ]]; then
|
||||
rust_target=s390x-unknown-linux-gnu
|
||||
else
|
||||
echo "Needs rustc target mapping"
|
||||
fi
|
||||
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
|
||||
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)" > "$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,268 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ $DEBIAN_ARCH = arm64 ]; then
|
||||
ARCH_PACKAGES="firmware-qcom-media"
|
||||
elif [ $DEBIAN_ARCH = amd64 ]; then
|
||||
ARCH_PACKAGES="firmware-amd-graphics
|
||||
libelf1
|
||||
libllvm11
|
||||
"
|
||||
fi
|
||||
|
||||
INSTALL_CI_FAIRY_PACKAGES="git
|
||||
python3-dev
|
||||
python3-pip
|
||||
python3-setuptools
|
||||
python3-wheel
|
||||
"
|
||||
|
||||
apt-get -y install --no-install-recommends \
|
||||
$ARCH_PACKAGES \
|
||||
$INSTALL_CI_FAIRY_PACKAGES \
|
||||
ca-certificates \
|
||||
firmware-realtek \
|
||||
initramfs-tools \
|
||||
libasan6 \
|
||||
libexpat1 \
|
||||
libpng16-16 \
|
||||
libpython3.9 \
|
||||
libsensors5 \
|
||||
libvulkan1 \
|
||||
libwaffle-1-0 \
|
||||
libx11-6 \
|
||||
libx11-xcb1 \
|
||||
libxcb-dri2-0 \
|
||||
libxcb-dri3-0 \
|
||||
libxcb-glx0 \
|
||||
libxcb-present0 \
|
||||
libxcb-randr0 \
|
||||
libxcb-shm0 \
|
||||
libxcb-sync1 \
|
||||
libxcb-xfixes0 \
|
||||
libxdamage1 \
|
||||
libxext6 \
|
||||
libxfixes3 \
|
||||
libxkbcommon0 \
|
||||
libxrender1 \
|
||||
libxshmfence1 \
|
||||
libxxf86vm1 \
|
||||
netcat-openbsd \
|
||||
python3 \
|
||||
python3-lxml \
|
||||
python3-mako \
|
||||
python3-numpy \
|
||||
python3-packaging \
|
||||
python3-pil \
|
||||
python3-renderdoc \
|
||||
python3-requests \
|
||||
python3-simplejson \
|
||||
python3-yaml \
|
||||
sntp \
|
||||
strace \
|
||||
waffle-utils \
|
||||
wget \
|
||||
xinit \
|
||||
xserver-xorg-core \
|
||||
xz-utils
|
||||
|
||||
# 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@0f1abc24c043e63894085a6bd12f14263e8b29eb
|
||||
|
||||
apt-get purge -y \
|
||||
$INSTALL_CI_FAIRY_PACKAGES
|
||||
|
||||
passwd root -d
|
||||
chsh -s /bin/sh
|
||||
|
||||
cat > /init <<EOF
|
||||
#!/bin/sh
|
||||
export PS1=lava-shell:
|
||||
exec sh
|
||||
EOF
|
||||
chmod +x /init
|
||||
|
||||
#######################################################################
|
||||
# Strip the image to a small minimal system without removing the debian
|
||||
# toolchain.
|
||||
|
||||
# xz compress firmware so it doesn't waste RAM at runtime on ramdisk systems
|
||||
find /lib/firmware -type f -print0 | \
|
||||
xargs -0r -P4 -n4 xz -T1 -C crc32
|
||||
|
||||
# Copy timezone file and remove tzdata package
|
||||
rm -rf /etc/localtime
|
||||
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
||||
|
||||
UNNEEDED_PACKAGES="
|
||||
libfdisk1
|
||||
"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Removing unused packages
|
||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||
do
|
||||
echo ${PACKAGE}
|
||||
if ! apt-get remove --purge --yes "${PACKAGE}"
|
||||
then
|
||||
echo "WARNING: ${PACKAGE} isn't installed"
|
||||
fi
|
||||
done
|
||||
|
||||
apt-get autoremove --yes || true
|
||||
|
||||
# Dropping logs
|
||||
rm -rf /var/log/*
|
||||
|
||||
# Dropping documentation, localization, i18n files, etc
|
||||
rm -rf /usr/share/doc/*
|
||||
rm -rf /usr/share/locale/*
|
||||
rm -rf /usr/share/X11/locale/*
|
||||
rm -rf /usr/share/man
|
||||
rm -rf /usr/share/i18n/*
|
||||
rm -rf /usr/share/info/*
|
||||
rm -rf /usr/share/lintian/*
|
||||
rm -rf /usr/share/common-licenses/*
|
||||
rm -rf /usr/share/mime/*
|
||||
|
||||
# Dropping reportbug scripts
|
||||
rm -rf /usr/share/bug
|
||||
|
||||
# Drop udev hwdb not required on a stripped system
|
||||
rm -rf /lib/udev/hwdb.bin /lib/udev/hwdb.d/*
|
||||
|
||||
# Drop all gconv conversions && binaries
|
||||
rm -rf usr/bin/iconv
|
||||
rm -rf usr/sbin/iconvconfig
|
||||
rm -rf usr/lib/*/gconv/
|
||||
|
||||
# Remove libusb database
|
||||
rm -rf usr/sbin/update-usbids
|
||||
rm -rf var/lib/usbutils/usb.ids
|
||||
rm -rf usr/share/misc/usb.ids
|
||||
|
||||
#######################################################################
|
||||
# Crush into a minimal production image to be deployed via some type of image
|
||||
# updating system.
|
||||
# IMPORTANT: The Debian system is not longer functional at this point,
|
||||
# for example, apt and dpkg will stop working
|
||||
|
||||
UNNEEDED_PACKAGES="apt libapt-pkg6.0 "\
|
||||
"ncurses-bin ncurses-base libncursesw6 libncurses6 "\
|
||||
"perl-base "\
|
||||
"debconf libdebconfclient0 "\
|
||||
"e2fsprogs e2fslibs libfdisk1 "\
|
||||
"insserv "\
|
||||
"udev "\
|
||||
"init-system-helpers "\
|
||||
"bash "\
|
||||
"cpio "\
|
||||
"xz-utils "\
|
||||
"passwd "\
|
||||
"libsemanage1 libsemanage-common "\
|
||||
"libsepol1 "\
|
||||
"gpgv "\
|
||||
"hostname "\
|
||||
"adduser "\
|
||||
"debian-archive-keyring "\
|
||||
"libegl1-mesa-dev "\
|
||||
"libegl-mesa0 "\
|
||||
"libgl1-mesa-dev "\
|
||||
"libgl1-mesa-dri "\
|
||||
"libglapi-mesa "\
|
||||
"libgles2-mesa-dev "\
|
||||
"libglx-mesa0 "\
|
||||
"mesa-common-dev "\
|
||||
|
||||
# Removing unneeded packages
|
||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||
do
|
||||
echo "Forcing removal of ${PACKAGE}"
|
||||
if ! dpkg --purge --force-remove-essential --force-depends "${PACKAGE}"
|
||||
then
|
||||
echo "WARNING: ${PACKAGE} isn't installed"
|
||||
fi
|
||||
done
|
||||
|
||||
# Show what's left package-wise before dropping dpkg itself
|
||||
COLUMNS=300 dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n
|
||||
|
||||
# Drop dpkg
|
||||
dpkg --purge --force-remove-essential --force-depends dpkg
|
||||
|
||||
# No apt or dpkg, no need for its configuration archives
|
||||
rm -rf etc/apt
|
||||
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/* opt srv share
|
||||
|
||||
# ca-certificates are in /etc drop the source
|
||||
rm -rf usr/share/ca-certificates
|
||||
|
||||
# No bash, no need for completions
|
||||
rm -rf usr/share/bash-completion
|
||||
|
||||
# No zsh, no need for comletions
|
||||
rm -rf usr/share/zsh/vendor-completions
|
||||
|
||||
# drop gcc python helpers
|
||||
rm -rf usr/share/gcc
|
||||
|
||||
# Drop sysvinit leftovers
|
||||
rm -rf etc/init.d
|
||||
rm -rf etc/rc[0-6S].d
|
||||
|
||||
# Drop upstart helpers
|
||||
rm -rf etc/init
|
||||
|
||||
# Various xtables helpers
|
||||
rm -rf usr/lib/xtables
|
||||
|
||||
# Drop all locales
|
||||
# TODO: only remaining locale is actually "C". Should we really remove it?
|
||||
rm -rf usr/lib/locale/*
|
||||
|
||||
# partition helpers
|
||||
rm -rf usr/sbin/*fdisk
|
||||
|
||||
# local compiler
|
||||
rm -rf usr/bin/localedef
|
||||
|
||||
# Systemd dns resolver
|
||||
find usr etc -name '*systemd-resolve*' -prune -exec rm -r {} \;
|
||||
|
||||
# Systemd network configuration
|
||||
find usr etc -name '*networkd*' -prune -exec rm -r {} \;
|
||||
|
||||
# systemd ntp client
|
||||
find usr etc -name '*timesyncd*' -prune -exec rm -r {} \;
|
||||
|
||||
# systemd hw database manager
|
||||
find usr etc -name '*systemd-hwdb*' -prune -exec rm -r {} \;
|
||||
|
||||
# No need for fuse
|
||||
find usr etc -name '*fuse*' -prune -exec rm -r {} \;
|
||||
|
||||
# lsb init function leftovers
|
||||
rm -rf usr/lib/lsb
|
||||
|
||||
# Only needed when adding libraries
|
||||
rm -rf usr/sbin/ldconfig*
|
||||
|
||||
# Games, unused
|
||||
rmdir usr/games
|
||||
|
||||
# Remove pam module to authenticate against a DB
|
||||
# plus libdb-5.3.so that is only used by this pam module
|
||||
rm -rf usr/lib/*/security/pam_userdb.so
|
||||
rm -rf usr/lib/*/libdb-5.3.so
|
||||
|
||||
# remove NSS support for nis, nisplus and hesiod
|
||||
rm -rf usr/lib/*/libnss_hesiod*
|
||||
rm -rf usr/lib/*/libnss_nis*
|
@@ -1,79 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
"
|
||||
|
||||
dpkg --add-architecture $arch
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
crossbuild-essential-$arch \
|
||||
libelf-dev:$arch \
|
||||
libexpat1-dev:$arch \
|
||||
libpciaccess-dev:$arch \
|
||||
libstdc++6:$arch \
|
||||
libvulkan-dev:$arch \
|
||||
libx11-dev:$arch \
|
||||
libx11-xcb-dev:$arch \
|
||||
libxcb-dri2-0-dev:$arch \
|
||||
libxcb-dri3-dev:$arch \
|
||||
libxcb-glx0-dev:$arch \
|
||||
libxcb-present-dev:$arch \
|
||||
libxcb-randr0-dev:$arch \
|
||||
libxcb-shm0-dev:$arch \
|
||||
libxcb-xfixes0-dev:$arch \
|
||||
libxdamage-dev:$arch \
|
||||
libxext-dev:$arch \
|
||||
libxrandr-dev:$arch \
|
||||
libxshmfence-dev:$arch \
|
||||
libxxf86vm-dev:$arch \
|
||||
wget
|
||||
|
||||
if [[ $arch != "armhf" ]]; then
|
||||
if [[ $arch == "s390x" ]]; then
|
||||
LLVM=9
|
||||
else
|
||||
LLVM=11
|
||||
fi
|
||||
|
||||
# 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 \
|
||||
libclang-cpp${LLVM}:$arch \
|
||||
libffi-dev:$arch \
|
||||
libgcc-s1:$arch \
|
||||
libtinfo-dev:$arch \
|
||||
libz3-dev:$arch \
|
||||
llvm-${LLVM}:$arch \
|
||||
zlib1g
|
||||
fi
|
||||
|
||||
. .gitlab-ci/container/create-cross-file.sh $arch
|
||||
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
|
||||
# dependencies where we want a specific version
|
||||
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
|
||||
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
# This needs to be done after container_post_build.sh, or apt-get breaks in there
|
||||
if [[ $arch != "armhf" ]]; then
|
||||
apt-get download llvm-${LLVM}-{dev,tools}:$arch
|
||||
dpkg -i --force-depends llvm-${LLVM}-*_${arch}.deb
|
||||
rm llvm-${LLVM}-*_${arch}.deb
|
||||
fi
|
@@ -1,60 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
EPHEMERAL="\
|
||||
rdfind \
|
||||
unzip \
|
||||
"
|
||||
|
||||
apt-get install -y --no-remove $EPHEMERAL
|
||||
|
||||
# Fetch the NDK and extract just the toolchain we want.
|
||||
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 /android-ndk-r21d/
|
||||
# Drop some large tools we won't use in this build.
|
||||
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"
|
||||
|
||||
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.102
|
||||
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
|
||||
tar -xf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
|
||||
|
||||
for arch in \
|
||||
x86_64-linux-android \
|
||||
i686-linux-android \
|
||||
aarch64-linux-android \
|
||||
arm-linux-androideabi ; do
|
||||
|
||||
cd $LIBDRM_VERSION
|
||||
rm -rf build-$arch
|
||||
meson build-$arch \
|
||||
--cross-file=/cross_file-$arch.txt \
|
||||
--libdir=lib/$arch \
|
||||
-Dlibkms=false \
|
||||
-Dnouveau=false \
|
||||
-Dvc4=false \
|
||||
-Detnaviv=false \
|
||||
-Dfreedreno=false \
|
||||
-Dintel=false \
|
||||
-Dcairo-tests=false
|
||||
ninja -C build-$arch install
|
||||
cd ..
|
||||
done
|
||||
|
||||
rm -rf $LIBDRM_VERSION
|
||||
|
||||
apt-get purge -y $EPHEMERAL
|
@@ -1,71 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install ca-certificates
|
||||
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
|
||||
|
||||
apt-get -y install \
|
||||
abootimg \
|
||||
autoconf \
|
||||
automake \
|
||||
bc \
|
||||
bison \
|
||||
ccache \
|
||||
cmake \
|
||||
debootstrap \
|
||||
fastboot \
|
||||
flex \
|
||||
g++ \
|
||||
git \
|
||||
kmod \
|
||||
libasan6 \
|
||||
libdrm-dev \
|
||||
libelf-dev \
|
||||
libexpat1-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxcb-dri3-dev \
|
||||
libxcb-glx0-dev \
|
||||
libxcb-present-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxdamage-dev \
|
||||
libxext-dev \
|
||||
libxrandr-dev \
|
||||
libxshmfence-dev \
|
||||
libxxf86vm-dev \
|
||||
llvm-11-dev \
|
||||
meson \
|
||||
pkg-config \
|
||||
python3-mako \
|
||||
python3-pil \
|
||||
python3-pip \
|
||||
python3-requests \
|
||||
python3-setuptools \
|
||||
u-boot-tools \
|
||||
wget \
|
||||
xz-utils \
|
||||
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@6f5af7e5574509726c79109e3c147cee95e81366
|
||||
|
||||
arch=armhf
|
||||
. .gitlab-ci/container/cross_build.sh
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# dependencies where we want a specific version
|
||||
EXTRA_MESON_ARGS=
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
############### Install packages for baremetal testing
|
||||
apt-get install -y ca-certificates
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
abootimg \
|
||||
cpio \
|
||||
fastboot \
|
||||
netcat \
|
||||
procps \
|
||||
python3-distutils \
|
||||
python3-minimal \
|
||||
python3-serial \
|
||||
rsync \
|
||||
snmp \
|
||||
wget
|
||||
|
||||
# setup SNMPv2 SMI MIB
|
||||
wget https://raw.githubusercontent.com/net-snmp/net-snmp/master/mibs/SNMPv2-SMI.txt \
|
||||
-O /usr/share/snmp/mibs/SNMPv2-SMI.txt
|
||||
|
||||
arch=arm64 . .gitlab-ci/container/baremetal_build.sh
|
||||
arch=armhf . .gitlab-ci/container/baremetal_build.sh
|
||||
|
||||
# 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
|
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
arch=i386
|
||||
|
||||
. .gitlab-ci/container/cross_build.sh
|
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
arch=ppc64el
|
||||
|
||||
. .gitlab-ci/container/cross_build.sh
|
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
arch=s390x
|
||||
|
||||
. .gitlab-ci/container/cross_build.sh
|
@@ -1,82 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
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=" \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
"
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
bison \
|
||||
ccache \
|
||||
dpkg-cross \
|
||||
flex \
|
||||
g++ \
|
||||
g++-mingw-w64-x86-64 \
|
||||
gcc \
|
||||
git \
|
||||
glslang-tools \
|
||||
kmod \
|
||||
libclang-11-dev \
|
||||
libclang-9-dev \
|
||||
libclc-dev \
|
||||
libelf-dev \
|
||||
libepoxy-dev \
|
||||
libexpat1-dev \
|
||||
libgtk-3-dev \
|
||||
libllvm11 \
|
||||
libllvm9 \
|
||||
libomxil-bellagio-dev \
|
||||
libpciaccess-dev \
|
||||
libunwind-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libvulkan-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxext-dev \
|
||||
libxml2-utils \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
libxshmfence-dev \
|
||||
libxvmc-dev \
|
||||
libxxf86vm-dev \
|
||||
libz-mingw-w64-dev \
|
||||
make \
|
||||
meson \
|
||||
pkg-config \
|
||||
python3-mako \
|
||||
python3-pil \
|
||||
python3-requests \
|
||||
qemu-user \
|
||||
valgrind \
|
||||
wayland-protocols \
|
||||
wget \
|
||||
wine64 \
|
||||
x11proto-dri2-dev \
|
||||
x11proto-gl-dev \
|
||||
x11proto-randr-dev \
|
||||
xz-utils \
|
||||
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@6f5af7e5574509726c79109e3c147cee95e81366
|
||||
|
||||
############### Uninstall ephemeral packages
|
||||
|
||||
apt-get purge -y $STABLE_EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
@@ -1,112 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
autoconf \
|
||||
automake \
|
||||
autotools-dev \
|
||||
bzip2 \
|
||||
cmake \
|
||||
libgbm-dev \
|
||||
libtool \
|
||||
python3-pip \
|
||||
"
|
||||
|
||||
# We need multiarch for Wine
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
clang \
|
||||
libasan6 \
|
||||
libarchive-dev \
|
||||
libclang-cpp11-dev \
|
||||
libglvnd-dev \
|
||||
libllvmspirvlib-dev \
|
||||
liblua5.3-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxcb-dri3-dev \
|
||||
libxcb-glx0-dev \
|
||||
libxcb-present-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-sync-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxml2-dev \
|
||||
llvm-11-dev \
|
||||
llvm-9-dev \
|
||||
ocl-icd-opencl-dev \
|
||||
procps \
|
||||
spirv-tools \
|
||||
strace \
|
||||
time \
|
||||
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 WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
|
||||
|
||||
export XORGMACROS_VERSION=util-macros-1.19.0
|
||||
export LIBWAYLAND_VERSION=wayland-1.18.0
|
||||
|
||||
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-libdrm.sh
|
||||
|
||||
wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
|
||||
tar -xvf $LIBWAYLAND_VERSION.tar.xz && rm $LIBWAYLAND_VERSION.tar.xz
|
||||
cd $LIBWAYLAND_VERSION; ./configure --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation; make install; cd ..
|
||||
rm -rf $LIBWAYLAND_VERSION
|
||||
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
pip3 install git+https://git.lavasoftware.org/lava/lavacli@3db3ddc45e5358908bc6a17448059ea2340492b7
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
@@ -1,70 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
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=" \
|
||||
cargo \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
"
|
||||
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
git \
|
||||
git-lfs \
|
||||
libasan6 \
|
||||
libexpat1 \
|
||||
libllvm11 \
|
||||
libllvm9 \
|
||||
liblz4-1 \
|
||||
libpng16-16 \
|
||||
libpython3.9 \
|
||||
libvulkan1 \
|
||||
libwayland-client0 \
|
||||
libwayland-server0 \
|
||||
libxcb-ewmh2 \
|
||||
libxcb-randr0 \
|
||||
libxcb-xfixes0 \
|
||||
libxkbcommon0 \
|
||||
libxrandr2 \
|
||||
libxrender1 \
|
||||
python3-mako \
|
||||
python3-numpy \
|
||||
python3-packaging \
|
||||
python3-pil \
|
||||
python3-requests \
|
||||
python3-six \
|
||||
python3-yaml \
|
||||
vulkan-tools \
|
||||
waffle-utils \
|
||||
xauth \
|
||||
xvfb \
|
||||
zlib1g
|
||||
|
||||
apt-get install -y --no-install-recommends \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
# 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@0f1abc24c043e63894085a6bd12f14263e8b29eb
|
||||
|
||||
############### Build dEQP runner
|
||||
. .gitlab-ci/container/build-deqp-runner.sh
|
||||
rm -rf ~/.cargo
|
||||
|
||||
apt-get purge -y $STABLE_EPHEMERAL
|
||||
|
||||
apt-get autoremove -y --purge
|
@@ -1,122 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
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-11 \
|
||||
cmake \
|
||||
flex \
|
||||
g++ \
|
||||
glslang-tools \
|
||||
libasound2-dev \
|
||||
libcap-dev \
|
||||
libclang-cpp11-dev \
|
||||
libelf-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 \
|
||||
libxrender-dev \
|
||||
llvm-11-dev \
|
||||
llvm-spirv \
|
||||
make \
|
||||
meson \
|
||||
ocl-icd-opencl-dev \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-distutils \
|
||||
wayland-protocols \
|
||||
wget \
|
||||
xz-utils \
|
||||
"
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
clinfo \
|
||||
inetutils-syslogd \
|
||||
iptables \
|
||||
libclang-common-11-dev \
|
||||
libclang-cpp11 \
|
||||
libcap2 \
|
||||
libegl1 \
|
||||
libfdt1 \
|
||||
libllvmspirvlib11 \
|
||||
libxcb-shm0 \
|
||||
ocl-icd-libopencl1 \
|
||||
python3-lxml \
|
||||
python3-renderdoc \
|
||||
python3-simplejson \
|
||||
spirv-tools \
|
||||
sysvinit-core
|
||||
|
||||
|
||||
. .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
|
||||
|
||||
############### Build libdrm
|
||||
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
############### Build libclc
|
||||
|
||||
. .gitlab-ci/container/build-libclc.sh
|
||||
|
||||
############### Build virglrenderer
|
||||
|
||||
. .gitlab-ci/container/build-virglrenderer.sh
|
||||
|
||||
############### Build piglit
|
||||
|
||||
PIGLIT_OPTS="-DPIGLIT_BUILD_CL_TESTS=ON -DPIGLIT_BUILD_DMA_BUF_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
|
||||
|
||||
############### Build Crosvm
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
. .gitlab-ci/container/build-crosvm.sh
|
||||
rm -rf /root/.cargo
|
||||
|
||||
############### Build dEQP GL
|
||||
|
||||
DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
############### Build apitrace
|
||||
|
||||
. .gitlab-ci/container/build-apitrace.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
ccache --show-stats
|
||||
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
apt-get autoremove -y --purge
|
@@ -1,160 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Ephemeral packages (installed for this script and removed again at the end)
|
||||
STABLE_EPHEMERAL=" \
|
||||
ccache \
|
||||
cmake \
|
||||
g++ \
|
||||
g++-mingw-w64-i686-posix \
|
||||
g++-mingw-w64-x86-64-posix \
|
||||
glslang-tools \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
liblz4-dev \
|
||||
libpciaccess-dev \
|
||||
libudev-dev \
|
||||
libvulkan-dev \
|
||||
libwaffle-dev \
|
||||
libwayland-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcb-ewmh-dev \
|
||||
libxcb-keysyms1-dev \
|
||||
libxkbcommon-dev \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
libzstd-dev \
|
||||
meson \
|
||||
mingw-w64-i686-dev \
|
||||
mingw-w64-tools \
|
||||
mingw-w64-x86-64-dev \
|
||||
p7zip \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-distutils \
|
||||
wget \
|
||||
xz-utils \
|
||||
"
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
$STABLE_EPHEMERAL \
|
||||
libxcb-shm0 \
|
||||
python3-lxml \
|
||||
python3-simplejson \
|
||||
xinit \
|
||||
xserver-xorg-video-amdgpu \
|
||||
xserver-xorg-video-ati
|
||||
|
||||
# We need multiarch for Wine
|
||||
dpkg --add-architecture i386
|
||||
|
||||
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
|
||||
|
||||
DXVK_VERSION="1.8.1"
|
||||
|
||||
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"
|
||||
|
||||
# Add the apitrace path to the registry
|
||||
wine \
|
||||
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
|
||||
/v Path \
|
||||
/t REG_EXPAND_SZ \
|
||||
/d "C:\windows\system32;C:\windows;C:\windows\system32\wbem;Z:\apitrace-msvc-win64\bin" \
|
||||
/f
|
||||
|
||||
############### Building ...
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
############### Build libdrm
|
||||
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
############### Build parallel-deqp-runner's hang-detection tool
|
||||
|
||||
. .gitlab-ci/container/build-hang-detection.sh
|
||||
|
||||
############### Build piglit
|
||||
|
||||
PIGLIT_BUILD_TARGETS="piglit_replayer" . .gitlab-ci/container/build-piglit.sh
|
||||
|
||||
############### Build Fossilize
|
||||
|
||||
. .gitlab-ci/container/build-fossilize.sh
|
||||
|
||||
############### Build dEQP VK
|
||||
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
############### Build gfxreconstruct
|
||||
|
||||
. .gitlab-ci/container/build-gfxreconstruct.sh
|
||||
|
||||
############### Build VKD3D-Proton
|
||||
|
||||
setup_wine "/vkd3d-proton-wine64"
|
||||
|
||||
. .gitlab-ci/container/build-vkd3d-proton.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
ccache --show-stats
|
||||
|
||||
apt-get purge -y \
|
||||
$STABLE_EPHEMERAL
|
||||
|
||||
apt-get autoremove -y --purge
|
@@ -1,107 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
|
||||
EPHEMERAL="
|
||||
autoconf
|
||||
automake
|
||||
bzip2
|
||||
git
|
||||
libtool
|
||||
pkgconfig(epoxy)
|
||||
pkgconfig(gbm)
|
||||
unzip
|
||||
wget
|
||||
xz
|
||||
"
|
||||
|
||||
dnf install -y --setopt=install_weak_deps=False \
|
||||
bison \
|
||||
ccache \
|
||||
clang-devel \
|
||||
flex \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gettext \
|
||||
kernel-headers \
|
||||
llvm-devel \
|
||||
meson \
|
||||
"pkgconfig(dri2proto)" \
|
||||
"pkgconfig(expat)" \
|
||||
"pkgconfig(glproto)" \
|
||||
"pkgconfig(libclc)" \
|
||||
"pkgconfig(libelf)" \
|
||||
"pkgconfig(libglvnd)" \
|
||||
"pkgconfig(libomxil-bellagio)" \
|
||||
"pkgconfig(libselinux)" \
|
||||
"pkgconfig(libva)" \
|
||||
"pkgconfig(pciaccess)" \
|
||||
"pkgconfig(vdpau)" \
|
||||
"pkgconfig(vulkan)" \
|
||||
"pkgconfig(wayland-egl-backend)" \
|
||||
"pkgconfig(wayland-protocols)" \
|
||||
"pkgconfig(wayland-scanner)" \
|
||||
"pkgconfig(x11)" \
|
||||
"pkgconfig(x11-xcb)" \
|
||||
"pkgconfig(xcb)" \
|
||||
"pkgconfig(xcb-dri2)" \
|
||||
"pkgconfig(xcb-dri3)" \
|
||||
"pkgconfig(xcb-glx)" \
|
||||
"pkgconfig(xcb-present)" \
|
||||
"pkgconfig(xcb-randr)" \
|
||||
"pkgconfig(xcb-sync)" \
|
||||
"pkgconfig(xcb-xfixes)" \
|
||||
"pkgconfig(xdamage)" \
|
||||
"pkgconfig(xext)" \
|
||||
"pkgconfig(xfixes)" \
|
||||
"pkgconfig(xrandr)" \
|
||||
"pkgconfig(xshmfence)" \
|
||||
"pkgconfig(xxf86vm)" \
|
||||
"pkgconfig(zlib)" \
|
||||
python-unversioned-command \
|
||||
python3-devel \
|
||||
python3-mako \
|
||||
python3-devel \
|
||||
python3-mako \
|
||||
vulkan-headers \
|
||||
$EPHEMERAL
|
||||
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
|
||||
# dependencies where we want a specific version
|
||||
export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
|
||||
export WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
|
||||
|
||||
export XORGMACROS_VERSION=util-macros-1.19.0
|
||||
export LIBWAYLAND_VERSION=wayland-1.18.0
|
||||
|
||||
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-libdrm.sh
|
||||
|
||||
wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
|
||||
tar -xvf $LIBWAYLAND_VERSION.tar.xz && rm $LIBWAYLAND_VERSION.tar.xz
|
||||
cd $LIBWAYLAND_VERSION; ./configure --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation; make install; cd ..
|
||||
rm -rf $LIBWAYLAND_VERSION
|
||||
|
||||
|
||||
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
|
||||
|
||||
dnf remove -y $EPHEMERAL
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
98
.gitlab-ci/container/lava_arm.sh
Normal file
98
.gitlab-ci/container/lava_arm.sh
Normal file
@@ -0,0 +1,98 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||
GCC_ARCH="aarch64-linux-gnu"
|
||||
KERNEL_ARCH="arm64"
|
||||
DEFCONFIG="arch/arm64/configs/defconfig"
|
||||
DEVICE_TREES="arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dtb arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dtb arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dtb arch/arm64/boot/dts/qcom/apq8016-sbc.dtb"
|
||||
KERNEL_IMAGE_NAME="Image"
|
||||
else
|
||||
GCC_ARCH="arm-linux-gnueabihf"
|
||||
KERNEL_ARCH="arm"
|
||||
DEFCONFIG="arch/arm/configs/multi_v7_defconfig"
|
||||
DEVICE_TREES="arch/arm/boot/dts/rk3288-veyron-jaq.dtb arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dtb"
|
||||
KERNEL_IMAGE_NAME="zImage"
|
||||
fi
|
||||
|
||||
############### Build dEQP runner
|
||||
if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||
EXTRA_MESON_ARGS="--cross-file /cross_file-armhf.txt"
|
||||
fi
|
||||
. .gitlab-ci/build-cts-runner.sh
|
||||
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin
|
||||
mv /usr/local/bin/deqp-runner /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/.
|
||||
|
||||
|
||||
############### Build dEQP
|
||||
EXTRA_CMAKE_ARGS="-DCMAKE_C_COMPILER=${GCC_ARCH}-gcc -DCMAKE_CXX_COMPILER=${GCC_ARCH}-g++"
|
||||
STRIP_CMD="${GCC_ARCH}-strip"
|
||||
. .gitlab-ci/build-deqp-gl.sh
|
||||
mv /deqp /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||
|
||||
|
||||
############### Cross-build kernel
|
||||
KERNEL_URL="https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.5-panfrost-fixes/linux-v5.5-panfrost-fixes.tar.gz"
|
||||
|
||||
if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||
export ARCH=${KERNEL_ARCH}
|
||||
export CROSS_COMPILE="${GCC_ARCH}-"
|
||||
fi
|
||||
|
||||
mkdir -p kernel
|
||||
wget -qO- ${KERNEL_URL} | tar -xz --strip-components=1 -C kernel
|
||||
pushd kernel
|
||||
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/${KERNEL_ARCH}.config
|
||||
make ${KERNEL_IMAGE_NAME} dtbs
|
||||
cp arch/${KERNEL_ARCH}/boot/${KERNEL_IMAGE_NAME} /lava-files/.
|
||||
cp ${DEVICE_TREES} /lava-files/.
|
||||
popd
|
||||
rm -rf kernel
|
||||
|
||||
|
||||
############### Create rootfs
|
||||
set +e
|
||||
debootstrap \
|
||||
--variant=minbase \
|
||||
--arch=${DEBIAN_ARCH} \
|
||||
--components main,contrib,non-free \
|
||||
testing \
|
||||
/lava-files/rootfs-${DEBIAN_ARCH}/ \
|
||||
http://deb.debian.org/debian
|
||||
|
||||
cat /lava-files/rootfs-${DEBIAN_ARCH}/debootstrap/debootstrap.log
|
||||
set -e
|
||||
|
||||
cp .gitlab-ci/create-rootfs.sh /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||
chroot /lava-files/rootfs-${DEBIAN_ARCH} sh /create-rootfs.sh
|
||||
rm /lava-files/rootfs-${DEBIAN_ARCH}/create-rootfs.sh
|
||||
|
||||
if [ ${DEBIAN_ARCH} = arm64 ]; then
|
||||
# Pull down a specific build of qcomlt/release/qcomlt-5.4 8c79b3d12355
|
||||
# ("Merge tag 'v5.4.23' into release/qcomlt-5.4"), where I used the
|
||||
# .config from
|
||||
# http://snapshots.linaro.org/96boards/dragonboard820c/linaro/debian/457/config-5.4.0-qcomlt-arm64
|
||||
# with the following merged in:
|
||||
#
|
||||
# CONFIG_DRM=y
|
||||
# CONFIG_DRM_MSM=y
|
||||
# CONFIG_ATL1C=y
|
||||
#
|
||||
# Reason: 5.5 has a big stack of oopses and warns on db820c. 4.14-5.4
|
||||
# linaro kernel binaries (see above .config link) have these as modules
|
||||
# and distributed the modules only in the debian system, not the initrd,
|
||||
# so they're very hard to extract (involving simg2img and loopback
|
||||
# mounting). 4.11 is missing d72fea538fe6 ("drm/msm: Fix the check for
|
||||
# the command size") so it can't actually run fredreno. qcomlt-4.14 is
|
||||
# unstable at boot (~10% instaboot rate). The 5.4 qcomlt kernel with msm
|
||||
# built in seems like the easiest way to go.
|
||||
wget https://people.freedesktop.org/~anholt/qcomlt-5.4-msm-build/Image.gz -O Image.gz \
|
||||
-O /lava-files/db820c-kernel
|
||||
wget https://people.freedesktop.org/~anholt/qcomlt-5.4-msm-build/apq8096-db820c.dtb \
|
||||
-O /lava-files/db820c.dtb
|
||||
|
||||
# Make a gzipped copy of the Image for db410c.
|
||||
gzip -k /lava-files/Image
|
||||
fi
|
@@ -1,213 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
check_minio()
|
||||
{
|
||||
MINIO_PATH="${MINIO_HOST}/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
|
||||
if wget -q --method=HEAD "https://${MINIO_PATH}/done"; then
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
# If remote files are up-to-date, skip rebuilding them
|
||||
check_minio "${FDO_UPSTREAM_REPO}"
|
||||
check_minio "${CI_PROJECT_PATH}"
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# Install rust, which we'll be using for deqp-runner. It will be cleaned up at the end.
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||
GCC_ARCH="aarch64-linux-gnu"
|
||||
KERNEL_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"
|
||||
DEVICE_TREES+=" arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dtb"
|
||||
DEVICE_TREES+=" arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dtb"
|
||||
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/apq8016-sbc.dtb"
|
||||
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/apq8096-db820c.dtb"
|
||||
DEVICE_TREES+=" arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dtb"
|
||||
DEVICE_TREES+=" arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb"
|
||||
KERNEL_IMAGE_NAME="Image"
|
||||
elif [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||
GCC_ARCH="arm-linux-gnueabihf"
|
||||
KERNEL_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"
|
||||
KERNEL_IMAGE_NAME="zImage"
|
||||
. .gitlab-ci/container/create-cross-file.sh armhf
|
||||
else
|
||||
GCC_ARCH="x86_64-linux-gnu"
|
||||
KERNEL_ARCH="x86_64"
|
||||
DEFCONFIG="arch/x86/configs/x86_64_defconfig"
|
||||
DEVICE_TREES=""
|
||||
KERNEL_IMAGE_NAME="bzImage"
|
||||
fi
|
||||
|
||||
# Determine if we're in a cross build.
|
||||
if [[ -e /cross_file-$DEBIAN_ARCH.txt ]]; then
|
||||
EXTRA_MESON_ARGS="--cross-file /cross_file-$DEBIAN_ARCH.txt"
|
||||
EXTRA_CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=/toolchain-$DEBIAN_ARCH.cmake"
|
||||
|
||||
if [ $DEBIAN_ARCH = arm64 ]; then
|
||||
RUST_TARGET="aarch64-unknown-linux-gnu"
|
||||
elif [ $DEBIAN_ARCH = armhf ]; then
|
||||
RUST_TARGET="armv7-unknown-linux-gnueabihf"
|
||||
fi
|
||||
rustup target add $RUST_TARGET
|
||||
export EXTRA_CARGO_ARGS="--target $RUST_TARGET"
|
||||
|
||||
export ARCH=${KERNEL_ARCH}
|
||||
export CROSS_COMPILE="${GCC_ARCH}-"
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-remove \
|
||||
automake \
|
||||
bc \
|
||||
cmake \
|
||||
debootstrap \
|
||||
git \
|
||||
glslang-tools \
|
||||
libdrm-dev \
|
||||
libegl1-mesa-dev \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
libpng-dev \
|
||||
libssl-dev \
|
||||
libudev-dev \
|
||||
libvulkan-dev \
|
||||
libwaffle-dev \
|
||||
libwayland-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxkbcommon-dev \
|
||||
patch \
|
||||
python3-distutils \
|
||||
python3-mako \
|
||||
python3-numpy \
|
||||
python3-serial \
|
||||
wget
|
||||
|
||||
|
||||
if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
|
||||
apt-get install -y --no-remove \
|
||||
libegl1-mesa-dev:armhf \
|
||||
libelf-dev:armhf \
|
||||
libgbm-dev:armhf \
|
||||
libgles2-mesa-dev:armhf \
|
||||
libpng-dev:armhf \
|
||||
libudev-dev:armhf \
|
||||
libvulkan-dev:armhf \
|
||||
libwaffle-dev:armhf \
|
||||
libwayland-dev:armhf \
|
||||
libx11-xcb-dev:armhf \
|
||||
libxkbcommon-dev:armhf
|
||||
fi
|
||||
|
||||
|
||||
############### Building
|
||||
STRIP_CMD="${GCC_ARCH}-strip"
|
||||
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}
|
||||
|
||||
|
||||
############### Build apitrace
|
||||
. .gitlab-ci/container/build-apitrace.sh
|
||||
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/apitrace
|
||||
mv /apitrace/build /lava-files/rootfs-${DEBIAN_ARCH}/apitrace
|
||||
rm -rf /apitrace
|
||||
|
||||
|
||||
############### Build dEQP runner
|
||||
. .gitlab-ci/container/build-deqp-runner.sh
|
||||
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin
|
||||
mv /usr/local/bin/deqp-runner /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/.
|
||||
mv /usr/local/bin/piglit-runner /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/.
|
||||
|
||||
|
||||
############### Build dEQP
|
||||
DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
mv /deqp /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||
|
||||
|
||||
############### Build piglit
|
||||
PIGLIT_OPTS="-DPIGLIT_BUILD_DMA_BUF_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
|
||||
mv /piglit /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||
|
||||
|
||||
############### Build libdrm
|
||||
EXTRA_MESON_ARGS+=" -D prefix=/libdrm"
|
||||
. .gitlab-ci/container/build-libdrm.sh
|
||||
|
||||
############### Build kernel
|
||||
. .gitlab-ci/container/build-kernel.sh
|
||||
|
||||
############### Delete rust, since the tests won't be compiling anything.
|
||||
rm -rf /root/.cargo
|
||||
|
||||
############### Create rootfs
|
||||
set +e
|
||||
if ! debootstrap \
|
||||
--variant=minbase \
|
||||
--arch=${DEBIAN_ARCH} \
|
||||
--components main,contrib,non-free \
|
||||
bullseye \
|
||||
/lava-files/rootfs-${DEBIAN_ARCH}/ \
|
||||
http://deb.debian.org/debian; then
|
||||
cat /lava-files/rootfs-${DEBIAN_ARCH}/debootstrap/debootstrap.log
|
||||
exit 1
|
||||
fi
|
||||
set -e
|
||||
|
||||
cp .gitlab-ci/container/create-rootfs.sh /lava-files/rootfs-${DEBIAN_ARCH}/.
|
||||
chroot /lava-files/rootfs-${DEBIAN_ARCH} sh /create-rootfs.sh
|
||||
rm /lava-files/rootfs-${DEBIAN_ARCH}/create-rootfs.sh
|
||||
|
||||
|
||||
############### 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.
|
||||
mkdir -p /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/.
|
||||
rm -rf /libdrm
|
||||
|
||||
|
||||
if [ ${DEBIAN_ARCH} = arm64 ]; then
|
||||
# Make a gzipped copy of the Image for db410c.
|
||||
gzip -k /lava-files/Image
|
||||
KERNEL_IMAGE_NAME+=" Image.gz"
|
||||
fi
|
||||
|
||||
du -ah /lava-files/rootfs-${DEBIAN_ARCH} | sort -h | tail -100
|
||||
pushd /lava-files/rootfs-${DEBIAN_ARCH}
|
||||
tar czf /lava-files/lava-rootfs.tgz .
|
||||
popd
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
############### Upload the files!
|
||||
ci-fairy minio login $CI_JOB_JWT
|
||||
FILES_TO_UPLOAD="lava-rootfs.tgz \
|
||||
$KERNEL_IMAGE_NAME"
|
||||
|
||||
if [[ -n $DEVICE_TREES ]]; then
|
||||
FILES_TO_UPLOAD="$FILES_TO_UPLOAD $(basename -a $DEVICE_TREES)"
|
||||
fi
|
||||
|
||||
for f in $FILES_TO_UPLOAD; do
|
||||
ci-fairy minio cp /lava-files/$f \
|
||||
minio://${MINIO_PATH}/$f
|
||||
done
|
||||
|
||||
touch /lava-files/done
|
||||
ci-fairy minio cp /lava-files/done minio://${MINIO_PATH}/done
|
52
.gitlab-ci/container/llvm-snapshot.gpg.key
Normal file
52
.gitlab-ci/container/llvm-snapshot.gpg.key
Normal file
@@ -0,0 +1,52 @@
|
||||
-----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-----
|
20
.gitlab-ci/container/obs-emulators-wine-debian.gpg.key
Normal file
20
.gitlab-ci/container/obs-emulators-wine-debian.gpg.key
Normal file
@@ -0,0 +1,20 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v2.0.15 (GNU/Linux)
|
||||
|
||||
mQENBFu8fWQBCADM64J7qlcnI2KwxSKSdyaOi7hz44EUXDpC3+3hfFP8k28SgV3U
|
||||
4a/ydOdd2cDSne5w+yjrnJWYuS0sTiE7vQPtKfmCmQZfCStvoRe5Pt+AOy1GA/iu
|
||||
U5wHIZD+/A9CeQcu5L3PkVkmijz0LmSCq7HnnVB0SdFA5eFlV98H875EasvpJ3xU
|
||||
ziI3yvqdZ5/0LgKzOiFjk4rMXQS01a1dNpwFO7EXiq921ZjnXatdnsDQ/NAj7z8P
|
||||
3qnTAj6yvl7DtdlXXA2hiznEOZNCRLZ69vHq0hGIw+OKjpsUkCZK29AnY4wJxxzY
|
||||
frjknVW7tyZ6Hxwz6R4vaVlZ6h5WR/OiAdqlABEBAAG0NEVtdWxhdG9ycyBPQlMg
|
||||
UHJvamVjdCA8RW11bGF0b3JzQGJ1aWxkLm9wZW5zdXNlLm9yZz6JAT4EEwEIACgF
|
||||
Alu8fWQCGwMFCQQesAAGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEN+hdadR
|
||||
BJYOXVoH/Rd0dRx4SUx7KVjTrDfSuf6jXseyenkl4aQnp46n0MttatkoCdGVvyrq
|
||||
VWvGfO3MI122MnFKqia7Hep1HlcYGe2a5tW/w1SGGEy+VZduxcZCMmVuSnl+3ioG
|
||||
2fRGx3uoNBEGQIbZ5VVlABUJC+c/Vq1m6kT9Edz4XWRPHW1Nwjjfn79618ebGZMc
|
||||
R0fUM9L3GZw9V/kAK8kXmIL7rkglfewTbs6fByqAix79MjsNURAuCeIc5OmbxL4j
|
||||
LxuoNhnxxucB7YGBhCa9ZL8LYEIbdeyaJmgdHDoUQjz4peXibz5v+Er8mGOwuSLl
|
||||
y1U21T3huNf9Osjw52nxVcDmugBWqQKIRgQTEQIABgUCW7x9ZAAKCRA7MBG3a51l
|
||||
IwayAJ9dHmDag9nFY9GujfMr+foKquFS9wCfQlvp6Sz0N5aKdW00NGnZZ/EKHIQ=
|
||||
=uZyA
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
@@ -1,95 +0,0 @@
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
||||
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
CONFIG_DEVFREQ_GOV_PASSIVE=y
|
||||
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_PWM_CROS_EC=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
|
||||
# Strip out some stuff we don't need for graphics testing, to reduce
|
||||
# the build.
|
||||
CONFIG_CAN=n
|
||||
CONFIG_WIRELESS=n
|
||||
CONFIG_RFKILL=n
|
||||
CONFIG_WLAN=n
|
||||
|
||||
CONFIG_REGULATOR_FAN53555=y
|
||||
CONFIG_REGULATOR=y
|
||||
|
||||
CONFIG_REGULATOR_VCTRL=y
|
||||
|
||||
CONFIG_KASAN=n
|
||||
CONFIG_KASAN_INLINE=n
|
||||
CONFIG_STACKTRACE=n
|
||||
|
||||
CONFIG_TMPFS=y
|
||||
|
||||
CONFIG_PROVE_LOCKING=n
|
||||
CONFIG_DEBUG_LOCKDEP=n
|
||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
|
||||
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_RTL8152=y
|
||||
CONFIG_USB_NET_AX8817X=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_ETH=y
|
||||
|
||||
CONFIG_FW_LOADER_COMPRESS=y
|
||||
|
||||
# options for AMD devices
|
||||
CONFIG_X86_AMD_PLATFORM_DEVICE=y
|
||||
CONFIG_ACPI_VIDEO=y
|
||||
CONFIG_X86_AMD_FREQ_SENSITIVITY=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_AMD=y
|
||||
CONFIG_DRM_AMDGPU=m
|
||||
CONFIG_DRM_AMDGPU_SI=m
|
||||
CONFIG_DRM_AMDGPU_USERPTR=y
|
||||
CONFIG_DRM_AMD_ACP=n
|
||||
CONFIG_ACPI_WMI=y
|
||||
CONFIG_MXM_WMI=y
|
||||
CONFIG_PARPORT=y
|
||||
CONFIG_PARPORT_PC=y
|
||||
CONFIG_PARPORT_SERIAL=y
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_CHROME_PLATFORMS=y
|
||||
|
||||
#options for Intel devices
|
||||
CONFIG_MFD_INTEL_LPSS_PCI=y
|
||||
|
||||
#options for KVM guests
|
||||
CONFIG_FUSE_FS=y
|
||||
CONFIG_HYPERVISOR_GUEST=y
|
||||
CONFIG_KVM=y
|
||||
CONFIG_KVM_GUEST=y
|
||||
CONFIG_VIRT_DRIVERS=y
|
||||
CONFIG_VIRTIO_FS=y
|
||||
CONFIG_DRM_VIRTIO_GPU=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
CONFIG_PARAVIRT=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
||||
CONFIG_CRYPTO_DEV_VIRTIO=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
CONFIG_BLK_MQ_VIRTIO=y
|
||||
CONFIG_TUN=y
|
249
.gitlab-ci/container/x86_build.sh
Normal file
249
.gitlab-ci/container/x86_build.sh
Normal file
@@ -0,0 +1,249 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
CROSS_ARCHITECTURES="i386 ppc64el s390x"
|
||||
for arch in $CROSS_ARCHITECTURES; do
|
||||
dpkg --add-architecture $arch
|
||||
done
|
||||
|
||||
apt-get install -y \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
unzip \
|
||||
wget
|
||||
|
||||
# Upstream LLVM package repository
|
||||
apt-key add .gitlab-ci/container/llvm-snapshot.gpg.key
|
||||
echo "deb https://apt.llvm.org/buster/ llvm-toolchain-buster-9 main" >/etc/apt/sources.list.d/llvm9.list
|
||||
|
||||
# Upstream Wine (WineHQ) package repository. We use the OBS service
|
||||
# instead of the repository at the winehq.org domain because:
|
||||
#
|
||||
# " The WineHQ packages for Debian 10 and later require libfaudio0
|
||||
# as a dependency. Since the distro does not provide it for Debian
|
||||
# 10, users of that version can download libfaudio0 packages from
|
||||
# the OBS. See https://forum.winehq.org/viewtopic.php?f=8&t=32192
|
||||
# for details."
|
||||
#
|
||||
# As explained at https://wiki.winehq.org/Debian
|
||||
apt-key add .gitlab-ci/container/obs-emulators-wine-debian.gpg.key
|
||||
echo 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/ ./' >/etc/apt/sources.list.d/obs-emulators-wine-debian.list
|
||||
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
|
||||
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
autoconf \
|
||||
automake \
|
||||
autotools-dev \
|
||||
bison \
|
||||
ccache \
|
||||
clang-9 \
|
||||
cmake \
|
||||
flex \
|
||||
g++ \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
libclang-6.0-dev \
|
||||
libclang-7-dev \
|
||||
libclang-8-dev \
|
||||
libclang-9-dev \
|
||||
libclc-dev \
|
||||
libelf-dev \
|
||||
libepoxy-dev \
|
||||
libexpat1-dev \
|
||||
libgbm-dev \
|
||||
libgtk-3-dev \
|
||||
libomxil-bellagio-dev \
|
||||
libpciaccess-dev \
|
||||
libtool \
|
||||
libunwind-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libvulkan-dev \
|
||||
libvulkan-dev:ppc64el \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxdamage-dev \
|
||||
libxext-dev \
|
||||
libxml2-utils \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
libxshmfence-dev \
|
||||
libxvmc-dev \
|
||||
libxxf86vm-dev \
|
||||
llvm-6.0-dev \
|
||||
llvm-7-dev \
|
||||
llvm-9-dev \
|
||||
meson \
|
||||
pkg-config \
|
||||
python-mako \
|
||||
python3-mako \
|
||||
python3-pil \
|
||||
python3-requests \
|
||||
qemu-user \
|
||||
scons \
|
||||
x11proto-dri2-dev \
|
||||
x11proto-gl-dev \
|
||||
x11proto-randr-dev \
|
||||
xz-utils \
|
||||
zlib1g-dev
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
# Cross-build Mesa deps
|
||||
for arch in $CROSS_ARCHITECTURES; do
|
||||
apt-get install -y --no-remove \
|
||||
crossbuild-essential-${arch} \
|
||||
libdrm-dev:${arch} \
|
||||
libelf-dev:${arch} \
|
||||
libexpat1-dev:${arch} \
|
||||
libffi-dev:${arch} \
|
||||
libllvm8:${arch} \
|
||||
libstdc++6:${arch} \
|
||||
libtinfo-dev:${arch}
|
||||
|
||||
if [ "$arch" == "i386" ]; then
|
||||
# libpciaccess-dev is only needed for Intel.
|
||||
apt-get install -y --no-remove \
|
||||
libpciaccess-dev:${arch}
|
||||
fi
|
||||
|
||||
mkdir /var/cache/apt/archives/${arch}
|
||||
# Download llvm-* packages, but don't install them yet, since they can
|
||||
# only be installed for one architecture at a time
|
||||
apt-get install -o Dir::Cache::archives=/var/cache/apt/archives/$arch --download-only -y --no-remove \
|
||||
llvm-8-dev:${arch}
|
||||
done
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
llvm-8-dev \
|
||||
|
||||
# for 64bit windows cross-builds
|
||||
apt-get install -y --no-remove \
|
||||
libz-mingw-w64-dev \
|
||||
mingw-w64 \
|
||||
winehq-stable
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
# Generate cross build files for Meson
|
||||
for arch in $CROSS_ARCHITECTURES; do
|
||||
cross_file="/cross_file-$arch.txt"
|
||||
/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
|
||||
sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
|
||||
done
|
||||
|
||||
|
||||
# for the vulkan overlay layer
|
||||
wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip
|
||||
unzip glslang-master-linux-Release.zip bin/glslangValidator
|
||||
install -m755 bin/glslangValidator /usr/local/bin/
|
||||
rm bin/glslangValidator glslang-master-linux-Release.zip
|
||||
|
||||
|
||||
# dependencies where we want a specific version
|
||||
export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
|
||||
export XCB_RELEASES=https://xcb.freedesktop.org/dist
|
||||
export WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
|
||||
|
||||
export XORGMACROS_VERSION=util-macros-1.19.0
|
||||
export LIBDRM_VERSION=libdrm-2.4.100
|
||||
export XCBPROTO_VERSION=xcb-proto-1.13
|
||||
export LIBXCB_VERSION=libxcb-1.13
|
||||
export LIBWAYLAND_VERSION=wayland-1.15.0
|
||||
export WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.12
|
||||
|
||||
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
|
||||
|
||||
wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
|
||||
tar -xvf $XCBPROTO_VERSION.tar.bz2 && rm $XCBPROTO_VERSION.tar.bz2
|
||||
cd $XCBPROTO_VERSION; ./configure; make install; cd ..
|
||||
rm -rf $XCBPROTO_VERSION
|
||||
|
||||
wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
|
||||
tar -xvf $LIBXCB_VERSION.tar.bz2 && rm $LIBXCB_VERSION.tar.bz2
|
||||
cd $LIBXCB_VERSION; ./configure; make install; cd ..
|
||||
rm -rf $LIBXCB_VERSION
|
||||
|
||||
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
|
||||
tar -xvf $LIBDRM_VERSION.tar.bz2 && rm $LIBDRM_VERSION.tar.bz2
|
||||
cd $LIBDRM_VERSION
|
||||
meson build -D vc4=true -D freedreno=true -D etnaviv=true -D libdir=lib/x86_64-linux-gnu; ninja -C build install
|
||||
rm -rf build; meson --cross-file=/cross_file-ppc64el.txt build -D libdir=lib/powerpc64le-linux-gnu; ninja -C build install
|
||||
rm -rf build; meson --cross-file=/cross_file-i386.txt build -D libdir=lib/i386-linux-gnu; ninja -C build install
|
||||
cd ..
|
||||
rm -rf $LIBDRM_VERSION
|
||||
|
||||
wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
|
||||
tar -xvf $LIBWAYLAND_VERSION.tar.xz && rm $LIBWAYLAND_VERSION.tar.xz
|
||||
cd $LIBWAYLAND_VERSION; ./configure --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation; make install; cd ..
|
||||
rm -rf $LIBWAYLAND_VERSION
|
||||
|
||||
wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
|
||||
tar -xvf $WAYLAND_PROTOCOLS_VERSION.tar.xz && rm $WAYLAND_PROTOCOLS_VERSION.tar.xz
|
||||
cd $WAYLAND_PROTOCOLS_VERSION; ./configure; make install; cd ..
|
||||
rm -rf $WAYLAND_PROTOCOLS_VERSION
|
||||
|
||||
|
||||
# The version of libglvnd-dev in debian is too old
|
||||
# Check this page to see when this local compilation can be dropped in favour of the package:
|
||||
# https://packages.debian.org/libglvnd-dev
|
||||
GLVND_VERSION=1.2.0
|
||||
wget https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v$GLVND_VERSION/libglvnd-v$GLVND_VERSION.tar.gz
|
||||
tar -xvf libglvnd-v$GLVND_VERSION.tar.gz && rm libglvnd-v$GLVND_VERSION.tar.gz
|
||||
pushd libglvnd-v$GLVND_VERSION; ./autogen.sh; ./configure; make install; popd
|
||||
rm -rf libglvnd-v$GLVND_VERSION
|
||||
|
||||
|
||||
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
|
||||
|
||||
apt-get purge -y \
|
||||
autoconf \
|
||||
automake \
|
||||
autotools-dev \
|
||||
cmake \
|
||||
git \
|
||||
gnupg \
|
||||
libgbm-dev \
|
||||
libtool \
|
||||
unzip \
|
||||
wget
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
60
.gitlab-ci/container/x86_build_old.sh
Normal file
60
.gitlab-ci/container/x86_build_old.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get install -y \
|
||||
apt-transport-https \
|
||||
ca-certificates
|
||||
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
echo 'deb https://deb.debian.org/debian stretch-backports main' >/etc/apt/sources.list.d/backports.list
|
||||
|
||||
apt-get update
|
||||
|
||||
# Use newer packages from backports by default
|
||||
cat >/etc/apt/preferences <<EOF
|
||||
Package: *
|
||||
Pin: release a=stretch-backports
|
||||
Pin-Priority: 500
|
||||
EOF
|
||||
|
||||
apt-get dist-upgrade -y
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
bison \
|
||||
bzip2 \
|
||||
ccache \
|
||||
flex \
|
||||
g++ \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
libclang-3.9-dev \
|
||||
libclang-4.0-dev \
|
||||
libclang-5.0-dev \
|
||||
libclc-dev \
|
||||
libdrm-dev \
|
||||
libelf-dev \
|
||||
libepoxy-dev \
|
||||
libexpat1-dev \
|
||||
libpng-dev \
|
||||
libunwind-dev \
|
||||
llvm-3.9-dev \
|
||||
llvm-4.0-dev \
|
||||
llvm-5.0-dev \
|
||||
meson \
|
||||
pkg-config \
|
||||
python-mako \
|
||||
python3-mako \
|
||||
scons \
|
||||
xz-utils \
|
||||
zlib1g-dev
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
############### Uninstall unused packages
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
137
.gitlab-ci/container/x86_test-gl.sh
Normal file
137
.gitlab-ci/container/x86_test-gl.sh
Normal file
@@ -0,0 +1,137 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get install -y \
|
||||
ca-certificates \
|
||||
gnupg
|
||||
|
||||
# Upstream LLVM package repository
|
||||
apt-key add .gitlab-ci/container/llvm-snapshot.gpg.key
|
||||
echo "deb https://apt.llvm.org/buster/ llvm-toolchain-buster-9 main" >/etc/apt/sources.list.d/llvm9.list
|
||||
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
|
||||
|
||||
apt-get update
|
||||
|
||||
# Use newer packages from backports by default
|
||||
cat >/etc/apt/preferences <<EOF
|
||||
Package: *
|
||||
Pin: release a=buster-backports
|
||||
Pin-Priority: 500
|
||||
EOF
|
||||
|
||||
apt-get dist-upgrade -y
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
autoconf \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
libexpat1 \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
libllvm9 \
|
||||
libpcre3-dev \
|
||||
libpcre32-3 \
|
||||
libpng-dev \
|
||||
libpng16-16 \
|
||||
libpython3.7 \
|
||||
libvulkan-dev \
|
||||
libvulkan1 \
|
||||
libwaffle-dev \
|
||||
libwayland-server0 \
|
||||
libxcb-keysyms1 \
|
||||
libxcb-keysyms1-dev \
|
||||
libxcb-xfixes0 \
|
||||
libxkbcommon-dev \
|
||||
libxkbcommon0 \
|
||||
libxrender-dev \
|
||||
libxrender1 \
|
||||
make \
|
||||
meson \
|
||||
patch \
|
||||
pkg-config \
|
||||
python \
|
||||
python3-distutils \
|
||||
python3-mako \
|
||||
python3-numpy \
|
||||
python3-pil \
|
||||
python3-requests \
|
||||
python3-six \
|
||||
python3-yaml \
|
||||
python3.7 \
|
||||
python3.7-dev \
|
||||
qt5-default \
|
||||
qt5-qmake \
|
||||
waffle-utils \
|
||||
wget \
|
||||
xauth \
|
||||
xvfb \
|
||||
xz-utils \
|
||||
zlib1g
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
############### Build virglrenderer
|
||||
|
||||
. .gitlab-ci/build-virglrenderer.sh
|
||||
|
||||
############### Build piglit
|
||||
|
||||
. .gitlab-ci/build-piglit.sh
|
||||
|
||||
############### Build dEQP runner
|
||||
|
||||
. .gitlab-ci/build-cts-runner.sh
|
||||
|
||||
############### Build dEQP GL
|
||||
|
||||
. .gitlab-ci/build-deqp-gl.sh
|
||||
|
||||
############### Build apitrace
|
||||
|
||||
. .gitlab-ci/build-apitrace.sh
|
||||
|
||||
############### Build renderdoc
|
||||
|
||||
. .gitlab-ci/build-renderdoc.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
ccache --show-stats
|
||||
|
||||
apt-get purge -y \
|
||||
autoconf \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
g++ \
|
||||
gcc \
|
||||
gnupg \
|
||||
libc6-dev \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
libpcre3-dev \
|
||||
libpng-dev \
|
||||
libwaffle-dev \
|
||||
libxcb-keysyms1-dev \
|
||||
libxkbcommon-dev \
|
||||
libxrender-dev \
|
||||
make \
|
||||
meson \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-distutils \
|
||||
python3.7-dev \
|
||||
wget \
|
||||
xz-utils
|
||||
|
||||
apt-get autoremove -y --purge
|
182
.gitlab-ci/container/x86_test-vk.sh
Normal file
182
.gitlab-ci/container/x86_test-vk.sh
Normal file
@@ -0,0 +1,182 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get install -y \
|
||||
ca-certificates \
|
||||
gnupg
|
||||
|
||||
# Upstream LLVM package repository
|
||||
apt-key add .gitlab-ci/container/llvm-snapshot.gpg.key
|
||||
echo "deb https://apt.llvm.org/buster/ llvm-toolchain-buster-9 main" >/etc/apt/sources.list.d/llvm9.list
|
||||
|
||||
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
|
||||
echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get dist-upgrade -y
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
ccache \
|
||||
cmake \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
git-lfs \
|
||||
libexpat1 \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
libllvm9 \
|
||||
liblz4-1 \
|
||||
liblz4-dev \
|
||||
libpng-dev \
|
||||
libpng16-16 \
|
||||
libvulkan-dev \
|
||||
libvulkan1 \
|
||||
libwayland-client0 \
|
||||
libwayland-server0 \
|
||||
libxcb-ewmh-dev \
|
||||
libxcb-ewmh2 \
|
||||
libxcb-keysyms1 \
|
||||
libxcb-keysyms1-dev \
|
||||
libxcb-randr0 \
|
||||
libxcb-xfixes0 \
|
||||
libxkbcommon-dev \
|
||||
libxkbcommon0 \
|
||||
libxrandr-dev \
|
||||
libxrandr2 \
|
||||
libxrender-dev \
|
||||
libxrender1 \
|
||||
meson \
|
||||
p7zip \
|
||||
pkg-config \
|
||||
python \
|
||||
python3-distutils \
|
||||
python3-pil \
|
||||
python3-requests \
|
||||
python3-yaml \
|
||||
vulkan-tools \
|
||||
wget \
|
||||
xauth \
|
||||
xvfb
|
||||
|
||||
# We need multiarch for Wine
|
||||
dpkg --add-architecture i386
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-remove \
|
||||
wine \
|
||||
wine32 \
|
||||
wine64
|
||||
|
||||
############### Set up Wine env variables
|
||||
|
||||
export WINEDEBUG="-all"
|
||||
export WINEPREFIX="/dxvk-wine64"
|
||||
|
||||
############### Install DXVK
|
||||
|
||||
DXVK_VERSION="1.6"
|
||||
|
||||
# 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
|
||||
|
||||
# DXVK's setup often fails 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 ...
|
||||
test -f "${WINEPREFIX}/system.reg" || sleep 2
|
||||
|
||||
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="9.0"
|
||||
APITRACE_VERSION_DATE="20191126"
|
||||
|
||||
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"
|
||||
|
||||
# Add the apitrace path to the registry
|
||||
wine \
|
||||
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
|
||||
/v Path \
|
||||
/t REG_EXPAND_SZ \
|
||||
/d "C:\windows\system32;C:\windows;C:\windows\system32\wbem;Z:\apitrace-msvc-win64\bin" \
|
||||
/f
|
||||
|
||||
############### Building ...
|
||||
|
||||
. .gitlab-ci/container/container_pre_build.sh
|
||||
|
||||
############### Build dEQP runner
|
||||
|
||||
. .gitlab-ci/build-cts-runner.sh
|
||||
|
||||
############### Build Fossilize
|
||||
|
||||
. .gitlab-ci/build-fossilize.sh
|
||||
|
||||
############### Build dEQP VK
|
||||
|
||||
. .gitlab-ci/build-deqp-vk.sh
|
||||
|
||||
############### Build gfxreconstruct
|
||||
|
||||
. .gitlab-ci/build-gfxreconstruct.sh
|
||||
|
||||
############### Build VulkanTools
|
||||
|
||||
. .gitlab-ci/build-vulkantools.sh
|
||||
|
||||
############### Uninstall the build software
|
||||
|
||||
ccache --show-stats
|
||||
|
||||
apt-get purge -y \
|
||||
ccache \
|
||||
cmake \
|
||||
g++ \
|
||||
gcc \
|
||||
gnupg \
|
||||
libgbm-dev \
|
||||
libgles2-mesa-dev \
|
||||
liblz4-dev \
|
||||
libpng-dev \
|
||||
libvulkan-dev \
|
||||
libxcb-ewmh-dev \
|
||||
libxcb-keysyms1-dev \
|
||||
libxkbcommon-dev \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
meson \
|
||||
p7zip \
|
||||
pkg-config \
|
||||
wget
|
||||
|
||||
apt-get autoremove -y --purge
|
205
.gitlab-ci/create-rootfs.sh
Normal file
205
.gitlab-ci/create-rootfs.sh
Normal file
@@ -0,0 +1,205 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
apt-get -y install --no-install-recommends \
|
||||
ca-certificates \
|
||||
initramfs-tools \
|
||||
libpng16-16 \
|
||||
strace \
|
||||
libsensors5 \
|
||||
libexpat1 \
|
||||
libdrm2 \
|
||||
libdrm-nouveau2 \
|
||||
firmware-qcom-media \
|
||||
wget \
|
||||
xz-utils
|
||||
passwd root -d
|
||||
chsh -s /bin/sh
|
||||
|
||||
cat > /init <<EOF
|
||||
#!/bin/sh
|
||||
export PS1=lava-shell:
|
||||
exec sh
|
||||
EOF
|
||||
chmod +x /init
|
||||
|
||||
mkdir -p /lib/firmware/rtl_nic
|
||||
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtl_nic/rtl8153a-3.fw -O /lib/firmware/rtl_nic/rtl8153a-3.fw
|
||||
|
||||
#######################################################################
|
||||
# Strip the image to a small minimal system without removing the debian
|
||||
# toolchain.
|
||||
|
||||
# xz compress firmware so it doesn't waste RAM at runtime. Except db820c's
|
||||
# GPU firmware, due to using a precompiled kernel without compression support.
|
||||
find /lib/firmware -type f -print0 | \
|
||||
grep -vz a530 | \
|
||||
xargs -0r -P4 -n4 xz -T1 -C crc32
|
||||
ln -s /lib/firmware/qcom/a530* /lib/firmware/
|
||||
|
||||
# Copy timezone file and remove tzdata package
|
||||
rm -rf /etc/localtime
|
||||
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
||||
|
||||
UNNEEDED_PACKAGES="libfdisk1
|
||||
tzdata
|
||||
diffutils"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Removing unused packages
|
||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||
do
|
||||
echo ${PACKAGE}
|
||||
if ! apt-get remove --purge --yes "${PACKAGE}"
|
||||
then
|
||||
echo "WARNING: ${PACKAGE} isn't installed"
|
||||
fi
|
||||
done
|
||||
|
||||
apt-get autoremove --yes || true
|
||||
|
||||
# Dropping logs
|
||||
rm -rf /var/log/*
|
||||
|
||||
# Dropping documentation, localization, i18n files, etc
|
||||
rm -rf /usr/share/doc/*
|
||||
rm -rf /usr/share/locale/*
|
||||
rm -rf /usr/share/man
|
||||
rm -rf /usr/share/i18n/*
|
||||
rm -rf /usr/share/info/*
|
||||
rm -rf /usr/share/lintian/*
|
||||
rm -rf /usr/share/common-licenses/*
|
||||
rm -rf /usr/share/mime/*
|
||||
|
||||
# Dropping reportbug scripts
|
||||
rm -rf /usr/share/bug
|
||||
|
||||
# Drop udev hwdb not required on a stripped system
|
||||
rm -rf /lib/udev/hwdb.bin /lib/udev/hwdb.d/*
|
||||
|
||||
# Drop all gconv conversions && binaries
|
||||
rm -rf usr/bin/iconv
|
||||
rm -rf usr/sbin/iconvconfig
|
||||
rm -rf usr/lib/*/gconv/
|
||||
|
||||
# Remove libusb database
|
||||
rm -rf usr/sbin/update-usbids
|
||||
rm -rf var/lib/usbutils/usb.ids
|
||||
rm -rf usr/share/misc/usb.ids
|
||||
|
||||
#######################################################################
|
||||
# Crush into a minimal production image to be deployed via some type of image
|
||||
# updating system.
|
||||
# IMPORTANT: The Debian system is not longer functional at this point,
|
||||
# for example, apt and dpkg will stop working
|
||||
|
||||
UNNEEDED_PACKAGES="apt libapt-pkg5.0 "\
|
||||
"ncurses-bin ncurses-base libncursesw5 libncurses5 "\
|
||||
"perl-base "\
|
||||
"debconf libdebconfclient0 "\
|
||||
"e2fsprogs e2fslibs libfdisk1 "\
|
||||
"insserv "\
|
||||
"udev "\
|
||||
"init-system-helpers "\
|
||||
"bash "\
|
||||
"cpio "\
|
||||
"xz-utils "\
|
||||
"passwd "\
|
||||
"libsemanage1 libsemanage-common "\
|
||||
"libsepol1 "\
|
||||
"gpgv "\
|
||||
"hostname "\
|
||||
"adduser "\
|
||||
"debian-archive-keyring "\
|
||||
|
||||
# Removing unneeded packages
|
||||
for PACKAGE in ${UNNEEDED_PACKAGES}
|
||||
do
|
||||
echo "Forcing removal of ${PACKAGE}"
|
||||
if ! dpkg --purge --force-remove-essential --force-depends "${PACKAGE}"
|
||||
then
|
||||
echo "WARNING: ${PACKAGE} isn't installed"
|
||||
fi
|
||||
done
|
||||
|
||||
# Show what's left package-wise before dropping dpkg itself
|
||||
COLUMNS=300 dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n
|
||||
|
||||
# Drop dpkg
|
||||
dpkg --purge --force-remove-essential --force-depends dpkg
|
||||
|
||||
# No apt or dpkg, no need for its configuration archives
|
||||
rm -rf etc/apt
|
||||
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/* opt srv share
|
||||
|
||||
# ca-certificates are in /etc drop the source
|
||||
rm -rf usr/share/ca-certificates
|
||||
|
||||
# No bash, no need for completions
|
||||
rm -rf usr/share/bash-completion
|
||||
|
||||
# No zsh, no need for comletions
|
||||
rm -rf usr/share/zsh/vendor-completions
|
||||
|
||||
# drop gcc-6 python helpers
|
||||
rm -rf usr/share/gcc-6
|
||||
|
||||
# Drop sysvinit leftovers
|
||||
rm -rf etc/init.d
|
||||
rm -rf etc/rc[0-6S].d
|
||||
|
||||
# Drop upstart helpers
|
||||
rm -rf etc/init
|
||||
|
||||
# Various xtables helpers
|
||||
rm -rf usr/lib/xtables
|
||||
|
||||
# Drop all locales
|
||||
# TODO: only remaining locale is actually "C". Should we really remove it?
|
||||
rm -rf usr/lib/locale/*
|
||||
|
||||
# partition helpers
|
||||
rm usr/sbin/*fdisk
|
||||
|
||||
# local compiler
|
||||
rm usr/bin/localedef
|
||||
|
||||
# Systemd dns resolver
|
||||
find usr etc -name '*systemd-resolve*' -prune -exec rm -r {} \;
|
||||
|
||||
# Systemd network configuration
|
||||
find usr etc -name '*networkd*' -prune -exec rm -r {} \;
|
||||
|
||||
# systemd ntp client
|
||||
find usr etc -name '*timesyncd*' -prune -exec rm -r {} \;
|
||||
|
||||
# systemd hw database manager
|
||||
find usr etc -name '*systemd-hwdb*' -prune -exec rm -r {} \;
|
||||
|
||||
# No need for fuse
|
||||
find usr etc -name '*fuse*' -prune -exec rm -r {} \;
|
||||
|
||||
# lsb init function leftovers
|
||||
rm -rf usr/lib/lsb
|
||||
|
||||
# Only needed when adding libraries
|
||||
rm usr/sbin/ldconfig*
|
||||
|
||||
# Games, unused
|
||||
rmdir usr/games
|
||||
|
||||
# Remove pam module to authenticate against a DB
|
||||
# plus libdb-5.3.so that is only used by this pam module
|
||||
rm usr/lib/*/security/pam_userdb.so
|
||||
rm usr/lib/*/libdb-5.3.so
|
||||
|
||||
# remove NSS support for nis, nisplus and hesiod
|
||||
rm usr/lib/*/libnss_hesiod*
|
||||
rm usr/lib/*/libnss_nis*
|
1
.gitlab-ci/cross-xfail-i386
Normal file
1
.gitlab-ci/cross-xfail-i386
Normal file
@@ -0,0 +1 @@
|
||||
u_format_test
|
@@ -1 +1,4 @@
|
||||
lp_test_arit
|
||||
roundeven
|
||||
u_format_test
|
||||
u_half_test
|
@@ -1,2 +1,4 @@
|
||||
lp_test_arit
|
||||
lp_test_format
|
||||
lp_test_printf
|
||||
u_format_test
|
||||
|
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
mount -t devtmpfs none /dev || echo possibly already mounted
|
||||
mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
|
||||
. /crosvm-env.sh
|
||||
|
||||
# / is ro
|
||||
export PIGLIT_REPLAY_EXTRA_ARGS="$PIGLIT_REPLAY_EXTRA_ARGS --db-path /tmp/replayer-db"
|
||||
|
||||
if sh $CROSVM_TEST_SCRIPT; then
|
||||
touch /results/success
|
||||
fi
|
||||
|
||||
sleep 5 # Leave some time to get the last output flushed out
|
||||
|
||||
poweroff -d -n -f || true
|
||||
|
||||
sleep 10 # Just in case init would exit before the kernel shuts down the VM
|
||||
|
||||
exit 1
|
@@ -1,49 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
ln -sf $CI_PROJECT_DIR/install /install
|
||||
|
||||
export LD_LIBRARY_PATH=$CI_PROJECT_DIR/install/lib/
|
||||
export EGL_PLATFORM=surfaceless
|
||||
|
||||
export -p > /crosvm-env.sh
|
||||
export GALLIUM_DRIVER="$CROSVM_GALLIUM_DRIVER"
|
||||
export GALLIVM_PERF="nopt"
|
||||
export LIBGL_ALWAYS_SOFTWARE="true"
|
||||
|
||||
CROSVM_KERNEL_ARGS="root=my_root rw rootfstype=virtiofs loglevel=3 init=$CI_PROJECT_DIR/install/crosvm-init.sh ip=192.168.30.2::192.168.30.1:255.255.255.0:crosvm:eth0"
|
||||
|
||||
# Temporary results dir because from the guest we cannot write to /
|
||||
mkdir -p /results
|
||||
mount -t tmpfs tmpfs /results
|
||||
|
||||
mkdir -p /piglit/.gitlab-ci/piglit
|
||||
mount -t tmpfs tmpfs /piglit/.gitlab-ci/piglit
|
||||
|
||||
unset DISPLAY
|
||||
unset XDG_RUNTIME_DIR
|
||||
|
||||
/usr/sbin/iptables-legacy -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
|
||||
# Crosvm wants this
|
||||
syslogd > /dev/null
|
||||
|
||||
# We aren't testing LLVMPipe here, so we don't need to validate NIR on the host
|
||||
export NIR_VALIDATE=0
|
||||
|
||||
crosvm run \
|
||||
--gpu "$CROSVM_GPU_ARGS" \
|
||||
-m 4096 \
|
||||
-c $((FDO_CI_CONCURRENT > 1 ? FDO_CI_CONCURRENT - 1 : 1)) \
|
||||
--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" \
|
||||
-p "$CROSVM_KERNEL_ARGS" \
|
||||
/lava-files/bzImage
|
||||
|
||||
mkdir -p $CI_PROJECT_DIR/results
|
||||
mv /results/* $CI_PROJECT_DIR/results/.
|
||||
|
||||
test -f $CI_PROJECT_DIR/results/success
|
@@ -1,10 +0,0 @@
|
||||
# Note: skips lists for CI are just a list of lines that, when
|
||||
# non-zero-length and not starting with '#', will regex match to
|
||||
# delete lines from the test list. Be careful.
|
||||
|
||||
# These are tremendously slow (pushing toward a minute), and aren't
|
||||
# reliable to be run in parallel with other tests due to CPU-side timing.
|
||||
dEQP-GLES[0-9]*.functional.flush_finish.*
|
||||
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/4575
|
||||
dEQP-VK.wsi.display.get_display_plane_capabilities
|
10
.gitlab-ci/deqp-default-skips.txt
Normal file
10
.gitlab-ci/deqp-default-skips.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
# Note: skips lists for CI are just a list of lines that, when
|
||||
# non-zero-length and not starting with '#', will regex match to
|
||||
# delete lines from the test list. Be careful.
|
||||
|
||||
# Skip the perf/stress tests to keep runtime manageable
|
||||
dEQP-GLES[0-9]*.performance.*
|
||||
dEQP-GLES[0-9]*.stress.*
|
||||
|
||||
# These are really slow on tiling architectures (including llvmpipe).
|
||||
dEQP-GLES[0-9]*.functional.flush_finish.*
|
2642
.gitlab-ci/deqp-freedreno-a307-fails.txt
Normal file
2642
.gitlab-ci/deqp-freedreno-a307-fails.txt
Normal file
File diff suppressed because it is too large
Load Diff
23
.gitlab-ci/deqp-freedreno-a307-skips.txt
Normal file
23
.gitlab-ci/deqp-freedreno-a307-skips.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
# Note: skips lists for CI are just a list of lines that, when
|
||||
# non-zero-length and not starting with '#', will regex match to
|
||||
# delete lines from the test list. Be careful.
|
||||
|
||||
# Skip the perf/stress tests to keep runtime manageable
|
||||
dEQP-GLES[0-9]*.performance.*
|
||||
dEQP-GLES[0-9]*.stress.*
|
||||
|
||||
# These are really slow on tiling architectures (including llvmpipe).
|
||||
dEQP-GLES[0-9]*.functional.flush_finish.*
|
||||
|
||||
# Flaky results
|
||||
dEQP-GLES3.functional.occlusion_query.stencil_write
|
||||
dEQP-GLES3.functional.rasterization.fbo.rbo_.*
|
||||
dEQP-GLES3.functional.rasterization.fbo.texture_2d.interpolation.triangles
|
||||
dEQP-GLES3.functional.rasterization.fbo.texture_2d.primitives.points
|
||||
dEQP-GLES3.functional.rasterization.flatshading.lines_wide
|
||||
dEQP-GLES3.functional.rasterization.flatshading.triangles
|
||||
dEQP-GLES3.functional.shaders.linkage.varying.interpolation.centroid
|
||||
dEQP-GLES3.functional.shaders.texture_functions.texturegradoffset.*
|
||||
dEQP-GLES3.functional.shaders.texture_functions.textureprojgradoffset.*
|
||||
dEQP-GLES3.functional.texture.units.4_units.only_3d.*
|
||||
dEQP-GLES3.functional.vertex_arrays.single_attribute.*
|
2000
.gitlab-ci/deqp-freedreno-a530-fails.txt
Normal file
2000
.gitlab-ci/deqp-freedreno-a530-fails.txt
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user