1
0
mirror of https://github.com/rancher/os-kernel.git synced 2025-09-04 14:24:36 +00:00

package build files

This commit is contained in:
Ivan Mikushin
2015-09-17 12:44:12 +05:00
parent 9980dc00e1
commit c2e570e89d
2 changed files with 13 additions and 6 deletions

View File

@@ -4,14 +4,12 @@ set -e
: ${KERNEL_URL:="https://github.com/rancher/linux/archive/Ubuntu-3.19.0-27.29.tar.gz"}
: ${KERNEL_SHA1:="84b9bc53bbb4dd465b97ea54a71a9805e27ae4f2"}
: ${ARTIFACTS:=$(pwd)/assets}
: ${BUILD:=$(pwd)/build}
: ${BUILD:=/usr/src}
: ${CONFIG:=$(pwd)/config}
: ${DIST:=$(pwd)/dist}
DOCKER_FILE=${CONFIG}/.dockerfile
mkdir -p ${BUILD} ${DIST}
write_base()
{
if [ "${BASE_WRITTEN}" = "true" ]; then
@@ -112,3 +110,10 @@ download()
return 1
fi
}
list_build_files() {
find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl
find $(find ./arch/${SRCARCH} -name include -o -name scripts -type d) ./include ./scripts -type f
find ./arch/${SRCARCH} -name module.lds -o -name Kbuild.platforms -o -name Platform
find . -name Module.symvers -type f
}

View File

@@ -1,17 +1,17 @@
#!/bin/bash
set -e
cd $(dirname $0)/..
source scripts/build-common
apt-get install -y build-essential libncurses5-dev bc ccache
export CCACHE_DIR="${HOME}/.kernel-ccache"
export CC="ccache gcc"
export PATH="/usr/lib/ccache:$PATH"
KERNEL=$(basename ${KERNEL_URL})
DIR=${KERNEL/.tar.*//}
mkdir -p ${BUILD}
cd ${BUILD}
if [ ! -e ${DIR} ]; then
@@ -31,7 +31,9 @@ cp ${CONFIG}/kernel-config .config
make oldconfig
make -j$(nproc) tar-pkg
list_build_files | tar -czf build.tar.gz -T /dev/stdin
mkdir -p ${DIST}/kernel
mv linux*.tar ${DIST}/kernel
gzip ${DIST}/kernel/linux*.tar
make headers_install INSTALL_HDR_PATH=${DIST}/kernel/headers
mv build.tar.gz ${DIST}/kernel