kernel-arch.bbclass: Add powerpc64 mappings
authorTom Rini <tom_rini@mentor.com>
Mon, 21 Feb 2011 16:20:49 +0000 (09:20 -0700)
committerTom Rini <tom_rini@mentor.com>
Mon, 21 Feb 2011 16:23:54 +0000 (09:23 -0700)
A future TODO is to see if there's anything left that must
build with ARCH=ppc in the kernel that can't be upgraded to a
newer kernel with ARCH=powerpc.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
classes/kernel-arch.bbclass

index 970e7ee..aefb5db 100644 (file)
@@ -6,7 +6,7 @@
 
 valid_archs = "alpha cris ia64 \
                x86_64 i386 x86 \
-               m68knommu m68k ppc powerpc ppc64  \
+               m68knommu m68k ppc powerpc ppc64 powerpc64 \
                sparc sparc64 \
                arm  arm26 \
                m32r mips \
@@ -26,6 +26,7 @@ def map_kernel_arch(a, d):
        elif re.match('mips(el|64|64el)$', a):  return 'mips'
        elif re.match('sh(3|4)$', a):           return 'sh'
        elif re.match('bfin', a):               return 'blackfin'
+       elif re.match('(p|owerpc)64$', a):      return 'powerpc'
        elif a in valid_archs:                  return a
        else:
                bb.error("cannot map '%s' to a linux kernel architecture" % a)
@@ -35,7 +36,7 @@ export ARCH = "${@map_kernel_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}"
 def map_uboot_arch(a, d):
        import re
 
-       if   re.match('powerpc$', a): return 'ppc'
+       if   re.match('(powerpc|ppc)(|64)$', a): return 'ppc'
        elif re.match('i.86$', a): return 'x86'
        return a