Message ID | 7829286302c0e4a4bdcb351cbd295cb95387d7c1.1702307359.git.liezhi.yang@windriver.com |
---|---|
State | Accepted, archived |
Commit | 5fbb4ca8da4f4f1ea426275c45634802dcb5a575 |
Headers | show |
Series | [1/1] archiver.bbclass: Improve work-shared checking | expand |
Hi, https://github.com/openembedded/openembedded-core/commit/5fbb4ca8da4f4f1ea426275c45634802dcb5a575 This patch caused something terrible wrong behavior, because ".../work-shared/<MACHINE>/kernel-source/" directory is totally empty and the complete Linux kernel source is missing if INHERIT += "archiver" is used in local.conf file. Please fix it and if there any workaround please send it because at the moment without usage of INHERIT += "archiver" Yocto scarthgap build is working but with use it, all the time it failed to compile Linux kernel because git symbolic folder which linked to kernel-source is totally empty in this case in linux working directory. I use the following settings when i try to making archives but it is failed to build/fetch kernel source to kernel-source directory (it was fine to use in nanbield release before). INHERIT += "archiver" ARCHIVER_MODE[src] = "patched" ARCHIVER_MODE[compression] = "bz2" ARCHIVER_MODE[mirror] = "combined" COPYLEFT_RECIPE_TYPES = "target" COPYLEFT_AVAILABLE_RECIPE_TYPES = "target" # Don't filter the license COPYLEFT_LICENSE_INCLUDE = "" COPYLEFT_LICENSE_EXCLUDE = "" # Deploy licenses COPY_LIC_MANIFEST = "1" COPY_LIC_DIRS = "1" LICENSE_CREATE_PACKAGE = "1"
Hi Livius, On 6/6/24 05:06, Livius wrote: > [Edited Message Follows] > > Hi, > > https://github.com/openembedded/openembedded-core/commit/5fbb4ca8da4f4f1ea426275c45634802dcb5a575 > > This patch caused something terrible wrong behavior, because ".../work-shared/<MACHINE>/kernel-source/" directory is totally empty and the complete Linux kernel source is missing if INHERIT += "archiver" is used in local.conf file. Please fix it and if there any workaround please send it because at the moment without usage of INHERIT += "archiver" Yocto scarthgap build is working but with use it, all the time it failed to compile Linux kernel because git symbolic folder which linked to kernel-source is totally empty in this case in linux working directory. > > I use the following settings when i try to making archives but it is failed to fetch kernel source to kernel-source directory (it was fine to use in nanbield release before). > > INHERIT += "archiver" > ARCHIVER_MODE[src] = "patched" > ARCHIVER_MODE[compression] = "bz2" > ARCHIVER_MODE[mirror] = "combined" > COPYLEFT_RECIPE_TYPES = "target" > COPYLEFT_AVAILABLE_RECIPE_TYPES = "target" > > # Don't filter the license > COPYLEFT_LICENSE_INCLUDE = "" > COPYLEFT_LICENSE_EXCLUDE = "" > > # Deploy licenses > COPY_LIC_MANIFEST = "1" > COPY_LIC_DIRS = "1" > LICENSE_CREATE_PACKAGE = "1" I added the above settings to conf/layer.conf, and started a fresh build on scarthgap branch, it works well for me: commit ae6cebca5bac9521230c69fed23b375d0de7f5f6 (HEAD -> scarthgap, origin/scarthgap) $ bitbake linux-yocto $ ls tmp/deploy/images/qemux86-64/* -1 tmp/deploy/images/qemux86-64/bzImage tmp/deploy/images/qemux86-64/bzImage--6.6.23+git0+f7f00b22ef_2d01bc1d4e-r0-qemux86-64-20240606092927.bin tmp/deploy/images/qemux86-64/bzImage-qemux86-64.bin tmp/deploy/images/qemux86-64/modules--6.6.23+git0+f7f00b22ef_2d01bc1d4e-r0-qemux86-64-20240606092927.tgz tmp/deploy/images/qemux86-64/modules-qemux86-64.tgz $ du -sh tmp/deploy/sources/x86_64-poky-linux/linux-yocto-6.6.23+git-r0/linux-yocto-6.6.23+ git-r0-patched.tar.bz2 168M tmp/deploy/sources/x86_64-poky-linux/linux-yocto-6.6.23+git-r0/linux-yocto-6.6.23+git-r0-patched.tar.bz2 // Robert > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#200381): https://lists.openembedded.org/g/openembedded-core/message/200381 > Mute This Topic: https://lists.openembedded.org/mt/103110276/7304958 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [liezhi.yang@eng.windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- >
It seems to me i found, when it can not work well. I use linux-fslc recipe from meta-freescale which redefining somewhy source directory in linux-imx.inc file. https://github.com/Freescale/meta-freescale/blob/master/recipes-kernel/linux/linux-imx.inc#L22 S = "${WORKDIR}/git" In kernel.bbclass it is the default S = "${STAGING_KERNEL_DIR}" value. This patch should work well only if the linux-kernel recipe use the default source dir as STAGING_KERNEL_DIR. If any other BSP provider company uses for example S = "${WORKDIR}/git", their linux-kernel recipe build/compiling will be failed in case of use archiver class.
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 0eee1abefab..80a69cf31db 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -468,10 +468,8 @@ def create_diff_gz(d, src_orig, src, ar_outdir): os.chdir(cwd) def is_work_shared(d): - pn = d.getVar('PN') - return pn.startswith('gcc-source') or \ - bb.data.inherits_class('kernel', d) or \ - (bb.data.inherits_class('kernelsrc', d) and d.expand("${TMPDIR}/work-shared") in d.getVar('S')) + sharedworkdir = os.path.join(d.getVar('TMPDIR'), 'work-shared') + return d.getVar('S').startswith(sharedworkdir) # Run do_unpack and do_patch python do_unpack_and_patch() {