Hi Alex

Thank you for your advice and I have a question.

1:-> This does not seem like the right place to me to adjust the settings.

Well, did you mean that I shouldn’t adjust the settings in meta-environment 
recipe, instead of it, adjust the settings in the nativesdk-meson recipe?


--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)

From: Alexander Kanavin [mailto:[email protected]]
Sent: Monday, September 02, 2019 4:12 PM
To: Zheng, Ruoqin/郑 若钦 <[email protected]>
Cc: OE-core <[email protected]>
Subject: Re: [OE-core] [PATCH] meta-environment: make rpm and dnf work in 
toolchain

On Mon, 2 Sep 2019 at 03:16, Zheng Ruoqin 
<[email protected]<mailto:[email protected]>> wrote:
We need to configure dnf and rpm to use and make it compatible with package 
architecture from yocto build system.
+
+    mkdir -p ${D}/${SDKTARGETSYSROOT}/etc/rpm
+    echo "arch_compat: ${MACHINE_ARCH}: ${PACKAGE_ARCHS}" > 
${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+    sed -i 's/-nativesdk//g' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+    sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+    echo "${MACHINE_ARCH}-pc-linux" > ${D}/${SDKTARGETSYSROOT}/etc/rpm/platform
+
+    mkdir -p ${D}/${SDKTARGETSYSROOT}/etc/dnf/vars
+    echo "${DEFAULTTUNE}:${MACHINE_ARCH}:${TARGET_ARCH}" > 
${D}/${SDKTARGETSYSROOT}/etc/dnf/vars/arch
+    sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/dnf/vars/arch

This does not seem like the right place to me to adjust the settings. I think 
(not sure; never tried it) that the right technique is in the nativesdk-meson 
recipe:

    install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
    install -m 0755 ${WORKDIR}/meson-setup.py 
${D}${SDKPATHNATIVE}/post-relocate-setup.d/

    # We need to wrap the real meson with a thin env setup wrapper.
    mv ${D}${bindir}/meson ${D}${bindir}/meson.real
    install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson

Alex


-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to