summaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-core/recipes-test/interbench/files
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2018-04-16 22:14:52 +0200
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2018-04-20 17:07:06 +0200
commitbb0882c5dad030f676e424265ebcd869bb3ff899 (patch)
treed95bb2d7ad6b5ac47427f73babe015b0ade02342 /meta-agl-profile-core/recipes-test/interbench/files
parent97e5e76efa44f55ee9aaf3998bb3df38b829706c (diff)
Introduce meta-agl-profile-core and meta-agl-profile-graphics
Rework towards agl profiles. This change is part of a series of changes to create the AGL profiles. This set will mainly introduce the 'core' profile. It is setup to be a drop-in change, thus some files were kept in (dummy) locations for now. However, they'll be taken care of in the next changes in this series. The main target of the meta-agl-profile-core layer is to host: - a minimal, bootable image with network and package management enabled -- agl-image-boot - a minimal image with network and packagemanagement and the AGL APIs -- agl-image-minimal The layer meta-agl-profile-graphical is used as superset of these and includes support for egl+wayland+weston. All recipes concerning graphics were moved there. This is not a full profile as we still have to migrate some parts of meta-agl-demo in a follow-up changeset. The roadmap as discussed during the F2F session in Karlsruhe is: - week 16 : core profile and profiles w/o graphics - week 17 : graphical profiles - week 18 : final conversion of the demo image v2: moved agl-login-manager from -graphics to -core (see Jose's comment) v3: moved back after discussion - follow-up in separate changeset Change-Id: Idacb0d1274baac1f63f8d1b850d4b1104ac33918 Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-profile-core/recipes-test/interbench/files')
-rw-r--r--meta-agl-profile-core/recipes-test/interbench/files/interbench.c.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/meta-agl-profile-core/recipes-test/interbench/files/interbench.c.patch b/meta-agl-profile-core/recipes-test/interbench/files/interbench.c.patch
new file mode 100644
index 000000000..c882739ba
--- /dev/null
+++ b/meta-agl-profile-core/recipes-test/interbench/files/interbench.c.patch
@@ -0,0 +1,68 @@
+--- interbench.c.orig 2009-10-30 23:14:59.000000000 -0500
++++ interbench.c 2012-07-10 19:06:00.000000000 -0500
+@@ -71,6 +71,7 @@ struct user_data {
+ char datestamp[13];
+ FILE *logfile;
+ } ud = {
++ .ram = 0,
+ .duration = 30,
+ .cpu_load = 4,
+ .log = 1,
+@@ -652,6 +653,8 @@ void emulate_write(struct thread *th)
+ terminal_error("fopen");
+ if (stat(name, &statbuf) == -1)
+ terminal_fileopen_error(fp, "stat");
++ if (statbuf.st_blksize < MIN_BLK_SIZE)
++ statbuf.st_blksize = MIN_BLK_SIZE;
+ for (i = 0 ; i < mem; i++) {
+ if (fwrite(buf, statbuf.st_blksize, 1, fp) != 1)
+ terminal_fileopen_error(fp, "fwrite");
+@@ -1136,14 +1139,17 @@ void get_ram(void)
+ if(!(meminfo = fopen("/proc/meminfo", "r")))
+ terminal_error("fopen");
+
+- ud.ram = ud.swap = 0;
+- while( !feof(meminfo) && !fscanf(meminfo, "MemTotal: %lu kB", &ud.ram) )
+- fgets(aux,sizeof(aux),meminfo);
++ if (!ud.ram)
++ {
++ while( !feof(meminfo) && !fscanf(meminfo, "MemTotal: %lu kB", &ud.ram) )
++ fgets(aux,sizeof(aux),meminfo);
++ }
++ ud.swap = 0;
+ while( !feof(meminfo) && !fscanf(meminfo, "SwapTotal: %lu kB", &ud.swap) )
+ fgets(aux,sizeof(aux),meminfo);
+ if (fclose(meminfo) == -1)
+ terminal_error("fclose");
+-
++
+ if( !ud.ram || !ud.swap ) {
+ unsigned long i;
+ fprintf(stderr, "\nCould not get memory or swap size. ");
+@@ -1399,6 +1405,7 @@ void usage(void)
+ fprintf(stderr, "\t[-h]\n\n");
+ fprintf(stderr, " -l\tUse <int> loops per sec (default: use saved benchmark)\n");
+ fprintf(stderr, " -L\tUse cpu load of <int> with burn load (default: 4)\n");
++ fprintf(stderr, " -M\tForce RAM size to <int>. Useful when disk is smaller than RAM.\n");
+ fprintf(stderr, " -t\tSeconds to run each benchmark (default: 30)\n");
+ fprintf(stderr, " -B\tNice the benchmarked thread to <int> (default: 0)\n");
+ fprintf(stderr, " -N\tNice the load thread to <int> (default: 0)\n");
+@@ -1482,7 +1489,7 @@ int main(int argc, char **argv)
+ terminal_error("signal");
+ #endif
+
+- while ((q = getopt(argc, argv, "hl:L:B:N:ut:bcnrC:I:m:w:x:W:X:")) != -1) {
++ while ((q = getopt(argc, argv, "hl:L:M:B:N:ut:bcnrC:I:m:w:x:W:X:")) != -1) {
+ switch (q) {
+ case 'h':
+ usage();
+@@ -1496,6 +1503,9 @@ int main(int argc, char **argv)
+ case 'L':
+ ud.cpu_load = atoi(optarg);
+ break;
++ case 'M':
++ ud.ram = atoi(optarg);
++ break;
+ case 'B':
+ ud.bench_nice = atoi(optarg);
+ break;
ring.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Bluetooth PBAP Service

## Overview

Bluetooth PBAP service reports respective vCard phonebook data from BlueZ via communication with PBAP profile

## Verbs

| Name        | Description                                | JSON Response                                      |
|-------------|--------------------------------------------|----------------------------------------------------|
| subscribe   | subscribe to Bluetooth PBAP events         | *Request:* {"value": "status"}                     |
| unsubscribe | unsubscribe to Bluetooth PBAP events       | *Request:* {"value": "status"}                     |
| import      | request contact data from connected device | see **import verb section**                        |
| contacts    | return all contacts from connected device  | see **contacts verb section**                      |
| entry       | return vCard data from handle              | see **entry verb section**                         |
| history     | return call history list                   | see **history verb section**                       |
| search      | search for respective vCard handle         | see **search verb section**                        |
| status      | current device connection status           | same response as noted in **status event section** |


### import Verb

Requests phonebook from connected device via OBEX transfers, caches the results to a database, and
returns a response as documented in the **contacts verb section**


### contacts Verb

Returns all vCards that are accessible from respective connected device in concatenated output
from the cached database.

NOTE: This doesn't request refreshed data from device

<pre>

"response": {
    "vcards": [
     {
        "fn": "Art McGee",
        "photo": {
            "mimetype": "image/jpeg",
            "data": 'BASE64 IMAGE BLOB HERE'
        },
        "telephone": [
          {
            "CELL": "+13305551212"
          }
        ]
     },
     ...
  ]
}
</pre>

### search Verb

Example of a request for vCard search using **number** parameter (i.e. *{"number":"+15035551212"}*) results:

<pre>
"response": {
    "results": [
       {
          "handle": "27e.vcf",
          "name": "Art McGee"
       }
    ]
}                                       },
</pre>

### entry Verb

Client must pass one of the following values to the **list** parameter in request:

| Value         | Description                                      |
|---------------|--------------------------------------------------|
| ich           | Incoming calls                                   |
| och           | Outgoing calls                                   |
| mch           | Missed calls                                     |
| cch           | Combined calls (e.g. incoming, outgoing, missed) |
| pb            | Phonebook (typically selected)                   |

Also there is a **handle** parameter that must be in form of vCard path (e.g. 27e.vcf).

Response is the same as noted in the **contacts** verb

### history Verb

Client must pass one of the following values to the list parameter in request:

| Value         | Description                                      |
|---------------|--------------------------------------------------|
| ich           | Incoming calls                                   |
| och           | Outgoing calls                                   |
| mch           | Missed calls                                     |
| cch           | Combined calls (e.g. incoming, outgoing, missed) |

Sample request for a combined list (i.e. *{"list":"cch"}*) and its respective response:

<pre>
"response": {
    "vcards": [
      {
        "fn": "Art McGee"
        "type": "DIALED",
        "timestamp": "20190509T193422",
        "telephone": "+13305551212"
      },
      {
        "fn": "UNKNOWN CALLER",
        "type": "MISSED",
        "timestamp": "20190426T014109",
        "telephone": "+15035551212"
      },
      {
        "fn": "Satoshi Nakamoto"
        "type": "RECEIVED",
        "timestamp": "20190421T090123",
        "telephone": "+13605551212"
      }
   ]
}
</pre>

## Events

Respective binding only outputs one event that signals if an PBAP capable device is connected

### status Event

Sample of a Bluetooth PBAP status event:

<pre>
{
  "connected": true
}
</pre>