Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1060430lqm; Thu, 2 May 2024 04:17:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWEuMqJJCXeP3pMRXkbBxHyth5QoaHCX7H9/QhaarcXknQnn8ILsKGJfOPSCvbntL/EPpMOHzlsr9rWL2UZq/G56OXk3ECB9qLXLcXrPw== X-Google-Smtp-Source: AGHT+IHo3nSB7b177EgQgByS8ZYWG1jX61ucMYYYUgAEdiYZEXu4yIBLdnNtPdg2FTgj+vHAr6tj X-Received: by 2002:a05:6512:78d:b0:51e:fb8d:796e with SMTP id x13-20020a056512078d00b0051efb8d796emr1173352lfr.3.1714648630365; Thu, 02 May 2024 04:17:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714648630; cv=pass; d=google.com; s=arc-20160816; b=p0W8ik2IUYxohsBx1/B7tnEyWwdQ0tEYKfjsm87ze9D1FpLdJQgF//09zSVNcwUiwc uAxpZyn97CpBjBhUTushXLxMXZOAGHFbCRYFklG6jLjqQeIVbIOx/LgleZZ3SdkGgprG IgECT1t8/LP21dqfNmhnbsFZn2SCLsjFcLEA9HrifRViSMBbcXa+KB9bHdtdQtoSAu4f au4ZUoDQq7WqgK/7OMCG16WmNuz30v5xIB2qDTRh33kPHNILMiCCQb+eCtCiPNygRyLh G3bRJ7pGO9LJjWo4Inb1e2/rokbribbldl4KLeeNdxen5OGQjGejAltBB9FK1IuMck2f iZZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=alIA34WXYkmJHYDf9JzzyaPI80jtTP1Uaq24imH+xTg=; fh=vMEVt+/lM/PL3y9BEvBRZ6J01+z3dfwimotkXKhzPEw=; b=tzx/4jpLMUPTuGu2kJketrc4VOT/c7dFFksM/fb5h85OexuYmHiIB6zT1YnSErV2Oo xeLYOhJZK9IJmH4sjDXSSmM2rAZwq/7zYj+Vz2UmzhGVfkNY7B1zpB5H7RwjHIXb5AjH nnWM5HymcZF2QQYsui0dfXiCqxPbp74uN7lJ4lETbVkcsdwUJnPscdh3F1kLArcHULSO fJ2oA/OaX343lycoZNKtCcoN3j4iMafEzbpk0U3qrpLJyuW3is/66nuZrrQwg5JX8N6u f3/ZCP9TULrR3dITzeKLq6vsUiJDqccKM6GkVNNc1WrnTtlGWlXn0+RHz8C7p88m51j/ 573A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=UBCxu639; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-166384-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166384-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r25-20020a50d699000000b00572a8000ecbsi404826edi.13.2024.05.02.04.17.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 04:17:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166384-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=UBCxu639; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-166384-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166384-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 88D041F228A5 for ; Thu, 2 May 2024 11:17:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65E3D78C9A; Thu, 2 May 2024 11:16:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="UBCxu639" Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECC4669959 for ; Thu, 2 May 2024 11:16:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714648590; cv=none; b=aGBPunSN4WpXhmHkbTK99+tVS+EM9gju8FGmP6B5RIIP4UqWfAqGvZ+SWSoerRVA+tj+WTQUROfVQWOqJBQIDLsP78hz2CIaZlenSO7EkY8CaczBkyf2xl4dVmnULaVMVkTnDs9B9CSJyFSMvS1NcKdVgzRxM0uQBn/4MxWwcLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714648590; c=relaxed/simple; bh=YBmIuvux2Nz3WQf1dIIQ6Ld9PE8PDzjfaHfR7DKWMGc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LRyaq+pXhVNLO6KpvhDxqXgPD591PWejbohZlqJhwv8a28R40hIZBbDprPjPfDvXpYGr7762t+adY3DoMRMTZQgoNkXkMm3IJQAl4MvmUYxlTXyjiRxRLEuF49wA6r41TcjUlSi0zfDwJ758KE1h40NtgV2G0RJOqQzlIUOshhc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b=UBCxu639; arc=none smtp.client-ip=185.125.188.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 1352A3FE6D for ; Thu, 2 May 2024 11:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1714648585; bh=alIA34WXYkmJHYDf9JzzyaPI80jtTP1Uaq24imH+xTg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UBCxu639vQImDUVx8mVJ+0buLHcnoIlizToRJF6V+F3NGQqODsY+JS2MTHkdXffh7 5pEjooilSH7SoCD+0rW4nCFrtS1xv4HHSwtaZJRS60Ow8gp5N6M/GoiWvZ3WneZcAD fJu+w12nCormA2hCgWnwAx3uEhMFCgG5P1vrpsDE/rjH8cNV57jCXlHt7EEfQbv/R+ Y2J1stqLvtGkHHsrcklkAzPCey4uEDG0wqM6OdPWHcCCnhFWKep37wA2qW0IsmABnt ss9arEIPpKga/RqVw53VxxWRmaHAUvg+gKab/1SXY/5oDRlWqsgENX5SuG8a/FFP5E MYzxD/C6KwbAQ== Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a558739aaf4so467131766b.0 for ; Thu, 02 May 2024 04:16:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714648579; x=1715253379; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=alIA34WXYkmJHYDf9JzzyaPI80jtTP1Uaq24imH+xTg=; b=uKS41Po78JLl2FB++tXWW1cVwjC8FOjwAwCZ8jvlS5sQY7wRLI6I2cp1n90DDSotWy OUIhXXNJ6Ku98MdYXMQGWuDQrDUW8qTlSqhCDxbNH/mATqOpTtLiYc8nIQPvj6dFBt6l W4CibKL7fhr34oJ2lVEWpi7oJJY6dTLj6Z36rRHFz46KYTjxy9KXkkumrQJ0MwELzKg+ CYwXNlURqm3OL2Mo+64I2LSua0O04MPdV9cCZCB7UQsnTuJhtYDRPDAoXczvTJ0SGSBO IxlSgQsXvXVCjMTkIoqEGa6CxNWeyn+GIH+RS/sYbJNTVIm7GCgVceeT05yH97Hupnd2 SUeA== X-Forwarded-Encrypted: i=1; AJvYcCVlCCxKodgItWPa8Q82zp8Z77egp547Gc8J2Cg5HmcFBw53oRXNbhms6jDrWloADQSJWWqLv+OEWK5g79xducMjxwRW5am7sX4hXYGr X-Gm-Message-State: AOJu0YzF36ojcKgsj5n3PcXozDtC4ennut/35fpmhYILnw7tGRn974TV 4WovrEEfxscmY+Y1k8tSS75aRQmG8mMGWfv/SB3UPwcuwVzWYimCfkDuUBPIdHS51mSueQkgR6X qiIurqMBUh+i9jMEisl3bvSMMt1MWanW7jBbrZ9Lb/m9rs5wJHG6sACGR4m2QhASDgF2Q+Vt+x2 rmSQ== X-Received: by 2002:a17:906:11db:b0:a52:351f:5694 with SMTP id o27-20020a17090611db00b00a52351f5694mr1517621eja.14.1714648578861; Thu, 02 May 2024 04:16:18 -0700 (PDT) X-Received: by 2002:a17:906:11db:b0:a52:351f:5694 with SMTP id o27-20020a17090611db00b00a52351f5694mr1517596eja.14.1714648578551; Thu, 02 May 2024 04:16:18 -0700 (PDT) Received: from stitch.. ([80.71.142.166]) by smtp.gmail.com with ESMTPSA id gs23-20020a170906f19700b00a4739efd7cesm437278ejb.60.2024.05.02.04.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 04:16:18 -0700 (PDT) From: Emil Renner Berthing To: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Paul Walmsley , Palmer Dabbelt , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Nick Terrell Subject: [PATCH v1 3/3] kbuild: buildtar: install riscv compressed images as vmlinuz Date: Thu, 2 May 2024 13:16:08 +0200 Message-ID: <20240502111613.1380453-4-emil.renner.berthing@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240502111613.1380453-1-emil.renner.berthing@canonical.com> References: <20240502111613.1380453-1-emil.renner.berthing@canonical.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use the KBUILD_IMAGE variable to determine the right kernel image to install and install compressed images to /boot/vmlinuz-$version like the 'make install' target already does. Signed-off-by: Emil Renner Berthing --- This patch depends on Masahiro's patch at https://lore.kernel.org/r/20240414174139.3001175-1-masahiroy@kernel.org --- scripts/package/buildtar | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/package/buildtar b/scripts/package/buildtar index ed8d9b496305..fa9bd0795d22 100755 --- a/scripts/package/buildtar +++ b/scripts/package/buildtar @@ -54,9 +54,8 @@ cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}" # Install arch-specific kernel image(s) # # Note: -# mips, arm64, and riscv copy the first image found. This may not produce -# the desired outcome because it may pick up a stale file remaining in the -# build tree. +# mips and arm64 copy the first image found. This may not produce the desired +# outcome because it may pick up a stale file remaining in the build tree. # case "${ARCH}" in x86|i386|x86_64) @@ -101,13 +100,12 @@ case "${ARCH}" in done ;; riscv) - # Please note the following code may copy a stale file. - for i in Image.bz2 Image.gz Image; do - if [ -f "${objtree}/arch/riscv/boot/${i}" ] ; then - cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}" - break - fi - done + case "${KBUILD_IMAGE##*/}" in + Image.*|vmlinuz.efi) + cp -v -- "$KBUILD_IMAGE" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}";; + *) + cp -v -- "$KBUILD_IMAGE" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}";; + esac ;; *) cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}" -- 2.43.0