From patchwork Mon Jun 22 06:33:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 279852 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=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 4F177C433E0 for ; Mon, 22 Jun 2020 06:39:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16EE82541D for ; Mon, 22 Jun 2020 06:39:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bLyI0el3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16EE82541D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnG7E-0006Sy-Dh for qemu-devel@archiver.kernel.org; Mon, 22 Jun 2020 02:39:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnG1h-0006V0-N9; Mon, 22 Jun 2020 02:33:53 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:52515) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jnG1W-0007ul-GC; Mon, 22 Jun 2020 02:33:53 -0400 Received: by mail-wm1-x341.google.com with SMTP id r9so13699487wmh.2; Sun, 21 Jun 2020 23:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xAwN/a4oBvgObKEWKqLHwzSi23Om+xZRsWpsUFF+lhU=; b=bLyI0el3fQ1Af0KNXQomybyruDMqB/LyVdJrM0LzCWapPFEb507ueDkv3pHvoUwRxr YQiv159ybBomQOSTAKVeqA0oeiTFCMQHAr3z3gy/MXBH1ZbZrKE2Xpr9z6D+XRmBXxBG 6iT3bE/973is2afBqqTJe7qozq9iIATZB64Z7GqPPvV937c1+d+xKvwx5awPWvSXSiEy 98goxTlEBg180NlKCp8UpmuwZpVcEgAVy1epaHXs/OCryAE+bUIBMMOb1EW68liCzkKq PAq4v7kS7h5lctDfHfnFH7jdVUQmjKuVZBcj4iEt1phKvnYGkRZaxbdJPho0vIJYNWO+ fUxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xAwN/a4oBvgObKEWKqLHwzSi23Om+xZRsWpsUFF+lhU=; b=ZVQ4bIFbYDMVSJDFSOqrP19gzX6gwWGCall2NgQ50oaqNJIrbH5OESp4NXUieF2h6l /p+2MKU0L0MakkHvo39LnGjjyzDXRLwt7rd6sBAEQWpYMfcIWtTmZSkaJZ1hXSJok5KU 6I0B0kq2uLZxauCWYOhzDOXoBpcSOBdSBnFPYjMaYe/wlQ8Hf2D5RyA6O/NDdGORIp7U uywMNL5AvIAsvqet/USkX5jWJEYy2XrARlpRUS9EH6A0LQkK0gzIBVPagGNS7O85dCVL E4ojIxr+UFOE9RovPzb0rR2cz8o0hxgIOJTwCyo+cN5i6rOKQnYk2xpREENfhWjhcMyy wtPA== X-Gm-Message-State: AOAM533IemSNNpWAkqSuIxtBeZ+lxo1ooTy0srPl4A97LzPCQemjZ+C+ o1VYLnPY3fB/FmeyT9pBSpI= X-Google-Smtp-Source: ABdhPJwp4wsC/VupXLnJyEivh+9jjMgz9ZXrOLn41yfFdUSv/aoVsayD2Qr/toJBrJTqu7dCB3+GKA== X-Received: by 2002:a1c:2157:: with SMTP id h84mr15499792wmh.35.1592807620778; Sun, 21 Jun 2020 23:33:40 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id a10sm16684240wrm.21.2020.06.21.23.33.38 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 21 Jun 2020 23:33:40 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v2 3/7] roms/Makefile: Build the generic platform for RISC-V OpenSBI firmware Date: Sun, 21 Jun 2020 23:33:20 -0700 Message-Id: <1592807604-20805-4-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1592807604-20805-1-git-send-email-bmeng.cn@gmail.com> References: <1592807604-20805-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=bmeng.cn@gmail.com; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Bin Meng Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently. Update our Makefile to build the generic platform instead of building virt and sifive_u separately for RISC-V OpenSBI firmware. Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- Changes in v2: - Copy the ELF images too in the make rules roms/Makefile | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/roms/Makefile b/roms/Makefile index f9acf39..211a269 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -64,10 +64,8 @@ default help: @echo " u-boot.e500 -- update u-boot.e500" @echo " u-boot.sam460 -- update u-boot.sam460" @echo " efi -- update UEFI (edk2) platform firmware" - @echo " opensbi32-virt -- update OpenSBI for 32-bit virt machine" - @echo " opensbi64-virt -- update OpenSBI for 64-bit virt machine" - @echo " opensbi32-sifive_u -- update OpenSBI for 32-bit sifive_u machine" - @echo " opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u machine" + @echo " opensbi32-generic -- update OpenSBI for 32-bit generic machine" + @echo " opensbi64-generic -- update OpenSBI for 64-bit generic machine" @echo " bios-microvm -- update bios-microvm.bin (qboot)" @echo " clean -- delete the files generated by the previous" \ "build targets" @@ -170,29 +168,19 @@ skiboot: efi: edk2-basetools $(MAKE) -f Makefile.edk2 -opensbi32-virt: +opensbi32-generic: $(MAKE) -C opensbi \ CROSS_COMPILE=$(riscv32_cross_prefix) \ - PLATFORM="qemu/virt" - cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-virt-fw_jump.bin + PLATFORM="generic" + cp opensbi/build/platform/generic/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-generic-fw_jump.bin + cp opensbi/build/platform/generic/firmware/fw_jump.elf ../pc-bios/opensbi-riscv32-generic-fw_jump.elf -opensbi64-virt: +opensbi64-generic: $(MAKE) -C opensbi \ CROSS_COMPILE=$(riscv64_cross_prefix) \ - PLATFORM="qemu/virt" - cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-virt-fw_jump.bin - -opensbi32-sifive_u: - $(MAKE) -C opensbi \ - CROSS_COMPILE=$(riscv32_cross_prefix) \ - PLATFORM="sifive/fu540" - cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin - -opensbi64-sifive_u: - $(MAKE) -C opensbi \ - CROSS_COMPILE=$(riscv64_cross_prefix) \ - PLATFORM="sifive/fu540" - cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin + PLATFORM="generic" + cp opensbi/build/platform/generic/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-generic-fw_jump.bin + cp opensbi/build/platform/generic/firmware/fw_jump.elf ../pc-bios/opensbi-riscv64-generic-fw_jump.elf bios-microvm: $(MAKE) -C qboot