Skip to content

813gan/linup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

linup

This script will update your custom kernel.

Dependencies

  • gcc
  • make
  • >=jq-1.5
  • gpg && Linux kernel release signing keys
  • GRUB-2
  • Kernel compiled with .config support and access to .config through /proc/config.gz ( CONFIG_IKCONFIG=y and CONFIG_IKCONFIG_PROC=y )

Usage

Warning: Before running this script as root make sure that You will be able to restore your previous kernel. Messing up with kernel/bootloader always can make your system non-bootable.

Warning: This script was tested only on Gentoo.

By default linup do following things:

  • Check if your kernel is up-to-date, if it is, exit.
  • Download the latest stable kernel, extract, check signatures and replace .config with your current configuration.
  • Build and install kernel.
  • Update bootloader, out of box linup works only with GRUB.

You can change this behaviour with command line arguments and configuration files described in section 'Advanced usage'.

Linup accepts following command line arguments:

  • -r or --rebuild
    Do not check for new version, just build and install Linux sources pointed by symlink "$src_location/linux" (by default /usr/src/linux)
  • -dl or --download-only
    Do not build or install anything, just download sources, update symlink (by default /usr/src/linux) and replace downloaded .config with your current configuration. If your sources are up-to-date linup will exit without any changes.
  • --version
    Select kernel version. You can find available versions at kernel.org
  • --config
    Set custom path to configuration file. By default linup try to use /etc/linup or /etc/local/linup

Advanced usage

TODO

Examples

If you have no configuration file and You just want to download and install last stable release simply use
# linup.sh

You probably want stick to one of the long-term versions. Use --version to select version. For example to download and install long-term maintance kernel v4.4 use
# linup.sh --version 4.4

After every successful download linup will save timestamp and refuse to download and build kernel until new version appears. To rebuild kernel use
# linup.sh -r

If You don't have custom kernel You want linup just to download selected version and then let You configure it.
# linup.sh -dl --version 4.4 && cd /usr/src/linux && make menuconfig
and then build and install
# linup.sh -r

You may find Gentoo handbook and wiki helpful while configuring kernel.

Troubleshooting

linup prints message ===FAILED=TO=VERIFY=SIGNATURE===

You probably didn't install keys. Use
gpg --search-keys developer-name-here@kernel.org

I have no idea how to get my current .config

On Debian you can find it in /boot/config*. Assuming You have downloaded and extracted kernel sources in /usr/src/linux use
# cp -v /boot/config* /usr/src/linux/.config

About

This script will update your custom kernel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages