diff --git a/CLFS/config b/CLFS/config index 0084973..1e20ebc 100644 --- a/CLFS/config +++ b/CLFS/config @@ -49,6 +49,10 @@ CONFIG= # NOTE: this setting is required BOOT_CONFIG= +# Get the kernel package and patches even if no configutation file +# has been supplied? 0(no)/1(yes) +GETKERNEL=0 + #--- Book's sources directory # If you have previously checked out the book from the repository BOOK= diff --git a/HLFS/config b/HLFS/config index 956105d..cb34228 100644 --- a/HLFS/config +++ b/HLFS/config @@ -19,6 +19,10 @@ FSTAB= # If no config file is specified the kernel is NOT compiled CONFIG= +# Get the kernel package and patches even if no configutation file +# has been supplied? 0(no)/1(yes) +GETKERNEL=0 + #--- Book's sources directory # If you have previously checked out the book from the repository BOOK= diff --git a/LFS/config b/LFS/config index e803dd7..a1388c0 100644 --- a/LFS/config +++ b/LFS/config @@ -13,6 +13,10 @@ FSTAB= # If no config file is specified the kernel is NOT compiled CONFIG= +# Get the kernel package and patches even if no configutation file +# has been supplied? 0(no)/1(yes) +GETKERNEL=0 + #--- Book's sources directory # If you have previously checked out the book from the repository BOOK= diff --git a/common/common-functions b/common/common-functions index e691209..9680b00 100644 --- a/common/common-functions +++ b/common/common-functions @@ -624,7 +624,8 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if [[ "$VIMLANG" = "0" ]] && continue ;; *linux/linux-* ) - [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] && continue + [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] && \ + [[ "$GETKERNEL" = "0" ]] && continue ;; esac diff --git a/common/func_validate_configs.sh b/common/func_validate_configs.sh index ca56b0c..e9c4a3f 100644 --- a/common/func_validate_configs.sh +++ b/common/func_validate_configs.sh @@ -84,9 +84,9 @@ validate_config() { # Are the config values sane (within reason) inline_doc # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables - local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG KEYMAP PAGE TIMEZONE LANG LC_ALL" - local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG KEYMAP VIMLANG PAGE TIMEZONE LANG" - local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG VIMLANG PAGE TIMEZONE LANG" + local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL" + local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG" + local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG" local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,' local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \${OFF}' @@ -172,6 +172,9 @@ inline_doc # Validate general parameters.. GETPKG) validate_against_str "x0x x1x" ;; + GETKERNEL ) if [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] ; then + [[ "$GETPKG" = "1" ]] && validate_against_str "x0x x1x" + fi ;; RUNMAKE) validate_against_str "x0x x1x" ;; REPORT) validate_against_str "x0x x1x" if [[ "${!config_param}" = "1" ]]; then