lkml.org 
[lkml]   [2021]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/20] kbuild: scripts/install.sh: handle compressed/uncompressed kernel images
Date
For x86, the default kernel image is compressed, but other architectures
allowed both compressed and uncompressed kernel images to be built. Add
a test to detect which one this is, and either name the output file
"vmlinuz" for a compressed image, or "vmlinux" for an uncompressed
image.

For x86 this change is a no-op, but other architectures depend on this.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
scripts/install.sh | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/scripts/install.sh b/scripts/install.sh
index 2adcb993efa2..72dc4c81013e 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -49,8 +49,18 @@ verify "$3"
if [ -x ~/bin/"${INSTALLKERNEL}" ]; then exec ~/bin/"${INSTALLKERNEL}" "$@"; fi
if [ -x /sbin/"${INSTALLKERNEL}" ]; then exec /sbin/"${INSTALLKERNEL}" "$@"; fi

-# Default install - same as make zlilo
-install "$2" "$4"/vmlinuz
+base=$(basename "$2")
+if [ "$base" = "bzImage" ]; then
+ # Compressed install
+ echo "Installing compressed kernel"
+ base=vmlinuz
+else
+ # Normal install
+ echo "Installing normal kernel"
+ base=vmlinux
+fi
+
+install "$2" "$4"/"$base"
install "$3" "$4"/System.map
sync

--
2.31.1
\
 
 \ /
  Last update: 2021-04-07 07:35    [W:0.497 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site