Message ID | 20250121085526.1370937-8-hongxu.jia@windriver.com |
---|---|
State | New |
Headers | show |
Series | [1/9] perl: fix do_install failed for nativesdk-perl | expand |
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information: --- Testing patch /home/patchtest/share/mboxes/8-9-Add-recipe-nativesdk-multiconfig-multlib-toolchain-packager.patch FAIL: test shortlog format: Commit shortlog (first line of commit message) should follow the format "<target>: <summary>" (test_mbox.TestMbox.test_shortlog_format) PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence) PASS: test author valid (test_mbox.TestMbox.test_author_valid) PASS: test bugzilla entry format (test_mbox.TestMbox.test_bugzilla_entry_format) PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence) PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags) PASS: test max line length (test_metadata.TestMetadata.test_max_line_length) PASS: test mbox format (test_mbox.TestMbox.test_mbox_format) PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade) PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length) PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list) SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint) SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files) SKIP: test CVE check ignore: No modified recipes or older target branch, skipping test (test_metadata.TestMetadata.test_cve_check_ignore) SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format) SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence) SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format) SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned) SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence) SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence) SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint) SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head) SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files) SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence) --- Please address the issues identified and submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
diff --git a/meta-selftest/recipes-test/multiconfig/nativesdk-multiconfig-multlib-toolchain-packager_0.1.bb b/meta-selftest/recipes-test/multiconfig/nativesdk-multiconfig-multlib-toolchain-packager_0.1.bb new file mode 100644 index 0000000000..c742c3eddd --- /dev/null +++ b/meta-selftest/recipes-test/multiconfig/nativesdk-multiconfig-multlib-toolchain-packager_0.1.bb @@ -0,0 +1,74 @@ +DESCRIPTION = "Fetch 32bit x86 buildtools-tarball from x86 multiconfig build, \ +extract and install toolchain libraries and include files into 64bit nativesdk sysroot.\ +Or fetch 64bit x86_64 buildtools-tarball from x86_64 multiconfig build, \ +extract and install toolchain libraries and include files into 32bit nativesdk sysroot.\ +" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +inherit nativesdk + +MCSDK_ARCH:virtclass-mcextend-x86 = "i686" +MCSDK_ARCH:virtclass-mcextend-x86_64 = "x86_64" + +FROM_MULTICONFIG:virtclass-mcextend-x86_64 = "x86" +FROM_MULTICONFIG:virtclass-mcextend-x86 = "x86_64" + +TO_MULTICONFIG = "${MCNAME}" + +MC_SDK_DEPLOY = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/sdk" +MC_TOOLCHAIN_OUTPUTNAME = "${MCSDK_ARCH}-buildtools-nativesdk-standalone-${DISTRO_VERSION}" + +# 64bit x86_64 platform requires 32bit x86 buildtools-tarball +# Or +# 32bit x86 platform requires 64bit buildtools-tarball +do_install[mcdepends] += "mc:${FROM_MULTICONFIG}:${TO_MULTICONFIG}:buildtools-tarball:do_build" +do_install () { + install -d ${D}${localstatedir}/machines/${MCNAME} + install ${MC_SDK_DEPLOY}/${MC_TOOLCHAIN_OUTPUTNAME}.sh ${D}${localstatedir}/machines/${MCNAME}/buildtools-tarball.sh +} + +MC_BASELIB:virtclass-mcextend-x86 = "lib" +MC_BASELIB:virtclass-mcextend-x86_64 = "lib64" + +INSTALL_FILES ?= " \ + /usr/include \ + /usr/${MC_BASELIB} \ + /${MC_BASELIB} \ +" +do_install[vardeps] += "INSTALL_FILES MC_SDK_DEPLOY MC_TOOLCHAIN_OUTPUTNAME" + +# Extract and install toolchain libraries and include files into nativesdk sysroot +pkg_postinst:${PN} () { + set -x + $D${localstatedir}/machines/${MCNAME}/buildtools-tarball.sh -y -d $D/sdk-${MCNAME} + src_prefix="$D/sdk-${MCNAME}/sysroots/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}" + for install_file in ${INSTALL_FILES}; do + if [ ! -e ${src_prefix}${install_file} ]; then + echo "${src_prefix}${install_file} does not exist" + exit 1 + elif [ -d ${src_prefix}${install_file} ]; then + install -d $D${SDKPATHNATIVE}${install_file} + cp -rf ${src_prefix}${install_file}/* $D${SDKPATHNATIVE}${install_file}/ + else + install -d $D${SDKPATHNATIVE}${install_file%/*} + cp -f ${src_prefix}${install_file} $D${SDKPATHNATIVE}${install_file} + fi + done + rm $D/sdk-${MCNAME} -rf +} + + +python () { + mcname = d.getVar('MCNAME') + if not mcname: + raise bb.parse.SkipRecipe("Not a multiconfig target") + + multiconfigs = d.getVar('BBMULTICONFIG') or "" + if mcname not in multiconfigs: + raise bb.parse.SkipRecipe("multiconfig target %s not enabled" % mcname) +} + +INSANE_SKIP = "native-last" + +BBCLASSEXTEND = "mcextend:x86 mcextend:x86_64"
Support two mutliconfig build x86 and x86_64: 1. Trigger a x86 multiconfig build to generate 32bit x86 buildtools-tarball. During package runtime installation, script postinst extracted 32bit x86 buildtools-tarball and installed it to 64bit x86_64 nativesdk sysroot. 2. Trigger a x86_64 multiconfig build to generate 64bit x86_64 buildtools-tarball. During package runtime installation, script postinst extracted 64bit x86_64 buildtools-tarball and installed it to 32bit x86 nativesdk sysroot. [ YOCTO #15722 ] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- ...ticonfig-multlib-toolchain-packager_0.1.bb | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 meta-selftest/recipes-test/multiconfig/nativesdk-multiconfig-multlib-toolchain-packager_0.1.bb