diff options
author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/classes/kernel-arch.bbclass | |
parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
download | poky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz |
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/kernel-arch.bbclass')
-rw-r--r-- | meta/classes/kernel-arch.bbclass | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass new file mode 100644 index 0000000000..92a6c982fb --- /dev/null +++ b/meta/classes/kernel-arch.bbclass | |||
@@ -0,0 +1,26 @@ | |||
1 | # | ||
2 | # set the ARCH environment variable for kernel compilation (including | ||
3 | # modules). return value must match one of the architecture directories | ||
4 | # in the kernel source "arch" directory | ||
5 | # | ||
6 | |||
7 | valid_archs = "alpha cris ia64 m68knommu ppc sh \ | ||
8 | sparc64 x86_64 arm h8300 m32r mips \ | ||
9 | ppc64 sh64 um arm26 i386 m68k \ | ||
10 | parisc s390 sparc v850" | ||
11 | |||
12 | def map_kernel_arch(a, d): | ||
13 | import bb, re | ||
14 | |||
15 | valid_archs = bb.data.getVar('valid_archs', d, 1).split() | ||
16 | |||
17 | if re.match('(i.86|athlon)$', a): return 'i386' | ||
18 | elif re.match('arm26$', a): return 'arm26' | ||
19 | elif re.match('armeb$', a): return 'arm' | ||
20 | elif re.match('powerpc$', a): return 'ppc' | ||
21 | elif re.match('mipsel$', a): return 'mips' | ||
22 | elif a in valid_archs: return a | ||
23 | else: | ||
24 | bb.error("cannot map '%s' to a linux kernel architecture" % a) | ||
25 | |||
26 | export ARCH = "${@map_kernel_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}" | ||