summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-07-20 12:43:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-26 13:16:40 +0100
commit4f67aef1bf27652a48110a04604a3ad0d9a9a127 (patch)
tree80a50dcbc168fc768db418b26e23a578a3cf4abd /meta/lib/oe
parent26810bc160bd78924a7f1fddac31afb4981f5b6b (diff)
downloadpoky-4f67aef1bf27652a48110a04604a3ad0d9a9a127.tar.gz
lib/oe: split out machine to ELF data dictionary
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/elf.py127
1 files changed, 127 insertions, 0 deletions
diff --git a/meta/lib/oe/elf.py b/meta/lib/oe/elf.py
new file mode 100644
index 0000000000..e63d268c35
--- /dev/null
+++ b/meta/lib/oe/elf.py
@@ -0,0 +1,127 @@
1def machine_dict(d):
2# TARGET_OS TARGET_ARCH MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
3 machdata = {
4 "darwin9" : {
5 "arm" : (40, 0, 0, True, 32),
6 },
7 "eabi" : {
8 "arm" : (40, 0, 0, True, 32),
9 },
10 "elf" : {
11 "aarch64" : (183, 0, 0, True, 64),
12 "aarch64_be" :(183, 0, 0, False, 64),
13 "i586" : (3, 0, 0, True, 32),
14 "x86_64": (62, 0, 0, True, 64),
15 "epiphany": (4643, 0, 0, True, 32),
16 "mips": ( 8, 0, 0, False, 32),
17 "mipsel": ( 8, 0, 0, True, 32),
18 "microblaze": (189, 0, 0, False, 32),
19 "microblazeeb":(189, 0, 0, False, 32),
20 "microblazeel":(189, 0, 0, True, 32),
21 "powerpc": (20, 0, 0, False, 32),
22 "riscv32": (243, 0, 0, True, 32),
23 "riscv64": (243, 0, 0, True, 64),
24 },
25 "linux" : {
26 "aarch64" : (183, 0, 0, True, 64),
27 "aarch64_be" :(183, 0, 0, False, 64),
28 "arm" : (40, 97, 0, True, 32),
29 "armeb": (40, 97, 0, False, 32),
30 "powerpc": (20, 0, 0, False, 32),
31 "powerpc64": (21, 0, 0, False, 64),
32 "i386": ( 3, 0, 0, True, 32),
33 "i486": ( 3, 0, 0, True, 32),
34 "i586": ( 3, 0, 0, True, 32),
35 "i686": ( 3, 0, 0, True, 32),
36 "x86_64": (62, 0, 0, True, 64),
37 "ia64": (50, 0, 0, True, 64),
38 "alpha": (36902, 0, 0, True, 64),
39 "hppa": (15, 3, 0, False, 32),
40 "m68k": ( 4, 0, 0, False, 32),
41 "mips": ( 8, 0, 0, False, 32),
42 "mipsel": ( 8, 0, 0, True, 32),
43 "mips64": ( 8, 0, 0, False, 64),
44 "mips64el": ( 8, 0, 0, True, 64),
45 "mipsisa32r6": ( 8, 0, 0, False, 32),
46 "mipsisa32r6el": ( 8, 0, 0, True, 32),
47 "mipsisa64r6": ( 8, 0, 0, False, 64),
48 "mipsisa64r6el": ( 8, 0, 0, True, 64),
49 "nios2": (113, 0, 0, True, 32),
50 "riscv32": (243, 0, 0, True, 32),
51 "riscv64": (243, 0, 0, True, 64),
52 "s390": (22, 0, 0, False, 32),
53 "sh4": (42, 0, 0, True, 32),
54 "sparc": ( 2, 0, 0, False, 32),
55 "microblaze": (189, 0, 0, False, 32),
56 "microblazeeb":(189, 0, 0, False, 32),
57 "microblazeel":(189, 0, 0, True, 32),
58 },
59 "linux-musl" : {
60 "aarch64" : (183, 0, 0, True, 64),
61 "aarch64_be" :(183, 0, 0, False, 64),
62 "arm" : ( 40, 97, 0, True, 32),
63 "armeb": ( 40, 97, 0, False, 32),
64 "powerpc": ( 20, 0, 0, False, 32),
65 "i386": ( 3, 0, 0, True, 32),
66 "i486": ( 3, 0, 0, True, 32),
67 "i586": ( 3, 0, 0, True, 32),
68 "i686": ( 3, 0, 0, True, 32),
69 "x86_64": ( 62, 0, 0, True, 64),
70 "mips": ( 8, 0, 0, False, 32),
71 "mipsel": ( 8, 0, 0, True, 32),
72 "mips64": ( 8, 0, 0, False, 64),
73 "mips64el": ( 8, 0, 0, True, 64),
74 "microblaze": (189, 0, 0, False, 32),
75 "microblazeeb":(189, 0, 0, False, 32),
76 "microblazeel":(189, 0, 0, True, 32),
77 "riscv32": (243, 0, 0, True, 32),
78 "riscv64": (243, 0, 0, True, 64),
79 "sh4": ( 42, 0, 0, True, 32),
80 },
81 "uclinux-uclibc" : {
82 "bfin": ( 106, 0, 0, True, 32),
83 },
84 "linux-gnueabi" : {
85 "arm" : (40, 0, 0, True, 32),
86 "armeb" : (40, 0, 0, False, 32),
87 },
88 "linux-musleabi" : {
89 "arm" : (40, 0, 0, True, 32),
90 "armeb" : (40, 0, 0, False, 32),
91 },
92 "linux-gnuspe" : {
93 "powerpc": (20, 0, 0, False, 32),
94 },
95 "linux-muslspe" : {
96 "powerpc": (20, 0, 0, False, 32),
97 },
98 "linux-gnu" : {
99 "powerpc": (20, 0, 0, False, 32),
100 "sh4": (42, 0, 0, True, 32),
101 },
102 "linux-gnu_ilp32" : {
103 "aarch64" : (183, 0, 0, True, 32),
104 },
105 "linux-gnux32" : {
106 "x86_64": (62, 0, 0, True, 32),
107 },
108 "linux-muslx32" : {
109 "x86_64": (62, 0, 0, True, 32),
110 },
111 "linux-gnun32" : {
112 "mips64": ( 8, 0, 0, False, 32),
113 "mips64el": ( 8, 0, 0, True, 32),
114 "mipsisa64r6": ( 8, 0, 0, False, 32),
115 "mipsisa64r6el":( 8, 0, 0, True, 32),
116 },
117 }
118
119 # Add in any extra user supplied data which may come from a BSP layer, removing the
120 # need to always change this class directly
121 extra_machdata = (d and d.getVar("PACKAGEQA_EXTRA_MACHDEFFUNCS" or None) or "").split()
122 for m in extra_machdata:
123 call = m + "(machdata, d)"
124 locs = { "machdata" : machdata, "d" : d}
125 machdata = bb.utils.better_eval(call, locs)
126
127 return machdata