[PATCH 06/20] kbuild: scripts/install.sh: handle compressed/uncompressed kernel images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux