Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2952866rwn; Sat, 10 Sep 2022 02:06:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR6/5EVXkd4idfU3opWUUKJ0ncPLmMgeO2jFg1p98zvbbRVe4+TyS3nP62maDqNht+2l/EVC X-Received: by 2002:a17:902:d70a:b0:176:9d00:d3be with SMTP id w10-20020a170902d70a00b001769d00d3bemr17101457ply.152.1662800815223; Sat, 10 Sep 2022 02:06:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662800815; cv=none; d=google.com; s=arc-20160816; b=q+wkQX0WCNJSBDT6smx8rSvCpq63p34YdYw+cdlrCDJjIqwMJ6eJuZ0+VH0ykCxYf4 rPMiLTW+7tKCIzoy+QKO6LRr7Y1C4+/pst/slCXWbpOZd7CEA4ZYA876tnILsEbnEfO7 oAkgfLWVvf/WZg6ug1BXZALZhGWrMz2b+P+3OHTzYI8zShaB8ZcgO8GofRZwJ8sWZwCF Xi/fRre5MsR9ldI9eozMiqfEgo5RUHhRBI0JOzTI/ZoTenqXQVvERSqFuLPWajfCrjy2 ZreI/leY6jVBzxR4ugAG5387RLjRX5o+FHyOOP/NkPPglwv8GN3KD5CP3FHj8+zHFkaU P0Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RLmi4UB7XjKrC0wLBXynGvB6mwZJ5Vb6V/0+0o/iGnk=; b=OKr2u+K9xG222dhiWu87Mouf1GJBACzA6j70l0jgrDjPQ0U+vds/MHvE2Cbxcsv/oa MCZwyvco+ryLPeRpa4E1hncHBL6JasVaZL+YNuKPhBdEGmJaf9BK0fMPdmka6ERdkWOi YAMx+clETViTVFgRKouQaFRrjY44pzOxzB658ezPtKQIp1WI2BRZ1WeH4/0MyacrjEdg iQUg1jIwrFlDWFLkAo+X/loleOUpdmWRp78YhjrTytsyMMzGj/lKYadgZHwVddVTEYpI Q7ui4qkazMGmEVdIoAsEw2ws7p0ds4qfX+I9kvwoUCyL06yaWpek4yx6HQr4X/Coa0L7 ad3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZOdk3K0+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g19-20020a056a0023d300b0053e4e1b4f52si1926525pfc.327.2022.09.10.02.06.43; Sat, 10 Sep 2022 02:06:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZOdk3K0+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbiIJINT (ORCPT + 99 others); Sat, 10 Sep 2022 04:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbiIJIMx (ORCPT ); Sat, 10 Sep 2022 04:12:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAC2B89820; Sat, 10 Sep 2022 01:12:45 -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 ams.source.kernel.org (Postfix) with ESMTPS id B37D9B80A1F; Sat, 10 Sep 2022 08:12:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEDABC433D7; Sat, 10 Sep 2022 08:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662797562; bh=lwtkWqnCdC5DTCxRNKDZAmqT7xFGdg5/mD/OyTi+jns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZOdk3K0+fDQSXUkVV1UQVNrKkF1z8VQ6IrRebarYpJKGMhIIDynbV00pEBvpcWFmd VJzD7vjT5pcn/L9XYHw4UvjYf8LVH9ZvOr8yt15syG7AGhnXifpWmopBXwUHSdxVss /vqExpAel4cYuMHw4XKkKRbaarz8vLoNphuAwFfyfu4WX46MfuBxLc6nRVHq4zF1Ax oCNhJf/MQ/4YHX0D1Hio3LI3p/dxJNCfwwuPki071rG+Ip1n5cjRFcOV/IrefGaUju LeDc4EUuXjurHcERtalJCfsqfs9XFYbaAHjpGyVf2eVLFZ/uYCR5mH9fNDgZMnxtb/ npXste2NcsNZQ== From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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 , Will Deacon , Catalin Marinas Subject: [PATCH v5 8/8] loongarch: efi: enable generic EFI compressed boot Date: Sat, 10 Sep 2022 10:11:52 +0200 Message-Id: <20220910081152.2238369-9-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220910081152.2238369-1-ardb@kernel.org> References: <20220910081152.2238369-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2133; i=ardb@kernel.org; h=from:subject; bh=lwtkWqnCdC5DTCxRNKDZAmqT7xFGdg5/mD/OyTi+jns=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBjHEbHfhsOWC6jY9/BchEKckyY8ye89Us81pOZvd6I L0O/jheJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYxxGxwAKCRDDTyI5ktmPJHjpC/ 9PvwfHLVyV0gx543xJ5aj4rBRcRSIT4OzOblDa0pQC7alXcteRi8zXtxqMIClOF/fRR7HSGL9OQboo /Ar/6F8I8a9KV6h9sNHvXjbskBYyKgRCClAd4En7AXgFKHMTNxqgjaC9v0p+08bgbQeydxvBCai3cQ QMxx0WwWc3EphmiSZ0qvEqIvvbvpiSealSogkU/3iQDSimCQnMNbz/KwBVNwhzcWkSdJhSiRy/aYlv J+T7mGNGhmKibk3CIxGnwr18XZVtvcoyt+psuBvIjncvaKOfL4yEXDW1wwqcNdtRkrZodh2NjGGDNm 2hWVmS/y/iAIfvM8SQ+t8jI7GcLYlwfYPDQzWaJGlff6Cudh6KPWr4EfodCkaQkkHJ1cXlN7tzVuOf 4GXm7IVOIjutmPpxx8QoZgVP0X5f9emhSDvpGgdIJdVaU0m6N/1ShIRPNyCIBFiWMVwN262gGluvgP 0yQtENAuDQtau0At5ub3UBxUl2pZm0SUJFlpMEcRUl4zI= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wire up the generic EFI zboot support for LoongArch64 Signed-off-by: Ard Biesheuvel --- arch/loongarch/Kconfig | 1 + arch/loongarch/Makefile | 4 ++-- arch/loongarch/boot/.gitignore | 1 + arch/loongarch/boot/Makefile | 6 ++++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index fca106a8b8af..f960dbbfb62d 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -55,6 +55,7 @@ config LOONGARCH select BUILDTIME_TABLE_SORT select COMMON_CLK select EFI + select EFI_ZBOOT select GENERIC_CLOCKEVENTS select GENERIC_CMOS_UPDATE select GENERIC_CPU_AUTOPROBE diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile index 4bc47f47cfd8..357ed2a771bf 100644 --- a/arch/loongarch/Makefile +++ b/arch/loongarch/Makefile @@ -10,7 +10,7 @@ KBUILD_DEFCONFIG := loongson3_defconfig ifndef CONFIG_EFI_STUB KBUILD_IMAGE := $(boot)/vmlinux.elf else -KBUILD_IMAGE := $(boot)/vmlinux.efi +KBUILD_IMAGE := $(boot)/vmlinuz.efi endif # @@ -93,7 +93,7 @@ vdso_install: all: $(notdir $(KBUILD_IMAGE)) -vmlinux.elf vmlinux.efi: vmlinux +vmlinux.elf vmlinux.efi vmlinuz.efi: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(bootvars-y) $(boot)/$@ install: diff --git a/arch/loongarch/boot/.gitignore b/arch/loongarch/boot/.gitignore index 49423ee96ef3..e5dc594dc4b6 100644 --- a/arch/loongarch/boot/.gitignore +++ b/arch/loongarch/boot/.gitignore @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only vmlinux* +vmlinuz* diff --git a/arch/loongarch/boot/Makefile b/arch/loongarch/boot/Makefile index fecf34f50e56..4e1c374c5782 100644 --- a/arch/loongarch/boot/Makefile +++ b/arch/loongarch/boot/Makefile @@ -18,3 +18,9 @@ $(obj)/vmlinux.elf: vmlinux FORCE targets += vmlinux.efi $(obj)/vmlinux.efi: vmlinux FORCE $(call if_changed,objcopy) + +EFI_ZBOOT_PAYLOAD := vmlinux.efi +EFI_ZBOOT_BFD_TARGET := elf64-loongarch +EFI_ZBOOT_MACH_TYPE := LOONGARCH64 + +include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot -- 2.35.1