Openembedded Core Discussions
 help / color / mirror / Atom feed
* [meta-oe][PATCH v2] insane.bbclass: Added Epiphany machine definitions
@ 2015-03-29 19:17 Peter Saunderson
  2015-03-30  2:11 ` Nathan Rossi
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Saunderson @ 2015-03-29 19:17 UTC (permalink / raw)
  To: openembedded-core; +Cc: Peter Saunderson

Adding machine definitions for the epiphany (http://www.adapteva.com/) chip.
using https://github.com/adapteva/epiphany-binutils-gdb.
For binutils implementation that defines TARGET_ARCH MACHINE "epiphany": 4643 See https://github.com/adapteva/epiphany-binutils-gdb/blob/epiphany-binutils-2.24/bfd/elf32-epiphany.c
For example layer that uses these defines see https://github.com/peteasa/meta-epiphany.git

Epiphany cross compile is confused by package_qa_check_arch so this check is also skipped.
---
 meta/classes/insane.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index c6dea22..9cdb382 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -52,6 +52,9 @@ def package_qa_get_machine_dict():
             "darwin9" : { 
                         "arm" :       (40,     0,    0,          True,          32),
                       },
+            "e-os" :  {
+                        "epiphany":   ( 4643,  0,    0,          True,          32),
+                      },
             "linux" : { 
                         "aarch64" :   (183,    0,    0,          True,          64),
                         "aarch64_be" :(183,    0,    0,          False,         64),
@@ -445,6 +448,10 @@ def package_qa_check_arch(path,name,d, elf, messages):
     provides = d.getVar('PROVIDES', True)
     bpn = d.getVar('BPN', True)
 
+    # FIXME: epiphany cross compile confuses this check
+    if (target_os == 'e-os'):
+        return
+
     # FIXME: Cross package confuse this check, so just skip them
     for s in ['cross', 'nativesdk', 'cross-canadian']:
         if bb.data.inherits_class(s, d):
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-oe][PATCH v2] insane.bbclass: Added Epiphany machine definitions
  2015-03-29 19:17 [meta-oe][PATCH v2] insane.bbclass: Added Epiphany machine definitions Peter Saunderson
@ 2015-03-30  2:11 ` Nathan Rossi
       [not found]   ` <5519BCA9.70401@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Rossi @ 2015-03-30  2:11 UTC (permalink / raw)
  To: Peter Saunderson; +Cc: openembedded-core

On Mon, Mar 30, 2015 at 5:17 AM, Peter Saunderson <peteasa@gmail.com> wrote:
>

You have [meta-oe] in your subject, I believe you are after just
oe-core with this patch correct?

> Adding machine definitions for the epiphany (http://www.adapteva.com/) chip.
> using https://github.com/adapteva/epiphany-binutils-gdb.
> For binutils implementation that defines TARGET_ARCH MACHINE "epiphany": 4643 See https://github.com/adapteva/epiphany-binutils-gdb/blob/epiphany-binutils-2.24/bfd/elf32-epiphany.c

Epiphany is in upstream binutils with the matching ID,
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=include/elf/common.h;h=25cfef2d6b1ae8e3f976f1e55576d0fbaff79027;hb=HEAD#l408

> For example layer that uses these defines see https://github.com/peteasa/meta-epiphany.git
>
> Epiphany cross compile is confused by package_qa_check_arch so this check is also skipped.
> ---
>  meta/classes/insane.bbclass | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index c6dea22..9cdb382 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -52,6 +52,9 @@ def package_qa_get_machine_dict():
>              "darwin9" : {
>                          "arm" :       (40,     0,    0,          True,          32),
>                        },
> +            "e-os" :  {

I assume 'e-os' is short hand for 'epiphany-os'?

Is there are reason for using e-os? I noticed in your layer that your
toolchains are actually target os 'elf' (e.g. epiphany-elf-gcc), in
which case it should be 'elf' that goes into the TARGET_OS variable.
This might be the reason for the issues that you see when compiling?

Regards,
Nathan

> +                        "epiphany":   ( 4643,  0,    0,          True,          32),
> +                      },
>              "linux" : {
>                          "aarch64" :   (183,    0,    0,          True,          64),
>                          "aarch64_be" :(183,    0,    0,          False,         64),
> @@ -445,6 +448,10 @@ def package_qa_check_arch(path,name,d, elf, messages):
>      provides = d.getVar('PROVIDES', True)
>      bpn = d.getVar('BPN', True)
>
> +    # FIXME: epiphany cross compile confuses this check
> +    if (target_os == 'e-os'):
> +        return
> +
>      # FIXME: Cross package confuse this check, so just skip them
>      for s in ['cross', 'nativesdk', 'cross-canadian']:
>          if bb.data.inherits_class(s, d):
> --
> 2.1.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] insane.bbclass: Added Epiphany machine definitions
       [not found]   ` <5519BCA9.70401@gmail.com>
@ 2015-03-30 21:21     ` Peter Saunderson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Saunderson @ 2015-03-30 21:21 UTC (permalink / raw)
  To: Nathan Rossi; +Cc: openembedded-core

Updated subject line.

On 30/03/15 22:14, Peter Saunderson wrote:
> On 30/03/15 03:11, Nathan Rossi wrote:
>> On Mon, Mar 30, 2015 at 5:17 AM, Peter Saunderson <peteasa@gmail.com> 
>> wrote:
>> You have [meta-oe] in your subject, I believe you are after just
>> oe-core with this patch correct?
> Yes, sorry wrong subject line.  oe-core only.
>> Adding machine definitions for the epiphany 
>> (http://www.adapteva.com/) chip.
>> using https://github.com/adapteva/epiphany-binutils-gdb.
>> For binutils implementation that defines TARGET_ARCH MACHINE 
>> "epiphany": 4643 See 
>> https://github.com/adapteva/epiphany-binutils-gdb/blob/epiphany-binutils-2.24/bfd/elf32-epiphany.c
>> Epiphany is in upstream binutils with the matching ID,
>> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=include/elf/common.h;h=25cfef2d6b1ae8e3f976f1e55576d0fbaff79027;hb=HEAD#l408 
>>
>>
>>> For example layer that uses these defines see 
>>> https://github.com/peteasa/meta-epiphany.git
>>>
>>> Epiphany cross compile is confused by package_qa_check_arch so this 
>>> check is also skipped.
>>> ---
>>>   meta/classes/insane.bbclass | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
>>> index c6dea22..9cdb382 100644
>>> --- a/meta/classes/insane.bbclass
>>> +++ b/meta/classes/insane.bbclass
>>> @@ -52,6 +52,9 @@ def package_qa_get_machine_dict():
>>>               "darwin9" : {
>>>                           "arm" :       (40,     0, 0,          
>>> True,          32),
>>>                         },
>>> +            "e-os" :  {
>> I assume 'e-os' is short hand for 'epiphany-os'?
>>
>> Is there are reason for using e-os? I noticed in your layer that your
>> toolchains are actually target os 'elf' (e.g. epiphany-elf-gcc), in
>> which case it should be 'elf' that goes into the TARGET_OS variable.
>> This might be the reason for the issues that you see when compiling?
> Perhaps the best way to understand my need to skip the 
> package_qa_check_arch is to comment out the FIXME lines for cross, 
> nativesdk and cross-canadian and run bitbake.  The files created with 
> cross compile etc are designed to execute on one machine and produce 
> run time files for another so the package_qa_check fails if you 
> include the check for builds that inherit from cross, nativesdk and 
> cross-canadian.  Thus the FIXME for cross, nativesdk and 
> cross-canadian allows gcc-cross-arm etc to build and be packaged.
>
> Now the tag e-os started as a shorthand for epiphany-os but actually 
> the os of the end product in this case does not matter and should not 
> be important to this check.  The package_qa_check_arch check is 
> designed to ensure that the right kind of file gets packaged and 
> eventually installed on the end product, in this case a linux system 
> running on arm.  The check is not run for packages that get installed 
> on linux running on x86_64 that are cross compilers for the linux arm 
> system.  Now with the epiphany case all the packages get installed on 
> a system that they do not run on!  They get installed in the poky sdk 
> so that I can cross compile and create an elf file that I can download 
> and run on the epiphany chip.  They also get installed on the linux 
> arm product and again get run eventually on the epiphany chip.  So if 
> the package_qa_check_arch is run on any of the packages tagged with 
> e-os then it would fail because they always get installed on a 
> architecture that is not compatible because the linux arm system is 
> acting as a host for the epiphany system.
>
> Perhaps it would be better to re-name this tag exotic-os because any 
> chip like epiphany or avr could have an entry in this group. At some 
> time in the future it would be possible to implement separate checks 
> for any of these exotic packages, however I am not sure that there is 
> value in spending the effort.
>>
>> Regards,
>> Nathan
>>
>>> +                        "epiphany":   ( 4643,  0,    0,          
>>> True,          32),
>>> +                      },
>>>               "linux" : {
>>>                           "aarch64" :   (183,    0, 0,          
>>> True,          64),
>>>                           "aarch64_be" :(183,    0, 0,          
>>> False,         64),
>>> @@ -445,6 +448,10 @@ def package_qa_check_arch(path,name,d, elf, 
>>> messages):
>>>       provides = d.getVar('PROVIDES', True)
>>>       bpn = d.getVar('BPN', True)
>>>
>>> +    # FIXME: epiphany cross compile confuses this check
>>> +    if (target_os == 'e-os'):
>>> +        return
>>> +
>>>       # FIXME: Cross package confuse this check, so just skip them
>>>       for s in ['cross', 'nativesdk', 'cross-canadian']:
>>>           if bb.data.inherits_class(s, d):
> Try to comment these two lines out and then do a bitbake for your 
> target and for the sdk and analyse the results to see the failures 
> induced by including the package_qa_check_arch for gcc- cross, 
> nativesdk and cross-canadian.
>
>
> Regards,
>
> Peter
>>> -- 
>>> 2.1.0
>>>
>>> -- 
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-30 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-29 19:17 [meta-oe][PATCH v2] insane.bbclass: Added Epiphany machine definitions Peter Saunderson
2015-03-30  2:11 ` Nathan Rossi
     [not found]   ` <5519BCA9.70401@gmail.com>
2015-03-30 21:21     ` [PATCH " Peter Saunderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox