summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-06-27 17:48:02 -0300
committerRenato Botelho <renato@netgate.com>2016-06-27 17:48:02 -0300
commit7d460897367410a3eaa8a68531e4b645990fbdc9 (patch)
tree801ba346b46f85b4bc9a4137483c02faed49d1ad
parent33306accaf76333f4da1c6e97c0c674d11c1c5bc (diff)
downloadpfsense-7d460897367410a3eaa8a68531e4b645990fbdc9.zip
pfsense-7d460897367410a3eaa8a68531e4b645990fbdc9.tar.gz
Install kernel on installer image
-rwxr-xr-xbuild.sh3
-rw-r--r--tools/builder_common.sh6
2 files changed, 7 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 85c4f5c..7e5f794 100755
--- a/build.sh
+++ b/build.sh
@@ -381,6 +381,9 @@ if [ -z "${_SKIP_REBUILD_PRESTAGE}" ]; then
echo ">>> Building kernel configs: $BUILD_KERNELS for FreeBSD: $FREEBSD_BRANCH ..."
build_all_kernels
+ # Install kernel on installer
+ installkernel ${INSTALLER_CHROOT_DIR}
+
# Prepare pre-final staging area
clone_to_staging_area
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index f805480..877aed7 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -1659,6 +1659,8 @@ buildkernel() {
# Imported from FreeSBIE
installkernel() {
+ local _destdir=${1:-${KERNEL_DESTDIR}}
+
if [ -z "${KERNCONF}" ]; then
echo ">>> ERROR: No kernel configuration defined probably this is not what you want! STOPPING!" | tee -a ${LOGFILE}
print_error_pfS
@@ -1670,10 +1672,10 @@ installkernel() {
fi
mkdir -p ${STAGE_CHROOT_DIR}/boot
- makeargs="${MAKEJ} DESTDIR=${KERNEL_DESTDIR}"
+ makeargs="${MAKEJ} DESTDIR=${_destdir}"
echo ">>> Builder is running the command: script -aq $LOGFILE make ${makeargs} installkernel KERNCONF=${KERNCONF}" | tee -a $LOGFILE
(script -aq $LOGFILE make -C ${FREEBSD_SRC_DIR} ${makeargs} installkernel KERNCONF=${KERNCONF} || print_error_pfS;) | egrep '^>>>'
- gzip -f9 $KERNEL_DESTDIR/boot/kernel/kernel
+ gzip -f9 ${_destdir}/boot/kernel/kernel
}
# Launch is ran first to setup a few variables that we need
OpenPOWER on IntegriCloud