From nobody Sun Feb 8 02:34:56 2026 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (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 9781517A2EF for ; Thu, 24 Apr 2025 02:41:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745462517; cv=none; b=sR0fsPRaxDobK1BFe7/KgNArQy+0NTkp6JGIZCqoW1SWYUZ/LYGCy+gDUrSXBZHp541IGgAwkQaa2bphlXt3nbvO+pZv1E7V8dXmMoah8NTbsFcEwf+H7iU4iunsR79odoekv9gIfmScp+/6AAKRg8v7Bsju6NKnOTZCjBiqxqg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745462517; c=relaxed/simple; bh=yrJGmNPCM0TF5kHp66SXiT7fplcjmCQr/20VcG80oU0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=T+U1azGb1zjUuOQxdUsNe3g2PgoRMae6xJMQr+yEq/xBmI+KOQrC5wPaDwCdmqcu5g59LIUqws0wRFfBTqZNKTLBoNS9x2I7Qr2MJc7g5yaLgUHe8kiUPfL3uP5965+W6/sxC67+/fHHWnReLJCXSBZgGLzeLQbpP3ZC1bx3muk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=bB19p221; arc=none smtp.client-ip=91.218.175.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="bB19p221" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1745462512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vv0ub1HV+zaOm/ig5nFshbIt0lM85siO57UbBlhiO8g=; b=bB19p221A9LUZnuwBbDzcRbTjbv5dfnA/u8QxyqAnyzm6TPN/BKnpccE8wMNY2AZowV1d2 XfZj2jPKn0egtmIpKU8HCrnV1V4mN3mN0mJoevi46Ebsny+t3FyLKtlnLTmcKT0SlI3je+ z32EsIx1/WisDbwPSlG0h+vso3+NECY= From: Youling Tang To: Huacai Chen Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, youling.tang@linux.dev, Youling Tang Subject: [PATCH v3 1/3] LoongArch: Add a default install.sh Date: Thu, 24 Apr 2025 10:40:32 +0800 Message-Id: <20250424024034.78436-2-youling.tang@linux.dev> In-Reply-To: <20250424024034.78436-1-youling.tang@linux.dev> References: <20250424024034.78436-1-youling.tang@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Youling Tang As specified in scripts/install.sh, the priority order is as follows (from highest to lowest): ~/bin/installkernel /sbin/installkernel arch/loongarch/boot/install.sh Fallback to default install.sh if installkernel is not found. Signed-off-by: Youling Tang --- arch/loongarch/boot/install.sh | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 arch/loongarch/boot/install.sh diff --git a/arch/loongarch/boot/install.sh b/arch/loongarch/boot/install.sh new file mode 100755 index 000000000000..daac197d3315 --- /dev/null +++ b/arch/loongarch/boot/install.sh @@ -0,0 +1,56 @@ +#!/bin/sh +# +# This file is subject to the terms and conditions of the GNU General Publ= ic +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 1995 by Linus Torvalds +# +# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin +# Adapted from code in arch/i386/boot/install.sh by Russell King +# +# "make install" script for the LoongArch Linux port +# +# Arguments: +# $1 - kernel version +# $2 - kernel image file +# $3 - kernel map file +# $4 - default install path (blank if root directory) + +set -e + +case "${2##*/}" in +vmlinux.elf) + echo "Installing uncompressed vmlinux.elf kernel" + base=3Dvmlinux + ;; +vmlinux.efi) + echo "Installing uncompressed vmlinux.efi kernel" + base=3Dvmlinux + ;; +vmlinuz.efi) + echo "Installing gzip/zstd compressed vmlinuz.efi kernel" + base=3Dvmlinuz + ;; +*) + echo "Warning: Unexpected kernel type" + exit 1 + ;; +esac + +if [ -f $4/$base-$1 ]; then + mv $4/$base-$1 $4/$base-$1.old +fi +cat $2 > $4/$base-$1 + +# Install system map file +if [ -f $4/System.map-$1 ]; then + mv $4/System.map-$1 $4/System.map-$1.old +fi +cp $3 $4/System.map-$1 + +# Install kernel config file +if [ -f $4/config-$1 ]; then + mv $4/config-$1 $4/config-$1.old +fi +cp .config $4/config-$1 --=20 2.38.1 From nobody Sun Feb 8 02:34:56 2026 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 D180417A2FF for ; Thu, 24 Apr 2025 02:41:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745462518; cv=none; b=ZlgfJtPMZ0c/eq9jyyX/scAN+VvzZPXp/BJr6KdqqBLSdpPEBdJhIYwgddFNDEJYTrWzXLHD1SixLf4hVZFhNq6n7yKz/gB/dGtt0GISOkCkV9XpHOeQ/wDqBchIC5WJY296QzmolSfXlK4aT68E93jjM9K+AW7vbhrlSDMoEZQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745462518; c=relaxed/simple; bh=Xl4h+hVtw1I6vKh8hCpsYqYhASw+cFAg3f8/x3QBH6c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pdW7RzzQzrhH9Lt1Y9eR4UCCcKDAM2AoE+kb8EH0Bmap0UdrdP0VXfF33UMbhh89LUDjc/ILUTtAGZhK4+y7nVObiH/WEDP9vdnfIi8fH6w8n4T0OaScHnEzG9YJ4OAOKQU3Qx5yJBb1M+OVSv4XxC2nsECGwv89/NHnfOjrStU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=LKy/8p8+; arc=none smtp.client-ip=91.218.175.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="LKy/8p8+" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1745462514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GVhZs0sKvUNmD2Q8oEdmWaRhwVuK0e7TNhgqQ3TKg3Q=; b=LKy/8p8+swSPXlBNycPoXHObfNopx8M5x+btec5URv3U5Cc85SZBB+ubbL8GaGXSHq7gSJ L6kNXabEvqKb7YlGEorR1k2Z21BOqg7FnMkludSz/x6m2uVMgWoB7pZYozq1bcsPCiWfI5 i742fY6KbN1T2SCv2jt1Q3VwFKZCgZc= From: Youling Tang To: Huacai Chen Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, youling.tang@linux.dev, Youling Tang Subject: [PATCH v3 2/3] LoongArch: Using generic scripts/install.sh in `make install` Date: Thu, 24 Apr 2025 10:40:33 +0800 Message-Id: <20250424024034.78436-3-youling.tang@linux.dev> In-Reply-To: <20250424024034.78436-1-youling.tang@linux.dev> References: <20250424024034.78436-1-youling.tang@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Youling Tang Use the generic script/install.sh to perform the make install operation. This will automatically generate the initrd file and modify the grub.cfg without manual intervention (The previous kernel image, config file and System.map will also be generated), similar to other architectures. Signed-off-by: Youling Tang --- arch/loongarch/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile index 0304eabbe606..64bdb52ddf7c 100644 --- a/arch/loongarch/Makefile +++ b/arch/loongarch/Makefile @@ -181,9 +181,7 @@ vmlinux.elf vmlinux.efi vmlinuz.efi: vmlinux $(Q)$(MAKE) $(build)=3D$(boot) $(bootvars-y) $(boot)/$@ =20 install: - $(Q)install -D -m 755 $(KBUILD_IMAGE) $(INSTALL_PATH)/$(image-name-y)-$(K= ERNELRELEASE) - $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE) - $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEA= SE) + $(call cmd,install) =20 define archhelp echo ' install - install kernel into $(INSTALL_PATH)' --=20 2.38.1 From nobody Sun Feb 8 02:34:56 2026 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 D535219D892 for ; Thu, 24 Apr 2025 02:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745462521; cv=none; b=i1xsL6ErFSNlE2VSyNjVYXO0U1q6rKspBL1Xo0NnRFPEEN+7eetzI0Hnv96YNHCKi8tHC3ErDqbhhCo44CNq7QDML2zs+nikkTyw/5MHyjhpJudrFPEw3pEhGNoaTTBIY+sseu++TrlbHLo0x6gPFnhhVm1MbpApGyxVdQg6USI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745462521; c=relaxed/simple; bh=MrzV+3X/xEyXN4HuhlmnoAsayUGQLlKoEXj6MMJMdgk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pus90Kgc3QUDswgWbQce6O0gxfi9BxLbkMlFyo9ucmXUPT5FExx++Deb4EbKFQPZbQHBPq+fvpnezg9TrKX9UtfeHAtt0o3djcn0DiA2+h/ruSL++QVdFgI0cmiuj7ThDSzBxoPPWrGXaiq1WYrloTGJx8Iip2hhFu1E4QNfguY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=oEFWZsTX; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="oEFWZsTX" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1745462516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hvnStUlONu9e+qIIWIBP2lqUAozvyqkrzzFTXoYeR3w=; b=oEFWZsTXdu6hAwtkjWZOrcUbRjLi3sL+/mVike0iX/8oxHiSKcRvaeybBzyLRlYF58LZK9 ws998n/Y/Ao9j6XP4Vs0JwJXUxbIv+34CqkkL4EVsVFLa8fVfR5USgU1GIrbyL8//wmEUi X/aNR4S5mgJFAESDrMx/zXeC/9yvtc8= From: Youling Tang To: Huacai Chen Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, youling.tang@linux.dev, Youling Tang Subject: [PATCH v3 3/3] LoongArch: Add some annotations in archhelp Date: Thu, 24 Apr 2025 10:40:34 +0800 Message-Id: <20250424024034.78436-4-youling.tang@linux.dev> In-Reply-To: <20250424024034.78436-1-youling.tang@linux.dev> References: <20250424024034.78436-1-youling.tang@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Youling Tang - Add annotations to the kernel image. - Modify the annotations of make insatll. Signed-off-by: Youling Tang --- arch/loongarch/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile index 64bdb52ddf7c..b0703a4e02a2 100644 --- a/arch/loongarch/Makefile +++ b/arch/loongarch/Makefile @@ -184,6 +184,11 @@ install: $(call cmd,install) =20 define archhelp - echo ' install - install kernel into $(INSTALL_PATH)' + echo ' vmlinux.elf - Uncompressed ELF kernel image (arch/loongarch/bo= ot/vmlinux.elf)' + echo ' vmlinux.efi - Uncompressed EFI kernel image (arch/loongarch/bo= ot/vmlinux.efi)' + echo ' vmlinuz.efi - GZIP/ZSTD-compressed EFI kernel image (arch/loon= garch/boot/vmlinuz.efi)' + echo ' Default when CONFIG_EFI_ZBOOT=3Dy' + echo ' install - Install kernel using (your) ~/bin/$(INSTALLKERNE= L) or' + echo ' (distribution) /sbin/$(INSTALLKERNEL) or install= .sh to $$(INSTALL_PATH)' echo endef --=20 2.38.1