Commit 03876975 authored by chrissi^'s avatar chrissi^

openwrt: Store Kernel Debug-Info

This change stores a Kernel with Debug-Symbols for the current
architecture in a new output directory '<outputdir>/debug'.
This allows a developer or operator of a network to store the kernel
along with the actual images. In case of a kernel oops the debug
information can be used with the script
'scripts/decode_stacktrace.sh'  in the kernel source tree to get the
names to the symbols of the stack trace.

OpenWRT already provides the CONFIG_COLLECT_KERNEL_DEBUG -option that
creates a kernel with debug-symbols in the OpenWRT output directory.
This change enables this option and copies the generated kernel to the
gluon output directory.
Signed-off-by: chrissi^'s avatarChrissi^ <chris@tinyhost.de>
parent cdaefa44
......@@ -26,6 +26,7 @@ end
mkdir(env.GLUON_IMAGEDIR..'/factory')
mkdir(env.GLUON_IMAGEDIR..'/sysupgrade')
mkdir(env.GLUON_IMAGEDIR..'/other')
mkdir(env.GLUON_IMAGEDIR..'/debug')
lib.include(target)
......@@ -53,6 +54,11 @@ for _, image in ipairs(lib.images) do
end
end
local kernel_debug_source = string.format('openwrt/bin/targets/%s/kernel-debug.tar.bz2',
bindir)
local kernel_debug_dest = env.GLUON_IMAGEDIR..'/debug/'..env.BOARD..'-'..subtarget..'-kernel-debug.tar.bz2'
lib.exec {'cp', kernel_debug_source, kernel_debug_dest}
-- Copy opkg repo
if lib.opkg and (env.GLUON_DEVICES or '') == '' then
......
......@@ -44,6 +44,8 @@ config 'CONFIG_PACKAGE_ATH_DEBUG=y'
config '# CONFIG_KERNEL_IP_MROUTE is not set'
config '# CONFIG_KERNEL_IPV6_MROUTE is not set'
config 'CONFIG_COLLECT_KERNEL_DEBUG=y'
try_config 'CONFIG_TARGET_MULTI_PROFILE=y'
try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment