From patchwork Sat Aug 27 08:38:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 12956885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18218C0502C for ; Sat, 27 Aug 2022 08:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7oWHsEvywCnoQyk70STXrNp1th2PJImj9Y70pVFX5bo=; b=vDWBzWstBVpAHT OfAymRLb5O+Ls/pqG8oJPzt+Ja8yDkFYMr83Hl/5tRLGjHS0OLkJiUXcNtcIwWA1VA8LtwclYRG0L gLs5nDpv/20HrON0FYLX649pca/TZQtCAx/jlLHZGHuUCcIYHySmyRC6jYbC4jP0UoSWDzeDykBYS htuzgMsnO7zdYhy7y58WVEaRwJd9I1S9Tz0tYEWFvfCR8Zqgi+xJYLOlbW/kJ4Fn7Edn+IyJ/5Eo5 oX8a2dc/TZLdmBA3gkXTlvOX300weH6wTlwTWZhC0+YA11BtF9iqyR2921q5ETEUpc9xkYbRDMnz0 znarjGEN0LKskLggKWDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRrNS-0062iG-3j; Sat, 27 Aug 2022 08:41:14 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRrLr-00619U-8c for linux-arm-kernel@lists.infradead.org; Sat, 27 Aug 2022 08:39:36 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9CA4F6131A; Sat, 27 Aug 2022 08:39:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2B07C433B5; Sat, 27 Aug 2022 08:39:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661589574; bh=dXr2U4KNSvu9NXXzFFvAEerp4KLDWPpQp4G37Yrxduw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oPdn8FnqntrJqRqTxyWOjgPp4RAoFxTRZIM7Stmbmy7TG03se4wSgAmAGBhPAS3+Z CsDnd0n3xCf4AaPa/eK2H2AAqyMxPZ9gl2GnhrMAKLfnYUKUCNxjuEIjRR59kfuZWe 324fHa1yJ1Ylroy26I5wL6+5RDreB/6O9U5i/6ScERuUl0vQA9GJG76hlPls0PNIV0 zjRfAT8vJdcC/CdMOag/E41A/RYri1FFRF4EykceN8hhDO1AiFC1zHMduRL3QkbS4H eBshooLB2iaGYcKTutm6Y+BiwE1HgQElH70Ixy8TArJFx+ib+5dnswZKp5pjC976G+ noW6/AfHxURuQ== From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , "James E.J. Bottomley" , Matthew Garrett , Peter Jones , Ilias Apalodimas , Heinrich Schuchardt , AKASHI Takahiro , Palmer Dabbelt , Atish Patra , Arnd Bergmann , Huacai Chen , Xi Ruoyao , Lennart Poettering , Jeremy Linton Subject: [PATCH v4 7/9] riscv: efi: enable generic EFI compressed boot Date: Sat, 27 Aug 2022 10:38:48 +0200 Message-Id: <20220827083850.2702465-8-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220827083850.2702465-1-ardb@kernel.org> References: <20220827083850.2702465-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1131; i=ardb@kernel.org; h=from:subject; bh=dXr2U4KNSvu9NXXzFFvAEerp4KLDWPpQp4G37Yrxduw=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBjCdgWh5IRWHOtFI19PpFhvvLHNKFanNQWcGMnMThJ 0OvUFrqJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYwnYFgAKCRDDTyI5ktmPJEdnC/ 9OvNdYvgsaAlP8LRNNGrodPGp87HcG7Y9/QumXH2AzAbUAu8yDrA8HEzNQ1iBVMvMpoSkpuORsraBY 4DKD6WGm1ufL+aC5lRPY0Tjge9MS+h+10JH00n8aNo1UXs5JYgP2Tf/QO1Am4Bex3KiREbaBPhGRHd 8R+E6xPqNTS3K2hsfMYIuRXqdeCkffi7hePdlVd+cfgLd62aRzaFvZKdynhxx9bpGOElMzmPaAyFml vUlDtXZHfjcpjFdY8S6FZKELL6UO5iVCqAcxv4PKWRBCWTOTVuQOSwZz7nRwPxmNKCkG+igeAl+TfR hie58Am1VDKS+/dfSX9LyL7e2C7DO0qjv/gqpw65/iolQj4Tx/rPenlNGgACCypc+uIbofiU8DG599 tu67u2rNdMfIdO47IYUS6zurgJ3juf+zyPBU6ns0kz06elAEpnxeoApBGcmWUN36DNZE+rTMvIvXEu NYL6CENaaIiAGaG9H1sfBlAAGyZPKnbUd+Enh+5UWG9/A= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220827_013935_402939_C1C69639 X-CRM114-Status: GOOD ( 10.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Wire up the generic EFI zboot support for RISC-V. Signed-off-by: Ard Biesheuvel --- arch/riscv/Makefile | 2 +- arch/riscv/boot/Makefile | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 3fa8ef336822..ee9c24db082c 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -139,7 +139,7 @@ else KBUILD_IMAGE := $(boot)/Image.gz endif endif -BOOT_TARGETS := Image Image.gz loader loader.bin xipImage +BOOT_TARGETS := Image Image.gz loader loader.bin xipImage vmlinuz.efi all: $(notdir $(KBUILD_IMAGE)) diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile index becd0621071c..d1a49adcb1d7 100644 --- a/arch/riscv/boot/Makefile +++ b/arch/riscv/boot/Makefile @@ -58,3 +58,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE $(obj)/loader.bin: $(obj)/loader FORCE $(call if_changed,objcopy) + +EFI_ZBOOT_PAYLOAD := Image +EFI_ZBOOT_BFD_TARGET := elf$(BITS)-littleriscv +EFI_ZBOOT_MACH_TYPE := RISCV$(BITS) + +include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot