|
|
56d25d |
From 487c264cb590c42b6122fd7d02d14c1d762214e5 Mon Sep 17 00:00:00 2001
|
|
|
56d25d |
From: Robert Marshall <rmarshall@redhat.com>
|
|
|
56d25d |
Date: Thu, 11 Dec 2014 14:41:21 -0500
|
|
|
56d25d |
Subject: [PATCH 26/41] Fix ppc kernelName when invoked by installkernel.
|
|
|
56d25d |
|
|
|
56d25d |
During the installation of a new kernel on an existing system the
|
|
|
56d25d |
invocation of "make install" called installkernel and that provided
|
|
|
56d25d |
new-kernel-pkg with the incorrect kernelName on ppc systems. Added
|
|
|
56d25d |
new option --kernel-name to new-kernel-pkg and invoked it from
|
|
|
56d25d |
installkernel with the appropriate kernel name.
|
|
|
56d25d |
|
|
|
56d25d |
Resolves: rhbz#979852
|
|
|
56d25d |
|
|
|
56d25d |
Signed-off-by: Robert Marshall <rmarshall@redhat.com>
|
|
|
56d25d |
---
|
|
|
56d25d |
installkernel | 6 +++---
|
|
|
56d25d |
new-kernel-pkg | 22 +++++++++++++++-------
|
|
|
56d25d |
2 files changed, 18 insertions(+), 10 deletions(-)
|
|
|
56d25d |
|
|
|
56d25d |
diff --git a/installkernel b/installkernel
|
|
|
56d25d |
index 86fe2c3..b887929 100755
|
|
|
56d25d |
--- a/installkernel
|
|
|
56d25d |
+++ b/installkernel
|
|
|
56d25d |
@@ -79,9 +79,9 @@ ln -fs ${RELATIVE_PATH}$INSTALL_PATH/System.map-$KERNEL_VERSION $LINK_PATH/Syste
|
|
|
56d25d |
|
|
|
56d25d |
if [ -n "$cfgLoader" ] && [ -x /sbin/new-kernel-pkg ]; then
|
|
|
56d25d |
if [ -n "$(which dracut 2>/dev/null)" ]; then
|
|
|
56d25d |
- new-kernel-pkg --mkinitrd --dracut --host-only --depmod --install $KERNEL_VERSION
|
|
|
56d25d |
+ new-kernel-pkg --mkinitrd --dracut --host-only --depmod --install --kernel-name $KERNEL_NAME $KERNEL_VERSION
|
|
|
56d25d |
else
|
|
|
56d25d |
- new-kernel-pkg --mkinitrd --depmod --install $KERNEL_VERSION
|
|
|
56d25d |
+ new-kernel-pkg --mkinitrd --depmod --install --kernel-name $KERNEL_NAME $KERNEL_VERSION
|
|
|
56d25d |
fi
|
|
|
56d25d |
- new-kernel-pkg --rpmposttrans $KERNEL_VERSION
|
|
|
56d25d |
+ new-kernel-pkg --rpmposttrans --kernel-name $KERNEL_NAME $KERNEL_VERSION
|
|
|
56d25d |
fi
|
|
|
56d25d |
diff --git a/new-kernel-pkg b/new-kernel-pkg
|
|
|
56d25d |
index 70f6118..527f8fb 100755
|
|
|
56d25d |
--- a/new-kernel-pkg
|
|
|
56d25d |
+++ b/new-kernel-pkg
|
|
|
56d25d |
@@ -588,6 +588,12 @@ doRmmoddep() {
|
|
|
56d25d |
fi
|
|
|
56d25d |
}
|
|
|
56d25d |
|
|
|
56d25d |
+# kernel image for 2.4 is vmlinux
|
|
|
56d25d |
+if [ $ARCH = 'ppc64' -o $ARCH = 'ppc' ]; then
|
|
|
56d25d |
+ if [ "$kernelmajor" == "2.4" ]; then
|
|
|
56d25d |
+ kernelName=vmlinux
|
|
|
56d25d |
+ fi
|
|
|
56d25d |
+fi
|
|
|
56d25d |
|
|
|
56d25d |
while [ $# -gt 0 ]; do
|
|
|
56d25d |
case $1 in
|
|
|
56d25d |
@@ -714,6 +720,15 @@ while [ $# -gt 0 ]; do
|
|
|
56d25d |
fi
|
|
|
56d25d |
;;
|
|
|
56d25d |
|
|
|
56d25d |
+ --kernel-name*)
|
|
|
56d25d |
+ if [[ $1 == --kernel-name\=* ]]; then
|
|
|
56d25d |
+ kernelName=${1#--kernel-name=}
|
|
|
56d25d |
+ else
|
|
|
56d25d |
+ kernelName="$2"
|
|
|
56d25d |
+ shift
|
|
|
56d25d |
+ fi
|
|
|
56d25d |
+ ;;
|
|
|
56d25d |
+
|
|
|
56d25d |
-v)
|
|
|
56d25d |
verbose=-v
|
|
|
56d25d |
;;
|
|
|
56d25d |
@@ -747,13 +762,6 @@ fi
|
|
|
56d25d |
|
|
|
56d25d |
kernelmajor=`echo $kernel | cut -d . -f 1,2`
|
|
|
56d25d |
|
|
|
56d25d |
-# kernel image for 2.4 is vmlinux
|
|
|
56d25d |
-if [ $ARCH = 'ppc64' -o $ARCH = 'ppc' ]; then
|
|
|
56d25d |
- if [ "$kernelmajor" == "2.4" ]; then
|
|
|
56d25d |
- kernelName=vmlinux
|
|
|
56d25d |
- fi
|
|
|
56d25d |
-fi
|
|
|
56d25d |
-
|
|
|
56d25d |
[[ $kernelImage ]] || kernelImage="$bootPrefix/$kernelName-$version"
|
|
|
56d25d |
|
|
|
56d25d |
# set the initrd file based on arch; ia64 is the only currently known oddball
|
|
|
56d25d |
--
|
|
|
56d25d |
2.4.3
|
|
|
56d25d |
|