Skip to content

Commit 269d79f

Browse files
Nick Childmpe
authored andcommitted
powerpc/boot: Add version to install filenames
Rather than replacing the versionless vmlinux and System.map files, copy to files with the version info appended. Additionally, since executing the script is a last resort option, inform the user about the missing `installkernel` command and the location of the installation. This work is adapted from `arch/s390/boot/install.sh`, and also matches the behaviour of arm, arm64 and riscv. Signed-off-by: Nick Child <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent 95f1a12 commit 269d79f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

arch/powerpc/boot/install.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ set -e
2121
# this should work for both the pSeries zImage and the iSeries vmlinux.sm
2222
image_name=`basename $2`
2323

24-
if [ -f $4/$image_name ]; then
25-
mv $4/$image_name $4/$image_name.old
24+
25+
echo "Warning: '${INSTALLKERNEL}' command not available... Copying" \
26+
"directly to $4/$image_name-$1" >&2
27+
28+
if [ -f $4/$image_name-$1 ]; then
29+
mv $4/$image_name-$1 $4/$image_name-$1.old
2630
fi
2731

28-
if [ -f $4/System.map ]; then
29-
mv $4/System.map $4/System.old
32+
if [ -f $4/System.map-$1 ]; then
33+
mv $4/System.map-$1 $4/System-$1.old
3034
fi
3135

32-
cat $2 > $4/$image_name
33-
cp $3 $4/System.map
36+
cat $2 > $4/$image_name-$1
37+
cp $3 $4/System.map-$1

0 commit comments

Comments
 (0)