From ae856c833347a88281cdc9af9fbb98f025aa65aa Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 6 Aug 2011 18:22:51 -0500 Subject: [PATCH] script/makeworld: build with GENERIC kernconf if none provided --- script/makeworld | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/script/makeworld b/script/makeworld index 0802b94..9467a11 100755 --- a/script/makeworld +++ b/script/makeworld @@ -143,6 +143,14 @@ then fi SRCS="$(realpath "${SRCS}")" +# If kernel config matching CONF does not exist, assume GENERIC +if [ -e "${world}/config/${CONF}" ] +then + KERNCONF="${CONF}" +else + KERNCONF=GENERIC +fi + # Environment for chroot build env=" USER=root @@ -180,6 +188,7 @@ prepare meh "Seed: ${seed}" meh "Srctree: ${SRCS}" meh "Config: ${ARCH}/${CONF}" +[ "${KERNCONF}" != "${CONF}" ] && meh "Kernel config: ${KERNCONF}" meh "Builddir: ${build}" meh "make ${MAKEOPTS}" meh "DESTDIR=${world}/root" @@ -190,7 +199,7 @@ do meh "==> Step: ${step} -> ${build_log}" [ "${BUILD_VERBOSE}" ] || exec 3>&1 > /dev/null script "${build_log}" env -i ${env} chroot "${build}" sh -c \ - "cd /usr/src; time make ${MAKEOPTS} ${step} TARGET=${ARCH} KERNCONF=${CONF} DESTDIR=/mnt" + "cd /usr/src; time make ${MAKEOPTS} ${step} TARGET=${ARCH} KERNCONF=${KERNCONF} DESTDIR=/mnt" res=$? [ "${BUILD_VERBOSE}" ] || exec 1>&3 [ "${res}" -gt 0 ] && wtf "chroot-cmd ${step} failed; check log" -- 2.42.0