* Bitwise Operations in BBClass
@ 2017-10-31 11:27 Ayoub Zaki
2017-10-31 11:34 ` Burton, Ross
0 siblings, 1 reply; 4+ messages in thread
From: Ayoub Zaki @ 2017-10-31 11:27 UTC (permalink / raw)
To: yocto
Hello,
I'm trying to get a bitwise operation working in a bitbake bblcass
function but no luck so far :
my_function() {
SZ="`wc -c < ${1}`"
ALIGN_SZ=$(((${SZ} + 0x1000 - 1) & ~ (0x1000 - 1)))
.......
}
Bitbake complains with :
ERROR: ExpansionError during parsing
/opt/Projects/Yocto/meta-somelayer/recipes-kernel/linux/linux-imx_4.1.15.bb:
Failure expanding variable my_function: NotImplementedError: $((
Any suggestions how to tackle this problem ?
Thank you !
--
Ayoub Zaki
Embedded Systems Consultant
Vaihinger Straße 2/1
D-71634 Ludwigsburg
Tel. : +4971415074546
Mobile : +4917662901545
Email : ayoub.zaki@embexus.com
Homepage : https://embexus.com
VAT No. : DE313902634
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bitwise Operations in BBClass
2017-10-31 11:27 Bitwise Operations in BBClass Ayoub Zaki
@ 2017-10-31 11:34 ` Burton, Ross
2017-10-31 11:38 ` Ayoub Zaki
0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2017-10-31 11:34 UTC (permalink / raw)
To: Ayoub Zaki; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]
That would be https://bugzilla.yoctoproject.org/show_bug.cgi?id=11314, $((
isn't supported by our shell parser. Shouldn't be that difficult to fix in
bitbake.
Ross
On 31 October 2017 at 11:27, Ayoub Zaki <ayoub.zaki@embexus.com> wrote:
> Hello,
>
> I'm trying to get a bitwise operation working in a bitbake bblcass
> function but no luck so far :
>
> my_function() {
>
> SZ="`wc -c < ${1}`"
>
> ALIGN_SZ=$(((${SZ} + 0x1000 - 1) & ~ (0x1000 - 1)))
>
> .......
>
> }
>
> Bitbake complains with :
>
> ERROR: ExpansionError during parsing /opt/Projects/Yocto/meta-somel
> ayer/recipes-kernel/linux/linux-imx_4.1.15.bb: Failure expanding variable
> my_function: NotImplementedError: $((
>
>
> Any suggestions how to tackle this problem ?
>
> Thank you !
>
> --
> Ayoub Zaki
> Embedded Systems Consultant
>
> Vaihinger Straße 2/1
> <https://maps.google.com/?q=Vaihinger+Stra%C3%9Fe+2/1&entry=gmail&source=g>
> D-71634 Ludwigsburg
>
> Tel. : +4971415074546
> Mobile : +4917662901545
> Email : ayoub.zaki@embexus.com
> Homepage : https://embexus.com
> VAT No. : DE313902634
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
[-- Attachment #2: Type: text/html, Size: 2412 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bitwise Operations in BBClass
2017-10-31 11:34 ` Burton, Ross
@ 2017-10-31 11:38 ` Ayoub Zaki
2017-10-31 12:27 ` Burton, Ross
0 siblings, 1 reply; 4+ messages in thread
From: Ayoub Zaki @ 2017-10-31 11:38 UTC (permalink / raw)
To: Burton, Ross; +Cc: yocto
Hi,
On 31.10.2017 12:34, Burton, Ross wrote:
> That would be https://bugzilla.yoctoproject.org/show_bug.cgi?id=11314,
> $(( isn't supported by our shell parser. Shouldn't be that difficult
> to fix in bitbake.
Any workarrounds for that problem ?
I tried with expr but it does not recognize bitwise operations like & ~
I'm really stucked ...
>
> Ross
>
> On 31 October 2017 at 11:27, Ayoub Zaki <ayoub.zaki@embexus.com
> <mailto:ayoub.zaki@embexus.com>> wrote:
>
> Hello,
>
> I'm trying to get a bitwise operation working in a bitbake bblcass
> function but no luck so far :
>
> my_function() {
>
> SZ="`wc -c < ${1}`"
>
> ALIGN_SZ=$(((${SZ} + 0x1000 - 1) & ~ (0x1000 - 1)))
>
> .......
>
> }
>
> Bitbake complains with :
>
> ERROR: ExpansionError during parsing
> /opt/Projects/Yocto/meta-somelayer/recipes-kernel/linux/linux-imx_4.1.15.bb
> <http://linux-imx_4.1.15.bb>: Failure expanding variable
> my_function: NotImplementedError: $((
>
>
> Any suggestions how to tackle this problem ?
>
> Thank you !
>
> --
> Ayoub Zaki
> Embedded Systems Consultant
>
> Vaihinger Straße 2/1
> <https://maps.google.com/?q=Vaihinger+Stra%C3%9Fe+2/1&entry=gmail&source=g>
> D-71634 Ludwigsburg
>
> Tel. : +4971415074546 <tel:%2B4971415074546>
> Mobile : +4917662901545 <tel:%2B4917662901545>
> Email : ayoub.zaki@embexus.com <mailto:ayoub.zaki@embexus.com>
> Homepage : https://embexus.com
> VAT No. : DE313902634
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
> https://lists.yoctoproject.org/listinfo/yocto
> <https://lists.yoctoproject.org/listinfo/yocto>
>
>
--
Ayoub Zaki
Embedded Systems Consultant
Vaihinger Straße 2/1
D-71634 Ludwigsburg
Tel. : +4971415074546
Mobile : +4917662901545
Email : ayoub.zaki@embexus.com
Homepage : https://embexus.com
VAT No. : DE313902634
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bitwise Operations in BBClass
2017-10-31 11:38 ` Ayoub Zaki
@ 2017-10-31 12:27 ` Burton, Ross
0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2017-10-31 12:27 UTC (permalink / raw)
To: Ayoub Zaki; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 2442 bytes --]
Two options:
1) fix the bug
2) write the logic in a Python function
On 31 October 2017 at 11:38, Ayoub Zaki <ayoub.zaki@embexus.com> wrote:
> Hi,
>
>
> On 31.10.2017 12:34, Burton, Ross wrote:
>
>> That would be https://bugzilla.yoctoproject.org/show_bug.cgi?id=11314,
>> $(( isn't supported by our shell parser. Shouldn't be that difficult to fix
>> in bitbake.
>>
>
> Any workarrounds for that problem ?
> I tried with expr but it does not recognize bitwise operations like & ~
> I'm really stucked ...
>
>
>> Ross
>>
>> On 31 October 2017 at 11:27, Ayoub Zaki <ayoub.zaki@embexus.com <mailto:
>> ayoub.zaki@embexus.com>> wrote:
>>
>> Hello,
>>
>> I'm trying to get a bitwise operation working in a bitbake bblcass
>> function but no luck so far :
>>
>> my_function() {
>>
>> SZ="`wc -c < ${1}`"
>>
>> ALIGN_SZ=$(((${SZ} + 0x1000 - 1) & ~ (0x1000 - 1)))
>>
>> .......
>>
>> }
>>
>> Bitbake complains with :
>>
>> ERROR: ExpansionError during parsing
>> /opt/Projects/Yocto/meta-somelayer/recipes-kernel/linux/linu
>> x-imx_4.1.15.bb
>> <http://linux-imx_4.1.15.bb>: Failure expanding variable
>> my_function: NotImplementedError: $((
>>
>>
>> Any suggestions how to tackle this prob
>> <https://maps.google.com/?q=w+to+tackle+this+prob&entry=gmail&source=g>lem
>> ?
>>
>> Thank you !
>>
>> -- Ayoub Zaki
>> Embedded Systems Consultant
>>
>> Vaihinger Straße 2/1
>> <https://maps.google.com/?q=Vaihinger+Stra%C3%9Fe+2/1&entry=
>> gmail&source=g>
>> D-71634 Ludwigsburg
>>
>> Tel. : +4971415074546 <tel:%2B4971415074546>
>> Mobile : +4917662901545 <tel:%2B4917662901545>
>> Email : ayoub.zaki@embexus.com <mailto:ayoub.zaki@embexus.com>
>> Homepage : https://embexus.com
>> VAT No. : DE313902634
>>
>> -- _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
>> https://lists.yoctoproject.org/listinfo/yocto
>> <https://lists.yoctoproject.org/listinfo/yocto>
>>
>>
>>
> --
> Ayoub Zaki
> Embedded Systems Consultant
>
> Vaihinger Straße 2/1
> D-71634 Ludwigsburg
>
> Tel. : +4971415074546
> Mobile : +4917662901545
> Email : ayoub.zaki@embexus.com
> Homepage : https://embexus.com
> VAT No. : DE313902634
>
>
[-- Attachment #2: Type: text/html, Size: 4909 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-31 12:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 11:27 Bitwise Operations in BBClass Ayoub Zaki
2017-10-31 11:34 ` Burton, Ross
2017-10-31 11:38 ` Ayoub Zaki
2017-10-31 12:27 ` Burton, Ross
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.