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
|
||||
sched/
|
||||
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__
|
||||
strcpy(host.p_model, "IA-64 ");
|
||||
model_hack = true;
|
||||
#elif __arm__
|
||||
strcpy(host.p_vendor, "ARM");
|
||||
vendor_hack = vendor_found = true;
|
||||
#endif
|
||||
|
||||
host.m_cache=-1;
|
||||
|
@ -504,6 +507,8 @@ static void parse_cpuinfo_linux(HOST_INFO& host) {
|
|||
strstr(buf, "family : ") || strstr(buf, "model name : ")
|
||||
#elif __powerpc__ || __sparc__
|
||||
strstr(buf, "cpu\t\t: ")
|
||||
#elif __arm__
|
||||
strstr(buf, "Processor\t: ")
|
||||
#else
|
||||
strstr(buf, "model name\t: ") || strstr(buf, "cpu model\t\t: ")
|
||||
#endif
|
||||
|
@ -589,6 +594,8 @@ static void parse_cpuinfo_linux(HOST_INFO& host) {
|
|||
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||
} else if ((strstr(buf, "features : ") == buf)) { /* ia64 */
|
||||
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)) {
|
||||
features_found = true;
|
||||
|
|
|
@ -15,8 +15,10 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define false 0
|
||||
#define true 1
|
||||
|
@ -37,7 +39,7 @@ int main(void) {
|
|||
|
||||
|
||||
FILE* f = fopen("/proc/cpuinfo", "r");
|
||||
if (!f) return;
|
||||
if (!f) return (EXIT_FAILURE);
|
||||
|
||||
#ifdef __mips__
|
||||
strcpy(p_model, "MIPS ");
|
||||
|
@ -51,6 +53,9 @@ int main(void) {
|
|||
#elif __ia64__
|
||||
strcpy(p_model, "IA-64 ");
|
||||
model_hack = true;
|
||||
#elif __arm__
|
||||
strcpy(p_vendor, "ARM ");
|
||||
vendor_hack = vendor_found = true;
|
||||
#endif
|
||||
|
||||
strcpy(features, "");
|
||||
|
@ -68,6 +73,8 @@ int main(void) {
|
|||
strstr(buf, "type\t\t: ")
|
||||
#elif __alpha__
|
||||
strstr(buf, "cpu\t\t\t: ")
|
||||
#elif __arm__
|
||||
strstr(buf, "CPU architecture: ")
|
||||
#else
|
||||
strstr(buf, "vendor_id\t: ") || strstr(buf, "system type\t\t: ")
|
||||
#endif
|
||||
|
@ -87,6 +94,8 @@ int main(void) {
|
|||
strstr(buf, "family : ") || strstr(buf, "model name : ")
|
||||
#elif __powerpc__ || __sparc__
|
||||
strstr(buf, "cpu\t\t: ")
|
||||
#elif __arm__
|
||||
strstr(buf, "Processor\t: ")
|
||||
#else
|
||||
strstr(buf, "model name\t: ") || strstr(buf, "cpu model\t\t: ")
|
||||
#endif
|
||||
|
@ -170,6 +179,8 @@ int main(void) {
|
|||
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||
} else if ((strstr(buf, "features : ") == buf)) { /* ia64 */
|
||||
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)) {
|
||||
features_found = true;
|
||||
|
@ -204,5 +215,4 @@ int main(void) {
|
|||
p_vendor, m_cache, model_buf
|
||||
);
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -177,12 +177,12 @@ $earth = array(
|
|||
),
|
||||
);
|
||||
$astro_phys_chem = array(
|
||||
tra("Astronomy/Physics/Chemistry"),
|
||||
tra("Astronomy, Physics, and Chemistry"),
|
||||
array(
|
||||
array(
|
||||
"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",
|
||||
"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"
|
||||
|
|
|
@ -107,7 +107,6 @@ function ordered_display($areas, $sort) {
|
|||
$projects = null;
|
||||
foreach ($areas as $area) {
|
||||
$title = $area[0];
|
||||
if (sizeof($area)==3) $title .= $area[2];
|
||||
$projs = $area[1];
|
||||
foreach ($projs as $p) {
|
||||
$p['area'] = $title;
|
||||
|
|
Loading…
Reference in New Issue