On Tue, Jul 06, 2010, Michael Hope wrote:
machine = os.uname()[-1] if machine in ('i686', 'x86_64'): return cls._find_pc_board()
elif machine == 'arm':
elif machine in ('arm', 'armv7l'):
You could try running "arch" instead. AFAIK, uname can be any of arch name + endianess: sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
- ENDIANNESS gives either l or b - arch_name gives one of armv4, armv5te, armv5tej armv6 etc. built from all supported CPUs, see the cpu_arch_name defs in linux/arch/arm/mm/proc-*.S
So using "arch" as an abstraction might be simplest; if you want to parse yourself, in theory, an ARM CPU architecture could be named foobar but it's rather unlikely so you could test whether uname starts with "arm".