mirror of https://github.com/BOINC/boinc.git
- client: processor identification for ARM
(from Evandro Menezes and Joachim Fritzsch)
This commit is contained in:
parent
20d9bc9230
commit
d0de3776bd
|
@ -7920,3 +7920,11 @@ David 26 Dec 2012
|
||||||
str_util.cpp
|
str_util.cpp
|
||||||
sched/
|
sched/
|
||||||
hr_info.cpp
|
hr_info.cpp
|
||||||
|
|
||||||
|
David 27 Dec 2012
|
||||||
|
- client: processor identification for ARM
|
||||||
|
(from Evandro Menezes and Joachim Fritzsch)
|
||||||
|
|
||||||
|
client/
|
||||||
|
hostinfo_unix.cpp
|
||||||
|
hostinfo_unix_test.cpp
|
||||||
|
|
|
@ -466,6 +466,9 @@ static void parse_cpuinfo_linux(HOST_INFO& host) {
|
||||||
#elif __ia64__
|
#elif __ia64__
|
||||||
strcpy(host.p_model, "IA-64 ");
|
strcpy(host.p_model, "IA-64 ");
|
||||||
model_hack = true;
|
model_hack = true;
|
||||||
|
#elif __arm__
|
||||||
|
strcpy(host.p_vendor, "ARM");
|
||||||
|
vendor_hack = vendor_found = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
host.m_cache=-1;
|
host.m_cache=-1;
|
||||||
|
@ -504,6 +507,8 @@ static void parse_cpuinfo_linux(HOST_INFO& host) {
|
||||||
strstr(buf, "family : ") || strstr(buf, "model name : ")
|
strstr(buf, "family : ") || strstr(buf, "model name : ")
|
||||||
#elif __powerpc__ || __sparc__
|
#elif __powerpc__ || __sparc__
|
||||||
strstr(buf, "cpu\t\t: ")
|
strstr(buf, "cpu\t\t: ")
|
||||||
|
#elif __arm__
|
||||||
|
strstr(buf, "Processor\t: ")
|
||||||
#else
|
#else
|
||||||
strstr(buf, "model name\t: ") || strstr(buf, "cpu model\t\t: ")
|
strstr(buf, "model name\t: ") || strstr(buf, "cpu model\t\t: ")
|
||||||
#endif
|
#endif
|
||||||
|
@ -589,6 +594,8 @@ static void parse_cpuinfo_linux(HOST_INFO& host) {
|
||||||
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||||
} else if ((strstr(buf, "features : ") == buf)) { /* ia64 */
|
} else if ((strstr(buf, "features : ") == buf)) { /* ia64 */
|
||||||
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||||
|
} else if ((strstr(buf, "Features\t: ") == buf)) { /* arm */
|
||||||
|
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||||
}
|
}
|
||||||
if (strlen(features)) {
|
if (strlen(features)) {
|
||||||
features_found = true;
|
features_found = true;
|
||||||
|
|
|
@ -15,8 +15,10 @@
|
||||||
// You should have received a copy of the GNU Lesser General Public License
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <cstdio>
|
#include <stdio.h>
|
||||||
#include <cstring>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#define false 0
|
#define false 0
|
||||||
#define true 1
|
#define true 1
|
||||||
|
@ -37,7 +39,7 @@ int main(void) {
|
||||||
|
|
||||||
|
|
||||||
FILE* f = fopen("/proc/cpuinfo", "r");
|
FILE* f = fopen("/proc/cpuinfo", "r");
|
||||||
if (!f) return;
|
if (!f) return (EXIT_FAILURE);
|
||||||
|
|
||||||
#ifdef __mips__
|
#ifdef __mips__
|
||||||
strcpy(p_model, "MIPS ");
|
strcpy(p_model, "MIPS ");
|
||||||
|
@ -51,6 +53,9 @@ int main(void) {
|
||||||
#elif __ia64__
|
#elif __ia64__
|
||||||
strcpy(p_model, "IA-64 ");
|
strcpy(p_model, "IA-64 ");
|
||||||
model_hack = true;
|
model_hack = true;
|
||||||
|
#elif __arm__
|
||||||
|
strcpy(p_vendor, "ARM ");
|
||||||
|
vendor_hack = vendor_found = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
strcpy(features, "");
|
strcpy(features, "");
|
||||||
|
@ -68,29 +73,33 @@ int main(void) {
|
||||||
strstr(buf, "type\t\t: ")
|
strstr(buf, "type\t\t: ")
|
||||||
#elif __alpha__
|
#elif __alpha__
|
||||||
strstr(buf, "cpu\t\t\t: ")
|
strstr(buf, "cpu\t\t\t: ")
|
||||||
|
#elif __arm__
|
||||||
|
strstr(buf, "CPU architecture: ")
|
||||||
#else
|
#else
|
||||||
strstr(buf, "vendor_id\t: ") || strstr(buf, "system type\t\t: ")
|
strstr(buf, "vendor_id\t: ") || strstr(buf, "system type\t\t: ")
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
if (!vendor_hack && !vendor_found) {
|
if (!vendor_hack && !vendor_found) {
|
||||||
vendor_found = true;
|
vendor_found = true;
|
||||||
strlcpy(p_vendor, strchr(buf, ':') + 2, sizeof(p_vendor));
|
strlcpy(p_vendor, strchr(buf, ':') + 2, sizeof(p_vendor));
|
||||||
} else if (!vendor_found) {
|
} else if (!vendor_found) {
|
||||||
vendor_found = true;
|
vendor_found = true;
|
||||||
strlcpy(buf2, strchr(buf, ':') + 2, sizeof(p_vendor) - strlen(p_vendor) - 1);
|
strlcpy(buf2, strchr(buf, ':') + 2, sizeof(p_vendor) - strlen(p_vendor) - 1);
|
||||||
strcat(p_vendor, buf2);
|
strcat(p_vendor, buf2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
#ifdef __ia64__
|
#ifdef __ia64__
|
||||||
strstr(buf, "family : ") || strstr(buf, "model name : ")
|
strstr(buf, "family : ") || strstr(buf, "model name : ")
|
||||||
#elif __powerpc__ || __sparc__
|
#elif __powerpc__ || __sparc__
|
||||||
strstr(buf, "cpu\t\t: ")
|
strstr(buf, "cpu\t\t: ")
|
||||||
|
#elif __arm__
|
||||||
|
strstr(buf, "Processor\t: ")
|
||||||
#else
|
#else
|
||||||
strstr(buf, "model name\t: ") || strstr(buf, "cpu model\t\t: ")
|
strstr(buf, "model name\t: ") || strstr(buf, "cpu model\t\t: ")
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
if (!model_hack && !model_found) {
|
if (!model_hack && !model_found) {
|
||||||
model_found = true;
|
model_found = true;
|
||||||
#ifdef __powerpc__
|
#ifdef __powerpc__
|
||||||
|
@ -170,6 +179,8 @@ int main(void) {
|
||||||
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||||
} else if ((strstr(buf, "features : ") == buf)) { /* ia64 */
|
} else if ((strstr(buf, "features : ") == buf)) { /* ia64 */
|
||||||
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||||
|
} else if ((strstr(buf, "Features\t: ") == buf)) { /* arm */
|
||||||
|
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||||
}
|
}
|
||||||
if (strlen(features)) {
|
if (strlen(features)) {
|
||||||
features_found = true;
|
features_found = true;
|
||||||
|
@ -204,5 +215,4 @@ int main(void) {
|
||||||
p_vendor, m_cache, model_buf
|
p_vendor, m_cache, model_buf
|
||||||
);
|
);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,12 +177,12 @@ $earth = array(
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$astro_phys_chem = array(
|
$astro_phys_chem = array(
|
||||||
tra("Astronomy/Physics/Chemistry"),
|
tra("Astronomy, Physics, and Chemistry"),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
"Constellation",
|
"Constellation",
|
||||||
"http://aerospaceresearch.net/constellation/",
|
"http://aerospaceresearch.net/constellation/",
|
||||||
"<a href=http://rechenkraft.net/>Rechenkraft.net</a>, <a href=http://stuttgart.dglr.de/>DGLR</a>, <a href=http://selfnet.de/>Selfnet</a>, and <a href=http://shackspace.de/>shack</a>",
|
"<a href=\"http://rechenkraft.net\">Rechenkraft.net</a>, <a href=\"http://stuttgart.dglr.de\">DGLR</a>, <a href=\"http://selfnet.de\">Selfnet</a>, and <a href=\"http://shackspace.de\">shack</a>",
|
||||||
"Aerospace-related science and engineering",
|
"Aerospace-related science and engineering",
|
||||||
"Constellation is a platform for aerospace-related simulations, including trajectory optimization of launchers, satellites and probes, simulation of Moon's near-surface exosphere, and analysis of dynamic systems of exploration-rovers",
|
"Constellation is a platform for aerospace-related simulations, including trajectory optimization of launchers, satellites and probes, simulation of Moon's near-surface exosphere, and analysis of dynamic systems of exploration-rovers",
|
||||||
"constellation2.png"
|
"constellation2.png"
|
||||||
|
|
|
@ -107,7 +107,6 @@ function ordered_display($areas, $sort) {
|
||||||
$projects = null;
|
$projects = null;
|
||||||
foreach ($areas as $area) {
|
foreach ($areas as $area) {
|
||||||
$title = $area[0];
|
$title = $area[0];
|
||||||
if (sizeof($area)==3) $title .= $area[2];
|
|
||||||
$projs = $area[1];
|
$projs = $area[1];
|
||||||
foreach ($projs as $p) {
|
foreach ($projs as $p) {
|
||||||
$p['area'] = $title;
|
$p['area'] = $title;
|
||||||
|
|
Loading…
Reference in New Issue