From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B089C4320A for ; Thu, 26 Aug 2021 15:34:28 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F2EC61037 for ; Thu, 26 Aug 2021 15:34:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7F2EC61037 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7A82B80C85; Thu, 26 Aug 2021 17:34:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="RhAsDsAe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9C5EF8315C; Thu, 26 Aug 2021 17:33:55 +0200 (CEST) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 646EA83189 for ; Thu, 26 Aug 2021 17:33:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pf1-x42d.google.com with SMTP id a21so3085570pfh.5 for ; Thu, 26 Aug 2021 08:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3an/Auu/gAw5MdsLSxb4+E3rlKa4wS2mILQDPoDmlSA=; b=RhAsDsAeYiIa39bOVeSy1PqlSzylZuUGfSb/11oYcaGnfgEo7p5C14e6b7u3+H0wKY js0THRqZkcaWpW1zBS6+1cPdJMuLTi/u4VVnopXyZGfS48JexjkQXtqDsfQFSlfpWKKY N6wOwyOmKWOWz/fXeG6E3HjfP8KkSp1x476+jS0CB1Jj4syRKbbyS2coxSQdt9EWv8D4 65nZt0m9iizUl8cUE+LPa7/6uKfCyxjl1ZPQEGMj33vyAfTaOa/i8sNlwlP6ypwPQ15i Jeoy23Y4opuClmrCSLtS/N7joIHkCVnAWuqihsqPRa1NDwO/W/QV1rG/EO3Fowkvc30e W/wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3an/Auu/gAw5MdsLSxb4+E3rlKa4wS2mILQDPoDmlSA=; b=Vs8EtjCjEqVYsAac0z7PPdFZyUD4HCbGl3YJ39qah7bfolirRcxUB56p2V24zw7onp 4/HbfEyCl+Ibczz97xQ0yhaGc8aSmJDfe/XXIQ9FZGFY5LlkjT2KQoCafjh8ruM0WY1S MfBLOu8taHAFBso/rWv2JJ4ct2Qzv6XvhxZs569zibONx2qIl4bXCeDq6UG53QcZYrpb 6HST0BEMuNSgom8tczC+DYys0KBMWJ8JBDVRalZ3w+tAiT40crCAg5A3IDEEAqtDfghU A0oPURJxFmyrpaEKhnfAwINA3Fc1Cb6S6LrEfIdNCY/1h2549U1aSwdTuyjqJihgtxl/ Fh7g== X-Gm-Message-State: AOAM530eU+Z7uzBmqRK5ks+KPckw6WHY41EJIXrev2flnSSdT4oXT+F7 f8QJ6Dsq16J7525xrjnC7vnOeE5rcnrqlw== X-Google-Smtp-Source: ABdhPJyQSlLcxBn29tPgO1TNp3KGEriKjUpXXlveZJ6pYLNwERDIbFQovajAUAs4Xbve/MOwkiUfIQ== X-Received: by 2002:a63:5848:: with SMTP id i8mr3844634pgm.135.1629992028818; Thu, 26 Aug 2021 08:33:48 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id n15sm3497518pff.149.2021.08.26.08.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 08:33:48 -0700 (PDT) From: Bin Meng To: Tom Rini , u-boot@lists.denx.de Subject: [PATCH v2 4/4] azure/gitlab: Add tests for SiFive Unleashed board Date: Thu, 26 Aug 2021 23:33:35 +0800 Message-Id: <20210826153335.27964-4-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826153335.27964-1-bmeng.cn@gmail.com> References: <20210826153335.27964-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This adds CI tests for SiFive Unleashed board. QEMU supports booting exact the same images as used on the real hardware out of the box, that U-Boot SPL loads U-Boot proper from either an SD card or the SPI NOR flash, hence we can easily set up CI to cover these 2 boot flows of SiFive Unleashed board. With this, now we can have regression testing of mmc-spi-slot and sifive spi drivers, as well as mmc and spi-nor subsystems. Signed-off-by: Bin Meng --- (no changes since v1) .azure-pipelines.yml | 20 +++++++++++++++++++- .gitlab-ci.yml | 26 +++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 15507a7357..2e9c1fb4fd 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -254,6 +254,12 @@ jobs: r2dplus_tulip: TEST_PY_BD: "r2dplus" TEST_PY_ID: "--id tulip_qemu" + sifive_unleashed_sdcard: + TEST_PY_BD: "sifive_unleashed" + TEST_PY_ID: "--id sdcard_qemu" + sifive_unleashed_spi-nor: + TEST_PY_BD: "sifive_unleashed" + TEST_PY_ID: "--id spi-nor_qemu" xilinx_zynq_virt: TEST_PY_BD: "xilinx_zynq_virt" TEST_PY_ID: "--id qemu" @@ -289,7 +295,7 @@ jobs: wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ; export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin; fi - if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]]; then + if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ; export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin; fi @@ -302,6 +308,18 @@ jobs: cp /opt/grub/grubriscv64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi cp /opt/grub/grubaa64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi cp /opt/grub/grubarm.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi + # create sdcard / spi-nor images for sifive unleashed using genimage + if [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then + mkdir -p root; + cp ${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .; + cp ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .; + rm -rf tmp; + genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg; + cp images/sdcard.img ${UBOOT_TRAVIS_BUILD_DIR}/; + rm -rf tmp; + genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg; + cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/; + fi virtualenv -p /usr/bin/python3 /tmp/venv . /tmp/venv/bin/activate pip install -r test/py/requirements.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ffdeaae5a8..599de6e506 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ stages: wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ; export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin; fi - - if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]]; then + - if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ; export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin; fi @@ -40,6 +40,18 @@ stages: - cp /opt/grub/grubriscv64.efi $UBOOT_TRAVIS_BUILD_DIR/grub_riscv64.efi - cp /opt/grub/grubaa64.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi - cp /opt/grub/grubarm.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi + # create sdcard / spi-nor images for sifive unleashed using genimage + - if [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then + mkdir -p root; + cp ${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .; + cp ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .; + rm -rf tmp; + genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg; + cp images/sdcard.img ${UBOOT_TRAVIS_BUILD_DIR}/; + rm -rf tmp; + genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg; + cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/; + fi - virtualenv -p /usr/bin/python3 /tmp/venv - . /tmp/venv/bin/activate - pip install -r test/py/requirements.txt @@ -317,6 +329,18 @@ r2dplus_tulip test.py: TEST_PY_ID: "--id tulip_qemu" <<: *buildman_and_testpy_dfn +sifive_unleashed_sdcard test.py: + variables: + TEST_PY_BD: "sifive_unleashed" + TEST_PY_ID: "--id sdcard_qemu" + <<: *buildman_and_testpy_dfn + +sifive_unleashed_spi-nor test.py: + variables: + TEST_PY_BD: "sifive_unleashed" + TEST_PY_ID: "--id spi-nor_qemu" + <<: *buildman_and_testpy_dfn + xilinx_zynq_virt test.py: variables: TEST_PY_BD: "xilinx_zynq_virt" -- 2.25.1