diff --git a/.codeclimate.yml b/.codeclimate.yml index 821f402ffce2a618d8fa4231757def3b2415f52e..592f42757ad022e331e142de8a95c1cef6869c7c 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -42,8 +42,7 @@ plugins: - "*.yml" - "*.yaml" - "*.json" - - "/meta-cassini-*" - - "/gitlab/" + - "/meta-cassini-*/**/*" - "*.png" - "/documentation/conf.py" - "/documentation/variables.py" @@ -57,6 +56,7 @@ plugins: - ".csslintrc" - ".eslintignore" - ".gitignore" + - "/build/" dict_path: "meta-cassini-config/qa-checks/cassini-dictionary" yamllint: enabled: true diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 022ec98153b6393e8d3b1ddd04217cbf3bcc8650..ac35e2bcfb776f9bc6cc94614f1a2f7ab67d99ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,8 @@ variables: BUILD_PLATFORM: value: none description: Comma seperated list of platforms to build - (none, all-platforms, corstone1000-mps3, n1sdp) + (none, all-platforms, corstone1000-mps3, corstone1000-fvp, + n1sdp) BUILD_HOST_ARCH: value: arm64 description: What build host architecture should be used diff --git a/.gitlab/Dockerfiles/cs1k-fvp-test-image/Dockerfile b/.gitlab/Dockerfiles/cs1k-fvp-test-image/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3e25264f06978472e7f450a4e6fd26a705af64b9 --- /dev/null +++ b/.gitlab/Dockerfiles/cs1k-fvp-test-image/Dockerfile @@ -0,0 +1,58 @@ +# Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: MIT +ARG DOCKERHUB_MIRROR= + +FROM ${DOCKERHUB_MIRROR}ubuntu:focal + +ARG MODEL="Corstone-1000-23" +ARG MODEL_CODE="FVP_Corstone_1000" +ARG MODEL_VERSION="11.19_21" +ARG FVP_ARCH="Linux64" + +RUN apt-get update \ + && apt-get install --no-install-recommends --yes \ + bc \ + ca-certificates \ + curl \ + gcc-8 \ + gnupg2 \ + libatomic1 \ + libdbus-1-3 \ + libssl1.1 \ + libvirt-clients \ + libvirt-daemon-system \ + telnet \ + tree \ + software-properties-common \ + unzip \ + wget \ + && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F \ + && add-apt-repository ppa:ubuntu-toolchain-r/test \ + && apt-get install --only-upgrade libstdc++6 -y \ + && apt-get clean \ + && rm -rf /var/cache/apt + +# Create model directory +RUN mkdir /opt/model + +# Setup networking +COPY network /etc/libvirt/hooks/ +COPY entrypoint.sh / +RUN chmod 755 /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] + +# Add FVP and Testing Binaries +ADD "https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/${MODEL}/Linux/${MODEL_CODE}_${MODEL_VERSION}_${FVP_ARCH}.tgz" /tmp/ + +RUN cd /tmp \ + && tar -zxvf "/tmp/${MODEL_CODE}_${MODEL_VERSION}_${FVP_ARCH}.tgz" \ + && ./FVP_Corstone_1000.sh --i-agree-to-the-contained-eula \ + --no-interactive \ + --destination /opt \ + && rm -rf /tmp/* + +EXPOSE 5000/tcp +EXPOSE 5001/tcp +EXPOSE 5002/tcp +EXPOSE 5003/tcp diff --git a/.gitlab/Dockerfiles/cs1k-fvp-test-image/entrypoint.sh b/.gitlab/Dockerfiles/cs1k-fvp-test-image/entrypoint.sh new file mode 100644 index 0000000000000000000000000000000000000000..16ac48bdb07693c12d4989cd36774d46e8ad92f6 --- /dev/null +++ b/.gitlab/Dockerfiles/cs1k-fvp-test-image/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: MIT + +# Start libvirt daemon +if [ -z "$SKIP_LIBVIRT" ] ; then + /usr/sbin/libvirtd & +fi + +# Continue with specified command +exec "$@" diff --git a/.gitlab/Dockerfiles/cs1k-fvp-test-image/network b/.gitlab/Dockerfiles/cs1k-fvp-test-image/network new file mode 100644 index 0000000000000000000000000000000000000000..f04eee2795728c86db1f250f65cd1843a8a490d1 --- /dev/null +++ b/.gitlab/Dockerfiles/cs1k-fvp-test-image/network @@ -0,0 +1,15 @@ +#!/bin/bash +# Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: MIT + +# If the change occurs to the "default" libvirt managed network +if [ "${1}" = "default" ] ; then + # If the network is started + if [ "${2}" = "started" ] ; then + ip tuntap add mode tap tap01 + ip link set tap01 promisc on + ip link set tap01 up + brctl addif virbr0 tap01 + fi +fi diff --git a/.gitlab/ci/corstone1000-image-builds.yml b/.gitlab/ci/corstone1000-image-builds.yml index d0fd4ca55cc24ef98508301743d057ce37b8657e..cd16c6b95b6728ebc803b1f50c8c3322c9497c42 100644 --- a/.gitlab/ci/corstone1000-image-builds.yml +++ b/.gitlab/ci/corstone1000-image-builds.yml @@ -10,6 +10,7 @@ RUN_TESTS: 'none' +# Corstone-1000 MPS3 builds cassini/tests/corstone1000-mps3: extends: .corstone1000_generator variables: @@ -60,3 +61,65 @@ cassini-sdk/corstone1000-mps3: $BUILD_PLATFORM =~ /corstone1000-mps3/)' - !reference [".build-image:rules:k3s-sdk", rules] - !reference [".build-image:rules:corstone1000", rules] + +# Corstone-1000 FVP builds +cassini/tests/corstone1000-fvp: + extends: .corstone1000_generator + variables: + MACHINE: corstone1000-fvp + BUILD_HOST_ARCH: x86_64 + RUN_TESTS: sanity + rules: + - if: '($BUILD_IMAGE =~ /all-images/ || $BUILD_IMAGE =~ /k3s/) && + ($BUILD_PLATFORM =~ /all-platforms/ || + $BUILD_PLATFORM =~ /corstone1000-fvp/)' + - !reference [".build-image:rules:k3s", rules] + - !reference [".build-image:rules:corstone1000", rules] + +cassini/security/tests/corstone1000-fvp: + extends: .corstone1000_generator + variables: + MACHINE: corstone1000-fvp + BUILD_HOST_ARCH: x86_64 + RUN_TESTS: sanity + rules: + - if: '($BUILD_IMAGE =~ /all-images/ || $BUILD_IMAGE =~ /k3s/) && + ($BUILD_PLATFORM =~ /all-platforms/ || + $BUILD_PLATFORM =~ /corstone1000-fvp/)' + - !reference [".build-image:rules:k3s-security", rules] + - !reference [".build-image:rules:corstone1000", rules] + +cassini-dev/tests/corstone1000-fvp: + extends: .corstone1000_generator + variables: + MACHINE: corstone1000-fvp + BUILD_HOST_ARCH: x86_64 + RUN_TESTS: sanity + rules: + - if: '($BUILD_IMAGE =~ /all-images/ || $BUILD_IMAGE =~ /k3s/) && + ($BUILD_PLATFORM =~ /all-platforms/ || + $BUILD_PLATFORM =~ /corstone1000-fvp/) + && ($FREQUENCY == "nightly")' + +cassini-dev/security/tests/corstone1000-fvp: + extends: .corstone1000_generator + variables: + MACHINE: corstone1000-fvp + BUILD_HOST_ARCH: x86_64 + RUN_TESTS: sanity + rules: + - if: '($BUILD_IMAGE =~ /all-images/ || $BUILD_IMAGE =~ /k3s/) && + ($BUILD_PLATFORM =~ /all-platforms/ || + $BUILD_PLATFORM =~ /corstone1000-fvp/) + && ($FREQUENCY == "nightly")' + +cassini-sdk/corstone1000-fvp: + extends: .corstone1000_generator + variables: + MACHINE: corstone1000-fvp + rules: + - if: '($BUILD_IMAGE =~ /all-images/ || $BUILD_IMAGE =~ /k3s/) && + ($BUILD_PLATFORM =~ /all-platforms/ || + $BUILD_PLATFORM =~ /corstone1000-fvp/)' + - !reference [".build-image:rules:k3s-sdk", rules] + - !reference [".build-image:rules:corstone1000", rules] diff --git a/.gitlab/ci/docker-image-builds.yml b/.gitlab/ci/docker-image-builds.yml index 2e5638b7bce32f0abad92ff14d3e2becc4b3ef07..80a0c415ef0f48a0a670536830422902169aaa5c 100644 --- a/.gitlab/ci/docker-image-builds.yml +++ b/.gitlab/ci/docker-image-builds.yml @@ -4,7 +4,8 @@ --- # Conditions .if-new-merge-request: &if-new-merge-request - if: '$CI_MERGE_REQUEST_IID && ($CI_MERGE_REQUEST_PROJECT_ID != $CI_MERGE_REQUEST_SOURCE_PROJECT_ID)' + if: "$CI_MERGE_REQUEST_IID && + ($CI_MERGE_REQUEST_PROJECT_ID != $CI_MERGE_REQUEST_SOURCE_PROJECT_ID)" Build-Utility-Docker-Arch-Image: extends: .build-docker-image diff --git a/.gitlab/ci/lava-test-fvp-build.yml b/.gitlab/ci/lava-test-fvp-build.yml new file mode 100644 index 0000000000000000000000000000000000000000..406c7f1ade06dc31054af6d9d33460e369648c3d --- /dev/null +++ b/.gitlab/ci/lava-test-fvp-build.yml @@ -0,0 +1,49 @@ +# Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: MIT +--- +# FVP is not available for arm based hosts yet +Fetch-FVP-Version-Info: + extends: .kas_build_cassini + stage: Setup + tags: + - x86_64 + # Store the build artifacts from the job. The download urls of these + # artifacts are later used by lava jobs to download and test the image. + variables: + KAS_CONFIGS: "cassini/tests/corstone1000-fvp" + FVP_CORSTONE1000_EULA_ACCEPT: "True" + script: + # Run build + - echo "Building target $KAS_CONFIGS" + - KASFILES=$(./.gitlab/scripts/jobs-to-kas ${KAS_CONFIGS}) + - echo KASFILES = $KASFILES + - export BB_NUMBER_THREADS="${KUBERNETES_CPU_REQUEST}" + - export PARALLEL_MAKE="-j ${KUBERNETES_CPU_REQUEST}" + - kas shell + --update + --force-checkout $KASFILES + -c 'bitbake -e fvp-corstone1000-native' > fvp_data.txt + - grep '^MODEL' fvp_data.txt | tr -d '"' > fvp_data.env + - grep '^PV' fvp_data.txt | tr -d '"' >> fvp_data.env + artifacts: + paths: + - fvp_data.env + reports: + dotenv: fvp_data.env + expire_in: "1 days" + +Build-FVP-Docker-Image: + extends: .build-docker-image + stage: Build + variables: + DOCKER_IMAGE_NAME: cs1k-fvp-test-image + BUILD_CONTEXT: $CI_PROJECT_DIR/.gitlab/Dockerfiles/$DOCKER_IMAGE_NAME + BUILDAH_ARGS: --build-arg ARMLMD_LICENSE_FILE=${ARMLMD_LICENSE_FILE} + needs: + - Fetch-FVP-Version-Info + script: + - BUILDAH_ARGS="${BUILDAH_ARGS} --build-arg MODEL=${MODEL}" + - BUILDAH_ARGS="${BUILDAH_ARGS} --build-arg MODEL_CODE=${MODEL_CODE}" + - BUILDAH_ARGS="${BUILDAH_ARGS} --build-arg MODEL_VERSION=${PV}" + - !reference [".build-docker-image", script] diff --git a/.gitlab/ci/lava-test.yml b/.gitlab/ci/lava-test.yml index 14c7377a817b7ed576517bba477fe579c4f1118b..1875545a1b4f69e6461da645aa5c52efb61a78c3 100644 --- a/.gitlab/ci/lava-test.yml +++ b/.gitlab/ci/lava-test.yml @@ -14,15 +14,18 @@ script: - mkdir cassini-firmware - pushd cassini-firmware + - joburl=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID} + - datafile=${CI_PROJECT_DIR}/build_data.env - | case "${MACHINE}" in 'n1sdp') echo "Building SD Card image for N1SDP" + fwfile=cassini-firmware.zip # Update the PMIC_FORCE parameter in the config.txt file in the # firmware package to TRUE. # Setting it to FALSE will require user input so the boot process # halts. - fwtar=${MACHINE}-board-firmware_primary.tar.gz + fwtar=${FW_IMAGE}-board-firmware_primary.tar.gz tar -zxvf ../work/build/tmp/deploy/images/${MACHINE}/${fwtar} config="PMIC_FORCE:" current_value=" FALSE" @@ -36,10 +39,13 @@ current_value=" 0" new_value=" 1" sed -i "s/$config$current_value/$config$new_value/" config.txt - zip -r ../cassini-firmware.zip * + zip -r ../${fwfile} * + echo "FIRMWARE_ARTIFACT_URL=${joburl}/artifacts/${fwfile}" \ + >> ${datafile} ;; 'corstone1000-mps3') echo "Building FPGA image set for Corstone1000 MPS3 board" + fwfile=cassini-firmware.zip mkdir -p ~/.ssh eval "$(ssh-agent -s)" if [ -n "${SSH_PRIVATE_GERRIT+x}" ]; then @@ -50,31 +56,34 @@ https://${CI_SERVER_HOST} git clone https://${CI_SERVER_HOST}/${CORSTONE1000_CI_PATH} export \ - BUILD_DIR=$(pwd)/../work/build/tmp/deploy/images/corstone1000-mps3/ + BUILD_DIR=$(pwd)/../work/build/tmp/deploy/images/corstone1000-mps3 # The `LavaPrepTool.py` requires specfic file name to prep for lava cp ${BUILD_DIR}/corstone1000-image-${MACHINE}.wic.nopt \ - ${BUILD_DIR}/corstone1000-flash-firmware-image-${MACHINE}.wic.nopt + ${BUILD_DIR}/corstone1000-flash-firmware-image-${MACHINE}.wic.nopt python3 corstone1000-ci/LavaPrepTool.py create_mps3 --config \ - corstone1000-ci/configs/cassini_create_mps3.yml + corstone1000-ci/configs/cassini_create_mps3.yml # LavaPrepTool creates this under cassini-firmware/, but Gitlab is # looking in the parent directory. So we move it. - mv cassini-firmware.zip ../ + mv ${fwfile} ../ + echo "FIRMWARE_ARTIFACT_URL=${joburl}/artifacts/${fwfile}" \ + >> ${datafile} + ;; + 'corstone1000-fvp') + echo "Nothing to be done for Corstone1000 FVP" + echo "FIRMWARE_ARTIFACT_URL=${FW_IMAGE_ARTIFACT_URL}" >> ${datafile} ;; - *) + *) echo "Unkown machine ${MACHINE}" exit 1 ;; esac - - joburl=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID} - - fwfile=cassini-firmware.zip - - datafile=${CI_PROJECT_DIR}/build_data.env - - echo "FIRMWARE_ARTIFACT_URL=${joburl}/artifacts/${fwfile}" >> ${datafile} - popd # cassini-firmware - cat ${CI_PROJECT_DIR}/build_data.env artifacts: paths: - - build_data.env - - cassini-firmware.zip + - "build_data.env" + - "cassini-firmware.zip" + - "**/*.fvpconf" reports: dotenv: build_data.env expire_in: "1 days" @@ -92,8 +101,32 @@ private_token=${CASSINI_CI_LAYERS_TOKEN} BL1_ARTIFACT: ${BL1_IMAGE_ARTIFACT_URL}? private_token=${CASSINI_CI_LAYERS_TOKEN} - FLASH_ARTIFACT: ${FW_IMAGE_ARTIFACT_URL}? + EXTSYS_ARTIFACT: ${EXTSYS_IMAGE_ARTIFACT_URL}? + private_token=${CASSINI_CI_LAYERS_TOKEN} LAVA_JOB_TEMPLATE: .gitlab/lava/$MACHINE/$LAVA_JOB.j2 + script: + # Fill in job template with image locations + - | + if [ ${MACHINE} == 'corstone1000-fvp' ]; then + j2 ${LAVA_JOB_TEMPLATE} -o ${LAVA_JOB}.tmp + pushd ${ARTIFACT_DIR} + FVP_CONFIG_FILE=$(readlink ${FVP_CONFIG}-${MACHINE}.fvpconf) + popd + python3 .gitlab/scripts/fvpconf-to-lava.py \ + "${ARTIFACT_DIR}/${FVP_CONFIG_FILE}" \ + "${LAVA_JOB}.tmp" \ + "${LAVA_JOB}.tmp.j2" + export LAVA_JOB_TEMPLATE="${LAVA_JOB}.tmp.j2" + fi + - !reference [".submit-lava-job", script] + artifacts: + paths: + - test_data.env + - $LAVA_JOB.tmp + - $LAVA_JOB.tmp.j2 + reports: + dotenv: test_data.env + expire_in: 1 day .ptest-tests: extends: .submit-cassini-lava-job diff --git a/.gitlab/ci/templates/image_build.yml.j2 b/.gitlab/ci/templates/image_build.yml.j2 index a19c6a9d80043a2c8c0c5d3eb5a2030f79d29f99..1127eb4923f7eed03657f8c1f3bca0c767c96356 100644 --- a/.gitlab/ci/templates/image_build.yml.j2 +++ b/.gitlab/ci/templates/image_build.yml.j2 @@ -16,12 +16,16 @@ Image-Build-{{ CI_JOB_NAME_SLUG }}: - pushd ${KAS_WORK_DIR}/build/tmp/deploy/images/{{ MACHINE }} - export IMAGE=$(ls -- *-{{ MACHINE }}.wic.bmap | sed "s/-{{ MACHINE }}\.wic\.bmap//") - export ARTIFACT_DIR="$(realpath --relative-to=${CI_PROJECT_DIR} ${KAS_WORK_DIR})/build/tmp/deploy/images/{{ MACHINE }}" + - echo "ARTIFACT_DIR=${ARTIFACT_DIR}" > ${CI_PROJECT_DIR}/build_data.env - echo "ARTIFACT_DIR = ${ARTIFACT_DIR}" - - echo "BMAP_ARTIFACT_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/${ARTIFACT_DIR}/$(readlink ${IMAGE}-{{ MACHINE }}.wic.bmap)" > ${CI_PROJECT_DIR}/build_data.env + - echo "BMAP_ARTIFACT_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/${ARTIFACT_DIR}/$(readlink ${IMAGE}-{{ MACHINE }}.wic.bmap)" >> ${CI_PROJECT_DIR}/build_data.env - echo "IMAGE_ARTIFACT_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/${ARTIFACT_DIR}/$(readlink ${IMAGE}-{{ MACHINE }}.wic.gz)" >> ${CI_PROJECT_DIR}/build_data.env - echo "IMAGE=${IMAGE}" >> ${CI_PROJECT_DIR}/build_data.env - echo "ARTIFACT_DIR=${ARTIFACT_DIR}" >> ${CI_PROJECT_DIR}/build_data.env -{% if MACHINE == 'corstone1000-mps3' %} +{% if MACHINE == 'n1sdp' %} + - export FW_IMAGE=$(ls -- *-board-firmware_primary.tar.gz | sed "s/-board-firmware_primary\.tar\.gz//") + - echo "FW_IMAGE=${FW_IMAGE}" >> ${CI_PROJECT_DIR}/build_data.env +{% elif MACHINE.startswith('corstone1000') %} - echo "BL1_IMAGE_ARTIFACT_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/work/build/tmp/deploy/images/{{ MACHINE }}/bl1.bin" >> ${CI_PROJECT_DIR}/build_data.env - echo "BL1_IMAGE=bl1.bin" >> ${CI_PROJECT_DIR}/build_data.env - export UTIL_IMAGE=$(ls -- *-{{ MACHINE }}.tar.bz2 | sed "s/-{{ MACHINE }}\.tar\.bz2//") @@ -30,6 +34,14 @@ Image-Build-{{ CI_JOB_NAME_SLUG }}: - export FW_IMAGE=$(ls -- *-{{ MACHINE }}.wic.nopt | sed "s/-{{ MACHINE }}\.wic\.nopt//") - echo "FW_IMAGE_ARTIFACT_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/work/build/tmp/deploy/images/{{ MACHINE }}/$(readlink ${FW_IMAGE}-{{ MACHINE }}.wic.nopt)" >> ${CI_PROJECT_DIR}/build_data.env - echo "FW_IMAGE=${FW_IMAGE}" >> ${CI_PROJECT_DIR}/build_data.env + - echo "EXTSYS_IMAGE_ARTIFACT_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/work/build/tmp/deploy/images/{{ MACHINE }}/es_flashfw.bin" >> ${CI_PROJECT_DIR}/build_data.env + - echo "EXTSYS_IMAGE=es_flashfw.bin" >> ${CI_PROJECT_DIR}/build_data.env +{% if MACHINE == 'corstone1000-fvp' %} + - export FVP_CONFIG=$(ls -- *-{{ MACHINE }}.fvpconf | sed "s/-{{ MACHINE }}\.fvpconf//") + - echo "FVP_CONFIG_ARTIFACT_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/work/build/tmp/deploy/images/{{ MACHINE }}/$(readlink ${FVP_CONFIG}-{{ MACHINE }}.fvpconf)" >> ${CI_PROJECT_DIR}/build_data.env + - echo "FVP_CONFIG=${FVP_CONFIG}" >> ${CI_PROJECT_DIR}/build_data.env + - echo "IMAGE_ARTIFACT_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/${ARTIFACT_DIR}/$(readlink ${IMAGE}-{{ MACHINE }}.wic.pad.gz)" >> ${CI_PROJECT_DIR}/build_data.env +{% endif %} {% endif %} # Store built images - | @@ -37,15 +49,21 @@ Image-Build-{{ CI_JOB_NAME_SLUG }}: flock --timeout 120 200 rm -rf ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }} mkdir --parents ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }} - cp $(readlink ${IMAGE}-{{ MACHINE }}.wic.bmap) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/ - cp $(readlink ${IMAGE}-{{ MACHINE }}.wic.bz2) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/ + cp $(readlink ${IMAGE}-{{ MACHINE }}.wic.bmap) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/${IMAGE}-{{ MACHINE }}.wic.bmap + cp $(readlink ${IMAGE}-{{ MACHINE }}.wic.gz) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/${IMAGE}-{{ MACHINE }}.wic.gz {% if MACHINE == 'n1sdp' %} - cp *-board-firmware_primary.tar.gz ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/ -{% elif MACHINE == 'corstone1000-mps3' %} - cp bl1.bin ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/ - cp $(readlink ${UTIL_IMAGE}-{{ MACHINE }}.tar.bz2) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/ - cp $(readlink ${FW_IMAGE}-{{ MACHINE }}.wic.nopt) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/ -{% else %} + cp ${FW_IMAGE}-board-firmware_primary.tar.gz ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/${FW_IMAGE}-board-firmware_primary.tar.gz +{% elif MACHINE.startswith('corstone1000') %} + cp bl1.bin ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/bl1.bin + cp es_flashfw.bin ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/es_flashfw.bin + cp $(readlink ${FW_IMAGE}-{{ MACHINE }}.wic.nopt) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/${FW_IMAGE}-{{ MACHINE }}.wic.nopt + if [ -e ${UTIL_IMAGE}-{{ MACHINE }}.tar.bz2 ]; then + cp $(readlink ${UTIL_IMAGE}-{{ MACHINE }}.tar.bz2) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/${UTIL_IMAGE}-{{ MACHINE }}.tar.bz2 + fi +{% if MACHINE == 'corstone1000-fvp' %} + cp $(readlink ${FVP_CONFIG}-{{ MACHINE }}.fvpconf) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/${FVP_CONFIG}-{{ MACHINE }}.fvpconf + cp $(readlink ${IMAGE}-{{ MACHINE }}.wic.pad.gz) ${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}/${IMAGE}-{{ MACHINE }}.wic.pad.gz +{% endif %} {% endif %} ) 200>${IMAGE_DIR}/{{ CI_JOB_NAME_SLUG }}.lock - popd # ${KAS_WORK_DIR}/build/tmp/deploy/images/{{ MACHINE }} @@ -57,11 +75,15 @@ Image-Build-{{ CI_JOB_NAME_SLUG }}: - $KAS_WORK_DIR/build/tmp/deploy/images/{{ MACHINE }}/*-*-*.wic.bmap {% if MACHINE == 'n1sdp' %} - $KAS_WORK_DIR/build/tmp/deploy/images/{{ MACHINE }}/*-board-firmware_primary.tar.gz -{% elif MACHINE == 'corstone1000-mps3' %} - - $KAS_WORK_DIR//build/tmp/deploy/images/{{ MACHINE }}/bl1.bin - - $KAS_WORK_DIR//build/tmp/deploy/images/{{ MACHINE }}/*-*-*.wic.nopt - - $KAS_WORK_DIR//build/tmp/deploy/images/{{ MACHINE }}/*-*-*.tar.bz2 -{% else %} +{% elif MACHINE.startswith('corstone1000') %} + - $KAS_WORK_DIR/build/tmp/deploy/images/{{ MACHINE }}/bl1.bin + - $KAS_WORK_DIR/build/tmp/deploy/images/{{ MACHINE }}/es_flashfw.bin + - $KAS_WORK_DIR/build/tmp/deploy/images/{{ MACHINE }}/*-*-*.wic.nopt + - $KAS_WORK_DIR/build/tmp/deploy/images/{{ MACHINE }}/*-*-*.tar.bz2 +{% if MACHINE == 'corstone1000-fvp' %} + - $KAS_WORK_DIR/build/tmp/deploy/images/{{ MACHINE }}/*-*-*.fvpconf + - $KAS_WORK_DIR/build/tmp/deploy/images/{{ MACHINE }}/*-*-*.wic.pad.gz +{% endif %} {% endif %} - build_data.env reports: @@ -76,6 +98,9 @@ Lava-Test-Prep-{{ CI_JOB_NAME_SLUG }}: extends: .test-preparation needs: - Image-Build-{{ CI_JOB_NAME_SLUG }} +{% if MACHINE == 'corstone1000-fvp' %} + - Build-FVP-Docker-Image +{% endif %} variables: MACHINE: "{{ MACHINE }}" diff --git a/.gitlab/ci/trigger-image-builds.yml b/.gitlab/ci/trigger-image-builds.yml index 667b041824a31be1dc2e10d9139e74b68302808c..987830a8ced60d03f38b3f22af833174a818ff64 100644 --- a/.gitlab/ci/trigger-image-builds.yml +++ b/.gitlab/ci/trigger-image-builds.yml @@ -28,6 +28,16 @@ merge_jobs: optional: true - job: cassini-dev/security/tests/corstone1000-mps3 optional: true + - job: cassini/tests/corstone1000-fvp + optional: true + - job: cassini/security/tests/corstone1000-fvp + optional: true + - job: cassini-sdk/corstone1000-fvp + optional: true + - job: cassini-dev/tests/corstone1000-fvp + optional: true + - job: cassini-dev/security/tests/corstone1000-fvp + optional: true before_script: - | cat << EOF > ${CI_JOB_FILE} @@ -39,10 +49,12 @@ merge_jobs: - gitlab-ci/yocto-build-base_gitlab-ci.yml - gitlab-ci/kas-build-base_gitlab-ci.yml - gitlab-ci/lava-test-base_gitlab-ci.yml + - gitlab-ci/docker-image-base_gitlab-ci.yml - local: .gitlab/ci/rules.yml - local: .gitlab/ci/cassini-build.yml - local: .gitlab/ci/yocto-qa.yml - local: .gitlab/ci/lava-test.yml + - local: .gitlab/ci/lava-test-fvp-build.yml EOF trigger_jobs: diff --git a/.gitlab/lava/corstone1000-fvp/sanity_job.yml.j2 b/.gitlab/lava/corstone1000-fvp/sanity_job.yml.j2 new file mode 100644 index 0000000000000000000000000000000000000000..a1e106a6dc5e92c5b878ac5351a20c26ca40e6d1 --- /dev/null +++ b/.gitlab/lava/corstone1000-fvp/sanity_job.yml.j2 @@ -0,0 +1,90 @@ +# Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: MIT +--- +device_type: fvp +job_name: {{ CI_JOB_NAME }} + +timeouts: + connection: + minutes: 3 + job: + minutes: 80 + actions: + auto-login-action: + minutes: 5 + fvp-deploy: + minutes: 20 + download-retry: + minutes: 20 + http-download: + minutes: 20 + +metadata: + source: {{ CI_PROJECT_URL }} + path: .gitlab/lava/corstone1000-fvp/sanity_job.yml.j2 + gitlab-job-url: {{ CI_JOB_URL }} + +priority: medium +visibility: + group: + - cassini + +notify: + criteria: + status: finished + callbacks: + - url: "{{ CI_API_V4_URL }}/projects/{{ CI_PROJECT_ID }}/jobs/{{ TEST_COMPLETE_JOB_ID }}/play" + method: POST + token: "{{ LAVA_CALLBACK_TOKEN }}" + header: "PRIVATE-TOKEN" + dataset: minimal + +actions: +- deploy: + to: fvp + images: + bl1: + url: {{ BL1_ARTIFACT }} + cs1000: + url: {{ FIRMWARE_ARTIFACT }} + extsys: + url: {{ EXTSYS_ARTIFACT }} + mmc0: + url: {{ IMAGE_ARTIFACT }} + compression: gz + +- boot: + method: fvp + docker: + name: "{{ CI_REGISTRY }}/{{ CI_PROJECT_PATH }}/cs1k-fvp-test-image:{{ DOCKER_IMAGE_TAG }}" + image: /opt/models/Linux64_GCC-9.3/FVP_Corstone-1000 + version_string: 'Fast Models [^\\n]+' + timeout: + minutes: 10 + console_string: 'host_terminal_0: Listening for serial connection on port (?P\d+)' + feedbacks: + - '(?Phost_terminal_1): Listening for serial connection on port (?P\d+)' + - '(?Psecenc_terminal): Listening for serial connection on port (?P\d+)' + - '(?Pextsys_terminal): Listening for serial connection on port (?P\d+)' + arguments: + - "-C se.trustedBootROMloader.fname={BL1}" + - "-C board.msd_mmc.p_mmc_file={MMC0}" + - "-C extsys_harness0.extsys_flashloader.fname={EXTSYS}" + - "-C extsys0.extsys_terminal.start_telnet=1" + - "-C host.host_terminal_0.start_telnet=1" + - "-C host.host_terminal_1.start_telnet=1" + - "-C se.secenc_terminal.start_telnet=1" + - "--data board.flash0={CS1000}@0x68100000" + auto_login: + login_prompt: 'corstone1000-fvp login:.*' + username: cassini + login_commands: + - cassini123 + - cassini123 + - sudo su - + prompts: + - 'New password: ' + - 'Re-enter new password: ' + - '@corstone1000-fvp:.+\$ ' + - '@corstone1000-fvp:.+# ' diff --git a/.gitlab/lava/corstone1000-mps3/sanity_job.yml.j2 b/.gitlab/lava/corstone1000-mps3/sanity_job.yml.j2 index feadfc9289277f38a1204ff87bebe29c060896dd..eecf6e042d5f1dbec2bef3a8c969bd4f079b52e9 100644 --- a/.gitlab/lava/corstone1000-mps3/sanity_job.yml.j2 +++ b/.gitlab/lava/corstone1000-mps3/sanity_job.yml.j2 @@ -133,9 +133,11 @@ actions: login_prompt: 'corstone1000-mps3 login:.*' username: cassini login_commands: - - cassini123 - - cassini123 + - cassini123 + - cassini123 + - sudo su - prompts: - 'New password: ' - 'Re-enter new password: ' - - '(.*)corstone1000-mps3:' + - '@corstone1000-mps3:.+\$ ' + - '@corstone1000-mps3:.+# ' diff --git a/.gitlab/scripts/fvpconf-to-lava.py b/.gitlab/scripts/fvpconf-to-lava.py new file mode 100755 index 0000000000000000000000000000000000000000..d1d98c2680976aa80396040cc630a488bed89269 --- /dev/null +++ b/.gitlab/scripts/fvpconf-to-lava.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python3 +# Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: MIT +import argparse +import json +import re +import sys +import yaml + + +def main(): + parser = argparse.ArgumentParser( + description='Adds FVP config options to lava test files') + + parser.add_argument("fvpconf", help="Yocto build generated fvpconf file") + parser.add_argument("lavafile", help="Input lava definition file") + parser.add_argument("lavaout", default="lava_definition.yml", + help="Output lava definition file") + + args = parser.parse_args() + + with open(args.fvpconf, "r") as fvpconf_file: + fvpconf = json.load(fvpconf_file) + + PatchLavaFile(fvpconf, args.lavafile, args.lavaout) + + +def PatchLavaFile(fvpconf, lavafile, lavaout): + with open(lavafile) as lavafile: + lavadata = yaml.safe_load(lavafile) + + # Update the fvpconf with parts of lava script that need retaining + for action in lavadata['actions']: + if "boot" in action and action['boot']['method'] == "fvp": + fvpconf = ParseArgs(fvpconf, action['boot']['arguments']) + + newArguments = [] + for arg, data in fvpconf['parameters'].items(): + newArguments.append("-C " + arg + "=\"" + data + "\"") + + for data in fvpconf['data']: + newArguments.append("--data " + data) + + # Now update the lava file data with the fvpconf + for i in range(len(lavadata['actions'])): + if ("boot" in lavadata['actions'][i] and + lavadata['actions'][i]['boot']['method'] == "fvp"): + lavadata['actions'][i]['boot']['arguments'] = newArguments + + # And finally output the new file + with open(lavaout, 'w') as lavaout: + yaml.dump(lavadata, lavaout, + default_flow_style=False) + + +def ParseArgs(fvpconf, lavaargs): + cargs = {} + data = {} + + finddata = re.compile(r'^(-(C|-data))\s+(.+)?=(.+)$') + findreplacement = re.compile(r'^.*{[0-9A-Z_]+}.*$') + for arg in lavaargs: + # print(arg) + match = finddata.match(arg) + + argtype = match.group(1) + argname = match.group(3) + argdata = match.group(4) + + if findreplacement.match(argdata): + # print("Found: " + argtype) + if argtype == "-C": + cargs[argname] = argdata + elif argtype == "--data": + data[argname + "="] = argdata + else: + print("Unnknown arg type found: " + argtype) + + # parameters is a dictionary + fvpconf['parameters'].update(cargs) + # data is a list of strings + for i in range(len(fvpconf['data'])): + if fvpconf['data'][i].startswith(tuple(data.keys())): + elementname = fvpconf['data'][i].split('=')[0] + "=" + # Need to sort out the load address if one exists + # as we want the version from the fvpconf file + # not the origional in the lava file + loadaddress = fvpconf['data'][i].split('@')[1] + if loadaddress != "": + loadaddress = "@" + loadaddress + fvpconf['data'][i] = elementname + \ + data[elementname].split('@')[0] + loadaddress + + return fvpconf + + +if __name__ == '__main__': + main() diff --git a/documentation/user_manual/corstone1000fvp.rst b/documentation/user_manual/corstone1000fvp.rst new file mode 100644 index 0000000000000000000000000000000000000000..8d3d73e055e10228d9dec13313d26525bb87d5bc --- /dev/null +++ b/documentation/user_manual/corstone1000fvp.rst @@ -0,0 +1,83 @@ +.. + # Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. + # + # SPDX-License-Identifier: MIT + +########################################## +Getting Started with Arm Corstone-1000 FVP +########################################## + +This document explains how to boot the Cassini distro on the Arm Corstone-1000 FVP. + +***** +Build +***** + +The provided kas configuration file meta-cassini-config/kas/corstone1000-fvp.yml can be used to build images +that are targeting the Corstone-1000 FVP. + +.. note:: + To build and run any image for the Corstone-1000 FVP the user has to + accept its |EULA|_, which can be done by executing + the following command in the build environment: + + .. code-block:: console + + export FVP_CORSTONE1000_EULA_ACCEPT=True + + +Building FVP images +=================== + +To build a Corstone-1000 FVP image: + + .. code-block:: console + + kas build --update meta-cassini-config/kas/cassini.yml:meta-cassini-config/kas/corstone1000-fvp.yml + +*** +Run +*** + +The resulting Cassini distribution image can be logged into as ``root`` user. + +Running the FVP +=============== + +To start the FVP and get the console: + + .. code-block:: console + + kas shell -c="../layers/meta-arm/scripts/runfvp --verbose --console" \ + meta-cassini-config/kas/cassini.yml:meta-cassini-config/kas/corstone1000-fvp.yml + +.. _reproduce_run-time_integration_tests: + +********** +Validation +********** + +The following validation tests can be performed on the Cassini Reference Stack: + + * System Integration Tests: + + * Cassini Architecture Stack: + + .. code-block:: console + + TESTIMAGE_AUTO=1 kas build meta-cassini-config/kas/cassini.yml:meta-cassini-config/kas/corstone1000-fvp.yml + + The previous test takes around 2 minutes to complete. + + A similar output should be printed out: + + .. code-block:: console + + NOTE: Executing Tasks + Creating terminal default on host_terminal_0 + default: Waiting for login prompt + RESULTS: + RESULTS - linuxboot.LinuxBootTest.test_linux_boot: PASSED (23.70s) + SUMMARY: + cassini-image-base () - Ran 1 test in 23.704s + cassini-image-base - OK - All required tests passed (successes=1, skipped=0, failures=0, errors=0) diff --git a/documentation/user_manual/index.rst b/documentation/user_manual/index.rst index cf1a84e6bd45d3c3db6ffbba4d6293c577d2d341..1bf88c6f17e083878ef7476209dc2e9c88202e25 100644 --- a/documentation/user_manual/index.rst +++ b/documentation/user_manual/index.rst @@ -12,3 +12,4 @@ User Manual build corstone1000 + corstone1000fvp diff --git a/documentation/variables.py b/documentation/variables.py index b464d0b99f1cc2f6a49a3a9958ac8d750da71d97..b819bf3ead7194766d724bd1b1499ef007f19cbb 100644 --- a/documentation/variables.py +++ b/documentation/variables.py @@ -61,6 +61,7 @@ general_links = { "link:Nginx": "https://www.nginx.com/", "link:Potential firmware damage notice": "https://community.arm.com/developer/tools-software/oss-platforms/w/docs/604/notice-potential-damage-to-n1sdp-boards-if-using-latest-firmware-release", "link:GitLab Issues": "https://gitlab.arm.com/cassini/meta-cassini/-/issues", + "link:EULA": "https://developer.arm.com/downloads/-/arm-ecosystem-fvps/eula", } layer_definitions = { diff --git a/meta-cassini-bsp/conf/machine/include/corstone1000-fvp-cassini-extra-settings.inc b/meta-cassini-bsp/conf/machine/include/corstone1000-fvp-cassini-extra-settings.inc new file mode 100644 index 0000000000000000000000000000000000000000..dac7b666c17ad2595d392e9bc331ced0d32a0c55 --- /dev/null +++ b/meta-cassini-bsp/conf/machine/include/corstone1000-fvp-cassini-extra-settings.inc @@ -0,0 +1,21 @@ +# Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: MIT + +include conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc + +# FVP parameters +FVP_CONFIG[diagnostics] = "0" +# Corstone-1000's FVP need images to have a extra empty space at the end or the FVP +# truncates the mmc card size resulting in invalid GPT entries as the GPT last block is +# beyond the MMC cards reported size, so we use the padded image here +FVP_CONFIG[board.msd_mmc.p_mmc_file] = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic.pad" +FVP_CONFIG[board.msd_mmc.diagnostics] = "0" +# Setup the second MMC card +FVP_CONFIG[board.msd_mmc_2.card_type] ?= "SDHC" +FVP_CONFIG[board.msd_mmc_2.p_fast_access] ?= "0" +FVP_CONFIG[board.msd_mmc_2.diagnostics] ?= "0" +FVP_CONFIG[board.msd_mmc_2.p_max_block_count] ?= "0xFFFF" +FVP_CONFIG[board.msd_config_2.pl180_fifo_depth] ?= "16" + +FVP_DATA = "board.flash0=${DEPLOY_DIR_IMAGE}/corstone1000-image-corstone1000-fvp.wic.nopt@0x68100000" diff --git a/meta-cassini-bsp/conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc b/meta-cassini-bsp/conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc index eaa9c8921087de4bb12d86e2973130c4bff5630a..ca0422dcbc8ccbdc4c2370c07fdb6cd9cdecab4b 100644 --- a/meta-cassini-bsp/conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc +++ b/meta-cassini-bsp/conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc @@ -2,6 +2,9 @@ # # SPDX-License-Identifier: MIT +# Generate the cassini wic image +IMAGE_FSTYPES += "wic wic.gz wic.bmap" + # Remove initramfs image generation for cassini distribution due to size restrictions INITRAMFS_IMAGE:remove:libc-glibc = "corstone1000-initramfs-image" diff --git a/meta-cassini-bsp/meta-arm/meta-arm-bsp/recipes-core/images/cassini-image-base.bbappend b/meta-cassini-bsp/meta-arm/meta-arm-bsp/recipes-core/images/cassini-image-base.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..7d9485de8812203172702a411ca88212f7786506 --- /dev/null +++ b/meta-cassini-bsp/meta-arm/meta-arm-bsp/recipes-core/images/cassini-image-base.bbappend @@ -0,0 +1,18 @@ +# Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: MIT + +# Corstone-1000's FVP needs images to have a extra empty space at the end or the FVP +# truncates the MMC card resulting in invalid GPT entries as the GPT last block is +# beyond the MMC cards reported size +IMAGE_TYPES += "wic.pad" + +CONVERSIONTYPES += "pad" + +CONVERSION_CMD:pad = "cp ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.pad && dd if=/dev/zero count=1024 bs=512 >> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.pad" + +IMAGE_FSTYPES:append:corstone1000-fvp = " wic.pad.gz" + +# Ensure cassini-image-* also builds the firmware for corstone1000 using a different libc +do_image_complete[depends] = "${@bb.utils.contains_any('MACHINE','corstone1000-mps3 corstone1000-fvp', \ + 'corstone1000-deploy-image:do_deploy', '', d)}" diff --git a/meta-cassini-bsp/meta-arm/meta-arm-bsp/recipes-core/images/corstone1000-deploy-image.bb b/meta-cassini-bsp/meta-arm/meta-arm-bsp/recipes-core/images/corstone1000-deploy-image.bb index ef8a3afc3ca804ae4931f273136f4643475d1032..d4bcca5cf97b7ea63c41c2fdbdeaf7f7a68314b1 100644 --- a/meta-cassini-bsp/meta-arm/meta-arm-bsp/recipes-core/images/corstone1000-deploy-image.bb +++ b/meta-cassini-bsp/meta-arm/meta-arm-bsp/recipes-core/images/corstone1000-deploy-image.bb @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Arm Limited or its affiliates. All rights reserved. +# Copyright (c) 2022-2023 Arm Limited or its affiliates. All rights reserved. # # SPDX-License-Identifier: MIT @@ -8,7 +8,7 @@ inherit deploy nopackages LICENSE = "MIT" PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(corstone1000-mps3)" +COMPATIBLE_MACHINE = "(corstone1000-mps3|corstone1000-fvp)" do_configure[noexec] = "1" do_compile[noexec] = "1" do_install[noexec] = "1" diff --git a/meta-cassini-bsp/meta-arm/meta-arm-bsp/wic/corstone1000-efidisk.wks.in b/meta-cassini-bsp/meta-arm/meta-arm-bsp/wic/corstone1000-efidisk.wks.in index 3a65fd050e96c393580623d963fb456a5d60b3a2..0a7dfef1b999cc616b62721d24434d74bd5e5ade 100644 --- a/meta-cassini-bsp/meta-arm/meta-arm-bsp/wic/corstone1000-efidisk.wks.in +++ b/meta-cassini-bsp/meta-arm/meta-arm-bsp/wic/corstone1000-efidisk.wks.in @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Arm Limited or its affiliates. All rights reserved. +# Copyright (c) 2022-2023 Arm Limited or its affiliates. All rights reserved. # # SPDX-License-Identifier: MIT @@ -6,8 +6,8 @@ # long-description: Creates a partitioned EFI disk image that the user # can directly dd to boot media. Uses a custom grub.cfg file to configure the boot. -part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024 +part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --label msdos --align 1024 --use-uuid --active -part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024 --uuid=6a60524d-061d-454a-bfd1-38989910eccd +part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid --uuid 6a60524d-061d-454a-bfd1-38989910eccd bootloader --ptable gpt --configfile="${GRUB_CFG_FILE}" --timeout=5 diff --git a/meta-cassini-config/kas/ci.yml b/meta-cassini-config/kas/ci.yml index cfaf286b418f52e875259b820594ec63fd28d30a..d37131db30dff661065d91eecc8f38159a4662b9 100644 --- a/meta-cassini-config/kas/ci.yml +++ b/meta-cassini-config/kas/ci.yml @@ -5,6 +5,10 @@ --- header: version: 11 + +env: + FVP_CORSTONE1000_EULA_ACCEPT: "True" + local_conf_header: ci: | INHERIT += "rm_work" diff --git a/meta-cassini-config/kas/corstone1000-fvp.yml b/meta-cassini-config/kas/corstone1000-fvp.yml new file mode 100644 index 0000000000000000000000000000000000000000..e13de00e2146abef2192fca31f30226c9af7ba58 --- /dev/null +++ b/meta-cassini-config/kas/corstone1000-fvp.yml @@ -0,0 +1,23 @@ +# Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: MIT + +--- +header: + version: 11 + includes: + - meta-cassini-config/kas/corstone1000-mps3.yml + +env: + FVP_CORSTONE1000_EULA_ACCEPT: "False" + TESTIMAGE_AUTO: "0" + +local_conf_header: + fvp-config: | + INHERIT += "${@bb.utils.contains(\ + 'BUILD_ARCH', 'x86_64', 'fvpboot', '', d)}" + LICENSE_FLAGS_ACCEPTED:append = " ${@oe.utils.vartrue(\ + 'FVP_CORSTONE1000_EULA_ACCEPT', 'Arm-FVP-EULA', '', d)}" + IMAGE_CLASSES:append = " testimage" + +machine: corstone1000-fvp diff --git a/meta-cassini-config/qa-checks/cassini-dictionary b/meta-cassini-config/qa-checks/cassini-dictionary index 454df2d9cb4cb7e346dc06bdfa0a6e144d041d6f..36b2e65af841118db8ffb9e3bc1d9138c3b05055 100644 --- a/meta-cassini-config/qa-checks/cassini-dictionary +++ b/meta-cassini-config/qa-checks/cassini-dictionary @@ -4,6 +4,7 @@ 3.2.1+git0+ab4d0cf908 3rd 4.16+stable0+f265444922 +4gb 512kb CASSINI CHANGELOG.md @@ -29,6 +30,7 @@ baremetal-sdk.yml baremetal.yml baremetal_architecture.png bblayers.conf +binaries bitbake bootloader bsp @@ -71,9 +73,13 @@ containerized containers_kernelcfg_check.bbclass contributing_documentation_build_validation corstone-1000 +corstone1000 +corstone1000-image-corstone1000-mps3.wic.nopt corstone1000-mps3 corstone1000-mps3.yml +corstone1000fvp cortex-a +cortex-a35 customizable customization customizations @@ -96,6 +102,7 @@ docker's docs.lavasoftware.org dom0 domu +download-fpga-images e.g efi endpoint @@ -106,6 +113,8 @@ filesystem filesystems foobar forking_workflow.html +fpga +fpga-prototyping-boards frobbing functionalities fvp @@ -174,6 +183,7 @@ manual_build_system_target_platforms manual_yocto_layers_layer_dependency_overview maxdepth mb +mcc merchantability merge_requests meta-arm-bsp @@ -198,6 +208,7 @@ oci openembedded optionally ostree +output_dir parallaxsecond parsec-cli-tests.sh parsec-simple-e2e-tests @@ -248,6 +259,7 @@ runtime-integration-tests sc2086 sc2288 schedulable +sd sdk sdl seccomp @@ -286,6 +298,7 @@ systemd systemready tests.yml titlesonly +tmp toctree top_level_test_name ua_test_clean_env diff --git a/meta-cassini-distro/classes/cassini-image.bbclass b/meta-cassini-distro/classes/cassini-image.bbclass index 072361fe64a75a7ca043f22a6867bb0c4e9b57a7..4e3ae750746d3051736c8f2a2ee99e38cca32f42 100644 --- a/meta-cassini-distro/classes/cassini-image.bbclass +++ b/meta-cassini-distro/classes/cassini-image.bbclass @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Arm Limited or its affiliates. All rights reserved. +# Copyright (c) 2022-2023 Arm Limited or its affiliates. All rights reserved. # # SPDX-License-Identifier: MIT @@ -8,8 +8,6 @@ IMAGE_BUILDINFO_VARS = " \ inherit core-image extrausers image-buildinfo -IMAGE_FSTYPES:corstone1000 += "wic wic.gz wic.bmap" - # meta-virtualization/recipes-containers/k3s/README.md states that K3s requires # 2GB of space in the rootfs to ensure containers can start CASSINI_ROOTFS_EXTRA_SPACE ?= "2000000" diff --git a/meta-cassini-distro/conf/distro/cassini.conf b/meta-cassini-distro/conf/distro/cassini.conf index de9471ffeff5f647a282e8363057521b3727ace9..712f6e2c64d08497739ad642f3f5ff681e13257a 100644 --- a/meta-cassini-distro/conf/distro/cassini.conf +++ b/meta-cassini-distro/conf/distro/cassini.conf @@ -13,7 +13,7 @@ DISTRO_VERSION = "unstable" # systemd as the init system INIT_MANAGER = "systemd" -DISTRO_FEATURES:append = " virtualization ipv6 seccomp k3s cassini-parsec" +DISTRO_FEATURES = "largefile usbhost ipv4 virtualization seccomp k3s cassini-parsec" # Apply feature specific config USER_CLASSES:append = " cassini-distro-features" diff --git a/meta-cassini-distro/recipes-core/images/cassini-image-base.bb b/meta-cassini-distro/recipes-core/images/cassini-image-base.bb index 6fe0698b06f558719ce8493901205846f254c0b2..afaf59408d7c8c5ad0b57abec02a750fd572e65d 100644 --- a/meta-cassini-distro/recipes-core/images/cassini-image-base.bb +++ b/meta-cassini-distro/recipes-core/images/cassini-image-base.bb @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Arm Limited or its affiliates. All rights reserved. +# Copyright (c) 2022-2023 Arm Limited or its affiliates. All rights reserved. # # SPDX-License-Identifier: MIT @@ -9,6 +9,3 @@ IMAGE_LINGUAS = " " LICENSE = "MIT" inherit cassini-image - -# Ensure cassini-image-* also builds the firmware for platforms that use a different libc -EXTRA_IMAGEDEPENDS:append:corstone1000 = " corstone1000-deploy-image"