>>>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 <bruce.ashfi...@gmail.com> To: Michael Lim <youh...@us.ibm.com> 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 <youh...@us.ibm.com> wrote: > > >On Mon, Oct 28, 2019 at 11:36 AM Michael Lim <youh...@us.ibm.com> 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