Install kernel on installer image

This commit is contained in:
Renato Botelho 2016-06-27 17:48:02 -03:00
parent 33306accaf
commit 7d46089736
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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