build: add a working DEBUG flag for 22.1 kernels
Make sure to do a manual clean kernel build run in order to get the necessary files in place. A partial rebuild does not seem to work.
This commit is contained in:
parent
775737ffd5
commit
5559bc8524
7
Makefile
7
Makefile
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2015-2021 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2015-2022 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
@ -84,7 +84,8 @@ _ARCH!= uname -p
|
|||
ARCH?= ${_ARCH}
|
||||
ABI?= ${_CONFIGDIR:C/^.*\///}
|
||||
KERNEL?= SMP
|
||||
ADDITIONS?= #os-dyndns
|
||||
ADDITIONS?= # empty
|
||||
DEBUG?= # empty
|
||||
DEVICE?= A10
|
||||
COMSPEED?= 115200
|
||||
COMPORT?= 0x3f8
|
||||
|
@ -155,7 +156,7 @@ VERBOSE_FLAGS= -x
|
|||
VERBOSE_HIDDEN= @
|
||||
.endif
|
||||
|
||||
.for _VERSION in ABI LUA PERL PHP PYTHON RUBY VERSION
|
||||
.for _VERSION in ABI DEBUG LUA PERL PHP PYTHON RUBY VERSION
|
||||
VERSIONS+= PRODUCT_${_VERSION}=${${_VERSION}}
|
||||
.endfor
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ Available build options are:
|
|||
* ARCH: the target architecture if not native
|
||||
* COMPORT: serial port, e.g. "0x3f8" (default)
|
||||
* COMSPEED: serial speed, e.g. "115200" (default)
|
||||
* DEBUG: build a debug kernel with additional object information
|
||||
* DEVICE: loads device-specific modifications, e.g. "A10" (default)
|
||||
* FLAVOUR: "OpenSSL" (default), "LibreSSL", "Base"
|
||||
* KERNEL: the kernel config to use, e.g. SMP (default)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2014-2021 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2014-2022 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,9 +44,19 @@ 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
|
||||
|
||||
if [ -f ${CONFIGDIR}/${PRODUCT_KERNEL} ]; then
|
||||
cp "${CONFIGDIR}/${PRODUCT_KERNEL}" \
|
||||
KERNDEBUG="nomakeoptions DEBUG"
|
||||
SRCDEBUG="WITHOUT_DEBUG_FILES=yes"
|
||||
|
||||
if [ -n "${PRODUCT_DEBUG}" ]; then
|
||||
KERNDEBUG="makeoptions DEBUG=-g"
|
||||
SRCDEBUG=
|
||||
fi
|
||||
|
||||
if [ -f "${CONFIGDIR}/${PRODUCT_KERNEL}" ]; then
|
||||
sed -e "s/%%DEBUG%%/${KERNDEBUG}/" "${CONFIGDIR}/${PRODUCT_KERNEL}" > \
|
||||
"${SRCDIR}/sys/${PRODUCT_TARGET}/conf/${PRODUCT_KERNEL}"
|
||||
else
|
||||
echo ">>> Attempting to use external kernel: ${PRODUCT_KERNEL}"
|
||||
fi
|
||||
|
||||
MAKE_ARGS="
|
||||
|
@ -54,7 +64,7 @@ TARGET_ARCH=${PRODUCT_ARCH}
|
|||
TARGET=${PRODUCT_TARGET}
|
||||
KERNCONF=${PRODUCT_KERNEL}
|
||||
SRCCONF=${CONFIGDIR}/src.conf
|
||||
WITHOUT_DEBUG_FILES=yes
|
||||
${SRCDEBUG}
|
||||
__MAKE_CONF=
|
||||
${MAKE_ARGS_DEV}
|
||||
"
|
||||
|
|
|
@ -2,8 +2,7 @@ include GENERIC
|
|||
|
||||
ident SMP
|
||||
|
||||
#makeoptions DEBUG=-g
|
||||
nomakeoptions DEBUG
|
||||
%%DEBUG%%
|
||||
|
||||
options DDB
|
||||
options GEOM_BDE
|
||||
|
|
|
@ -2,8 +2,7 @@ include GENERIC
|
|||
|
||||
ident SMP
|
||||
|
||||
#makeoptions DEBUG=-g
|
||||
nomakeoptions DEBUG
|
||||
%%DEBUG%%
|
||||
|
||||
options DDB
|
||||
options GEOM_BDE
|
||||
|
|
Loading…
Reference in New Issue