2014-11-09 10:57:12 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-01-20 10:43:35 +01:00
|
|
|
# Copyright (c) 2014-2016 Franco Fichtner <franco@opnsense.org>
|
2014-11-09 10:57:12 +01:00
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions
|
|
|
|
# are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
2014-11-09 11:06:26 +01:00
|
|
|
#
|
2014-11-09 10:57:12 +01:00
|
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
|
|
# documentation and/or other materials provided with the distribution.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
# SUCH DAMAGE.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2015-05-16 12:48:14 +02:00
|
|
|
. ./common.sh && $(${SCRUB_ARGS})
|
2014-11-09 10:57:12 +01:00
|
|
|
|
2014-12-12 09:13:08 +01:00
|
|
|
git_describe ${SRCDIR}
|
2014-11-09 10:57:12 +01:00
|
|
|
|
2016-01-20 10:43:35 +01:00
|
|
|
KERNELSET=${SETSDIR}/kernel-${REPO_VERSION}-${ARCH}
|
|
|
|
|
|
|
|
if [ -f ${KERNELSET}.txz ]; then
|
|
|
|
echo ">>> Kernel is up to date"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
sh ./clean.sh kernel
|
|
|
|
|
2014-11-15 15:54:43 +01:00
|
|
|
BUILD_KERNEL="SMP"
|
|
|
|
|
|
|
|
# XXX move config to src.git
|
2015-06-12 08:01:54 +02:00
|
|
|
cp ${CONFIGDIR}/${BUILD_KERNEL} ${SRCDIR}/sys/${ARCH}/conf/${BUILD_KERNEL}
|
2014-11-15 15:54:43 +01:00
|
|
|
|
|
|
|
MAKEARGS="TARGET_ARCH=${ARCH} KERNCONF=${BUILD_KERNEL}"
|
2014-11-09 10:57:12 +01:00
|
|
|
|
|
|
|
make -C${SRCDIR} -j${CPUS} buildkernel ${MAKEARGS} NO_KERNELCLEAN=yes
|
|
|
|
make -C${SRCDIR}/release obj ${MAKEARGS}
|
|
|
|
make -C${SRCDIR}/release kernel.txz ${MAKEARGS}
|
|
|
|
|
2015-12-25 23:47:57 +01:00
|
|
|
mv $(make -C${SRCDIR}/release -V .OBJDIR)/kernel.txz ${KERNELSET}.txz
|
|
|
|
|
|
|
|
generate_signature ${KERNELSET}.txz
|