kernel: Add contents of ${DEBUG} to the LOCALVERSION

This way 'uname -r' will report something like
4.9.44-linuxkit_dbg on debug kernels.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer 2017-08-24 11:53:35 +01:00
parent 8b84baf226
commit 15d3ce25aa

View File

@ -80,6 +80,7 @@ RUN case $(uname -m) in \
cp /linux/kernel_config-${KERNEL_SERIES}-$(uname -m) ${KERNEL_DEF_CONF}; \
if [ -n "${DEBUG}" ]; then \
sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' ${KERNEL_DEF_CONF}; \
sed -i "s/CONFIG_LOCALVERSION=\"-linuxkit\"/CONFIG_LOCALVERSION=\"-linuxkit${DEBUG}\"/" ${KERNEL_DEF_CONF}; \
cat /linux/debug_config >> ${KERNEL_DEF_CONF}; \
fi && \
rm /linux/kernel_config-${KERNEL_SERIES}* && \