[OE-core] [PATCH 2/2] kernel.bbclass: do_strip: allow recipes to strip the kernel

Richard Purdie richard.purdie at linuxfoundation.org
Mon Apr 8 20:54:33 UTC 2013


On Mon, 2013-04-08 at 16:15 -0400, michel.thebeau at windriver.com wrote:
> From: Michel Thebeau <michel.thebeau at windriver.com>
> 
> Allow recipes to specify sections to be stripped from the kernel output
> using KERNEL_IMAGE_STRIP_EXTRA_SECTIONS.  For example:
> 
> KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment .unwanted"
> 
> The file to be stripped is a copy of ${KERNEL_OUTPUT} and will be given
> the same name with an additional ".stripped" suffix.  The suffix can be
> overridden using KERNEL_STRIP_SUFFIX.
> 
> Since the toolchain does not give indication when the specified sections
> are absent, we read the sections first and make this report by issuing a
> warning to the developer.
> 
> The toolchain by default strips the image with the -s option (even
> when -s is not specified):
> -s --strip-all       Remove all symbol and relocation information
> 
> For example, these sections are always removed:
> .debug_aranges
> .debug_info
> .debug_abbrev
> .debug_line
> .debug_frame
> .debug_str
> .debug_loc
> .debug_ranges
> .symtab
> .strtab
> 
> In addition to these, the sections listed in
> KERNEL_IMAGE_STRIP_EXTRA_SECTIONS will also be removed.
> 
> Only stripping of vmlinux (elf) is supported at this time.  A warning
> will be given if the image type is not vmlinux.
> 
> Stripping the image could also be done in the kernel, but that would
> only work for linux-yocto based kernels, so it's not the route we
> decided to go.
> 
> [YOCTO 3515]
> 
> Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
> Signed-off-by: Michel Thebeau <michel.thebeau at windriver.com>

Can we please just have one output kernel, not two. Is the unstripped
version useful anywhere?

Cheers,

Richard







More information about the Openembedded-core mailing list