mirror of
https://github.com/opnsense/tools.git
synced 2026-05-28 04:35:46 -04:00
build/kernel: make kernel default/debug options external files
Easier to maintain. While here add KASASN to debug for a test drive.
This commit is contained in:
parent
f77fd1b8af
commit
54d92acbc8
3 changed files with 13 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2014-2024 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2014-2025 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
|
@ -44,16 +44,17 @@ git_version ${SRCDIR}
|
|||
KERNEL_DEBUG_SET=${SETSDIR}/kernel-dbg-${PRODUCT_VERSION}-${PRODUCT_ARCH}${PRODUCT_DEVICE+"-${PRODUCT_DEVICE}"}.txz
|
||||
KERNEL_RELEASE_SET=${SETSDIR}/kernel-${PRODUCT_VERSION}-${PRODUCT_ARCH}${PRODUCT_DEVICE+"-${PRODUCT_DEVICE}"}.txz
|
||||
|
||||
KERNDEBUG="nomakeoptions DEBUG"
|
||||
KERNDEBUG=default
|
||||
SRCDEBUG="WITHOUT_DEBUG_FILES=yes"
|
||||
|
||||
if [ -n "${PRODUCT_DEBUG}" ]; then
|
||||
KERNDEBUG="makeoptions DEBUG=-g\noptions INVARIANTS\noptions INVARIANT_SUPPORT\noptions KASSERT_PANIC_OPTIONAL"
|
||||
KERNDEBUG=debug
|
||||
SRCDEBUG=
|
||||
fi
|
||||
|
||||
if [ -f "${CONFIGDIR}/${PRODUCT_KERNEL}" ]; then
|
||||
sed -e "s/%%DEBUG%%/${KERNDEBUG}/" "${CONFIGDIR}/${PRODUCT_KERNEL}" > \
|
||||
sed -e "/%%DEBUG%%/r ${CONFIGDIR}/kernel.${KERNDEBUG}" \
|
||||
"${CONFIGDIR}/${PRODUCT_KERNEL}" | grep -v %%DEBUG%% > \
|
||||
"${SRCDIR}/sys/${PRODUCT_TARGET}/conf/${PRODUCT_KERNEL}"
|
||||
else
|
||||
echo ">>> Attempting to use external kernel: ${PRODUCT_KERNEL}"
|
||||
|
|
|
|||
6
config/25.1/kernel.debug
Normal file
6
config/25.1/kernel.debug
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# included from kernel.debug
|
||||
makeoptions DEBUG=-g
|
||||
options INVARIANTS
|
||||
options INVARIANT_SUPPORT
|
||||
options KASSERT_PANIC_OPTIONAL
|
||||
options KASAN
|
||||
2
config/25.1/kernel.default
Normal file
2
config/25.1/kernel.default
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# included from kernel.default
|
||||
nomakeoptions DEBUG
|
||||
Loading…
Reference in a new issue