mirror of
https://github.com/dynup/kpatch
synced 2025-03-21 02:16:45 +00:00
Merge pull request #732 from gktrk/variable-make-jobs
kpatch-build: allow the number of make jobs to be specified using CPUS
This commit is contained in:
commit
1719f9ee13
@ -326,6 +326,7 @@ usage() {
|
||||
echo " -s, --sourcedir Specify kernel source directory" >&2
|
||||
echo " -c, --config Specify kernel config file" >&2
|
||||
echo " -v, --vmlinux Specify original vmlinux" >&2
|
||||
echo " -j, --jobs Specify the number of make jobs" >&2
|
||||
echo " -t, --target Specify custom kernel build targets" >&2
|
||||
echo " -o, --output Specify output folder" >&2
|
||||
echo " -d, --debug Keep scratch files in /tmp" >&2
|
||||
@ -334,7 +335,7 @@ usage() {
|
||||
echo " (not recommended)" >&2
|
||||
}
|
||||
|
||||
options=$(getopt -o hr:s:c:v:t:o:d -l "help,sourcerpm:,sourcedir:,config:,vmlinux:,target:,output:,debug,skip-gcc-check,skip-cleanup" -- "$@") || die "getopt failed"
|
||||
options=$(getopt -o hr:s:c:v:j:t:o:d -l "help,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,output:,debug,skip-gcc-check,skip-cleanup" -- "$@") || die "getopt failed"
|
||||
|
||||
eval set -- "$options"
|
||||
|
||||
@ -367,6 +368,11 @@ while [[ $# -gt 0 ]]; do
|
||||
VMLINUX=$(readlink -f "$2")
|
||||
shift
|
||||
;;
|
||||
-j|--jobs)
|
||||
[[ ! "$2" -gt 0 ]] && die "Invalid number of make jobs '$2'"
|
||||
CPUS="$2"
|
||||
shift
|
||||
;;
|
||||
-t|--target)
|
||||
TARGETS="$TARGETS $2"
|
||||
shift
|
||||
|
Loading…
Reference in New Issue
Block a user