<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Hi Alex<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thank you for your advice and I have a question.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">1:-> This does not seem like the right place to me to adjust the settings.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">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?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif">--------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif">Zheng Ruoqin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif">Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Alexander Kanavin [mailto:alex.kanavin@gmail.com]
<br>
<b>Sent:</b> Monday, September 02, 2019 4:12 PM<br>
<b>To:</b> Zheng, Ruoqin/</span><span lang="ZH-CN" style="font-size:11.0pt;font-family:宋体">郑</span><span lang="ZH-CN" style="font-size:11.0pt;font-family:"Calibri",sans-serif">
</span><span lang="ZH-CN" style="font-size:11.0pt;font-family:宋体">若钦</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <zhengrq.fnst@cn.fujitsu.com><br>
<b>Cc:</b> OE-core <openembedded-core@lists.openembedded.org><br>
<b>Subject:</b> Re: [OE-core] [PATCH] meta-environment: make rpm and dnf work in toolchain<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, 2 Sep 2019 at 03:16, Zheng Ruoqin <<a href="mailto:zhengrq.fnst@cn.fujitsu.com" target="_blank">zhengrq.fnst@cn.fujitsu.com</a>> wrote:<o:p></o:p></p>
</div>
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">We need to configure dnf and rpm to use and make it compatible with package architecture from yocto build system.<br>
+<br>
+ mkdir -p ${D}/${SDKTARGETSYSROOT}/etc/rpm<br>
+ echo "arch_compat: ${MACHINE_ARCH}: ${PACKAGE_ARCHS}" > ${D}/${SDKTARGETSYSROOT}/etc/rpmrc<br>
+ sed -i 's/-nativesdk//g' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc<br>
+ sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc<br>
+ echo "${MACHINE_ARCH}-pc-linux" > ${D}/${SDKTARGETSYSROOT}/etc/rpm/platform<br>
+<br>
+ mkdir -p ${D}/${SDKTARGETSYSROOT}/etc/dnf/vars<br>
+ echo "${DEFAULTTUNE}:${MACHINE_ARCH}:${TARGET_ARCH}" > ${D}/${SDKTARGETSYSROOT}/etc/dnf/vars/arch<br>
+ sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/dnf/vars/arch<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d<br>
install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/<br>
<br>
# We need to wrap the real meson with a thin env setup wrapper.<br>
mv ${D}${bindir}/meson ${D}${bindir}/meson.real<br>
install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Alex<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>