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=-12.9 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,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED,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 8CD94C4338F for ; Sun, 22 Aug 2021 05:01:42 +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 D974A6124B for ; Sun, 22 Aug 2021 05:01:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D974A6124B 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 9F80C82DF7; Sun, 22 Aug 2021 07:01:39 +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="YQsMMUiw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 069B282DFE; Sun, 22 Aug 2021 07:01:38 +0200 (CEST) Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) (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 B46FD82DB2 for ; Sun, 22 Aug 2021 07:01:32 +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-pg1-x52d.google.com with SMTP id q2so13414011pgt.6 for ; Sat, 21 Aug 2021 22:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ju7d/lhZLqVJlSRxct99PAWhoaeRmAaqgZgxdKwC/xc=; b=YQsMMUiwMcZTHUPACMGi3ErnQVoUQfWNn6d2jb33fnFflTtrKkGJPMbmHSDvIGny28 ZSeaYuwXqwp4765pA2pDC1Ct8AXfsQ5dYm10W2n6bDkTfleK3fiUZPxBBNL3hj+WmFDO 8dgHEr4rbV/PiOgs4T7SnKtw4jAyrNK5QpqsDMg8th7NAgMJqJl4uYemqOzuhFuj9gzi 0sokgOXY2TfZovD1+YsBJteI69A3LyAY/M/YXl/Wo494CGtoCEn/PvSC+xqSV4UsNWIg tGuv3pya+GtzuBsAzYXpkz26smL0TmCa0gMigyW2jkJ1XRO2/HyQbB5wpT2pcbnGa8gQ FAqg== 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:mime-version :content-transfer-encoding; bh=ju7d/lhZLqVJlSRxct99PAWhoaeRmAaqgZgxdKwC/xc=; b=ZkKQCHxKJuSVUd+XNww7HUMGSBW35b4NQbXm4zKnhC4INOJkqszG0CgHVQ6R5dCZ6Q IGm/6iDmq3s5gjK6uM7/qSPMtTSxawVqmS/eCQTcUwNHIJW22R0hY1VfyNe0ebYycw+w DW5PA+jF+xE2X6DIV5uz3gvhKbEFK2kLaawExhx3ORRW2CMs+qJ3cIOeNrp6eCWCArZ7 FlFYzfZfdTjX/vz15hTU32wAqQmI3R9+zBg5QybU/xt5+J5P1TsSCgDMdP6BhpvJhFbU V4nWym5ZGool09OUQ5pqDocTotIuXJCDUAYeKyCfaC4p4GckfDzW3UcAMf9mqDAym/Zv eN1w== X-Gm-Message-State: AOAM5304C9uJa2eUxd9Qsd2dEL96Q9pEe+wlovplSG6mPSL2Ydd/Y8tk PRxK6Hjwe7QTK/fmFycmFRI= X-Google-Smtp-Source: ABdhPJzYSq5hqtZxhG7EQvexoWTecM5XsUPl1/36fuaECpBJVaes6Z/BpySv2NAui7mXaxt93L4NoA== X-Received: by 2002:aa7:9254:0:b029:3c9:268e:ae68 with SMTP id 20-20020aa792540000b02903c9268eae68mr27577580pfp.58.1629608490917; Sat, 21 Aug 2021 22:01:30 -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 t38sm11912951pfg.207.2021.08.21.22.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Aug 2021 22:01:30 -0700 (PDT) From: Bin Meng To: Tom Rini , u-boot@lists.denx.de Subject: [u-boot-test-hooks PATCH] travis-ci: Add SiFive Unleashed QEMU targets Date: Sun, 22 Aug 2021 13:01:23 +0800 Message-Id: <20210822050123.2355-1-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 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 Add support for testing sifive_unleashed_defconfig via QEMU. 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. Signed-off-by: Bin Meng --- bin/travis-ci/conf.sifive_unleashed_sdcard_qemu | 11 +++++++++++ bin/travis-ci/conf.sifive_unleashed_spi-nor_qemu | 11 +++++++++++ .../u_boot_boardenv_sifive_unleashed_sdcard_qemu.py | 10 ++++++++++ .../u_boot_boardenv_sifive_unleashed_spi-nor_qemu.py | 10 ++++++++++ 4 files changed, 42 insertions(+) create mode 100644 bin/travis-ci/conf.sifive_unleashed_sdcard_qemu create mode 100644 bin/travis-ci/conf.sifive_unleashed_spi-nor_qemu create mode 100644 py/travis-ci/u_boot_boardenv_sifive_unleashed_sdcard_qemu.py create mode 100644 py/travis-ci/u_boot_boardenv_sifive_unleashed_spi-nor_qemu.py diff --git a/bin/travis-ci/conf.sifive_unleashed_sdcard_qemu b/bin/travis-ci/conf.sifive_unleashed_sdcard_qemu new file mode 100644 index 0000000..f3c3da1 --- /dev/null +++ b/bin/travis-ci/conf.sifive_unleashed_sdcard_qemu @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: MIT +# +# Copyright (c) 2021 Bin Meng + +console_impl=qemu +qemu_machine="sifive_u,msel=11" +qemu_binary="qemu-system-riscv64" +qemu_extra_args="-smp 5 -m 8G -nographic -nic user,tftp=${UBOOT_TRAVIS_BUILD_DIR}" +qemu_kernel_args="-bios ${U_BOOT_BUILD_DIR}/spl/u-boot-spl.bin -drive file=${U_BOOT_BUILD_DIR}/sdcard.img,if=sd" +reset_impl=none +flash_impl=none diff --git a/bin/travis-ci/conf.sifive_unleashed_spi-nor_qemu b/bin/travis-ci/conf.sifive_unleashed_spi-nor_qemu new file mode 100644 index 0000000..e28bfc4 --- /dev/null +++ b/bin/travis-ci/conf.sifive_unleashed_spi-nor_qemu @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: MIT +# +# Copyright (c) 2021 Bin Meng + +console_impl=qemu +qemu_machine="sifive_u,msel=6" +qemu_binary="qemu-system-riscv64" +qemu_extra_args="-smp 5 -m 8G -nographic -nic user,tftp=${UBOOT_TRAVIS_BUILD_DIR}" +qemu_kernel_args="-bios ${U_BOOT_BUILD_DIR}/spl/u-boot-spl.bin -drive file=${U_BOOT_BUILD_DIR}/spi-nor.img,if=mtd" +reset_impl=none +flash_impl=none diff --git a/py/travis-ci/u_boot_boardenv_sifive_unleashed_sdcard_qemu.py b/py/travis-ci/u_boot_boardenv_sifive_unleashed_sdcard_qemu.py new file mode 100644 index 0000000..a86e0bd --- /dev/null +++ b/py/travis-ci/u_boot_boardenv_sifive_unleashed_sdcard_qemu.py @@ -0,0 +1,10 @@ +import os +import travis_tftp + +env__net_dhcp_server = True +env__net_tftp_readable_file = travis_tftp.file2env('u-boot') +env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworld.efi') +env__efi_loader_grub_file = travis_tftp.file2env('grub_riscv64.efi') +env__efi_fit_tftp_file = { + "dn" : os.environ['UBOOT_TRAVIS_BUILD_DIR'], +} diff --git a/py/travis-ci/u_boot_boardenv_sifive_unleashed_spi-nor_qemu.py b/py/travis-ci/u_boot_boardenv_sifive_unleashed_spi-nor_qemu.py new file mode 100644 index 0000000..a86e0bd --- /dev/null +++ b/py/travis-ci/u_boot_boardenv_sifive_unleashed_spi-nor_qemu.py @@ -0,0 +1,10 @@ +import os +import travis_tftp + +env__net_dhcp_server = True +env__net_tftp_readable_file = travis_tftp.file2env('u-boot') +env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworld.efi') +env__efi_loader_grub_file = travis_tftp.file2env('grub_riscv64.efi') +env__efi_fit_tftp_file = { + "dn" : os.environ['UBOOT_TRAVIS_BUILD_DIR'], +} -- 2.25.1