qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Merge remote-tracking branch 'remotes/philmd-gitlab/tags/edk2-next-20200121' into staging

EDK2 firmware patches

Another set of build-sys patches, to help building the firmware
binaries we use for testing. We almost have reproducible builds.

# gpg: Signature made Tue 21 Jan 2020 15:14:09 GMT
# gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd-gitlab/tags/edk2-next-20200121:
gitlab-ci.yml: Add jobs to build EDK2 firmware binaries
roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

+84
+49
.gitlab-ci-edk2.yml
··· 1 + docker-edk2: 2 + stage: build 3 + rules: # Only run this job when the Dockerfile is modified 4 + - changes: 5 + - .gitlab-ci-edk2.yml 6 + - .gitlab-ci.d/edk2/Dockerfile 7 + when: always 8 + image: docker:19.03.1 9 + services: 10 + - docker:19.03.1-dind 11 + variables: 12 + GIT_DEPTH: 3 13 + IMAGE_TAG: $CI_REGISTRY_IMAGE:edk2-cross-build 14 + # We don't use TLS 15 + DOCKER_HOST: tcp://docker:2375 16 + DOCKER_TLS_CERTDIR: "" 17 + before_script: 18 + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY 19 + script: 20 + - docker pull $IMAGE_TAG || true 21 + - docker build --cache-from $IMAGE_TAG --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA 22 + --tag $IMAGE_TAG .gitlab-ci.d/edk2 23 + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA 24 + - docker push $IMAGE_TAG 25 + 26 + build-edk2: 27 + rules: # Only run this job when ... 28 + - changes: # ... roms/edk2/ is modified (submodule updated) 29 + - roms/edk2/* 30 + when: always 31 + - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2' 32 + when: always 33 + - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2' 34 + when: always 35 + artifacts: 36 + paths: # 'artifacts.zip' will contains the following files: 37 + - pc-bios/edk2*bz2 38 + - pc-bios/edk2-licenses.txt 39 + - edk2-stdout.log 40 + - edk2-stderr.log 41 + image: $CI_REGISTRY_IMAGE:edk2-cross-build 42 + variables: 43 + GIT_DEPTH: 3 44 + script: # Clone the required submodules and build EDK2 45 + - git submodule update --init roms/edk2 46 + - git -C roms/edk2 submodule update --init 47 + - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1)) 48 + - echo "=== Using ${JOBS} simultaneous jobs ===" 49 + - make -j${JOBS} -C roms efi 2>&1 1>edk2-stdout.log | tee -a edk2-stderr.log >&2
+27
.gitlab-ci.d/edk2/Dockerfile
··· 1 + # 2 + # Docker image to cross-compile EDK2 firmware binaries 3 + # 4 + FROM ubuntu:16.04 5 + 6 + MAINTAINER Philippe Mathieu-Daudé <philmd@redhat.com> 7 + 8 + # Install packages required to build EDK2 9 + RUN apt update \ 10 + && \ 11 + \ 12 + DEBIAN_FRONTEND=noninteractive \ 13 + apt install --assume-yes --no-install-recommends \ 14 + build-essential \ 15 + ca-certificates \ 16 + dos2unix \ 17 + gcc-aarch64-linux-gnu \ 18 + gcc-arm-linux-gnueabi \ 19 + git \ 20 + iasl \ 21 + make \ 22 + nasm \ 23 + python \ 24 + uuid-dev \ 25 + && \ 26 + \ 27 + rm -rf /var/lib/apt/lists/*
+3
.gitlab-ci.yml
··· 1 + include: 2 + - local: '/.gitlab-ci-edk2.yml' 3 + 1 4 before_script: 2 5 - apt-get update -qq 3 6 - apt-get install -y -qq flex bison libglib2.0-dev libpixman-1-dev genisoimage
+2
MAINTAINERS
··· 2368 2368 F: roms/edk2-* 2369 2369 F: tests/data/uefi-boot-images/ 2370 2370 F: tests/uefi-test-tools/ 2371 + F: .gitlab-ci-edk2.yml 2372 + F: .gitlab-ci.d/edk2/ 2371 2373 2372 2374 Usermode Emulation 2373 2375 ------------------
+3
roms/edk2-funcs.sh
··· 112 112 ( [ "$gcc_arch" == i686 ] && [ "$host_arch" == x86_64 ] ); then 113 113 # no cross-compiler needed 114 114 : 115 + elif ( [ -e /etc/debian_version ] && [ "$gcc_arch" == arm ] ); then 116 + # force soft-float cross-compiler on Debian 117 + printf 'arm-linux-gnueabi-' 115 118 else 116 119 printf '%s-linux-gnu-\n' "$gcc_arch" 117 120 fi