diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2018-01-18 01:13:32 +0100 |
---|---|---|
committer | Anders Roxell <anders.roxell@linaro.org> | 2018-01-18 16:54:14 +0100 |
commit | c5f0050b6b580a4cbc28a256dc9cf7bd2575c89a (patch) | |
tree | e68a9dd0b212cfc74139ba6f3afb6eee58f473cb | |
parent | 072aa924404b5dc37298678e76e203fc5dd3cdb3 (diff) |
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
-rwxr-xr-x | build-kernel | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/build-kernel b/build-kernel index 1cc2d66..c7137b1 100755 --- a/build-kernel +++ b/build-kernel @@ -15,6 +15,7 @@ FIT_NAME="kernel kernel_dtb" KDIR=${KDIR:-$(pwd)} clean_build=0 +build_deb_packages=0 #ARCH=arm64 git_describe=$(git describe --long) KERNEL_VERSION="linux-mainline" @@ -33,10 +34,11 @@ usage() { echo -e " ..." echo -e " -i defconfig, defconfig to build in the src tree" echo -e " -m MACHINE, add machine name" + echo -e " -p, build deb packages" echo -e " -h, prints out this help" } -while getopts "a:cd:hk:i:m:" arg; do +while getopts "a:cd:hk:i:m:p" arg; do case $arg in a) ARCH="$OPTARG" @@ -56,6 +58,9 @@ while getopts "a:cd:hk:i:m:" arg; do m) MACHINE="$OPTARG" ;; + p) + build_deb_packages=1 + ;; h|*) usage exit 0 @@ -140,4 +145,9 @@ cp -f ${OUTPUT}/.config ${STAGING}/kernel-${git_describe}.config make -j ${NUM_CPUS} CROSS_COMPILE=${CROSS_COMPILE} ARCH=${ARCH} KDIR=${KDIR} O=${OUTPUT} Image cp -f ${OUTPUT}/arch/${ARCH}/boot/${image_name} ${STAGING}/${image_name}-${git_describe} cp -f $(find ${STAGING} -type f -name "*${dtb_name}-${git_describe}.dtb") ${STAGING}/ + +if [[ $build_deb_packages -eq 1 ]]; then + make -j ${NUM_CPUS} CROSS_COMPILE=${CROSS_COMPILE} ARCH=${ARCH} KDIR=${KDIR} O=${OUTPUT} bindeb-pkg + mv -f ${OUTPUT}/../*$(basename ${OUTPUT} |awk -F'-' '{print $1-$2}')*.* ${STAGING} +fi ## vim: set sw=4 sts=4 et foldmethod=syntax : ## |