* [PATCH v2 0/3] LoongArch: Adjust the 'make install' operation
@ 2025-04-21 5:47 Youling Tang
2025-04-21 5:47 ` [PATCH v2 1/3] LoongArch: Add fallback install.sh Youling Tang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Youling Tang @ 2025-04-21 5:47 UTC (permalink / raw)
To: Huacai Chen; +Cc: loongarch, youling.tang
Changelog:
v2:
* Adjust the patch sequence.
* Adjust the title information.
* Distinguish between vmlinux.efi and vmlinux.elf in install.sh
* Correct minor mistakes.
Youling Tang (3):
LoongArch: Add fallback install.sh
LoongArch: Using a generic scripts/install.sh in `make install`
LoongArch: Add some annotations in archhelp
arch/loongarch/Makefile | 11 ++++---
arch/loongarch/boot/install.sh | 53 ++++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+), 4 deletions(-)
create mode 100755 arch/loongarch/boot/install.sh
--
2.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/3] LoongArch: Add fallback install.sh
2025-04-21 5:47 [PATCH v2 0/3] LoongArch: Adjust the 'make install' operation Youling Tang
@ 2025-04-21 5:47 ` Youling Tang
2025-04-21 5:47 ` [PATCH v2 2/3] LoongArch: Using a generic scripts/install.sh in `make install` Youling Tang
2025-04-21 5:47 ` [PATCH v2 3/3] LoongArch: Add some annotations in archhelp Youling Tang
2 siblings, 0 replies; 4+ messages in thread
From: Youling Tang @ 2025-04-21 5:47 UTC (permalink / raw)
To: Huacai Chen; +Cc: loongarch, youling.tang, Youling Tang
From: Youling Tang <tangyouling@kylinos.cn>
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 not found.
Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
---
arch/loongarch/boot/install.sh | 53 ++++++++++++++++++++++++++++++++++
1 file changed, 53 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..7ce76810b8b7
--- /dev/null
+++ b/arch/loongarch/boot/install.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# 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
+# Compressed install
+vmlinuz.efi)
+ echo "Installing compressed vmlinuz.efi kernel"
+ base=vmlinuz
+ ;;
+# Uncompressed install
+vmlinux.efi)
+ echo "Installing uncompressed vmlinux.efi kernel"
+ base=vmlinux
+ ;;
+vmlinux.elf)
+ echo "Installing uncompressed vmlinux.elf kernel"
+ base=vmlinux
+ ;;
+# Unexpected type
+*)
+ echo "Warning: Not expected 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
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/3] LoongArch: Using a generic scripts/install.sh in `make install`
2025-04-21 5:47 [PATCH v2 0/3] LoongArch: Adjust the 'make install' operation Youling Tang
2025-04-21 5:47 ` [PATCH v2 1/3] LoongArch: Add fallback install.sh Youling Tang
@ 2025-04-21 5:47 ` Youling Tang
2025-04-21 5:47 ` [PATCH v2 3/3] LoongArch: Add some annotations in archhelp Youling Tang
2 siblings, 0 replies; 4+ messages in thread
From: Youling Tang @ 2025-04-21 5:47 UTC (permalink / raw)
To: Huacai Chen; +Cc: loongarch, youling.tang, Youling Tang
From: Youling Tang <tangyouling@kylinos.cn>
Use the generic script/install.sh to perform the make install operation.
This will automatically generate the initrd file and modify grub.cfg
without manual intervention (The previous image and System.map will also
be generated), similar to other architectures.
Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
---
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)=$(boot) $(bootvars-y) $(boot)/$@
install:
- $(Q)install -D -m 755 $(KBUILD_IMAGE) $(INSTALL_PATH)/$(image-name-y)-$(KERNELRELEASE)
- $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
- $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
+ $(call cmd,install)
define archhelp
echo ' install - install kernel into $(INSTALL_PATH)'
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 3/3] LoongArch: Add some annotations in archhelp
2025-04-21 5:47 [PATCH v2 0/3] LoongArch: Adjust the 'make install' operation Youling Tang
2025-04-21 5:47 ` [PATCH v2 1/3] LoongArch: Add fallback install.sh Youling Tang
2025-04-21 5:47 ` [PATCH v2 2/3] LoongArch: Using a generic scripts/install.sh in `make install` Youling Tang
@ 2025-04-21 5:47 ` Youling Tang
2 siblings, 0 replies; 4+ messages in thread
From: Youling Tang @ 2025-04-21 5:47 UTC (permalink / raw)
To: Huacai Chen; +Cc: loongarch, youling.tang, Youling Tang
From: Youling Tang <tangyouling@kylinos.cn>
- Add annotations to the kernel image.
- Modify the annotations of insatll.
Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
---
arch/loongarch/Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile
index 64bdb52ddf7c..5711fe0efa76 100644
--- a/arch/loongarch/Makefile
+++ b/arch/loongarch/Makefile
@@ -184,6 +184,11 @@ install:
$(call cmd,install)
define archhelp
- echo ' install - install kernel into $(INSTALL_PATH)'
+ echo ' vmlinux.elf - Uncompressed ELF kernel image (arch/loongarch/boot/vmlinux.elf)'
+ echo ' vmlinux.efi - Uncompressed EFI kernel image (arch/loongarch/boot/vmlinux.efi)'
+ echo ' vmlinuz.efi - Compressed EFI kernel image (arch/loongarch/boot/vmlinuz.efi)'
+ echo ' Default when CONFIG_EFI_ZBOOT=y'
+ echo ' install - Install kernel using (your) ~/bin/$(INSTALLKERNEL) or (distribution)'
+ echo ' /sbin/$(INSTALLKERNEL) or install.sh to $$(INSTALL_PATH)'
echo
endef
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-21 5:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21 5:47 [PATCH v2 0/3] LoongArch: Adjust the 'make install' operation Youling Tang
2025-04-21 5:47 ` [PATCH v2 1/3] LoongArch: Add fallback install.sh Youling Tang
2025-04-21 5:47 ` [PATCH v2 2/3] LoongArch: Using a generic scripts/install.sh in `make install` Youling Tang
2025-04-21 5:47 ` [PATCH v2 3/3] LoongArch: Add some annotations in archhelp Youling Tang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.