kbuild: allow arches to have their own "bootloader.sh"

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/arch/x86/boot/bootloader.sh b/arch/x86/boot/bootloader.sh
new file mode 100644
index 0000000..70a36b3
--- /dev/null
+++ b/arch/x86/boot/bootloader.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+#
+# x86 default bootloader setup
+#
+# Defaults to LILO as that's the historical bootloader
+# Maybe someday we can update this.
+
+echo "hello from bootloader.sh!"
+
+if [ -x /sbin/lilo ]; then
+	/sbin/lilo
+elif [ -x /etc/lilo/install ]; then
+	/etc/lilo/install
+else
+	echo "Cannot find LILO, ensure your bootloader knows of the new kernel image."
+fi
diff --git a/scripts/install.sh b/scripts/install.sh
index dd86fb9..34ad8bd 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -134,3 +134,9 @@
 		fi
 		;;
 esac
+
+# Some architectures like to call specific bootloader "helper" programs
+# so let them have their own special command here
+if [ -f "arch/$ARCH/boot/bootloader.sh" ] ; then
+	sh arch/"$ARCH"/boot/bootloader.sh
+fi