# Linux distribution you are using, options are "Arch", "Void", "Ubuntu", "Debian", "Fedora" or "Suse".
# Linux distribution you are using, options are "Arch", "Void", "Ubuntu", "Debian", "Fedora", "Suse", "Generic".
# It is automatically set to "Arch" when using PKGBUILD.
# It is automatically set to "Arch" when using PKGBUILD.
# If left empty, the script will prompt
# If left empty, the script will prompt
_distro=""
_distro=""
@ -61,11 +61,11 @@ _diffconfig_name=""
# Name of the default config file to use for the kernel
# Name of the default config file to use for the kernel
# Default (empty):
# Default (empty):
# - Archlinux (PKGBUILD): "config.x86_64" from the linux-tkg-config/5.y folder.
# - Archlinux (PKGBUILD): "config.x86_64" from the linux-tkg-config/5.y folder.
# - install.sh: Picks the .config file from the currently running kernel.
# - install.sh: Picks the .config file from the currently running kernel.
# It is recommended to be running an official kernel before running this script, to pick off a correct .config file
# It is recommended to be running an official kernel before running this script, to pick off a correct .config file
# User provided:
# User provided:
# - Archlinux : use "config_hardened.x86_64" to get a hardened kernel. To get a complete hardened setup, you have to use "cfs" as _cpusched.
# - Archlinux : use "config_hardened.x86_64" to get a hardened kernel. To get a complete hardened setup, you have to use "cfs" as _cpusched.
# - Any : custom user provided file, the given path should be relative to the PKGBUILD file. This enables for example to use a user stripped down .config file.
# - Any : custom user provided file, the given path should be relative to the PKGBUILD file. This enables for example to use a user stripped down .config file.
# If the .config file isn't up to date with the chosen kernel version, any extra CONFIG_XXXX is set to its default value.
# If the .config file isn't up to date with the chosen kernel version, any extra CONFIG_XXXX is set to its default value.
# Note: the script copies the resulting .config file as "kernelconfig.new" next to the PKGBUILD as a convenience for an eventual re-use. It gets overwritten at each run.
# Note: the script copies the resulting .config file as "kernelconfig.new" next to the PKGBUILD as a convenience for an eventual re-use. It gets overwritten at each run.
# One can use "kernelconfig.new" here to always use the latest edited .config file. modprobed-db needs to be used only once for its changes to be picked up.
# One can use "kernelconfig.new" here to always use the latest edited .config file. modprobed-db needs to be used only once for its changes to be picked up.
- config : interactive script that shallow clones the linux 5.x.y git tree into the folder linux-src-git, then applies extra patches and prepares the .config file
- config : interactive script that shallow clones the linux 5.x.y git tree into the folder linux-src-git, then applies extra patches and prepares the .config file
by copying the one from the currently running linux system and updates it.
by copying the one from the currently running linux system and updates it.
- install : [for RPM and DEB based distros only], does the config step, proceeds to compile, then prompts to install
- install : does the config step, proceeds to compile, then prompts to install
- uninstall-help : [for RPM and DEB based distros only], lists the installed kernels in this system, then gives hints on how to uninstall them manually."
- 'DEB' distros: it creates .deb packages that will be installed then stored in the DEBS folder.
- 'RPM' distros: it creates .rpm packages that will be installed then stored in the RPMS folder.
- 'Generic' distro: it uses 'make modules_install' and 'make install', uses 'dracut' to create an initramfs, then updates grub's boot entry.
- uninstall-help : [RPM and DEB based distros only], lists the installed kernels in this system, then gives hints on how to uninstall them manually."
exit0
exit0
fi
fi
@ -205,7 +212,7 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then
# Run init script that is also run in PKGBUILD, it will define some env vars that we will use
# Run init script that is also run in PKGBUILD, it will define some env vars that we will use