Skip to content

Instantly share code, notes, and snippets.

@sofar
Created July 13, 2012 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sofar/3106588 to your computer and use it in GitHub Desktop.
Save sofar/3106588 to your computer and use it in GitHub Desktop.
installkernel - preserve vmlinuz-
#!/bin/bash
. /etc/lunar/config
preserve()
{
if [ -f $1 ] ; then
mv -f $1 $1.old
fi
}
# make backups
preserve $4/vmlinuz-$1
preserve $4/System.map-$1
preserve $4/config.$1
make modules_install
# bzImage
cp $2 $4/vmlinuz-$1
# System.map
cp $3 $4/System.map-$1
# save config as .gz
cp .config $4/config.$1
gzip -f $4/config.$1
# and update bootloader
update_bootloader vmlinuz-$1 $1
[ $? == 2 ] && true
@sofar
Copy link
Author

sofar commented Jul 13, 2012

Just needs a . $BOOTSTRAP at the top now as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment