diff options
| author | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-03-17 13:02:01 +0100 |
|---|---|---|
| committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-03-17 13:02:01 +0100 |
| commit | 158be4c48fd1b86cd4f58eee8d1d10958d1be195 (patch) | |
| tree | 5d29d0a3d617927208c5f4586bf33889f6550ec5 /packages | |
| parent | 3bc21dfdeba7deed9bbaee6d490fc05bb71d2203 (diff) | |
| parent | 1f445f44f3e95a0aeff0e3f15b620012bbf9dd1a (diff) | |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/cpubench/cpubench_06.bb | 15 | ||||
| -rw-r--r-- | packages/cpubench/files/openwrt_cpu_bench_v06.c | 227 | ||||
| -rw-r--r-- | packages/freesmartphone/fsodeviced_git.bb | 15 | ||||
| -rw-r--r-- | packages/freesmartphone/libfsoframework_git.bb | 17 | ||||
| -rw-r--r-- | packages/gpephone/soundserver/libtool.patch | 10 | ||||
| -rw-r--r-- | packages/gpephone/soundserver_1.0.bb | 4 | ||||
| -rw-r--r-- | packages/mesa/mesa-dri_7.2.bb | 2 | ||||
| -rw-r--r-- | packages/vala/vala-native_git.bb | 9 |
8 files changed, 282 insertions, 17 deletions
diff --git a/packages/cpubench/cpubench_06.bb b/packages/cpubench/cpubench_06.bb new file mode 100644 index 0000000000..82735310b6 --- /dev/null +++ b/packages/cpubench/cpubench_06.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "OpenWRT's CPU Benchmark" +HOMEPAGE = "http://wiki.openwrt.org/HardwarePerformance" +LICENSE = "GPL" +SECTION = "devel" + +SRC_URI = "file://openwrt_cpu_bench_v06.c" + +do_compile() { + ${CC} -O0 ${LDFLAGS} ${WORKDIR}/openwrt_cpu_bench_v06.c -o cpubench +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 cpubench ${D}${bindir} +} diff --git a/packages/cpubench/files/openwrt_cpu_bench_v06.c b/packages/cpubench/files/openwrt_cpu_bench_v06.c new file mode 100644 index 0000000000..dfb05a8360 --- /dev/null +++ b/packages/cpubench/files/openwrt_cpu_bench_v06.c @@ -0,0 +1,227 @@ + +#include <stdio.h> +#include <stdlib.h> +#include <sys/time.h> +#include <time.h> +#include <unistd.h> + + + + +#define VERSION_STR "v0.6" + +// This is the overhead of calling gettimeofday() 2 times +double overhead = -1; + +double begin_secs = 0; +double real_get_seconds() +{ + struct timeval tv; + double total; + + gettimeofday(&tv, NULL); + total = (double)tv.tv_sec; + total += ((double)tv.tv_usec)/(double)1000000.0; + + //printf("Secs: %d / Usecs: %d / FSecs: %f\n", tv.tv_sec, tv.tv_usec, total); + + return total; +} +double get_seconds() +{ + if (begin_secs == 0) + { + // First call + begin_secs = real_get_seconds(); + } + + return (real_get_seconds() - begin_secs); +} + + +double run_float_bench() +{ + double secs; + double begin = get_seconds(); + int i; + + double nb=0; + for (i=0;i<300000;i++) + { + nb *= i; + int n = i >> 10; + nb /= n; + } + + double end = get_seconds(); + secs = end-begin; + printf("Time to run float bench: %.2f[secs]\n", secs); + + return secs; +} + + +double do_run_memory_bench() +{ + double begin, end; + int i; + int* buf; + int len, index; + double secs; + + begin = get_seconds(); + + len = (1<<21)/sizeof(int); // 2Mb + buf = malloc(len*sizeof(int)); + + // Write to memory - sequential + for (i=0;i<len;i++) + { + buf[i] = i; + } + + // Read memory - sequential + for (i=0;i<len;i++) + { + int a = buf[i]; + } + + // Read memory - random + for (i=0;i<len;i++) + { + index = (i*23)%(len/2); + int a = buf[index]; + } + + // Write memory - random + for (i=0;i<len;i++) + { + index = (i*23)%(len/2); + buf[index] = i; + } + free(buf); + + end = get_seconds(); + secs = (end-begin); + + return secs; +} + +double run_memory_bench() +{ + double secs = 0; + int i; + + for (i=0;i<10;i++) + { + secs += do_run_memory_bench(); + } + + printf("Time to run memory bench: %.2f[secs]\n", secs); + + return secs; +} + +#define NBD 9009 +double run_compute_e() +{ + double begin, end; + double secs; + + begin = get_seconds(); + + int N=NBD, n=N, a[NBD],x; + while(--n) + { + a[n]=1+1/n; + } + + for(;N>9;) + { + for(n=N--;--n; a[n]=x%n, x=10*a[n-1]+x/n) + { + } + } + + end = get_seconds(); + + secs = (end-begin); + printf("Time to run computation of e (%d digits): %.2f[secs]\n", NBD, secs); + + return secs; +} + +double run_compute_pi() +{ + double begin, end; + double secs; + int i; + + begin = get_seconds(); + //printf("Begin: %f\n", begin); + + for (i=0;i<10;i++) + { + int a=10000,b=0,c=8400,d=0,e=0,f[8401],g=0; + + //printf("i:%d\n", i); + for(;b-c;) + { + f[b++]=a/5; + } + + for(;d=0,g=c*2;c-=14,e=d%a) + { + for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b) + { + } + } + //printf("Mid: %lld\n", (get_seconds()-end)); + } + + end = get_seconds(); + //printf("End: %f\n", end); + + secs = (end-begin); + printf("Time to run computation of pi (2400 digits, 10 times): %.2f[secs]\n", secs); + + return secs; +} + +int main() +{ + printf("This is CPU and memory benchmark for OpenWRT "VERSION_STR". This will then take some time... (typically 30-60 seconds on a 200MHz computer)\n"); + + double begin = get_seconds(); + double end = get_seconds(); + overhead = (end-begin)*1000000; + printf("Overhead for getting time: %.0fus\n", overhead); + + + // Nb 1 + double sec_mem = run_memory_bench(); + + // Nb 2 + double sec_pi = run_compute_pi(); + + // Nb 3 + double sec_e = run_compute_e(); + + // Nb 4 + double sec_float = run_float_bench(); + + + + + printf("Total time: %.1fs\n", (sec_mem+sec_e+sec_pi+sec_float)); + + time_t t = time(0); + struct tm ti; + localtime_r(&t, &ti); + printf("\nYou can copy/paste the following line in the wiki table at: http://wiki.openwrt.org/HardwarePerformance\n"); + + printf("|| %04d-%02d-%02d || ''Author'' || %.1fs || %.1fs || %.1fs || %.1fs || " VERSION_STR " || ''OS'' || ''DeviceModel'' || ''CPU model'' || ''CPU Frequency'' || ''LinkToHwPage'' ||\n", (ti.tm_year+1900), (ti.tm_mon+1), ti.tm_mday, sec_mem, sec_pi, sec_e, sec_float); + + return 0; +} + diff --git a/packages/freesmartphone/fsodeviced_git.bb b/packages/freesmartphone/fsodeviced_git.bb new file mode 100644 index 0000000000..e8a77fd617 --- /dev/null +++ b/packages/freesmartphone/fsodeviced_git.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Reference implementation of the org.freesmartphone.Device.* APIs" +SECTION = "console/network" +DEPENDS = "libfsoframework" +LICENSE = "GPL" +PV = "0.0.0.0+gitr${SRCREV}" +PR = "r0" + +SRC_URI = "\ + ${FREESMARTPHONE_GIT}/cornucopia;protocol=git;branch=master \ +" +S = "${WORKDIR}/git/fsodeviced" + +inherit autotools + +FILES_${PN} += "${datadir}" diff --git a/packages/freesmartphone/libfsoframework_git.bb b/packages/freesmartphone/libfsoframework_git.bb new file mode 100644 index 0000000000..7b03e17041 --- /dev/null +++ b/packages/freesmartphone/libfsoframework_git.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "freesmartphone.org support library" +LICENSE = "GPL" +SECTION = "devel" +DEPENDS = "vala-native glib-2.0 dbus dbus-glib" +PV = "0.0.0.0+gitr${SRCREV}" +PR = "r0" + +SRC_URI = "\ + ${FREESMARTPHONE_GIT}/cornucopia;protocol=git;branch=master \ +" +S = "${WORKDIR}/git/libfsoframework" + +inherit autotools_stage pkgconfig + +FILES_${PN} += "${sysconfdir} ${datadir}" +# ship vapi files +FILES_${PN}-dev += "${datadir}/vala" diff --git a/packages/gpephone/soundserver/libtool.patch b/packages/gpephone/soundserver/libtool.patch deleted file mode 100644 index 6ae60d9288..0000000000 --- a/packages/gpephone/soundserver/libtool.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- soundserver-1.0/configure.ac.orig 2007-02-21 18:51:48.000000000 +0100 -+++ soundserver-1.0/configure.ac 2007-02-21 18:52:03.000000000 +0100 -@@ -9,7 +9,6 @@ - - # Checks for programs. - AC_PROG_CC --AC_PROG_LIBTOOL - - # Localization - AH_TEMPLATE([GETTEXT_PACKAGE], [Package name for gettext]) diff --git a/packages/gpephone/soundserver_1.0.bb b/packages/gpephone/soundserver_1.0.bb index 17e3c6b6b1..5309ea2e82 100644 --- a/packages/gpephone/soundserver_1.0.bb +++ b/packages/gpephone/soundserver_1.0.bb @@ -2,15 +2,13 @@ LICENSE = "LiPS" DESCRIPTION = "Cellphone alarm daemon" SECTION = "gpe" PRIORITY = "optional" -PR = "r1" +PR = "r2" DEPENDS = "glib-2.0 libiac gstreamer" GPE_TARBALL_SUFFIX = "bz2" inherit gpephone autotools -SRC_URI += " file://libtool.patch;patch=1" - EXTRA_OECONF="--disable-osc8k" LDFLAGS += " -L${STAGING_LIBDIR}" diff --git a/packages/mesa/mesa-dri_7.2.bb b/packages/mesa/mesa-dri_7.2.bb index 13a22afe01..296a254841 100644 --- a/packages/mesa/mesa-dri_7.2.bb +++ b/packages/mesa/mesa-dri_7.2.bb @@ -1,6 +1,6 @@ include mesa-common.inc -PROTO_DEPS = "xf86driproto glproto dri2proto" +PROTO_DEPS = "xf86driproto glproto dri2proto expat" LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes" DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" diff --git a/packages/vala/vala-native_git.bb b/packages/vala/vala-native_git.bb index b33dbc28ab..66abd5e292 100644 --- a/packages/vala/vala-native_git.bb +++ b/packages/vala/vala-native_git.bb @@ -2,12 +2,15 @@ require vala_0.5.7.bb # vala from git always needs the latest released version to compile itself DEPENDS = "vala-native" -SRCREV = "633493367757a8e5f663c69c975bf525ab8a6d53" -PV := "0.5.7+0.5.8pre01-git${SRCREV}" +SRCREV = "e7462e3ed00b75c16c11c27f6d8a640c7f35fafc" +PV := "0.5.7+0.5.8pre02-gitr${SRCREV}" DEFAULT_PREFERENCE = "-1" -SRC_URI = "${GNOME_GIT}/vala;protocol=git;branch=master" +SRC_URI = "\ + ${FREESMARTPHONE_GIT}/vala;protocol=git;branch=master \ + file://static-dbus-methods.patch;patch=1 \ +" S = "${WORKDIR}/git" inherit native |
