![](/img/trans.png)
[英]While I'm trying gcc make linux-headers-`uname -r` I'm getting error
[英]Possible values for `uname -m`
uname(1)
命令行实用程序具有-m
选项,用于打印“计算机硬件名称”。
在Linux上,此字段来自struct utsname
的machine
成员,由uname(2)
系统调用填充。
许多其他语言API返回此信息:
os.uname()
和platform.machine()
php_uname()
“机器”字段有哪些可能的值?
(v4.12 - 2017年7月)
我们来看一下newuname系统调用的来源。
Linux具有UTS命名空间 ,但init_uts_ns
machine
字段由UTS_MACHINE
宏初始化,该宏是按体系结构定义的,因此跟踪此问题变得复杂。
更复杂的是,如果进程在32位“compat”个性下运行到COMPAT_UTS_MACHINE
,则可以通过override_architecture()
覆盖machine
。
UTS_MACHINE
在Makefile
默认与ARCH
相同。 但是,许多平台在同一个arch
目录下具有单独的子架构,因此它们自己设置了UTS_MACHINE
随着目录列表中的arch/
和一点点grep
的Linux内核源-ing( git grep 'UTS_MACHINE\\s*:='
和git grep COMPAT_UTS_MACHINE
),我们可以在这个名单到:
alpha
arc
arm
aarch64_be
( arm64
) aarch64
( arm64
) armv8b
( arm64
compat) armv8l
( arm64
compat)
blackfin
c6x
cris
frv
h8300
hexagon
ia64
m32r
m68k
metag
microblaze
mips
(原生或compat) mips64
( mips
) mn10300
nios2
openrisc
parisc
(本地或compat) parisc64
( parisc
) ppc
( powerpc
native或compat) ppc64
( powerpc
) ppcle
( powerpc
native或compat) ppc64le
( powerpc
) s390
( s390x
compat) s390x
score
sh
sh64
( sh
) sparc
(原生或compat) sparc64
( sparc
) tile
unicore32
i386
( x86
) i686
( x86
compat) x86_64
( x64
) xtensa
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.