kbuild 2.5 has standard support for running user specific install
scripts after installing the bootable kernel and modules. That is, the
"update my bootloader" phase can be automated and will propagate from
one .config to the next when you make oldconfig.
bool 'Run a post-install script or command' CONFIG_INSTALL_SCRIPT
if [ "$CONFIG_INSTALL_SCRIPT" = "y" ]; then
string ' Post-install script or command name' CONFIG_INSTALL_SCRIPT_NAME ""
fi
$(CONFIG_INSTALL_SCRIPT_NAME) is run with several environment variables
set, including the kernel release. There is a sample install script in
scripts/lilo_new_kernel which will satisfy most people, if not you can
copy and edit it to suit.
#!/bin/sh
#
# This is a sample script to add a new kernel to /etc/lilo.conf. If it
# does not do what you want, copy this script to somewhere outside the
# kernel, change the copy and point your .config at the modified copy.
# Then you do not need to change the script when you upgrade your kernel.
#
label=$(echo "$KERNELRELEASE" | cut -c1-15)
if ! grep "label=$label\$" /etc/lilo.conf > /dev/null
then
ed /etc/lilo.conf > /dev/null 2>&1 <<EODATA
/^image/
i
image=$CONFIG_INSTALL_PREFIX_NAME$CONFIG_INSTALL_KERNEL_NAME
label=$label
optional
.
w
q
EODATA
if [ ! $? ]
then
echo edit of /etc/lilo.conf failed
exit 1
fi
fi
lilo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/