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 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 E8AD1C77B7F for ; Tue, 16 May 2023 07:32:03 +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=yZaQb2dPcBSvEQJByEyUrpimp2wqG98qNkldQer4HP4=; b=OsfG7jZVk+Dk3H dVl7TMIXCGp71kP5JFpqf9Nxtl0+18o13fxm7BAVbnfg8Dcefd71QTAr6FGUufs4Dsc/YrYSy2Mw6 AC51Rstqtgs/2y7OEQEQe7n+RFKywz1vW45nIAs366zTaR6Yd1oaLvP2UtDfFD+lXJLrqi+LVpZzD 9+dCbN4oQ1LprhYD/3OksA8wPT7fMqifyODUCJEbsobnIAjP5oIfiubWTObUtpp5j2RTn1omt+6S4 HSY0vWY3G867BX9EjSXainRtzkb6gx7TdX8GTIbLTbY1x7cMK5WHPD6/6+bqKOGvu+mZsZAYBnpRQ 7zmcC58QZKN06qwGIawQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pypA9-004ewy-0M; Tue, 16 May 2023 07:32:01 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pypA6-004euk-03 for kexec@lists.infradead.org; Tue, 16 May 2023 07:31:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684222317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rKfD/+6Wp89q5P+zBwj9SnkKufVJhmvr2hp9QoJ6xvM=; b=hNRIqiTIn8dTDL8T104jkMr36+Jd2HVfblOC1fE7I7CdVbE+4SYKdUMzkhOOxrGp5eWtTE RGBeVCf0p7BprECmeRkoQoFSoKtFd5qkaXk+Pn82c+fBe6Z1pz36Ru7HfrsqeYMiKm5OR7 VtZ9iLfDNgnUTU0042YKxT5BGzNoBHQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-156-0La9H1fPN7awd8_8ton2fA-1; Tue, 16 May 2023 03:31:54 -0400 X-MC-Unique: 0La9H1fPN7awd8_8ton2fA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9D355185A7A4; Tue, 16 May 2023 07:31:52 +0000 (UTC) Received: from piliu.users.ipa.redhat.com (ovpn-8-20.pek2.redhat.com [10.72.8.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E6BE1121314; Tue, 16 May 2023 07:31:50 +0000 (UTC) From: Pingfan Liu To: kexec@lists.infradead.org Cc: Jeremy Linton , Pingfan Liu , horms@verge.net.au, ardb@kernel.org Subject: [PATCHv2 6/6] arm64: Hook up the ZBOOT support as vmlinuz Date: Tue, 16 May 2023 15:31:24 +0800 Message-Id: <20230516073124.23531-7-piliu@redhat.com> In-Reply-To: <20230516073124.23531-1-piliu@redhat.com> References: <20230516073124.23531-1-piliu@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230516_003158_129060_DA5E2A0B X-CRM114-Status: GOOD ( 13.47 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org From: Jeremy Linton Add the previously defined _probe() and _usage() routines to the kexec file types table, and build the new module. It should be noted that this "vmlinuz" support reuses the "Image" support to actually load the resulting image after it has been decompressed to a temporary file. Signed-off-by: Jeremy Linton Signed-off-by: Pingfan Liu To: kexec@lists.infradead.org Cc: horms@verge.net.au Cc: ardb@kernel.org Cc: jeremy.linton@arm.com --- kexec/arch/arm64/Makefile | 3 ++- kexec/arch/arm64/kexec-arm64.c | 1 + kexec/arch/arm64/kexec-arm64.h | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/kexec/arch/arm64/Makefile b/kexec/arch/arm64/Makefile index d27c8ee..900f246 100644 --- a/kexec/arch/arm64/Makefile +++ b/kexec/arch/arm64/Makefile @@ -16,7 +16,8 @@ arm64_KEXEC_SRCS += \ kexec/arch/arm64/kexec-elf-arm64.c \ kexec/arch/arm64/kexec-uImage-arm64.c \ kexec/arch/arm64/kexec-image-arm64.c \ - kexec/arch/arm64/kexec-zImage-arm64.c + kexec/arch/arm64/kexec-zImage-arm64.c \ + kexec/arch/arm64/kexec-vmlinuz-arm64.c arm64_UIMAGE = kexec/kexec-uImage.c diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c index ec6df4b..f6f96df 100644 --- a/kexec/arch/arm64/kexec-arm64.c +++ b/kexec/arch/arm64/kexec-arm64.c @@ -75,6 +75,7 @@ struct file_type file_type[] = { {"Image", image_arm64_probe, image_arm64_load, image_arm64_usage}, {"uImage", uImage_arm64_probe, uImage_arm64_load, uImage_arm64_usage}, {"zImage", zImage_arm64_probe, zImage_arm64_load, zImage_arm64_usage}, + {"vmlinuz", pez_arm64_probe, image_arm64_load, pez_arm64_usage}, }; int file_types = sizeof(file_type) / sizeof(file_type[0]); diff --git a/kexec/arch/arm64/kexec-arm64.h b/kexec/arch/arm64/kexec-arm64.h index bce93a1..e2fa97c 100644 --- a/kexec/arch/arm64/kexec-arm64.h +++ b/kexec/arch/arm64/kexec-arm64.h @@ -56,6 +56,10 @@ int zImage_arm64_load(int argc, char **argv, const char *kernel_buf, off_t kernel_size, struct kexec_info *info); void zImage_arm64_usage(void); +int pez_arm64_probe(const char *kern_fname, off_t kernel_size, + struct kexec_info *info); +void pez_arm64_usage(void); + extern off_t initrd_base; extern off_t initrd_size; -- 2.31.1 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec