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: 601275 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95C46C0502C for ; Sat, 27 Aug 2022 08:39:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232926AbiH0Ijg (ORCPT ); Sat, 27 Aug 2022 04:39:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232934AbiH0Ijg (ORCPT ); Sat, 27 Aug 2022 04:39:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E14ABCCE2 for ; Sat, 27 Aug 2022 01:39:35 -0700 (PDT) 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 9CAA5614A1 for ; 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 Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.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