diff --git a/customization.cfg b/customization.cfg index 9a7c02e..a71281c 100644 --- a/customization.cfg +++ b/customization.cfg @@ -23,17 +23,19 @@ _NUKR="true" # Git mirror to use to get the kernel sources, possible values are "kernel.org", "googlesource.com", "github.com" and "torvalds" _git_mirror="kernel.org" -# Folder where to checkout the kernel sources and build inside it -# Note: - Start with a '/' for an absolute path +# Root folder where to checkout the kernel sources (linux-src-git subdir) and build +# Note: - Leave empty to use PKGBUILD's dir +# - Start with a '/' for an absolute path in which `linux-tkg/linux-src-git/` will be created # - This setting can be used to set the work/build folder to a tmpfs folder # - Requires >= 32GB ram when building a full kernel, should work with less ram with modprobed-db -_kernel_work_folder="linux-src-git" +_kernel_work_folder="" -# Permanent folder where to keep the git clone and fetch new blobs -# Note: - Start with a '/' for an absolute path +# Permanent root folder where to keep the git clone (linux-kernel.git subdir) and fetch new blobs +# Note: - Leave empty to use PKGBUILD's dir +# - Start with a '/' for an absolute path in which `linux-tkg/linux-kernel.git/` will be created # - If your internet is faster than your storage, it may be wise to put this folder # in a tmpfs location (although it will reclone after each restart / tmpfs folder cleanup) -_kernel_source_folder="linux-kernel.git" +_kernel_source_folder="" # Custom compiler root dirs - Leave empty to use system compilers # Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0" diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index 6e6d736..15939bd 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -383,14 +383,14 @@ _set_compiler(){ _define_kernel_abs_paths() { - _kernel_work_folder_abs="$_kernel_work_folder" - if ! [[ "$_kernel_work_folder" == /* ]]; then - _kernel_work_folder_abs="$_where/$_kernel_work_folder" + _kernel_work_folder_abs="$_where/$_kernel_work_folder/linux-src-git" + if [[ "$_kernel_work_folder" == /* ]]; then + _kernel_work_folder_abs="$_kernel_work_folder/linux-tkg/linux-src-git" fi - _kernel_source_folder_abs="$_kernel_source_folder" - if ! [[ "$_kernel_source_folder" == /* ]]; then - _kernel_source_folder_abs="$_where/$_kernel_source_folder" + _kernel_source_folder_abs="$_where/$_kernel_source_folder/linux-kernel.git" + if [[ "$_kernel_source_folder" == /* ]]; then + _kernel_source_folder_abs="$_kernel_source_folder/linux-tkg/linux-kernel.git" fi } @@ -399,11 +399,6 @@ _setup_kernel_work_folder() { _define_kernel_abs_paths - if [ "$_kernel_source_folder_abs" == "$_kernel_work_folder_abs" ]; then - warning "The kernel source folder cannot be the same as the kernel work folder" - exit 1 - fi - if [ -z "$_kernel_git_tag" ]; then warning "internal error: kernel version should be chosen before cloning kernel sources" exit 1