<div dir="ltr">Two options:<div><br></div><div>1) fix the bug</div><div>2) write the logic in a Python function</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 31 October 2017 at 11:38, Ayoub Zaki <span dir="ltr"><<a href="mailto:ayoub.zaki@embexus.com" target="_blank">ayoub.zaki@embexus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<span class=""><br>
<br>
<br>
On 31.10.2017 12:34, Burton, Ross wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That would be <a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=11314" rel="noreferrer" target="_blank">https://bugzilla.yoctoproject.<wbr>org/show_bug.cgi?id=11314</a>, $(( isn't supported by our shell parser. Shouldn't be that difficult to fix in bitbake.<br>
</blockquote>
<br></span>
Any workarrounds for that problem ?<br>
I tried with expr but it does not recognize bitwise operations like  & ~<br>
I'm really stucked ...<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Ross<span class=""><br>
<br>
On 31 October 2017 at 11:27, Ayoub Zaki <<a href="mailto:ayoub.zaki@embexus.com" target="_blank">ayoub.zaki@embexus.com</a> <mailto:<a href="mailto:ayoub.zaki@embexus.com" target="_blank">ayoub.zaki@embexus.com</a><wbr>>> wrote:<br>
<br>
  Â  Hello,<br>
<br>
  Â  I'm trying to get a bitwise operation working in a bitbake bblcass<br>
  Â  function but no luck so far :<br>
<br>
  Â  my_function() {<br>
<br>
  Â  Â Â Â  SZ="`wc -c < ${1}`"<br>
<br>
  Â  Â Â Â  ALIGN_SZ=$(((${SZ} + 0x1000 - 1) & ~ (0x1000 - 1)))<br>
<br>
  Â  Â Â Â  .......<br>
<br>
  Â  }<br>
<br>
  Â  Bitbake complains with :<br>
<br>
  Â  ERROR: ExpansionError during parsing<br>
  Â  /opt/Projects/Yocto/meta-somel<wbr>ayer/recipes-kernel/linux/<a href="http://linux-imx_4.1.15.bb" rel="noreferrer" target="_blank">linu<wbr>x-imx_4.1.15.bb</a><br></span>
  Â  <<a href="http://linux-imx_4.1.15.bb" rel="noreferrer" target="_blank">http://linux-imx_4.1.15.bb</a>>: Failure expanding variable<span class=""><br>
  Â  my_function: NotImplementedError: $((<br>
<br>
<br>
  Â  Any suggestions ho<a href="https://maps.google.com/?q=w+to+tackle+this+prob&entry=gmail&source=g">w to tackle this prob</a>lem ?<br>
<br>
  Â  Thank you !<br>
<br>
  Â  --  Â  Â Ayoub Zaki<br>
  Â  Embedded Systems Consultant<br>
<br>
  Â  Vaihinger Straße 2/1<br></span>
  Â  <<a href="https://maps.google.com/?q=Vaihinger+Stra%C3%9Fe+2/1&entry=gmail&source=g" rel="noreferrer" target="_blank">https://maps.google.com/?q=Va<wbr>ihinger+Stra%C3%9Fe+2/1&entry=<wbr>gmail&source=g</a>><br>
  Â  D-71634 Ludwigsburg<br>
<br>
  Â  Tel.  Â  Â : <a href="tel:%2B4971415074546" value="+4971415074546" target="_blank">+4971415074546</a> <tel:%2B4971415074546><br>
  Â  Mobile  Â : <a href="tel:%2B4917662901545" value="+4917662901545" target="_blank">+4917662901545</a> <tel:%2B4917662901545><br>
  Â  Email  Â  : <a href="mailto:ayoub.zaki@embexus.com" target="_blank">ayoub.zaki@embexus.com</a> <mailto:<a href="mailto:ayoub.zaki@embexus.com" target="_blank">ayoub.zaki@embexus.com</a><wbr>><span class=""><br>
  Â  Homepage : <a href="https://embexus.com" rel="noreferrer" target="_blank">https://embexus.com</a><br>
  Â  VAT No.  : DE313902634<br>
<br>
  Â  --  Â  Â _____________________________<wbr>__________________<br>
  Â  yocto mailing list<br></span>
  Â  <a href="mailto:yocto@yoctoproject.org" target="_blank">yocto@yoctoproject.org</a> <mailto:<a href="mailto:yocto@yoctoproject.org" target="_blank">yocto@yoctoproject.org</a><wbr>><br>
  Â  <a href="https://lists.yoctoproject.org/listinfo/yocto" rel="noreferrer" target="_blank">https://lists.yoctoproject.org<wbr>/listinfo/yocto</a><br>
  Â  <<a href="https://lists.yoctoproject.org/listinfo/yocto" rel="noreferrer" target="_blank">https://lists.yoctoproject.or<wbr>g/listinfo/yocto</a>><br>
<br>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
-- <br>
Ayoub Zaki<br>
Embedded Systems Consultant<br>
<br>
Vaihinger Straße 2/1<br>
D-71634 Ludwigsburg<br>
<br>
Tel.  Â  Â : <a href="tel:%2B4971415074546" value="+4971415074546" target="_blank">+4971415074546</a><br>
Mobile  Â : <a href="tel:%2B4917662901545" value="+4917662901545" target="_blank">+4917662901545</a><br>
Email  Â  : <a href="mailto:ayoub.zaki@embexus.com" target="_blank">ayoub.zaki@embexus.com</a><br>
Homepage : <a href="https://embexus.com" rel="noreferrer" target="_blank">https://embexus.com</a><br>
VAT No.  : DE313902634<br>
<br>
</div></div></blockquote></div><br></div>