Re: [linux-yocto] kernel-dev rpm does not have much contents

2019-10-30 Thread Michael Lim

>>Thank you Bruce. After enable kernel-devsrc, the necessary rpm had been
created.
>>
>>I have one question though, the kernel-devsrc does not seem to include
all the kernel src, that has been fetched and applied patches. Why does it
call kernel-devsrc instead of just kernel-dev? Is there a way to generate
rpm for a complete kernel src with patches applied?
>>
>Correct. It only has enough of the build artifacts to develop against the
running kernel, i.e. out of tree modules (either on the build host, or on
target).

>The name is historical, and isn't aligned with any specific distro (i.e.
no matter what folks say, there is no agreed upon naming for these
packages, so rather than break expectations in the ecosystem, we keep ours
as it was: >kernel-devsrc).

>To keep it minimal, we do use a curated version of the source (just like
redhat, etc). Footprint is very important for that package.

>That being said, I do have a patch that creates a 'linux-source' package
that is the complete source, but that is really only for reference and
isn't extensively tested for building/development. I'm not in a place that
I  can get that >patch right now, but I can send it out a bit later today.

>Out of curiosity. What is the use case that you have for the source ? With
that information, I can tweak what we are offering as needed.

>Bruce

I was asked to find a replacement of a discontinue support that provides
RPMS (like,  dhcp, openssl, openslp, kernel, kernel-dev, kernel-src, and
etc...100+ more rpms) to the  embedded system build flow.  The next level
team uses these rpms to build the embedded system image.  I also was asked
to minimize the change to the down stream team that uses these rpms.  It is
not clear to me why this team is using both kernel-dev as well as
kernel-src...

Proving that a method to generate kernel-src is not available yet,  I'm
going to omit the kernel-src, for now.  I will see if the down stream team
can continue the work without it.  If I have to,  I will post another
request for the patch to generate kernel-src.

Let me know if this does not answer your question.

Thank you again.

Best Regards,
Michael Y. Lim

HW VPD Template
Boston SFO


Office: 045/C-08
Tie Line:  363-7244
Phone:   (512) 286-7244
email:  youh...@us.ibm.com
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] kernel-dev rpm does not have much contents

2019-10-30 Thread Bruce Ashfield
On Wed, Oct 30, 2019 at 10:44 AM Michael Lim  wrote:

> >>>You want the kernel-devsrc package, not kernel-dev in this case.
> >>
> >>>Bruce
> >>
> >> Thank you for responding Bruce.
> >>
> >> I do not see kernel-devsrc defined in the kernel.bbclass
> >
> >It's a separate recipe. Not part of the bbclass. Build that recipe,
> >and install the package and you'll get what you want.
>
> Thank you Bruce. After enable kernel-devsrc, the necessary rpm had been
> created.
>
> I have one question though, the kernel-devsrc does not seem to include all
> the kernel src, that has been fetched and applied patches. Why does it call
> kernel-devsrc instead of just kernel-dev? Is there a way to generate rpm
> for a complete kernel src with patches applied?
>
>
Correct. It only has enough of the build artifacts to develop against the
running kernel, i.e. out of tree modules (either on the build host, or on
target).

The name is historical, and isn't aligned with any specific distro (i.e. no
matter what folks say, there is no agreed upon naming for these packages,
so rather than break expectations in the ecosystem, we keep ours as it was:
kernel-devsrc).

To keep it minimal, we do use a curated version of the source (just like
redhat, etc). Footprint is very important for that package.

That being said, I do have a patch that creates a 'linux-source' package
that is the complete source, but that is really only for reference and
isn't extensively tested for building/development. I'm not in a place that
I  can get that patch right now, but I can send it out a bit later today.

Out of curiosity. What is the use case that you have for the source ? With
that information, I can tweak what we are offering as needed.

Bruce



> Anyway, I really appreciate you spent your value time to help out.
>
>
> Best Regards,
> Michael Y. Lim
>
> HW VPD Template
> Boston SFO
>
>
> Office: 045/C-08
> Tie Line: 363-7244
> Phone: (512) 286-7244
> email: youh...@us.ibm.com
>
>
> [image: Inactive hide details for Bruce Ashfield ---10/29/2019 03:12:19
> AM---On Mon, Oct 28, 2019 at 3:29 PM Michael Lim  Ashfield ---10/29/2019 03:12:19 AM---On Mon, Oct 28, 2019 at 3:29 PM
> Michael Lim  wrote: >
>
> From: Bruce Ashfield 
> To: Michael Lim 
> Cc: Development list for the linux-yocto repositories <
> linux-yocto@yoctoproject.org>
> Date: 10/29/2019 03:12 AM
> Subject: Re: [EXTERNAL] Re: [linux-yocto] kernel-dev rpm does not have
> much contents
> --
>
>
>
> On Mon, Oct 28, 2019 at 3:29 PM Michael Lim  wrote:
> >
> > >On Mon, Oct 28, 2019 at 11:36 AM Michael Lim 
> wrote:
> > >>
> > >> I am building a power pc core-image-minimal in yocto using
> linux-yoct_4.19. The project was built successfully, However, the
> kernel-dev rpm does not have much content.
> > >>
> > >> Its contents below:
> > >> fips_ppcnf]$ rpmv
> kernel-dev-4.19.61+git0+960be42184_4ec6f25516-r0.fips_ppcnf.rpm
> > >> drwxr-xr-x 2 root root 0 Oct 26 17:04 /boot
> > >> -rw-r--r-- 1 root root 375741 Oct 26 17:04
> /boot/Module.symvers-4.19.61-yocto-standard
> > >> -rw-r--r-- 1 root root 1542246 Oct 26 17:04
> /boot/System.map-4.19.61-yocto-standard
> > >> -rw-r--r-- 1 root root 60694 Oct 26 17:04
> /boot/config-4.19.61-yocto-standard
> > >>
> > >> There are no contents relate to the header files nor any built code.
> > >>
> > >> The kernel.bbclass has this line
> > >> FILES_${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map*
> /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}
> ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
> > >>
> > >> KERNEL_SRC_PATH="/usr/src/kernel"
> > >> KERNEL_VERSION="4.19.61-yocto-standard"
> > >>
> > >> Seems like the contents in the bold path were not included in the rpm.
> > >>
> > >> I'm not sure where the ${KERNEL_SRC_PATH} is. So I changed it to
> ${STAGING_KERNEL_BUILDDIR}. As I know there are contents there.
> Unfortunately, kernel-dev rpm does not contains the file in
> ${STAGING_KERNEL_BUILDDIR}.
> > >>
> > >>
> STAGING_KERNEL_BUILDDIR="/tmp/youhour/b20191023a/fips-build/fips-ppcnf/build/tmp/work-shared/fips-ppcnf/kernel-build-artifacts"
> > >>
> > >> I am very very new to the yocto build. Can someone help pointing out
> what I need to do to get all the code in ${STAGING_KERNEL_BUILDDIR} the
> kernel-dev rpm?
> >
> > >You want the kernel-devsrc package, not kernel-dev in this case.
> >

Re: [linux-yocto] kernel-dev rpm does not have much contents

2019-10-30 Thread Michael Lim

>>>You want the kernel-devsrc package, not kernel-dev in this case.
>>
>>>Bruce
>>
>> Thank you for responding Bruce.
>>
>> I do not see kernel-devsrc defined in the kernel.bbclass
>
>It's a separate recipe. Not part of the bbclass. Build that recipe,
>and install the package and you'll get what you want.

Thank you Bruce.  After enable kernel-devsrc,  the necessary rpm had been
created.

I have one question though,  the kernel-devsrc does not seem to include all
the kernel src, that has been fetched and applied patches.  Why does it
call kernel-devsrc instead of just kernel-dev?  Is there a way to generate
rpm for a complete kernel src with patches applied?

Anyway,  I really appreciate you spent your value time to help out.


Best Regards,
Michael Y. Lim

HW VPD Template
Boston SFO


Office: 045/C-08
Tie Line:  363-7244
Phone:   (512) 286-7244
email:  youh...@us.ibm.com




From:   Bruce Ashfield 
To: Michael Lim 
Cc: Development list for the linux-yocto repositories

Date:   10/29/2019 03:12 AM
Subject:    Re: [EXTERNAL] Re: [linux-yocto] kernel-dev rpm does not have
much contents



On Mon, Oct 28, 2019 at 3:29 PM Michael Lim  wrote:
>
> >On Mon, Oct 28, 2019 at 11:36 AM Michael Lim  wrote:
> >>
> >> I am building a power pc core-image-minimal in yocto using
linux-yoct_4.19. The project was built successfully, However, the
kernel-dev rpm does not have much content.
> >>
> >> Its contents below:
> >> fips_ppcnf]$ rpmv kernel-dev-4.19.61+git0
+960be42184_4ec6f25516-r0.fips_ppcnf.rpm
> >> drwxr-xr-x 2 root root 0 Oct 26 17:04 /boot
> >> -rw-r--r-- 1 root root 375741 Oct 26
17:04 /boot/Module.symvers-4.19.61-yocto-standard
> >> -rw-r--r-- 1 root root 1542246 Oct 26
17:04 /boot/System.map-4.19.61-yocto-standard
> >> -rw-r--r-- 1 root root 60694 Oct 26
17:04 /boot/config-4.19.61-yocto-standard
> >>
> >> There are no contents relate to the header files nor any built code.
> >>
> >> The kernel.bbclass has this line
> >> FILES_${KERNEL_PACKAGE_NAME}-dev =
"/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} $
{nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
> >>
> >> KERNEL_SRC_PATH="/usr/src/kernel"
> >> KERNEL_VERSION="4.19.61-yocto-standard"
> >>
> >> Seems like the contents in the bold path were not included in the rpm.
> >>
> >> I'm not sure where the ${KERNEL_SRC_PATH} is. So I changed it to $
{STAGING_KERNEL_BUILDDIR}. As I know there are contents there.
Unfortunately, kernel-dev rpm does not contains the file in $
{STAGING_KERNEL_BUILDDIR}.
> >>
> >>
STAGING_KERNEL_BUILDDIR="/tmp/youhour/b20191023a/fips-build/fips-ppcnf/build/tmp/work-shared/fips-ppcnf/kernel-build-artifacts"

> >>
> >> I am very very new to the yocto build. Can someone help pointing out
what I need to do to get all the code in ${STAGING_KERNEL_BUILDDIR} the
kernel-dev rpm?
>
> >You want the kernel-devsrc package, not kernel-dev in this case.
>
> >Bruce
>
> Thank you for responding Bruce.
>
> I do not see kernel-devsrc defined in the kernel.bbclass

It's a separate recipe. Not part of the bbclass. Build that recipe,
and install the package and you'll get what you want.

>
> Is there a bug in the kernel.bbclass where it includes ${KERNEL_SRC_PATH}
in the kernel-dev?  If that part is correct, is there a bug that prevent
code copy to ${KERNEL_SRC_PATH}?
>

There's no bug. kernel-dev doesn't the kernel source by design. Yocto
/ oe has always had its own naming for these packages, and kernel-dev
is the images / artifacts and the directory structure. Now that
kernel-devsrc is available (it wasn't a few years ago), we actually
could remove those directories from kernel.bbclass to clarify things.

Bruce

> ${KERNEL_SRC_PATH} seems to be a relative path in the yocto build. is $
{D}${KERNEL_SRC_PATH} the absolute path?
>
> Thank you in advance.
>
> Best Regards,
> Michael Y. Lim
>
> HW VPD Template
> Boston SFO
>
>
> Office: 045/C-08
> Tie Line: 363-7244
> Phone: (512) 286-7244
> email: youh...@us.ibm.com
>


--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II



-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] kernel-dev rpm does not have much contents

2019-10-28 Thread Bruce Ashfield
On Mon, Oct 28, 2019 at 11:36 AM Michael Lim  wrote:
>
> I am building a power pc core-image-minimal in yocto using linux-yoct_4.19. 
> The project was built successfully, However, the kernel-dev rpm does not have 
> much content.
>
> Its contents below:
> fips_ppcnf]$ rpmv 
> kernel-dev-4.19.61+git0+960be42184_4ec6f25516-r0.fips_ppcnf.rpm
> drwxr-xr-x 2 root root 0 Oct 26 17:04 /boot
> -rw-r--r-- 1 root root 375741 Oct 26 17:04 
> /boot/Module.symvers-4.19.61-yocto-standard
> -rw-r--r-- 1 root root 1542246 Oct 26 17:04 
> /boot/System.map-4.19.61-yocto-standard
> -rw-r--r-- 1 root root 60694 Oct 26 17:04 /boot/config-4.19.61-yocto-standard
>
> There are no contents relate to the header files nor any built code.
>
> The kernel.bbclass has this line
> FILES_${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map* /boot/Module.symvers* 
> /boot/config* ${KERNEL_SRC_PATH} 
> ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
>
> KERNEL_SRC_PATH="/usr/src/kernel"
> KERNEL_VERSION="4.19.61-yocto-standard"
>
> Seems like the contents in the bold path were not included in the rpm.
>
> I'm not sure where the ${KERNEL_SRC_PATH} is. So I changed it to 
> ${STAGING_KERNEL_BUILDDIR}. As I know there are contents there. 
> Unfortunately, kernel-dev rpm does not contains the file in 
> ${STAGING_KERNEL_BUILDDIR}.
>
> STAGING_KERNEL_BUILDDIR="/tmp/youhour/b20191023a/fips-build/fips-ppcnf/build/tmp/work-shared/fips-ppcnf/kernel-build-artifacts"
>
> I am very very new to the yocto build. Can someone help pointing out what I 
> need to do to get all the code in ${STAGING_KERNEL_BUILDDIR} the kernel-dev 
> rpm?

You want the kernel-devsrc package, not kernel-dev in this case.

Bruce

>
> By the way, I am using yocto 'WARRIOR' branch.
>
> Thank you in advance.
>
>
>
>
> Best Regards,
> Michael Y. Lim
>
> HW VPD Template
> Boston SFO
>
>
> Office: 045/C-08
> Tie Line: 363-7244
> Phone: (512) 286-7244
> email: youh...@us.ibm.com
>
> --
> ___
> linux-yocto mailing list
> linux-yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/linux-yocto



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto