diff --git a/src/system/libroot/posix/sys/uname.c b/src/system/libroot/posix/sys/uname.c index 5eac164f76..bb018a3265 100644 --- a/src/system/libroot/posix/sys/uname.c +++ b/src/system/libroot/posix/sys/uname.c @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -58,7 +59,42 @@ uname(struct utsname *info) case B_CPU_x86_64: platform = "x86_64"; break; - default: //TODO:add others + case B_CPU_PPC: + platform = "ppc"; + break; + case B_CPU_PPC_64: + platform = "ppc64"; + break; + case B_CPU_M68K: + platform = "m68k"; + break; + case B_CPU_ARM: + /* The minimal ARM version emulated by QEMU + * XXX: use armv6 (raspberry Pi)? + * XXX: should we really use B_HOST_IS_LENDIAN here? + * XXX: use real cpu version as on Linux? + * cf. http://git.qemu.org/?p=qemu.git;a=blob;f=linux-user/uname.c + */ +#if B_HOST_IS_LENDIAN + platform = "armv5tel"; +#else + platform = "armv5teb"; +#endif + break; + case B_CPU_ARM_64: + platform = "aarch64"; + break; + case B_CPU_ALPHA: + platform = "alpha"; + break; + case B_CPU_MIPS: + platform = "mips"; + break; + case B_CPU_SH: + platform = "sh4"; + break; + case B_CPU_UNKNOWN: + default: platform = "unknown"; break; }