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=-13.1 required=3.0 tests=BAYES_00,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=unavailable 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 0D3B4C433E2 for ; Thu, 16 Jul 2020 05:57:53 +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 C99752065E for ; Thu, 16 Jul 2020 05:57:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XDNrb2xa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C99752065E 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]:58444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvwu0-0007HD-3A for qemu-devel@archiver.kernel.org; Thu, 16 Jul 2020 01:57:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvwst-0005ia-C3; Thu, 16 Jul 2020 01:56:43 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:39477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvwsr-0000LI-Lb; Thu, 16 Jul 2020 01:56:43 -0400 Received: by mail-wr1-x444.google.com with SMTP id q5so5679522wru.6; Wed, 15 Jul 2020 22:56:40 -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=rwBr69aKqgDUi0/A7pROTSLiqSwaDFaBxL8GlGAjDF0=; b=XDNrb2xaXHbVeeKZEKUWajzTTeC8YvTKO050/8o19Tpb0QMxaC8LvDWjas5fRqFs/e FLnayai7PdpZuoA6Fha7L/LubOTEyM3fcuh3XBSUpVeA7m5U2BKGuESFyJ7nMC78oYcB wUugFoaizPkocMqBY8QKuJGlv9O61wcNNa0ZaMPvc/+F+x045UJD2lwrv/d/EA3dS+kS 4IcvWNWDkxAzJt+rykOX6wQApPHPGcxqi3h/BooIIbEa2QmUWjSwck6RgpSwpxxUsKFH KLN8GjcFwgMV7nOR9NQgjsB6B0i3IpXmnwlreXHxUQGYDGZzmKyEoYZjHl92WNKSOSJN pfvg== 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=rwBr69aKqgDUi0/A7pROTSLiqSwaDFaBxL8GlGAjDF0=; b=lxnnC10KLp83YEWmwtHrR7E1bljq1iBcxu04Gl9bno2BOQX9uKgYIoEgs08Y6UncAh v4tj091qF39MTLawFqGoP+j5YPFnUL8rUXBYl+A0XjFSTPoCzSDiqwvzLXz6D3TKrVWz qj0Gfp2jVf2dIvs9VcUcTLnuncaJiV8dboGUKAj7/09vVUMWGlzW4f5WRxjikITn5RpC OxJweqtKCCqnRELJsYcckmrAQTrH+a/2JWXuerXHYZLhUUW7vTvxq8O/d24TVRcN0PGm 4yMzMIcRlOKhS5wh6bi1WdfoIx9HWbIRDaRzmUrLA1aemcXCByrSb917ZykqB29bEA+t Z02w== X-Gm-Message-State: AOAM532n1Ue41ZwlPg4G1rMV+iiDzoMBWok9+3MSpu7nifwYyIPPIHt+ 3ZcepFHw/KNdaZesp/H95tg= X-Google-Smtp-Source: ABdhPJxEmBWddO2zhVnwKqLtMyjP7mvYCbIDZh4HOm2zWwlK99SDM1mlyAHmPb7UQtFgCV5FU51kuA== X-Received: by 2002:a5d:60c7:: with SMTP id x7mr3160873wrt.138.1594879000072; Wed, 15 Jul 2020 22:56:40 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id f12sm7193458wrw.53.2020.07.15.22.56.37 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 15 Jul 2020 22:56:39 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v5 3/7] roms/Makefile: Build the generic platform for RISC-V OpenSBI firmware Date: Wed, 15 Jul 2020 22:56:07 -0700 Message-Id: <1594878971-26050-4-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1594878971-26050-1-git-send-email-bmeng.cn@gmail.com> References: <1594878971-26050-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=bmeng.cn@gmail.com; helo=mail-wr1-x444.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=ham autolearn_force=no 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, and change to use fw_dynamic type images as well. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- (no changes since v3) Changes in v3: - Change fw_jump to fw_dynamic in the make rules 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..5d9f15b 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_dynamic.bin ../pc-bios/opensbi-riscv32-generic-fw_dynamic.bin + cp opensbi/build/platform/generic/firmware/fw_dynamic.elf ../pc-bios/opensbi-riscv32-generic-fw_dynamic.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_dynamic.bin ../pc-bios/opensbi-riscv64-generic-fw_dynamic.bin + cp opensbi/build/platform/generic/firmware/fw_dynamic.elf ../pc-bios/opensbi-riscv64-generic-fw_dynamic.elf bios-microvm: $(MAKE) -C qboot -- 2.7.4