[RFC,v2,0/3] Extend create-spdx to build kernel spdx info

Message ID 20220111235840.81471-1-saul.wold@windriver.com
Headers show
Series Extend create-spdx to build kernel spdx info | expand

Message

Saul Wold Jan. 11, 2022, 11:58 p.m. UTC
This second change set, enables the kernel:do_strip() to share the
oe.package:runstrip() method. A copy of the kernel is made for the
kernel strip processing which is ultimately deployed, while the 
unstripped kernel image can be used by package.bbclass to generate
the extended packagedata (debug info).  The extended packagedata is
also used to genrate the SPDX data.

This change also needs to strip out the "/usr/src/kernel" path since
the kernel uses work-shared, which is added to the search path.

I have tested this with edgerouter which uses the
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS variable

If this looks good, I will send a non-RFC patch set tomorrow.


Sau!


Saul Wold (3):
  create-spdx: Add kernel work-shared source
  package: Add support for kernel stripping
  kernel.bbclass: use common strip()

 meta/classes/create-spdx.bbclass |  6 ++++-
 meta/classes/kernel.bbclass      | 44 ++++++++++++++------------------
 meta/classes/package.bbclass     | 21 +++++----------
 meta/lib/oe/package.py           |  7 +++--
 4 files changed, 36 insertions(+), 42 deletions(-)

Comments

Bruce Ashfield Jan. 12, 2022, 2:30 p.m. UTC | #1
On Tue, Jan 11, 2022 at 6:59 PM Saul Wold <saul.wold@windriver.com> wrote:
>
> This second change set, enables the kernel:do_strip() to share the
> oe.package:runstrip() method. A copy of the kernel is made for the
> kernel strip processing which is ultimately deployed, while the
> unstripped kernel image can be used by package.bbclass to generate
> the extended packagedata (debug info).  The extended packagedata is
> also used to genrate the SPDX data.
>
> This change also needs to strip out the "/usr/src/kernel" path since
> the kernel uses work-shared, which is added to the search path.
>
> I have tested this with edgerouter which uses the
> KERNEL_IMAGE_STRIP_EXTRA_SECTIONS variable
>
> If this looks good, I will send a non-RFC patch set tomorrow.
>

Minor comments from my side, the approach looks fine to me .. no major concerns!

Bruce

>
> Sau!
>
>
> Saul Wold (3):
>   create-spdx: Add kernel work-shared source
>   package: Add support for kernel stripping
>   kernel.bbclass: use common strip()
>
>  meta/classes/create-spdx.bbclass |  6 ++++-
>  meta/classes/kernel.bbclass      | 44 ++++++++++++++------------------
>  meta/classes/package.bbclass     | 21 +++++----------
>  meta/lib/oe/package.py           |  7 +++--
>  4 files changed, 36 insertions(+), 42 deletions(-)
>
> --
> 2.31.1
>