linux-tkg/linux57-tkg/install.sh

284 lines
10 KiB
Bash
Raw Normal View History

Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
#!/bin/bash
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
msg2() {
echo -e " \033[1;34m->\033[1;0m \033[1;1m$1\033[1;0m" >&2
}
error() {
echo -e " \033[1;31m==> ERROR: $1\033[1;0m" >&2
}
warning() {
echo -e " \033[1;33m==> WARNING: $1\033[1;0m" >&2
}
plain() {
echo "$1" >&2
}
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
# Stop the script at any ecountered error
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
set -e
_where=`pwd`
srcdir="$_where"
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
source linux*-tkg-config/prepare
_cpu_opt_patch_link="https://raw.githubusercontent.com/graysky2/kernel_gcc_patch/master/enable_additional_cpu_optimizations_for_gcc_v10.1%2B_kernel_v${_basekernel}%2B.patch"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
source customization.cfg
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [ "$1" != "install" ] && [ "$1" != "config" ] && [ "$1" != "uninstall-help" ]; then
msg2 "Argument not recognised, options are:
- config : shallow clones the linux ${_basekernel}.x git tree into the folder linux-${_basekernel}, then applies on it the extra patches and prepares the .config file
by copying the one from the current linux system in /boot/config-`uname -r` and updates it.
- install : [RPM and DEB based distros only], does the config step, proceeds to compile, then prompts to install
- uninstall-help : [RPM and DEB based distros only], lists the installed kernels in this system, then gives a hint on how to uninstall them manually."
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
exit 0
fi
# Load external configuration file if present. Available variable values will overwrite customization.cfg ones.
if [ -e "$_EXT_CONFIG_PATH" ]; then
msg2 "External configuration file $_EXT_CONFIG_PATH will be used and will override customization.cfg values."
source "$_EXT_CONFIG_PATH"
fi
_misc_adds="false" # We currently don't want this enabled on non-Arch
if [ "$1" = "install" ] || [ "$1" = "config" ]; then
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [ -z $_distro ] && [ "$1" = "install" ]; then
while true; do
echo "Which linux distribution are you running ?"
echo "if it's not on the list, chose the closest one to it: Fedora/Suse for RPM, Ubuntu/Debian for DEB"
echo " 1) Debian"
echo " 2) Fedora"
echo " 3) Suse"
echo " 4) Ubuntu"
read -p "[1-4]: " _distro_index
if [ "$_distro_index" = "1" ]; then
_distro="Debian"
break
elif [ "$_distro_index" = "2" ]; then
_distro="Fedora"
break
elif [ "$_distro_index" = "3" ]; then
_distro="Suse"
break
elif [ "$_distro_index" = "4" ]; then
_distro="Ubuntu"
break
else
echo "Wrong index."
fi
done
fi
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [[ $1 = "install" && "$_distro" != "Ubuntu" && "$_distro" != "Debian" && "$_distro" != "Fedora" && "$_distro" != "Suse" ]]; then
msg2 "Variable \"_distro\" in \"customization.cfg\" hasn't been set to \"Ubuntu\", \"Debian\", \"Fedora\" or \"Suse\""
msg2 "This script can only install custom kernels for RPM and DEB based distros, though only those keywords are permitted. Exiting..."
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
exit 0
fi
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [ "$_distro" = "Ubuntu" ] || [ "$_distro" = "Debian" ]; then
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
msg2 "Installing dependencies"
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
sudo apt install git build-essential kernel-package fakeroot libncurses5-dev libssl-dev ccache bison flex qtbase5-dev -y
elif [ "$_distro" = "Fedora" ]; then
msg2 "Installing dependencies"
sudo dnf install fedpkg fedora-packager rpmdevtools ncurses-devel pesign grubby qt5-devel libXi-devel gcc-c++ git ccache flex bison elfutils-libelf-devel openssl-devel dwarves rpm-build -y
elif [ "$_distro" = "Suse" ]; then
msg2 "Installing dependencies"
sudo zypper install -y rpmdevtools ncurses-devel pesign libXi-devel gcc-c++ git ccache flex bison elfutils libelf-devel openssl-devel dwarves make patch bc rpm-build libqt5-qtbase-common-devel libqt5-qtbase-devel lz4
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
fi
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
# Force prepare script to avoid Arch specific commands if the user is using `config`
if [ "$1" = "config" ]; then
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
_distro=""
fi
if [ -d linux-${_basekernel}.orig ]; then
rm -rf linux-${_basekernel}.orig
fi
if [ -d linux-${_basekernel} ]; then
msg2 "Reseting files in linux-$_basekernel to their original state and getting latest updates"
cd "$_where"/linux-${_basekernel}
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
git checkout --force linux-$_basekernel.y
git clean -f -d -x
git pull
msg2 "Done"
cd "$_where"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
else
msg2 "Shallow git cloning linux $_basekernel"
git clone --branch linux-$_basekernel.y --single-branch --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-${_basekernel}
msg2 "Done"
fi
# Define current kernel subversion
if [ -z $_kernel_subver ]; then
cd "$_where"/linux-${_basekernel}
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
_kernelverstr=`git describe`
_kernel_subver=${_kernelverstr:5}
cd "$_where"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
fi
# Run init script that is also run in PKGBUILD, it will define some env vars that we will use
_tkg_initscript
cd "$_where"
msg2 "Downloading Graysky2's CPU optimisations patch"
wget "$_cpu_opt_patch_link"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
# Follow Ubuntu install isntructions in https://wiki.ubuntu.com/KernelTeam/GitKernelBuild
# cd in linux folder, copy Ubuntu's current config file, update with new params
cd "$_where"/linux-${_basekernel}
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
msg2 "Copying current kernel's config and running make oldconfig..."
cp /boot/config-`uname -r` .config
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [ "$_distro" = "Debian" ]; then #Help Debian cert problem.
sed -i -e 's#CONFIG_SYSTEM_TRUSTED_KEYS="debian/certs/test-signing-certs.pem"#CONFIG_SYSTEM_TRUSTED_KEYS=""#g' .config
sed -i -e 's#CONFIG_SYSTEM_TRUSTED_KEYS="debian/certs/debian-uefi-certs.pem"#CONFIG_SYSTEM_TRUSTED_KEYS=""#g' .config
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
fi
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
yes '' | make oldconfig
msg2 "Done"
# apply linux-tkg patching script
_tkg_srcprep
msg2 "Configuration done."
fi
if [ "$1" = "install" ]; then
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
# Use custom compiler paths if defined
if [ -n "${CUSTOM_GCC_PATH}" ]; then
PATH=${CUSTOM_GCC_PATH}/bin:${CUSTOM_GCC_PATH}/lib:${CUSTOM_GCC_PATH}/include:${PATH}
fi
if [ "$_force_all_threads" = "true" ]; then
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
_thread_num=`nproc`
else
_thread_num=`expr \`nproc\` / 4`
if [ "$_thread_num" = "0" ]; then
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
_thread_num=1
fi
fi
# ccache
if [ "$_noccache" != "true" ]; then
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [ "$_distro" = "Ubuntu" ] || [ "$_distro" = "Debian" ]; then
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
export PATH="/usr/lib/ccache/bin/:$PATH"
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
elif [ "$_distro" = "Fedora" ] || [ "$_distro" = "Suse" ]; then
export PATH="/usr/lib64/ccache/:$PATH"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
fi
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
export CCACHE_SLOPPINESS="file_macro,locale,time_macros"
export CCACHE_NOHASHDIR="true"
msg2 'ccache was found and will be used'
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
fi
if [ -z $_kernel_localversion ]; then
_kernel_flavor="tkg-${_cpusched}"
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
else
_kernel_flavor="tkg-${_kernel_localversion}"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
fi
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [ "$_distro" = "Ubuntu" ] || [ "$_distro" = "Debian" ]; then
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
if make -j ${_thread_num} deb-pkg LOCALVERSION=-${_kernel_flavor}; then
msg2 "Building successfully finished!"
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
cd "$_where"
# Create DEBS folder if it doesn't exist
mkdir -p DEBS
# Move rpm files to RPMS folder inside the linux-tkg folder
mv "$_where"/*.deb "$_where"/DEBS/
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
read -p "Do you want to install the new Kernel ? y/[n]: " _install
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [[ $_install =~ [yY] ]] || [ $_install = "yes" ] || [ $_install = "Yes" ]; then
cd "$_where"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
_kernelname=$_basekernel.$_kernel_subver-$_kernel_flavor
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
_headers_deb="linux-headers-${_kernelname}*.deb"
_image_deb="linux-image-${_kernelname}_*.deb"
_kernel_devel_deb="linux-libc-dev_${_kernelname}*.deb"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
cd DEBS
sudo dpkg -i $_headers_deb $_image_deb $_kernel_devel_deb
fi
fi
elif [[ "$_distro" = "Fedora" || "$_distro" = "Suse" ]]; then
# Replace dashes with underscores, it seems that it's being done by binrpm-pkg
# Se we can actually refer properly to the rpm files.
_kernel_flavor=${_kernel_flavor//-/_}
if make -j ${_thread_num} rpm-pkg EXTRAVERSION="_${_kernel_flavor}"; then
msg2 "Building successfully finished!"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
cd "$_where"
# Create RPMS folder if it doesn't exist
mkdir -p RPMS
# Move rpm files to RPMS folder inside the linux-tkg folder
mv ~/rpmbuild/RPMS/x86_64/* "$_where"/RPMS/
#Clean up the original folder, unneeded and takes a lot of space
rm -rf ~/rpmbuild/
read -p "Do you want to install the new Kernel ? y/[n]: " _install
if [ "$_install" = "y" ] || [ "$_install" = "Y" ] || [ "$_install" = "yes" ] || [ "$_install" = "Yes" ]; then
_kernelname=$_basekernel.${_kernel_subver}_$_kernel_flavor
_headers_rpm="kernel-headers-${_kernelname}*.rpm"
_kernel_rpm="kernel-${_kernelname}*.rpm"
_kernel_devel_rpm="kernel-devel-${_kernelname}*.rpm"
cd RPMS
if [ "$_distro" = "Fedora" ]; then
sudo dnf install $_headers_rpm $_kernel_rpm $_kernel_devel_rpm
elif [ "$_distro" = "Suse" ]; then
msg2 "Some files from 'linux-glibc-devel' will be replaced by files from the custom kernel-hearders package"
msg2 "To revert back to the original kernel headers do 'sudo zypper install -f linux-glibc-devel'"
sudo zypper install --replacefiles --allow-unsigned-rpm $_headers_rpm $_kernel_rpm $_kernel_devel_rpm
fi
msg2 "Install successful"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
fi
fi
fi
fi
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [ "$1" = "uninstall-help" ]; then
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
cd "$_where"
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
msg2 "List of installed custom tkg kernels: "
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
Support Fedora and derivatives (#56) * linux57: install.sh: Add install for Fedora * linux57: install.sh: use dnf to install and save it for uninstall * linux57: install.sh: enable Fedora compilation * linux57: use single equal sign for conditions * linux57: Add uninstall step * linux57: remove unwated changes * linux57: install.sh: code cleanup * linux57: install.sh: remove redundant condition * linux57: install.sh: Fedora: update dependency install * linux57: install.sh: uninstall only kernel and keep dependencies * linux57: install.sh: make script executable * linux57: install.sh: remove header uninstall in Ubuntu * Linux57: Initial Suse support * linux57: install.sh: Add Suse to the distro error message * linux57: install.sh: Additionnal Suse dependency packages * linux57: install.sh: disable gpg check for Suse kernel install * linux57: install.sh: Fedora & derivative: produce dev files * Linux57: install.sh: make Suse use ccache * Linux57: install.sh: Fedora & derivatives: add install/uninstall of kernel-devel * linux57: install.sh: Fix: disable sign check for Suse kernel install * linux57: install.sh: Fedora & derivatives: enable confirm prompt for kernel install * linux57: install.sh: suse add flag to replace files from default kernel-headers * linux57: install.sh: make uninstall manual * linux57: install.sh: add uninstall help for Suse * linux57: install.sh: correct uninstall message for suse * linux57: install.sh: move made RPMS into working folder and cleanup * linux57: install.sh: add uninstall help for Fedora * linux57: install.sh: Move deb files into DEBs folder * linux57: install.sh: Ubuntu: install dev deb package * linux57: install.sh: add Ubuntu uninstall help. * linux57: install.sh: improve Ubuntu uninstall help * linux57: Add Debian distro and related fix * linux57: install.sh: prompt for distro * linux57: install.sh: use _basekernel instead of 5.7 * linux57: install.sh: fix for using _basekernel everywhere * linux57: add ubuntu/debian dependency install * linux58: copy install.sh from 5.7 as-is, add distro prompt * linux59: copy install.sh from 5.7 as-is, add distro prompt * Fix PKGBUILD after adding the distro prompt * Revert "Fix PKGBUILD after adding the distro prompt" This reverts commit 9c3c155b3ed07a4aa04ec10d6fc0e8b5710a2f07. * Fix PKGBUILD because of the distro prompt * linux57: install.sh: improve `config` script path * linux57: install.sh: loop if wrong answer in distro prompt * linux57: install.sh: code cleanup * Copy linux57 install.sh to linux58 and linux59 * install.sh: change "uninstall" argument to "uninstall-help" * Update READMEs
2020-09-01 17:57:21 +02:00
if [ "$_distro" = "Ubuntu" ]; then
dpkg -l "*tkg*" | grep "linux.*tkg"
dpkg -l "*linux-libc-dev*" | grep "linux.*tkg"
msg2 "To uninstall a version, you should remove the linux-image, linux-headers and linux-libc-dev associated to it (if installed), with: "
msg2 " sudo apt remove linux-image-VERSION linux-headers-VERSION linux-libc-dev-VERSION"
msg2 " where VERSION is displayed in the lists above, uninstall only versions that have \"tkg\" in its name"
elif [ "$_distro" = "Fedora" ]; then
dnf list --installed kernel*
msg2 "To uninstall a version, you should remove the kernel, kernel-headers and kernel-devel associated to it (if installed), with: "
msg2 " sudo dnf remove --noautoremove kernel-VERSION kernel-devel-VERSION kernel-headers-VERSION"
msg2 " where VERSION is displayed in the second column"
elif [ "$_distro" = "Suse" ]; then
zypper packages --installed-only | grep "kernel.*tkg"
msg2 "To uninstall a version, you should remove the kernel, kernel-headers and kernel-devel associated to it (if installed), with: "
msg2 " sudo zypper remove --no-clean-deps kernel-VERSION kernel-devel-VERSION kernel-headers-VERSION"
msg2 " where VERSION is displayed in the second to last column"
Add Ubuntu install script + general-ish .config&patching script (#26) * linux57: Add make xconfig option * Linux57: copy PKGBUILD initial commands to _tkg_initscript() * linux57: Update _tkg_initscript() in "tkg-config/prepare" * linux57: Add _define_vars() function in tkg-config/prepare * linux57: Prepend "$_where" to patch paths, in _tkg_srcprep() This is done to be able to change the $_where in the non-Arch install script * linux57: Add distro choice config in customization.cfg, enable "Ubuntu" as option Show options that won't apply when target distro is Ubuntu * linux57: Isolate Arch specific commands in _tkg_srcprep() * linux57: make _tkg_initscript() more verbose * WIP: linux57: Add install.sh script The script downloads linux's source code, applies patches, and handles the .config file after copying the one from the distribution it's running on. TODO: Implement install (and maybe uninstall) * linux57: Add make xconfig option description in customization.cfg * linux57: Fix _EXT_CONFIG_PATH usage and variable sourcing * linux57: Add missing space in condition * linux57: Make _EXT_CONFIG_PATH description as usable by Ubuntu install script * linux57: Add LOCALVERSION kernel choice variable in customization.cfg For now it won't apply for Arch, but can be implemented * linux57: Properly delete linux source folder * linux57: Add progress message when doing make oldconfig * linux57: Add kernel compilation for Ubuntu * linux57: Fix warning in if condition * linux57: Add message when downloading CPU opt patch * linux57: Make script exit at any error * linux57: Move to linux (base version + subversion patch) approach * linux57: Use git to get/reset linux sources and move between subversions This approach has the least impact on the hard-drive given that only the files that need to be changed get changed by git. * linux57: Fix external config loading message * linux57: install.sh: use latest subersion, enable reverting to older ones * linux57: Add extra cleanup steps * Move user_patcher() to tkg-config/prepare * linux57: restore old patch files for old kernel subversions Old kernel subversions are needed for Ubuntu since the latest ones fail to build. * linux57: Define and use script location variable Makes folder navigation more reliable in the script * linux57: Add install step * linux57: install.sh: Uncomment compilation step * linux57: install.sh: Add "config" and "install" commands * linux57: install.sh: Add uninstall command * linux57: Add relative path for misc-patch * Fix leak error for CONFIG_PDS in make deb-pkg * linux57: Define _where in _tkg_srcprep for Arch * Revert "linux57: restore old patch files for old kernel subversions" This reverts commit 65dcbd654c4151283189505c826903c342782d0e. * linux57: Update shasum for pds-undead patch * linux57: Drop support for reverting to older subversions Latest kernel subversions should now work on other distros too * linux57: install.sh load user given customization.cfg first * linux57: install.sh install Ubuntu dependencies * linux57: install.sh: add help message for available commands * linux57: replace _misc_adds with _distro variable * linux57: Update README.md * linux57: README.md: fix typo * linux57: README.md: remove "nano customization.cfg" line * linux57: README.md: fix formatting * Revert "linux57: Update shasum for pds-undead patch" This reverts commit 3c6abef7993a02fc0ae97c23aab379968daa3a31. * Revert "Fix leak error for CONFIG_PDS in make deb-pkg" This reverts commit 40a2a002ae060b309a465d5b6c22a7b91828af0a. * linux57: tkg-config/prepare: remove unused variable defines * linux57: install.sh: use var for folder cleanup * Revert "linux57: replace _misc_adds with _distro variable" This reverts commit 9efdd31b8c0e4c34b2e2878de5bca83ea8e73018.
2020-08-06 19:59:17 +02:00
fi
fi