setting KERNEL_IMAGE_STRIP_EXTRA_SECTIONS blows up building linux-yocto
testing my recent docs submission documentingKERNEL_IMAGE_STRIP_EXTRA_SECTIONS, and it did not go well. i'm iterating through all of the tasks for building linux-yocto for a rockchip-based orangepi-5-plus, and everything worked fine up to and including the do_transform_kernel() task.
for fun, i added to my local.conf:
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment"
and manually ran the do_strip() task:
$ bitbake -c strip linux-yocto
to get:
ERROR: linux-yocto-6.18.35+git-r0 do_strip: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function:
<module>
0001:
*** 0002:do_strip(d)
0003:File:
'/home/rpjday/oe/layers/openembedded-core/meta/classes-recipe/kernel.bbclass',
lineno: 753, function: do_strip
0749:
0750: if (extra_sections andkernel_image.find(d.getVar('KERNEL_IMAGEDEST') + '/vmlinux') != -1):
0751: kernel_image_stripped = kernel_image + ".stripped"
0752: shutil.copy2(kernel_image, kernel_image_stripped)
*** 0753: oe.package.runstrip((kernel_image_stripped, 8,
strip, extra_sections))
0754: bb.debug(1, "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is
set, stripping sections: " + \
0755: extra_sections)
0756:}
0757:do_strip[dirs] = "${B}"Exception: TypeError: runstrip() missing 2 required positional
arguments: 'elftype' and 'strip'
ERROR: Logfile of failure stored in:/home/rpjday/oe/builds/orangepi-5-plus/build/tmp/work/orangepi_5_plus-oe-linux/linux-yocto/6.18.35+git/temp/log.do_strip.2408627
ERROR: Task (/home/rpjday/oe/layers/openembedded-core/meta/recipes-kernel/linux/linux-yocto_6.18.bb:do_strip)
failed with exit code '1'
all i did was add that line to my local.conf, is there something
else i'm missing in order to use that feature?
rday
Hi Robert,
Quoted 52 lines · Robert P. J. Day via lists.openembedded.org
testing my recent docs submission documenting
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS, and it did not go well. i'm iterating through all of the tasks for building linux-yocto for a rockchip-based orangepi-5-plus, and everything worked fine up to and including thedo_transform_kernel()task.for fun, i added to my local.conf:
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS= ".comment"and manually ran the
do_strip()task:$ bitbake -c strip linux-yoctoto get:
ERROR: linux-yocto-6.18.35+git-r0
do_strip: Error executing a python function inexec_func_python()autogenerated:The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python()autogenerated', lineno: 2, function:
<module>0001: *** 0002:do_strip(d) 0003:File:
'/home/rpjday/oe/layers/openembedded-core/meta/classes-recipe/kernel.bbclass',
lineno: 753, function:do_strip
0749:
0750: if (extra_sectionsandkernel_image.find(d.getVar('KERNEL_IMAGEDEST') + '/vmlinux')!= -1):0751: kernel_image_stripped = kernel_image + ".stripped" 0752: shutil.copy2(kernel_image, kernel_image_stripped) *** 0753: oe.package.runstrip((kernel_image_stripped, 8, strip, extra_sections)) 0754: bb.debug(1, "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping sections: " + \ 0755: extra_sections) 0756:} 0757:do_strip[dirs] = "${B}"Exception: TypeError:
runstrip()missing 2 required positional
arguments: 'elftype' and 'strip'ERROR: Logfile of failure stored in:
/home/rpjday/oe/builds/orangepi-5-plus/build/tmp/work/orangepi_5_plus-oe-linux/linux-yocto/6.18.35+git/temp/log.do_strip.2408627
ERROR: Task (/home/rpjday/oe/layers/openembedded-core/meta/recipes-kernel/linux/linux-yocto_6.18.bb:do_strip)
failed with exit code '1'
Quoted 3 lines
all i did was add that line to my local.conf, is there something
else i'm missing in order to use that feature?
Congrats, you found a bug. I sent a patch that should fix it though I haven't tested it, see https://lore.kernel.org/openembedded-core/[email protected]/.
Cheers,
Quentin
Quoted 55 lines · Quentin Schulz
Hi Robert,
Quoted 52 lines · Robert P. J. Day via lists.openembedded.org
testing my recent docs submission documenting
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS, and it did not go well. i'm iterating through all of the tasks for building linux-yocto for a rockchip-based orangepi-5-plus, and everything worked fine up to and including thedo_transform_kernel()task.for fun, i added to my local.conf:
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS= ".comment"and manually ran the
do_strip()task:$ bitbake -c strip linux-yoctoto get:
ERROR: linux-yocto-6.18.35+git-r0
do_strip: Error executing a python function inexec_func_python()autogenerated:The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python()autogenerated', lineno: 2, function:
<module>0001: *** 0002:do_strip(d) 0003:File:
'/home/rpjday/oe/layers/openembedded-core/meta/classes-recipe/kernel.bbclass',
lineno: 753, function:do_strip
0749:
0750: if (extra_sectionsandkernel_image.find(d.getVar('KERNEL_IMAGEDEST') + '/vmlinux')!= -1):0751: kernel_image_stripped = kernel_image + ".stripped" 0752: shutil.copy2(kernel_image, kernel_image_stripped) *** 0753: oe.package.runstrip((kernel_image_stripped, 8, strip, extra_sections)) 0754: bb.debug(1, "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping sections: " + \ 0755: extra_sections) 0756:} 0757:do_strip[dirs] = "${B}"Exception: TypeError:
runstrip()missing 2 required positional
arguments: 'elftype' and 'strip'ERROR: Logfile of failure stored in:
/home/rpjday/oe/builds/orangepi-5-plus/build/tmp/work/orangepi_5_plus-oe-linux/linux-yocto/6.18.35+git/temp/log.do_strip.2408627
ERROR: Task (/home/rpjday/oe/layers/openembedded-core/meta/recipes-kernel/linux/linux-yocto_6.18.bb:do_strip)
failed with exit code '1'
Quoted 7 lines
Quoted 3 lines
all i did was add that line to my local.conf, is there something
else i'm missing in order to use that feature?Congrats, you found a bug. I sent a patch that should fix it though I haven't tested it, see
https://lore.kernel.org/openembedded-core/[email protected]/.
i can report that your fix to kernel.bbclass allowed my command:
$ bitbake -c strip linux-yocto
to complete without error. thank you kindly.
rday
Quentin Schulz
Tested-by Robert P. J. DayHi Robert,
Quoted 65 lines · Robert P. J. Day
Quoted 55 lines · Quentin Schulz
Hi Robert,
Quoted 52 lines · Robert P. J. Day via lists.openembedded.org
testing my recent docs submission documenting
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS, and it did not go well. i'm iterating through all of the tasks for building linux-yocto for a rockchip-based orangepi-5-plus, and everything worked fine up to and including thedo_transform_kernel()task.for fun, i added to my local.conf:
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS= ".comment"and manually ran the
do_strip()task:$ bitbake -c strip linux-yoctoto get:
ERROR: linux-yocto-6.18.35+git-r0
do_strip: Error executing a python function inexec_func_python()autogenerated:The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python()autogenerated', lineno: 2, function:
<module>0001: *** 0002:do_strip(d) 0003:File:
'/home/rpjday/oe/layers/openembedded-core/meta/classes-recipe/kernel.bbclass',
lineno: 753, function:do_strip
0749:
0750: if (extra_sectionsandkernel_image.find(d.getVar('KERNEL_IMAGEDEST') + '/vmlinux')!= -1):0751: kernel_image_stripped = kernel_image + ".stripped" 0752: shutil.copy2(kernel_image, kernel_image_stripped) *** 0753: oe.package.runstrip((kernel_image_stripped, 8, strip, extra_sections)) 0754: bb.debug(1, "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping sections: " + \ 0755: extra_sections) 0756:} 0757:do_strip[dirs] = "${B}"Exception: TypeError:
runstrip()missing 2 required positional
arguments: 'elftype' and 'strip'ERROR: Logfile of failure stored in:
/home/rpjday/oe/builds/orangepi-5-plus/build/tmp/work/orangepi_5_plus-oe-linux/linux-yocto/6.18.35+git/temp/log.do_strip.2408627
ERROR: Task (/home/rpjday/oe/layers/openembedded-core/meta/recipes-kernel/linux/linux-yocto_6.18.bb:do_strip)
failed with exit code '1'Quoted 7 lines
Quoted 3 lines
all i did was add that line to my local.conf, is there something
else i'm missing in order to use that feature?Congrats, you found a bug. I sent a patch that should fix it though I haven't tested it, see
https://lore.kernel.org/openembedded-core/[email protected]/.
Quoted 6 lines
i can report that your fix to kernel.bbclass allowed my command:
$ bitbake -c strip linux-yoctoto complete without error. thank you kindly.
Can you please answer on the OE-Core patch with
:) ?
Thanks for testing and the quick feedback!
Quentin