Docker, CI: Add vexpress_fvp / vexpress_fvp_bloblist support
PATCH 1/1 Docker, CI: Add vexpress_fvp / vexpress_fvp_bloblist support
This adds the vexpress_fvp and vexpress_fvp_bloblist platforms to the list of platforms we test via emulator in CI. In order to do this we need to first have our container runtime have TF-A builds for the vexpress_fvp platform, both with and without transfer list support as well as installing "telnet" so that we can access console. In the CI files we check for the existence of /opt/tf-a/${TEST_PY_BD} and if found, copy bl1.bin and fip.bin to /tmp and set the variables so that we can later run FVP to run.
Note that we currently disable the hostfs (semihosting) tests as they trigger a bug in FVP. This has been reported upstream, and can be enabled when fixed.
---
Cc: Harrison Mutai <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: nd <[email protected]>
Cc: Manish Pandey <[email protected]>
--- .azure-pipelines.yml | 13 +++++++++++++ .gitlab-ci.yml | 23 +++++++++++++++++++++++ tools/docker/Dockerfile | 17 +++++++++++++---- 3 files changed, 49 insertions(+), 4 deletions(-)
.azure-pipelines.yml +13 -0
@@ -307,6 +307,13 @@ stages: /opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload; /opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f \${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000; fi + # If we have TF-A binaries, we need to use them. + if [[ -d /opt/tf-a/"\${TEST_PY_BD}" ]]; then + cp /opt/tf-a/"\${TEST_PY_BD}"/fip.bin /opt/tf-a/"\${TEST_PY_BD}"/bl1.bin /tmp; + export fip=/tmp/fip.bin; + export bl1=/tmp/bl1.bin; + export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:\${PATH}; + fi export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:\${PATH} export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci # "\${var:+"-k \$var"}" expands to "" if \$var is empty, "-k \$var" if not
@@ -428,6 +435,12 @@ stages: TEST_PY_BD: "vexpress_ca9x4" TEST_PY_ID: "--id qemu" TEST_PY_TEST_SPEC: "not sleep" + vexpress_fvp: + TEST_PY_BD: "vexpress_fvp" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" + vexpress_fvp_bloblist: + TEST_PY_BD: "vexpress_fvp_bloblist" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" integratorcp_cm926ejs: TEST_PY_BD: "integratorcp_cm926ejs" TEST_PY_ID: "--id qemu"
.gitlab-ci.yml +23 -0
@@ -96,6 +96,13 @@ stages: /opt/coreboot/cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload; /opt/coreboot/cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000; fi + # If we have TF-A binaries, we need to use them. + - if [[ -d /opt/tf-a/"${TEST_PY_BD}" ]]; then + cp /opt/tf-a/"${TEST_PY_BD}"/fip.bin /opt/tf-a/"${TEST_PY_BD}"/bl1.bin /tmp/; + export fip=/tmp/fip.bin; + export bl1=/tmp/bl1.bin; + export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:${PATH}; + fi # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not - export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
@@ -504,6 +511,22 @@ sifive_unleashed_spi-nor test.py: TEST_PY_ID: "--id spi-nor_qemu" <<: *buildman_and_testpy_dfn +vexpress_fvp test.py: + variables: + TEST_PY_BD: "vexpress_fvp" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" + tags: + - ${DEFAULT_AMD64_TAG} + <<: *buildman_and_testpy_dfn + +vexpress_fvp_bloblist test.py: + variables: + TEST_PY_BD: "vexpress_fvp_bloblist" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" + tags: + - ${DEFAULT_AMD64_TAG} + <<: *buildman_and_testpy_dfn + xilinx_zynq_virt test.py: variables: TEST_PY_BD: "xilinx_zynq_virt"
tools/docker/Dockerfile +13 -4
@@ -90,6 +90,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ help2man \ iasl \ imagemagick \ + inetutils-telnet \ iputils-ping \ libconfuse-dev \ libgit2-dev \
@@ -233,10 +234,18 @@ RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \ RUN git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git /tmp/tf-a && \ cd /tmp/tf-a/ && \ git checkout v2.12.0 && \ - cd tools/fiptool && \ - make -j$(nproc) && \ - mkdir -p /usr/local/bin && \ - cp fiptool /usr/local/bin && \ + make CROSS_COMPILE=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux- \ + PLAT=fvp BL33=/dev/null -j$(nproc) all fip && \ + mkdir -p /usr/local/bin /opt/tf-a/vexpress_fvp && \ + cp tools/fiptool/fiptool /usr/local/bin && \ + cp build/fvp/release/fip.bin build/fvp/release/bl1.bin \ + /opt/tf-a/vexpress_fvp/ && \ + rm -rf build/fvp && \ + make CROSS_COMPILE=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux- \ + PLAT=fvp BL33=/dev/null TRANSFER_LIST=1 -j$(nproc) all fip && \ + mkdir -p /opt/tf-a/vexpress_fvp_bloblist && \ + cp build/fvp/release/fip.bin build/fvp/release/bl1.bin \ + /opt/tf-a/vexpress_fvp_bloblist/ && \ rm -rf /tmp/tf-a # Download the Arm Architecture FVP platform. This file is double compressed.
Signature · 1 line
2.43.0
Quoted 122 lines · Tom Rini
This adds the
vexpress_fvpandvexpress_fvp_bloblistplatforms to the list of platforms we test via emulator in CI. In order to do this we need to first have our container runtime have TF-A builds for thevexpress_fvpplatform, both with and without transfer list support as well as installing "telnet" so that we can access console. In the CI files we check for the existence of/opt/tf-a/${TEST_PY_BD}and if found, copy bl1.bin and fip.bin to /tmp and set the variables so that we can later run FVP to run.Note that we currently disable the hostfs (semihosting) tests as they trigger a bug in FVP. This has been reported upstream, and can be enabled when fixed.
Signed-off-by Tom Rini <[email protected]>---
Cc: Harrison Mutai <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: nd <[email protected]>
Cc: Manish Pandey <[email protected]>--- .azure-pipelines.yml | 13 +++++++++++++ .gitlab-ci.yml | 23 +++++++++++++++++++++++ tools/docker/Dockerfile | 17 +++++++++++++---- 3 files changed, 49 insertions(+), 4 deletions(-).azure-pipelines.yml +13
-0@@ -307,6 +307,13 @@ stages: /opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload; /opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f \${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000; fi + # If we have TF-A binaries, we need to use them. + if [[ -d /opt/tf-a/"\${TEST_PY_BD}" ]]; then + cp /opt/tf-a/"\${TEST_PY_BD}"/fip.bin /opt/tf-a/"\${TEST_PY_BD}"/bl1.bin /tmp; + export fip=/tmp/fip.bin; + export bl1=/tmp/bl1.bin; + export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:\${PATH}; + fi export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:\${PATH} export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci # "\${var:+"-k \$var"}" expands to "" if \$var is empty, "-k \$var" if not@@ -428,6 +435,12 @@ stages: TEST_PY_BD: "vexpress_ca9x4" TEST_PY_ID: "--id qemu" TEST_PY_TEST_SPEC: "not sleep" + vexpress_fvp: + TEST_PY_BD: "vexpress_fvp" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" + vexpress_fvp_bloblist: + TEST_PY_BD: "vexpress_fvp_bloblist" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" integratorcp_cm926ejs: TEST_PY_BD: "integratorcp_cm926ejs" TEST_PY_ID: "--id qemu".gitlab-ci.yml +23
-0@@ -96,6 +96,13 @@ stages: /opt/coreboot/cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload; /opt/coreboot/cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000; fi + # If we have TF-A binaries, we need to use them. + - if [[ -d /opt/tf-a/"${TEST_PY_BD}" ]]; then + cp /opt/tf-a/"${TEST_PY_BD}"/fip.bin /opt/tf-a/"${TEST_PY_BD}"/bl1.bin /tmp/; + export fip=/tmp/fip.bin; + export bl1=/tmp/bl1.bin; + export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:${PATH}; + fi # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not - export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;@@ -504,6 +511,22 @@ sifive_unleashed_spi-nor test.py: TEST_PY_ID: "--id spi-nor_qemu" <<: *buildman_and_testpy_dfn +vexpress_fvp test.py: + variables: + TEST_PY_BD: "vexpress_fvp" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" + tags: + - ${DEFAULT_AMD64_TAG} + <<: *buildman_and_testpy_dfn + +vexpress_fvp_bloblist test.py: + variables: + TEST_PY_BD: "vexpress_fvp_bloblist" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" + tags: + - ${DEFAULT_AMD64_TAG} + <<: *buildman_and_testpy_dfn + xilinx_zynq_virt test.py: variables: TEST_PY_BD: "xilinx_zynq_virt"tools/docker/Dockerfile +6
-4@@ -90,6 +90,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ help2man \ iasl \ imagemagick \ + inetutils-telnet \ iputils-ping \ libconfuse-dev \ libgit2-dev \@@ -233,10 +234,18 @@ RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \ RUN git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git /tmp/tf-a && \ cd /tmp/tf-a/ && \ git checkout v2.12.0 && \ - cd tools/fiptool && \ - make -j$(nproc) && \ - mkdir -p /usr/local/bin && \ - cp fiptool /usr/local/bin && \ + make CROSS_COMPILE=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux- \ + PLAT=fvp BL33=/dev/null -j$(nproc) all fip && \ + mkdir -p /usr/local/bin /opt/tf-a/vexpress_fvp && \ + cp tools/fiptool/fiptool /usr/local/bin && \ + cp build/fvp/release/fip.bin build/fvp/release/bl1.bin \
tools/docker/Dockerfile RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \ · line 251
Quoted 10 lines
tools/docker/Dockerfile +7
-0+ /opt/tf-a/vexpress_fvp/ && \ + rm -rf build/fvp && \ + make CROSS_COMPILE=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux- \ + PLAT=fvp BL33=/dev/null TRANSFER_LIST=1 -j$(nproc) all fip && \ + mkdir -p /opt/tf-a/vexpress_fvp_bloblist && \ + cp build/fvp/release/fip.bin build/fvp/release/bl1.bin \ + /opt/tf-a/vexpress_fvp_bloblist/ && \ rm -rf /tmp/tf-a # Download the Arm Architecture FVP platform. This file is double compressed.
LGTM - thanks!
Thanks for doing this
Quoted 134 lines · Tom Rini
This adds the
vexpress_fvpandvexpress_fvp_bloblistplatforms to the list of platforms we test via emulator in CI. In order to do this we need to first have our container runtime have TF-A builds for thevexpress_fvpplatform, both with and without transfer list support as well as installing "telnet" so that we can access console. In the CI files we check for the existence of/opt/tf-a/${TEST_PY_BD}and if found, copy bl1.bin and fip.bin to /tmp and set the variables so that we can later run FVP to run.Note that we currently disable the hostfs (semihosting) tests as they trigger a bug in FVP. This has been reported upstream, and can be enabled when fixed.
Signed-off-by Tom Rini <[email protected]>---
Cc: Harrison Mutai <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: nd <[email protected]>
Cc: Manish Pandey <[email protected]>--- .azure-pipelines.yml | 13 +++++++++++++ .gitlab-ci.yml | 23 +++++++++++++++++++++++ tools/docker/Dockerfile | 17 +++++++++++++---- 3 files changed, 49 insertions(+), 4 deletions(-).azure-pipelines.yml +13
-0@@ -307,6 +307,13 @@ stages: /opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload; /opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f \${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000; fi + # If we have TF-A binaries, we need to use them. + if [[ -d /opt/tf-a/"\${TEST_PY_BD}" ]]; then + cp /opt/tf-a/"\${TEST_PY_BD}"/fip.bin /opt/tf-a/"\${TEST_PY_BD}"/bl1.bin /tmp; + export fip=/tmp/fip.bin; + export bl1=/tmp/bl1.bin; + export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:\${PATH}; + fi export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:\${PATH} export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci # "\${var:+"-k \$var"}" expands to "" if \$var is empty, "-k \$var" if not@@ -428,6 +435,12 @@ stages: TEST_PY_BD: "vexpress_ca9x4" TEST_PY_ID: "--id qemu" TEST_PY_TEST_SPEC: "not sleep" + vexpress_fvp: + TEST_PY_BD: "vexpress_fvp" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" + vexpress_fvp_bloblist: + TEST_PY_BD: "vexpress_fvp_bloblist" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" integratorcp_cm926ejs: TEST_PY_BD: "integratorcp_cm926ejs" TEST_PY_ID: "--id qemu".gitlab-ci.yml +23
-0@@ -96,6 +96,13 @@ stages: /opt/coreboot/cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload; /opt/coreboot/cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000; fi + # If we have TF-A binaries, we need to use them. + - if [[ -d /opt/tf-a/"${TEST_PY_BD}" ]]; then + cp /opt/tf-a/"${TEST_PY_BD}"/fip.bin /opt/tf-a/"${TEST_PY_BD}"/bl1.bin /tmp/; + export fip=/tmp/fip.bin; + export bl1=/tmp/bl1.bin; + export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:${PATH}; + fi # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not - export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;@@ -504,6 +511,22 @@ sifive_unleashed_spi-nor test.py: TEST_PY_ID: "--id spi-nor_qemu" <<: *buildman_and_testpy_dfn +vexpress_fvp test.py: + variables: + TEST_PY_BD: "vexpress_fvp" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" + tags: + - ${DEFAULT_AMD64_TAG} + <<: *buildman_and_testpy_dfn + +vexpress_fvp_bloblist test.py: + variables: + TEST_PY_BD: "vexpress_fvp_bloblist" + TEST_PY_TEST_SPEC: "not sleep and not hostfs" + tags: + - ${DEFAULT_AMD64_TAG} + <<: *buildman_and_testpy_dfn + xilinx_zynq_virt test.py: variables: TEST_PY_BD: "xilinx_zynq_virt"tools/docker/Dockerfile +13
-5@@ -90,6 +90,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ help2man \ iasl \ imagemagick \ + inetutils-telnet \ iputils-ping \ libconfuse-dev \ libgit2-dev \@@ -233,10 +234,18 @@ RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \ RUN git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git /tmp/tf-a && \ cd /tmp/tf-a/ && \ git checkout v2.12.0 && \ - cd tools/fiptool && \ - make -j$(nproc) && \ - mkdir -p /usr/local/bin && \ - cp fiptool /usr/local/bin && \ + make CROSS_COMPILE=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux- \ + PLAT=fvp BL33=/dev/null -j$(nproc) all fip && \ + mkdir -p /usr/local/bin /opt/tf-a/vexpress_fvp && \ + cp tools/fiptool/fiptool /usr/local/bin && \ + cp build/fvp/release/fip.bin build/fvp/release/bl1.bin \ + /opt/tf-a/vexpress_fvp/ && \ + rm -rf build/fvp && \ + make CROSS_COMPILE=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux- \ + PLAT=fvp BL33=/dev/null TRANSFER_LIST=1 -j$(nproc) all fip && \ + mkdir -p /opt/tf-a/vexpress_fvp_bloblist && \ + cp build/fvp/release/fip.bin build/fvp/release/bl1.bin \ + /opt/tf-a/vexpress_fvp_bloblist/ && \ rm -rf /tmp/tf-a # Download the Arm Architecture FVP platform. This file is double compressed. --
Quoted 2 lines
2.43.0
Quoted 10 lines · Tom Rini
This adds the
vexpress_fvpandvexpress_fvp_bloblistplatforms to the list of platforms we test via emulator in CI. In order to do this we need to first have our container runtime have TF-A builds for thevexpress_fvpplatform, both with and without transfer list support as well as installing "telnet" so that we can access console. In the CI files we check for the existence of/opt/tf-a/${TEST_PY_BD}and if found, copy bl1.bin and fip.bin to /tmp and set the variables so that we can later run FVP to run.[...]
Applied to u-boot/master, thanks!
[1/1] Docker, CI: Add vexpress_fvp / vexpress_fvp_bloblist support
commit: d75998b476de439a05b2f7ec95d426410bcaae18
Signature · 1 line
Tom