From 406a89c714c26391eb0865a1a604bc1cd2b0e1dd Mon Sep 17 00:00:00 2001 From: Maksym Stetsyuk Date: Sun, 25 Nov 2018 23:33:48 -0500 Subject: [PATCH] add ability to configure FreeBSD kernel build type, exposing KERNCONF environment variable via json manifest --- build-distro.sh | 6 +++++- trident-master.json | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build-distro.sh b/build-distro.sh index 486cd68..bc61fdb 100755 --- a/build-distro.sh +++ b/build-distro.sh @@ -37,7 +37,11 @@ if [ ! -f "${TRUEOS_MANIFEST}" ] ; then return 1 fi export TRUEOS_MANIFEST=`realpath -q "${TRUEOS_MANIFEST}"` +kernelBuildType=`jq -r '."kernel_build_type"' ${TRUEOS_MANIFEST}` +export KERNCONF=${kernelBuildType} + _manifest_version=`jq -r '."version"' ${TRUEOS_MANIFEST}` + if [ -z "${_manifest_version}" ] ; then echo "[ERROR] Could not read build manifest! ${TRUEOS_MANIFEST}" return 1 @@ -410,7 +414,7 @@ make_world(){ } make_kernel(){ - if [ -e "${INTERNAL_RELEASE_OBJDIR}/sys/GENERIC/kernel" ] ; then + if [ -e "${INTERNAL_RELEASE_OBJDIR}/sys/${kernelBuildType}/kernel" ] ; then echo "[INFO] Base Kernel Unchanged: Re-using base packages" else echo "[INFO] Building kernel..." diff --git a/trident-master.json b/trident-master.json index 6c700ed..c5f65ee 100644 --- a/trident-master.json +++ b/trident-master.json @@ -6,10 +6,11 @@ "ports-github-org" : "trueos", "ports-github-repo" : "trueos-ports", "ports-github-tag" : "ecb08ef2389b550a139526c3f47268ec3b236671", + "kernel_build_type": "GENERIC-NODEBUG", "base-packages" : { "name-prefix" : "OS", "kernel-flags" : { - "default" : [] + "default" : [] }, "world-flags" : { "default" : [],