diff options
Diffstat (limited to 'meta-linaro/recipes-extra')
47 files changed, 2657 insertions, 0 deletions
diff --git a/meta-linaro/recipes-extra/arndale-pre-boot/arndale-pre-boot_0.0.2.20130101.bb b/meta-linaro/recipes-extra/arndale-pre-boot/arndale-pre-boot_0.0.2.20130101.bb new file mode 100644 index 0000000..46de0d8 --- /dev/null +++ b/meta-linaro/recipes-extra/arndale-pre-boot/arndale-pre-boot_0.0.2.20130101.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | DESCRIPTION = "This package contains the BL1 binary for Arndale board, \ | ||
2 | a chip-specific pre-bootloader provided by Samsung." | ||
3 | SUMMARY = "Binary pre-bootloader for Arndale (BL1)" | ||
4 | SECTION = "bootloader" | ||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://BSD;md5=9c3fd1feed485309afa64b43f98ba22a" | ||
7 | |||
8 | SRCREV = "fddc9ea644ee7d05c439ef7cdecbe20da63cdce3" | ||
9 | PV = "0.0.2.20130101+git${SRCPV}" | ||
10 | PR = "r1" | ||
11 | |||
12 | SRC_URI = "git://git.linaro.org/pkg/arndale-pre-boot.git" | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | do_install() { | ||
17 | install -D -p -m0644 arndale-bl1.bin ${D}/lib/firmware/arndale/arndale-bl1.bin | ||
18 | } | ||
19 | |||
20 | PACKAGE_ARCH = "all" | ||
21 | |||
22 | PACKAGES = "${PN}" | ||
23 | |||
24 | FILES_${PN} = "/lib/firmware/arndale/arndale-bl1.bin" | ||
diff --git a/meta-linaro/recipes-extra/calibrator/calibrator_0.9e.bb b/meta-linaro/recipes-extra/calibrator/calibrator_0.9e.bb new file mode 100644 index 0000000..7911e0f --- /dev/null +++ b/meta-linaro/recipes-extra/calibrator/calibrator_0.9e.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "Cache-Memory and TLB calibration tool" | ||
2 | DESCRIPTION = "The Calibrator is a small C program that is supposed to \ | ||
3 | analyze a computers (cache-) memory system and extract the following \ | ||
4 | parameters: \ | ||
5 | number of cache levels, main memory access latency, number of TLB levels." | ||
6 | HOMEPAGE = "http://homepages.cwi.nl/~manegold/Calibrator/" | ||
7 | SECTION = "console/tools" | ||
8 | LICENSE = "BSD" | ||
9 | LIC_FILES_CHKSUM = "file://calibrator.c;endline=39;md5=102be98d5b443582cffa8eb4ee776af8" | ||
10 | PR = "r0" | ||
11 | |||
12 | SRC_URI = "http://homepages.cwi.nl/~manegold/Calibrator/src/calibrator.c \ | ||
13 | file://fix_conflicting_types_for_round.patch" | ||
14 | SRC_URI[md5sum] = "5355f07ab1103e6d2948e08936d1ff54" | ||
15 | SRC_URI[sha256sum] = "2018ed8fa733155d44ceb1c0066c5cf8df7771cdf7cfca0a07b8dd9bebd9c221" | ||
16 | |||
17 | S = "${WORKDIR}" | ||
18 | |||
19 | do_compile() { | ||
20 | ${CC} ${CFLAGS} calibrator.c -o calibrator -lm | ||
21 | } | ||
22 | |||
23 | do_install() { | ||
24 | install -D -p -m0755 calibrator ${D}${bindir}/calibrator | ||
25 | } | ||
26 | |||
27 | COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" | ||
diff --git a/meta-linaro/recipes-extra/calibrator/files/fix_conflicting_types_for_round.patch b/meta-linaro/recipes-extra/calibrator/files/fix_conflicting_types_for_round.patch new file mode 100644 index 0000000..b7e7a64 --- /dev/null +++ b/meta-linaro/recipes-extra/calibrator/files/fix_conflicting_types_for_round.patch | |||
@@ -0,0 +1,95 @@ | |||
1 | Description: rename round() to rnd() to fix conflicting types for 'round' error | ||
2 | Author: Fathi Boudra <fathi.boudra@linaro.org> | ||
3 | |||
4 | --- | ||
5 | calibrator.c | 30 +++++++++++++++--------------- | ||
6 | 1 file changed, 15 insertions(+), 15 deletions(-) | ||
7 | |||
8 | --- a/calibrator.c | ||
9 | +++ b/calibrator.c | ||
10 | @@ -128,7 +128,7 @@ void ErrXit(char *format, ...) { | ||
11 | exit(1); | ||
12 | } | ||
13 | |||
14 | -lng round(dbl x) | ||
15 | +lng rnd(dbl x) | ||
16 | { | ||
17 | return (lng)(x + 0.5); | ||
18 | } | ||
19 | @@ -890,16 +890,16 @@ void plotCache(cacheInfo *cache, lng **r | ||
20 | fprintf(fp, ")\n"); | ||
21 | fprintf(fp, "set y2tics"); | ||
22 | for (l = 0, s = " ("; l <= cache->levels; l++, s = ", ") { | ||
23 | - if (!delay) fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(cache->latency1[l] - delay)), NSperIt(cache->latency1[l] - delay)); | ||
24 | - else fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(cache->latency2[l] - delay)), NSperIt(cache->latency2[l] - delay)); | ||
25 | + if (!delay) fprintf(fp, "%s'(%ld)' %f", s, rnd(CYperIt(cache->latency1[l] - delay)), NSperIt(cache->latency1[l] - delay)); | ||
26 | + else fprintf(fp, "%s'(%ld)' %f", s, rnd(CYperIt(cache->latency2[l] - delay)), NSperIt(cache->latency2[l] - delay)); | ||
27 | } | ||
28 | for (y = 1; y <= yh; y *= 10) { | ||
29 | fprintf(fp, "%s'%1.3g' %ld", s, (dbl)(y * MHz) / 1000.0, y); | ||
30 | } | ||
31 | fprintf(fp, ")\n"); | ||
32 | for (l = 0; l <= cache->levels; l++) { | ||
33 | - if (!delay) z = (dbl)round(CYperIt(cache->latency1[l] - delay)) * 1000.0 / (dbl)MHz; | ||
34 | - else z = (dbl)round(CYperIt(cache->latency2[l] - delay)) * 1000.0 / (dbl)MHz; | ||
35 | + if (!delay) z = (dbl)rnd(CYperIt(cache->latency1[l] - delay)) * 1000.0 / (dbl)MHz; | ||
36 | + else z = (dbl)rnd(CYperIt(cache->latency2[l] - delay)) * 1000.0 / (dbl)MHz; | ||
37 | fprintf(fp, "set label %ld '(%1.3g) ' at %f,%f right\n", l + 1, z, xl, z); | ||
38 | fprintf(fp, "set arrow %ld from %f,%f to %f,%f nohead lt 0\n", l + 1, xl, z, xh, z); | ||
39 | } | ||
40 | @@ -986,16 +986,16 @@ void plotTLB(TLBinfo *TLB, lng **result, | ||
41 | fprintf(fp, "%s'<L1>' %ld)\n", s, TLB->mincachelines); | ||
42 | fprintf(fp, "set y2tics"); | ||
43 | for (l = 0, s = " ("; l <= TLB->levels; l++, s = ", ") { | ||
44 | - if (!delay) fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(TLB->latency1[l] - delay)), NSperIt(TLB->latency1[l] - delay)); | ||
45 | - else fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(TLB->latency2[l] - delay)), NSperIt(TLB->latency2[l] - delay)); | ||
46 | + if (!delay) fprintf(fp, "%s'(%ld)' %f", s, rnd(CYperIt(TLB->latency1[l] - delay)), NSperIt(TLB->latency1[l] - delay)); | ||
47 | + else fprintf(fp, "%s'(%ld)' %f", s, rnd(CYperIt(TLB->latency2[l] - delay)), NSperIt(TLB->latency2[l] - delay)); | ||
48 | } | ||
49 | for (y = 1; y <= yh; y *= 10) { | ||
50 | fprintf(fp, "%s'%1.3g' %ld", s, (dbl)(y * MHz) / 1000.0, y); | ||
51 | } | ||
52 | fprintf(fp, ")\n"); | ||
53 | for (l = 0; l <= TLB->levels; l++) { | ||
54 | - if (!delay) z = (dbl)round(CYperIt(TLB->latency1[l] - delay)) * 1000.0 / (dbl)MHz; | ||
55 | - else z = (dbl)round(CYperIt(TLB->latency2[l] - delay)) * 1000.0 / (dbl)MHz; | ||
56 | + if (!delay) z = (dbl)rnd(CYperIt(TLB->latency1[l] - delay)) * 1000.0 / (dbl)MHz; | ||
57 | + else z = (dbl)rnd(CYperIt(TLB->latency2[l] - delay)) * 1000.0 / (dbl)MHz; | ||
58 | fprintf(fp, "set label %ld '(%1.3g) ' at %f,%f right\n", l + 1, z, xl, z); | ||
59 | fprintf(fp, "set arrow %ld from %f,%f to %f,%f nohead lt 0\n", l + 1, xl, z, xh, z); | ||
60 | } | ||
61 | @@ -1023,9 +1023,9 @@ void printCPU(cacheInfo *cache, lng MHz, | ||
62 | FILE *fp = stdout; | ||
63 | |||
64 | fprintf(fp, "CPU loop + L1 access: "); | ||
65 | - fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[0]), round(CYperIt(cache->latency1[0]))); | ||
66 | + fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[0]), rnd(CYperIt(cache->latency1[0]))); | ||
67 | fprintf(fp, " ( delay: "); | ||
68 | - fprintf(fp, " %6.2f ns = %3ld cy )\n", NSperIt(delay), round(CYperIt(delay))); | ||
69 | + fprintf(fp, " %6.2f ns = %3ld cy )\n", NSperIt(delay), rnd(CYperIt(delay))); | ||
70 | fprintf(fp, "\n"); | ||
71 | fflush(fp); | ||
72 | } | ||
73 | @@ -1047,8 +1047,8 @@ void printCache(cacheInfo *cache, lng MH | ||
74 | fprintf(fp, " %3ld KB ", cache->size[l] / 1024); | ||
75 | } | ||
76 | fprintf(fp, " %3ld bytes ", cache->linesize[l + 1]); | ||
77 | - fprintf(fp, " %6.2f ns = %3ld cy " , NSperIt(cache->latency2[l + 1] - cache->latency2[l]), round(CYperIt(cache->latency2[l + 1] - cache->latency2[l]))); | ||
78 | - fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[l + 1] - cache->latency1[l]), round(CYperIt(cache->latency1[l + 1] - cache->latency1[l]))); | ||
79 | + fprintf(fp, " %6.2f ns = %3ld cy " , NSperIt(cache->latency2[l + 1] - cache->latency2[l]), rnd(CYperIt(cache->latency2[l + 1] - cache->latency2[l]))); | ||
80 | + fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[l + 1] - cache->latency1[l]), rnd(CYperIt(cache->latency1[l + 1] - cache->latency1[l]))); | ||
81 | } | ||
82 | fprintf(fp, "\n"); | ||
83 | fflush(fp); | ||
84 | @@ -1075,9 +1075,9 @@ void printTLB(TLBinfo *TLB, lng MHz) | ||
85 | } else { | ||
86 | fprintf(fp, " %3ld KB ", TLB->pagesize[l + 1] / 1024); | ||
87 | } | ||
88 | - fprintf(fp, " %6.2f ns = %3ld cy ", NSperIt(TLB->latency2[l + 1] - TLB->latency2[l]), round(CYperIt(TLB->latency2[l + 1] - TLB->latency2[l]))); | ||
89 | + fprintf(fp, " %6.2f ns = %3ld cy ", NSperIt(TLB->latency2[l + 1] - TLB->latency2[l]), rnd(CYperIt(TLB->latency2[l + 1] - TLB->latency2[l]))); | ||
90 | /* | ||
91 | - fprintf(fp, " %6.2f ns = %3ld cy" , NSperIt(TLB->latency1[l + 1] - TLB->latency1[l]), round(CYperIt(TLB->latency1[l + 1] - TLB->latency1[l]))); | ||
92 | + fprintf(fp, " %6.2f ns = %3ld cy" , NSperIt(TLB->latency1[l + 1] - TLB->latency1[l]), rnd(CYperIt(TLB->latency1[l + 1] - TLB->latency1[l]))); | ||
93 | */ | ||
94 | fprintf(fp, "\n"); | ||
95 | } | ||
diff --git a/meta-linaro/recipes-extra/daq-odp/daq-odp.bb b/meta-linaro/recipes-extra/daq-odp/daq-odp.bb new file mode 100644 index 0000000..6153cdb --- /dev/null +++ b/meta-linaro/recipes-extra/daq-odp/daq-odp.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "OpenDataPlane Data Acquisition (DAQ) module for Snort." | ||
2 | HOMEPAGE = "https://github.com/muvarov/daq-odp" | ||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2713c79cde0756d6a56337304277b711" | ||
5 | |||
6 | DEPENDS = "odp daq" | ||
7 | PV = "20140828+git${SRCPV}" | ||
8 | |||
9 | SRC_URI = "git://github.com/muvarov/daq-odp.git" | ||
10 | SRCREV = "c1dafe0ce4ea93401726ac53b3d129bb89b634ff" | ||
11 | SRCREV_FORMAT = "daq-odp" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | inherit autotools | ||
16 | |||
17 | FILES_${PN} += "${libdir}/daq/daq_odp.so ${libdir}/daq/daq_odp.la" | ||
18 | FILES_${PN}-dbg += "${libdir}/daq/.debug/daq_odp.so" | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/README b/meta-linaro/recipes-extra/dwarfutils/README new file mode 100644 index 0000000..5edf841 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/README | |||
@@ -0,0 +1,18 @@ | |||
1 | Patches were submitted upstream and the answer was: | ||
2 | |||
3 | --------- | ||
4 | Yes, I assume host == build in all releases to date. AFAIK you are the | ||
5 | first to try a canadian-cross build. | ||
6 | |||
7 | Another issue is that the build is not set up to do the build anywhere | ||
8 | but inside the source tree. It is true that make-clean/CLEANUP fixes up | ||
9 | the mess pretty well, but a separate build directory would be a nice | ||
10 | (and traditional) thing to allow. | ||
11 | |||
12 | I cannot use your submission for anything (Linaro and I have no | ||
13 | agreement in place) but I think these are interesting and worthwhile | ||
14 | small issues that libdwarf/dwarfdump should be able to deal with. | ||
15 | |||
16 | Thanks for the suggestion. I made a note and should be able to take a | ||
17 | look at this issue in the near future. | ||
18 | --------- | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarf.inc b/meta-linaro/recipes-extra/dwarfutils/dwarf.inc new file mode 100644 index 0000000..6839f49 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarf.inc | |||
@@ -0,0 +1,12 @@ | |||
1 | DEPENDS = "elfutils" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=db2a565b9d860834e0f2c9cf569fb4e5" | ||
4 | |||
5 | SRC_URI = "http://www.prevanders.net/libdwarf-${PV}.tar.gz" | ||
6 | |||
7 | SRC_URI[md5sum] = "83ab49c58439254729f543be6977692b" | ||
8 | SRC_URI[sha256sum] = "c0aede3a7368c27572ae1cc403c4cbdbf6eeb91a05adbb6f41c40ed78b75cdd9" | ||
9 | |||
10 | S = "${WORKDIR}/dwarf-${PV}/${BPN}" | ||
11 | |||
12 | inherit autotools | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfdump/fix-dump.patch b/meta-linaro/recipes-extra/dwarfutils/dwarfdump/fix-dump.patch new file mode 100644 index 0000000..45ca7a8 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfdump/fix-dump.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | --- | ||
2 | Makefile.in | 4 ++++ | ||
3 | 1 file changed, 4 insertions(+) | ||
4 | |||
5 | --- dwarfdump.orig/Makefile.in | ||
6 | +++ dwarfdump/Makefile.in | ||
7 | @@ -104,14 +104,18 @@ naming.o: $(srcdir)/naming.c $(srcdir)/ | ||
8 | # in the tree builds. | ||
9 | trivial_naming.o: $(srcdir)/naming.c | ||
10 | $(CC) $(CFLAGS) -DTRIVIAL_NAMING -c $(srcdir)/naming.c -o trivial_naming.o | ||
11 | |||
12 | tag_tree_build: $(srcdir)/tag_tree.c $(DIRINC)/dwarf.h $(HEADERS) tag_common.o makename.o common.o trivial_naming.o | ||
13 | +ifeq ($(NATIVE),1) | ||
14 | $(CC) $(CFLAGS) $(srcdir)/tag_tree.c tag_common.o common.o makename.o trivial_naming.o $(LDFLAGS) -o tag_tree_build | ||
15 | +endif | ||
16 | |||
17 | tag_attr_build: $(srcdir)/tag_attr.c $(DIRINC)/dwarf.h $(HEADERS) tag_common.o makename.o common.o trivial_naming.o | ||
18 | +ifeq ($(NATIVE),1) | ||
19 | $(CC) $(CFLAGS) $(srcdir)/tag_attr.c tag_common.o common.o makename.o trivial_naming.o $(LDFLAGS) -o tag_attr_build | ||
20 | +endif | ||
21 | |||
22 | tmp-tt-table.c tmp-tt-ext-table.c: $(srcdir)/tag_tree_ext.list $(srcdir)/tag_tree.list tag_tree_build | ||
23 | # gcc -E tag_tree.list does not work, so use a .c name | ||
24 | -rm -f tmp-t1.c | ||
25 | cp $(srcdir)/tag_tree.list tmp-t1.c | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfdump2/fix-dump.patch b/meta-linaro/recipes-extra/dwarfutils/dwarfdump2/fix-dump.patch new file mode 100644 index 0000000..18ffe81 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfdump2/fix-dump.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | --- | ||
2 | Makefile.in | 11 +++++++---- | ||
3 | 1 file changed, 7 insertions(+), 4 deletions(-) | ||
4 | |||
5 | --- dwarfdump2.orig/Makefile.in | ||
6 | +++ dwarfdump2/Makefile.in | ||
7 | @@ -100,14 +100,17 @@ common.o: $(srcdir)/common.cc $(srcdir) | ||
8 | # in the tree builds. | ||
9 | trivial_naming.o: $(srcdir)/naming.cc | ||
10 | $(CXX) $(CXXFLAGS) -DTRIVIAL_NAMING -c $(srcdir)/naming.cc -o trivial_naming.o | ||
11 | |||
12 | tag_tree_build: $(srcdir)/tag_tree.cc $(DIRINC)/dwarf.h $(HEADERS) tag_common.o trivial_naming.o common.o | ||
13 | - $(CXX) $(CXXFLAGS) $(srcdir)/tag_tree.cc trivial_naming.o tag_common.o common.o $(LDFLAGS) -o tag_tree_build | ||
14 | - | ||
15 | +ifeq ($(NATIVE),1) | ||
16 | + $(CXX) $(CXXFLAGS) $(srcdir)/tag_tree.cc trivial_naming.o tag_common.o common.o $(LDFLAGS) -o tag_tree_build | ||
17 | +endif | ||
18 | tag_attr_build: $(srcdir)/tag_attr.cc $(DIRINC)/dwarf.h $(HEADERS) trivial_naming.o tag_common.o naming.o common.o | ||
19 | - $(CXX) $(CXXFLAGS) $(srcdir)/tag_attr.cc trivial_naming.o tag_common.o common.o $(LDFLAGS) -o tag_attr_build | ||
20 | +ifeq ($(NATIVE),1) | ||
21 | + $(CXX) $(CXXFLAGS) $(srcdir)/tag_attr.cc trivial_naming.o tag_common.o common.o $(LDFLAGS) -o tag_attr_build | ||
22 | +endif | ||
23 | |||
24 | tmp-tt-table.cc tmp-tt-ext-table.cc: $(srcdir)/tag_tree_ext.list $(srcdir)/tag_tree.list tag_tree_build | ||
25 | # gcc -E tag_tree.list does not work, so use a .cc name | ||
26 | -rm -f tmp-t1.cc | ||
27 | cp $(srcdir)/tag_tree.list tmp-t1.cc | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfdump2_20121130.bb b/meta-linaro/recipes-extra/dwarfutils/dwarfdump2_20121130.bb new file mode 100644 index 0000000..10999d6 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfdump2_20121130.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | require dwarf.inc | ||
2 | |||
3 | DEPENDS = "libdwarf libdwarf-native" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://GPL.txt;md5=751419260aa954499f7abaabaa882bbe" | ||
6 | |||
7 | SRC_URI += "file://fix-dump.patch" | ||
8 | |||
9 | do_compile_prepend() { | ||
10 | oe_runmake CXX="${BUILD_CXX}" \ | ||
11 | CXXFLAGS="${BUILD_CXXFLAGS} -I${S}/../libdwarf/ -I." \ | ||
12 | LDFLAGS="${BUILD_LDFLAGS} -ldwarf -lelf" NATIVE=1 | ||
13 | rm *.o dwarfdump | ||
14 | } | ||
15 | |||
16 | do_install() { | ||
17 | install -d ${D}${bindir} ${D}${mandir}/man1 | ||
18 | install -m 0755 dwarfdump ${D}${bindir} | ||
19 | install -m 0644 dwarfdump.1 ${D}${mandir}/man1 | ||
20 | } | ||
21 | |||
22 | PARALLEL_MAKE = "" | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfdump_20121130.bb b/meta-linaro/recipes-extra/dwarfutils/dwarfdump_20121130.bb new file mode 100644 index 0000000..1befb31 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfdump_20121130.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | require dwarf.inc | ||
2 | |||
3 | DEPENDS = "libdwarf libdwarf-native" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://GPL.txt;md5=751419260aa954499f7abaabaa882bbe" | ||
6 | |||
7 | SRC_URI += "file://fix-dump.patch" | ||
8 | |||
9 | do_compile_prepend() { | ||
10 | oe_runmake CC="${BUILD_CC}" \ | ||
11 | CFLAGS="${BUILD_CFLAGS} -I${S}/../libdwarf/ -I." \ | ||
12 | LDFLAGS="${BUILD_LDFLAGS} -ldwarf -lelf" NATIVE=1 | ||
13 | rm *.o dwarfdump | ||
14 | } | ||
15 | |||
16 | do_install() { | ||
17 | install -d ${D}${bindir} ${D}${mandir}/man1 | ||
18 | install -m 0755 dwarfdump ${D}${bindir} | ||
19 | install -m 0644 dwarfdump.1 ${D}${mandir}/man1 | ||
20 | } | ||
21 | |||
22 | PARALLEL_MAKE = "" | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfgen_20121130.bb b/meta-linaro/recipes-extra/dwarfutils/dwarfgen_20121130.bb new file mode 100644 index 0000000..97d3b2f --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfgen_20121130.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require dwarf.inc | ||
2 | |||
3 | DEPENDS = "libdwarf libdwarf-native" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://GPL.txt;md5=751419260aa954499f7abaabaa882bbe" | ||
6 | |||
7 | do_install() { | ||
8 | install -d ${D}${bindir} ${D}${mandir}/man1 | ||
9 | install -m 0755 ${BPN} ${D}${bindir} | ||
10 | install -m 0644 ${BPN}.1 ${D}${mandir}/man1 | ||
11 | } | ||
12 | |||
13 | PARALLEL_MAKE = "" | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/libdwarf/fix-gennames.patch b/meta-linaro/recipes-extra/dwarfutils/libdwarf/fix-gennames.patch new file mode 100644 index 0000000..901409d --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/libdwarf/fix-gennames.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | --- | ||
2 | Makefile.in | 4 ++-- | ||
3 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
4 | |||
5 | --- libdwarf.orig/Makefile.in | ||
6 | +++ libdwarf/Makefile.in | ||
7 | @@ -135,13 +135,13 @@ libdwarf.so: dwarf_names.h dwarf_names.c | ||
8 | $(CC) $(CFLAGS) -shared $(OBJS) dwarf_names.o -o $@ | ||
9 | |||
10 | none: | ||
11 | echo "do nothing" | ||
12 | common.o: $(srcdir)/common.c $(srcdir)/common.h | ||
13 | - $(CC) $(CFLAGS) -c $(srcdir)/common.c | ||
14 | + $(BUILD_CC) $(BUILD_CFLAGS) -c $(srcdir)/common.c | ||
15 | gennames: $(srcdir)/gennames.c $(srcdir)/dwarf.h common.o | ||
16 | - $(CC) $(CFLAGS) $(srcdir)/gennames.c common.o $(LDFLAGS) -o gennames | ||
17 | + $(BUILD_CC) $(BUILD_CFLAGS) $(srcdir)/gennames.c common.o $(BUILD_LDFLAGS) -o gennames | ||
18 | dwarf_names.c dwarf_names.h: gennames $(srcdir)/dwarf.h | ||
19 | rm -f dwarf_names.h dwarf_names.c | ||
20 | ./gennames @dwarf_namestable@ -i $(srcdir) -o . | ||
21 | |||
22 | |||
diff --git a/meta-linaro/recipes-extra/dwarfutils/libdwarf_20121130.bb b/meta-linaro/recipes-extra/dwarfutils/libdwarf_20121130.bb new file mode 100644 index 0000000..828e0d0 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/libdwarf_20121130.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require dwarf.inc | ||
2 | |||
3 | SRC_URI += "file://fix-gennames.patch" | ||
4 | |||
5 | do_install() { | ||
6 | install -d ${D}${libdir} ${D}${includedir}/libdwarf | ||
7 | install -m 0755 libdwarf.a ${D}${libdir} | ||
8 | install -m 0644 ${S}/dwarf.h ${S}/libdwarf.h ${D}${includedir}/libdwarf | ||
9 | } | ||
10 | |||
11 | ALLOW_EMPTY_${PN} = "1" | ||
12 | |||
13 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-linaro/recipes-extra/efibootmgr/efibootmgr_0.5.4.bb b/meta-linaro/recipes-extra/efibootmgr/efibootmgr_0.5.4.bb new file mode 100644 index 0000000..1b91418 --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/efibootmgr_0.5.4.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | DESCRIPTION = "Linux user-space application to modify the EFI Boot Manager." | ||
2 | SUMMARY = "EFI Boot Manager" | ||
3 | HOMEPAGE = "http://linux.dell.com/efibootmgr/" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
7 | DEPENDS = "pciutils \ | ||
8 | zlib" | ||
9 | COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" | ||
10 | |||
11 | PR = "r1" | ||
12 | |||
13 | SRC_URI = "http://linux.dell.com/efibootmgr/permalink/efibootmgr-${PV}.tar.gz \ | ||
14 | file://ldflags.patch \ | ||
15 | file://docbook-fixes.patch \ | ||
16 | file://w-keep-existing-mbr-signature.patch \ | ||
17 | file://efibootmgr-0.5.4-support-4k-sectors.patch \ | ||
18 | file://efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch \ | ||
19 | file://efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch \ | ||
20 | file://efibootmgr-0.5.4-fix-minor-memory-leak.patch \ | ||
21 | file://efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch \ | ||
22 | file://efibootmgr-0.5.4-make_boot_var-does-not-check-for-failed-status-with-.patch" | ||
23 | |||
24 | SRC_URI[md5sum] = "cfcf24752d6461b73f7ba964bbf73169" | ||
25 | SRC_URI[sha256sum] = "b562a47a4f5327494992f2ee6ae14a75c5aeb9b4a3a78a06749d5cd2917b8e71" | ||
26 | |||
27 | S = "${WORKDIR}/efibootmgr-${PV}" | ||
28 | |||
29 | EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/src/lib -I${S}/src/include'" | ||
30 | |||
31 | do_install () { | ||
32 | install -D -p -m0755 src/efibootmgr/efibootmgr ${D}/${sbindir}/efibootmgr | ||
33 | } | ||
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/docbook-fixes.patch b/meta-linaro/recipes-extra/efibootmgr/files/docbook-fixes.patch new file mode 100644 index 0000000..fa711da --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/docbook-fixes.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | diff --git a/src/man/man8/efibootmgr.8.docbook b/src/man/man8/efibootmgr.8.docbook | ||
2 | index aef4444..eb8f266 100644 | ||
3 | --- a/src/man/man8/efibootmgr.8.docbook | ||
4 | +++ b/src/man/man8/efibootmgr.8.docbook | ||
5 | @@ -302,7 +302,7 @@ | ||
6 | <title>Displaying the current settings (must be root).</title> | ||
7 | |||
8 | <para> | ||
9 | - <computeroutput> | ||
10 | + <programlisting> | ||
11 | [root@localhost ~]# efibootmgr | ||
12 | BootCurrent: 0004 | ||
13 | BootNext: 0003 | ||
14 | @@ -313,7 +313,7 @@ | ||
15 | Boot0002* Hard Drive(Device:80)/HD(Part1,Sig00112233) | ||
16 | Boot0003* PXE Boot: MAC(00D0B7C15D91) | ||
17 | Boot0004* Linux | ||
18 | - </computeroutput> | ||
19 | + </programlisting> | ||
20 | </para> | ||
21 | <para>This shows:</para> | ||
22 | <itemizedlist> | ||
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch new file mode 100644 index 0000000..240aa69 --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 2d8f962284f40b918c0fc8385e58fcba219ddc12 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fedora Ninjas <pjones@fedoraproject.org> | ||
3 | Date: Wed, 28 Nov 2012 17:13:24 -0500 | ||
4 | Subject: [PATCH 2/5] Remove device path padding on non-Itanium | ||
5 | |||
6 | This code predates EFI support on any x86 hardware, and it's a strict | ||
7 | violation of the specification. Windows doesn't do it either. | ||
8 | --- | ||
9 | src/include/efi.h | 2 ++ | ||
10 | 1 file changed, 2 insertions(+) | ||
11 | |||
12 | diff --git a/src/include/efi.h b/src/include/efi.h | ||
13 | index be667ae..c2ac853 100644 | ||
14 | --- a/src/include/efi.h | ||
15 | +++ b/src/include/efi.h | ||
16 | @@ -294,7 +294,9 @@ typedef struct { | ||
17 | uint8_t signature[16]; | ||
18 | uint8_t mbr_type; | ||
19 | uint8_t signature_type; | ||
20 | +#ifdef __ia64 | ||
21 | uint8_t padding[6]; /* Emperically needed */ | ||
22 | +#endif | ||
23 | } __attribute__((packed)) HARDDRIVE_DEVICE_PATH; | ||
24 | |||
25 | typedef struct { | ||
26 | -- | ||
27 | 1.8.0 | ||
28 | |||
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch new file mode 100644 index 0000000..a1d9831 --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 6edc3ed5479b575f87eb51e335957b05fdd04fe8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fedora Ninjas <pjones@fedoraproject.org> | ||
3 | Date: Wed, 28 Nov 2012 16:49:18 -0500 | ||
4 | Subject: [PATCH 1/5] Work around broken Apple firmware | ||
5 | |||
6 | Alex Murray found that Apple's firmware sets an invalid EFI attribute on | ||
7 | BootCurrent, which newer versions of the kernel then reject. This patch | ||
8 | from him simply masks off the extraneous bit. | ||
9 | --- | ||
10 | src/lib/efivars_sysfs.c | 4 ++++ | ||
11 | 1 file changed, 4 insertions(+) | ||
12 | |||
13 | diff --git a/src/lib/efivars_sysfs.c b/src/lib/efivars_sysfs.c | ||
14 | index 182c70f..ea87325 100644 | ||
15 | --- a/src/lib/efivars_sysfs.c | ||
16 | +++ b/src/lib/efivars_sysfs.c | ||
17 | @@ -55,6 +55,10 @@ sysfs_read_variable(const char *name, efi_variable_t *var) | ||
18 | return EFI_INVALID_PARAMETER; | ||
19 | } | ||
20 | close(fd); | ||
21 | + /* latest apple firmware sets high bit which appears invalid | ||
22 | + to the linux kernel if we write it back so lets zero it out | ||
23 | + if it is set since it would be invalid to set it anyway */ | ||
24 | + var->Attributes = var->Attributes & ~(1 << 31); | ||
25 | return var->Status; | ||
26 | } | ||
27 | |||
28 | -- | ||
29 | 1.8.0 | ||
30 | |||
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch new file mode 100644 index 0000000..e9b5358 --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From f9f4ee75ad745637a47bf17ed968101b1ffbcc1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Domsch <Matt_Domsch@dell.com> | ||
3 | Date: Thu, 23 Jul 2009 14:20:19 -0500 | ||
4 | Subject: [PATCH 4/5] fix disk minor number discovery | ||
5 | |||
6 | Raymund Will noted disk_info_from_fd() incorrectly used logical && | ||
7 | instead of bitwise & when obtaining the minor number. | ||
8 | |||
9 | Reported in https://bugzilla.novell.com/show_bug.cgi?id=524529#c1 | ||
10 | --- | ||
11 | src/lib/disk.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/src/lib/disk.c b/src/lib/disk.c | ||
15 | index ebfe619..8ad590b 100644 | ||
16 | --- a/src/lib/disk.c | ||
17 | +++ b/src/lib/disk.c | ||
18 | @@ -55,7 +55,7 @@ disk_info_from_fd(int fd, | ||
19 | return 1; | ||
20 | } | ||
21 | major = buf.st_dev >> 8; | ||
22 | - minor = buf.st_dev && 0xFF; | ||
23 | + minor = buf.st_dev & 0xFF; | ||
24 | |||
25 | /* IDE disks can have up to 64 partitions, or 6 bits worth, | ||
26 | * and have one bit for the disk number. | ||
27 | -- | ||
28 | 1.8.0 | ||
29 | |||
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-minor-memory-leak.patch b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-minor-memory-leak.patch new file mode 100644 index 0000000..1ff4ce3 --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-minor-memory-leak.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 36c3a19c62cc3b6841e363712c3c78ef5915122d Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Domsch <Matt_Domsch@dell.com> | ||
3 | Date: Thu, 23 Jul 2009 14:18:11 -0500 | ||
4 | Subject: [PATCH 3/5] fix minor memory leak | ||
5 | |||
6 | David Binderman noted new_data was being allocated but not freed. Not | ||
7 | a big deal as the program exits soon thereafter (and is thus freed), | ||
8 | but worth fixing anyhow. | ||
9 | |||
10 | Fixes https://bugzilla.novell.com/show_bug.cgi?id=524529#c1 | ||
11 | --- | ||
12 | src/efibootmgr/efibootmgr.c | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c | ||
16 | index b984143..de67af0 100644 | ||
17 | --- a/src/efibootmgr/efibootmgr.c | ||
18 | +++ b/src/efibootmgr/efibootmgr.c | ||
19 | @@ -328,6 +328,7 @@ add_to_boot_order(uint16_t num) | ||
20 | /* Now new_data has what we need */ | ||
21 | memcpy(&(boot_order.Data), new_data, new_data_size); | ||
22 | boot_order.DataSize = new_data_size; | ||
23 | + free(new_data); | ||
24 | return create_or_edit_variable(&boot_order); | ||
25 | } | ||
26 | |||
27 | -- | ||
28 | 1.8.0 | ||
29 | |||
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-make_boot_var-does-not-check-for-failed-status-with-.patch b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-make_boot_var-does-not-check-for-failed-status-with-.patch new file mode 100644 index 0000000..75374ac --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-make_boot_var-does-not-check-for-failed-status-with-.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 5fcfccb39089febb89945b841f489b5acc7638ce Mon Sep 17 00:00:00 2001 | ||
2 | From: Lane Winner <lane.winner@oracle.com> | ||
3 | Date: Tue, 24 Apr 2012 12:58:57 -0500 | ||
4 | Subject: [PATCH 5/5] make_boot_var does not check for failed status with | ||
5 | create_variable. This can result in a memory leak. | ||
6 | Additionally the user should be notified of the | ||
7 | problem. | ||
8 | |||
9 | We encounter this issue on one system after filling up the UEFI boot list | ||
10 | with dummy devices. | ||
11 | |||
12 | The patch fix the problem. It was verified on a Mensa system using RHEL 6.0 | ||
13 | |||
14 | Signed-off-by: Yinghai Lu<yinghai@kernel.org> | ||
15 | --- | ||
16 | src/efibootmgr/efibootmgr.c | 8 +++++++- | ||
17 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c | ||
20 | index de67af0..236365a 100644 | ||
21 | --- a/src/efibootmgr/efibootmgr.c | ||
22 | +++ b/src/efibootmgr/efibootmgr.c | ||
23 | @@ -239,6 +239,7 @@ warn_duplicate_name(list_t *boot_list) | ||
24 | static var_entry_t * | ||
25 | make_boot_var(list_t *boot_list) | ||
26 | { | ||
27 | + efi_status_t status; | ||
28 | var_entry_t *boot; | ||
29 | int free_number; | ||
30 | list_t *pos; | ||
31 | @@ -271,7 +272,12 @@ make_boot_var(list_t *boot_list) | ||
32 | free(boot); | ||
33 | return NULL; | ||
34 | } | ||
35 | - create_variable(&boot->var_data); | ||
36 | + | ||
37 | + status = create_variable(&boot->var_data); | ||
38 | + if (status != EFI_SUCCESS) { | ||
39 | + free(boot); | ||
40 | + return NULL; | ||
41 | + } | ||
42 | list_add_tail(&boot->list, boot_list); | ||
43 | return boot; | ||
44 | } | ||
45 | -- | ||
46 | 1.8.0 | ||
47 | |||
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-support-4k-sectors.patch b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-support-4k-sectors.patch new file mode 100644 index 0000000..c380c61 --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-support-4k-sectors.patch | |||
@@ -0,0 +1,176 @@ | |||
1 | Return-Path: pjones@redhat.com | ||
2 | Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO | ||
3 | zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by | ||
4 | mail04.corp.redhat.com with LMTP; Wed, 14 Jul 2010 14:25:52 -0400 (EDT) | ||
5 | Received: from localhost (localhost.localdomain [127.0.0.1]) | ||
6 | by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B69C19F152 | ||
7 | for <pjones@redhat.com>; Wed, 14 Jul 2010 14:25:52 -0400 (EDT) | ||
8 | Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) | ||
9 | by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) | ||
10 | with ESMTP id jCHcGZehMQ5J for <pjones@redhat.com>; | ||
11 | Wed, 14 Jul 2010 14:25:52 -0400 (EDT) | ||
12 | Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) | ||
13 | by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A601C9F14C | ||
14 | for <pjones@mail.corp.redhat.com>; Wed, 14 Jul 2010 14:25:52 -0400 (EDT) | ||
15 | Received: from pjones4.install.bos.redhat.com (pjones4.install.bos.redhat.com [10.16.52.154]) | ||
16 | by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6EIPpGh017771; | ||
17 | Wed, 14 Jul 2010 14:25:52 -0400 | ||
18 | From: Peter Jones <pjones@redhat.com> | ||
19 | To: Matt Domsch <Matt_Domsch@dell.com> | ||
20 | Cc: Peter Jones <pjones@redhat.com>, Stuart Hayes <stuart_hayes@dell.com> | ||
21 | Subject: [efibootmgr patch] Handle sector_size != 512. | ||
22 | Date: Wed, 14 Jul 2010 14:26:49 -0400 | ||
23 | Message-Id: <1279132009-26635-1-git-send-email-pjones@redhat.com> | ||
24 | In-Reply-To: <1279121617-17961-1-git-send-email-pjones@redhat.com> | ||
25 | References: <1279121617-17961-1-git-send-email-pjones@redhat.com> | ||
26 | X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 | ||
27 | |||
28 | Disks can have 4kB sectors now, so don't just bail out when that's the | ||
29 | case. | ||
30 | --- | ||
31 | src/include/disk.h | 3 +++ | ||
32 | src/lib/disk.c | 43 +++++++++++++++++++++++++++++++++---------- | ||
33 | src/lib/gpt.c | 30 ++++++++++++++---------------- | ||
34 | 3 files changed, 50 insertions(+), 26 deletions(-) | ||
35 | |||
36 | diff --git a/src/include/disk.h b/src/include/disk.h | ||
37 | index eb93d10..8aa37d7 100644 | ||
38 | --- a/src/include/disk.h | ||
39 | +++ b/src/include/disk.h | ||
40 | @@ -65,6 +65,9 @@ enum _interface_type {interface_type_unknown, | ||
41 | ata, atapi, scsi, usb, | ||
42 | i1394, fibre, i2o, md}; | ||
43 | |||
44 | + | ||
45 | +unsigned int lcm(unsigned int x, unsigned int y); | ||
46 | + | ||
47 | int disk_get_pci(int fd, | ||
48 | unsigned char *bus, | ||
49 | unsigned char *device, | ||
50 | diff --git a/src/lib/disk.c b/src/lib/disk.c | ||
51 | index 883864f..9c3a878 100644 | ||
52 | --- a/src/lib/disk.c | ||
53 | +++ b/src/lib/disk.c | ||
54 | @@ -420,6 +420,27 @@ get_sector_size(int filedes) | ||
55 | return sector_size; | ||
56 | } | ||
57 | |||
58 | +/************************************************************ | ||
59 | + * lcm | ||
60 | + * Requires: | ||
61 | + * - numbers of which to find the lowest common multiple | ||
62 | + * Modifies: nothing | ||
63 | + * Returns: | ||
64 | + * lowest common multiple of x and y | ||
65 | + ************************************************************/ | ||
66 | +unsigned int | ||
67 | +lcm(unsigned int x, unsigned int y) | ||
68 | +{ | ||
69 | + unsigned int m = x, n = y, o; | ||
70 | + | ||
71 | + while ((o = m % n)) { | ||
72 | + m = n; | ||
73 | + n = o; | ||
74 | + } | ||
75 | + | ||
76 | + return (x / n) * y; | ||
77 | +} | ||
78 | + | ||
79 | /** | ||
80 | * disk_get_partition_info() | ||
81 | * @fd - open file descriptor to disk | ||
82 | @@ -442,26 +463,27 @@ disk_get_partition_info (int fd, | ||
83 | uint8_t *mbr_type, uint8_t *signature_type) | ||
84 | { | ||
85 | legacy_mbr *mbr; | ||
86 | - void *mbr_unaligned; | ||
87 | + void *mbr_sector; | ||
88 | + size_t mbr_size; | ||
89 | off_t offset; | ||
90 | int this_bytes_read = 0; | ||
91 | int gpt_invalid=0, mbr_invalid=0; | ||
92 | int rc=0; | ||
93 | int sector_size = get_sector_size(fd); | ||
94 | |||
95 | - if (sizeof(*mbr) != sector_size) | ||
96 | - return 1; | ||
97 | - mbr_unaligned = malloc(sizeof(*mbr)+sector_size-1); | ||
98 | - mbr = (legacy_mbr *) | ||
99 | - (((unsigned long)mbr_unaligned + sector_size - 1) & | ||
100 | - ~(unsigned long)(sector_size-1)); | ||
101 | - memset(mbr, 0, sizeof(*mbr)); | ||
102 | + | ||
103 | + mbr_size = lcm(sizeof(*mbr), sector_size); | ||
104 | + if ((rc = posix_memalign(&mbr_sector, sector_size, mbr_size)) != 0) | ||
105 | + goto error; | ||
106 | + memset(mbr_sector, '\0', mbr_size); | ||
107 | + | ||
108 | offset = lseek(fd, 0, SEEK_SET); | ||
109 | - this_bytes_read = read(fd, mbr, sizeof(*mbr)); | ||
110 | + this_bytes_read = read(fd, mbr_sector, mbr_size); | ||
111 | if (this_bytes_read < sizeof(*mbr)) { | ||
112 | rc=1; | ||
113 | goto error_free_mbr; | ||
114 | } | ||
115 | + mbr = (legacy_mbr *)mbr_sector; | ||
116 | gpt_invalid = gpt_disk_get_partition_info(fd, num, | ||
117 | start, size, | ||
118 | signature, | ||
119 | @@ -479,7 +501,8 @@ disk_get_partition_info (int fd, | ||
120 | } | ||
121 | } | ||
122 | error_free_mbr: | ||
123 | - free(mbr_unaligned); | ||
124 | + free(mbr_sector); | ||
125 | + error: | ||
126 | return rc; | ||
127 | } | ||
128 | |||
129 | diff --git a/src/lib/gpt.c b/src/lib/gpt.c | ||
130 | index d90ddaf..83e7a94 100644 | ||
131 | --- a/src/lib/gpt.c | ||
132 | +++ b/src/lib/gpt.c | ||
133 | @@ -215,26 +215,24 @@ read_lastoddsector(int fd, uint64_t lba, void *buffer, size_t count) | ||
134 | static ssize_t | ||
135 | read_lba(int fd, uint64_t lba, void *buffer, size_t bytes) | ||
136 | { | ||
137 | - int sector_size = get_sector_size(fd); | ||
138 | - off_t offset = lba * sector_size; | ||
139 | + int sector_size = get_sector_size(fd); | ||
140 | + off_t offset = lba * sector_size; | ||
141 | ssize_t bytesread; | ||
142 | - void *aligned; | ||
143 | - void *unaligned; | ||
144 | - | ||
145 | - if (bytes % sector_size) | ||
146 | - return EINVAL; | ||
147 | + void *iobuf; | ||
148 | + size_t iobuf_size; | ||
149 | + int rc; | ||
150 | |||
151 | - unaligned = malloc(bytes+sector_size-1); | ||
152 | - aligned = (void *) | ||
153 | - (((unsigned long)unaligned + sector_size - 1) & | ||
154 | - ~(unsigned long)(sector_size-1)); | ||
155 | - memset(aligned, 0, bytes); | ||
156 | + iobuf_size = lcm(bytes, sector_size); | ||
157 | + rc = posix_memalign(&iobuf, sector_size, iobuf_size); | ||
158 | + if (rc) | ||
159 | + return rc; | ||
160 | + memset(iobuf, 0, bytes); | ||
161 | |||
162 | |||
163 | - lseek(fd, offset, SEEK_SET); | ||
164 | - bytesread = read(fd, aligned, bytes); | ||
165 | - memcpy(buffer, aligned, bytesread); | ||
166 | - free(unaligned); | ||
167 | + lseek(fd, offset, SEEK_SET); | ||
168 | + bytesread = read(fd, iobuf, iobuf_size); | ||
169 | + memcpy(buffer, iobuf, bytes); | ||
170 | + free(iobuf); | ||
171 | |||
172 | /* Kludge. This is necessary to read/write the last | ||
173 | block of an odd-sized disk, until Linux 2.5.x kernel fixes. | ||
174 | -- | ||
175 | 1.7.1.1 | ||
176 | |||
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/ldflags.patch b/meta-linaro/recipes-extra/efibootmgr/files/ldflags.patch new file mode 100644 index 0000000..3207920 --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/ldflags.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- efibootmgr-0.5.4.orig/Makefile | ||
2 | +++ efibootmgr-0.5.4/Makefile | ||
3 | @@ -11,6 +11,8 @@ | ||
4 | CFLAGS = $(EXTRA_CFLAGS) -DEFIBOOTMGR_VERSION=\"$(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_SUBLEVEL)$(RELEASE_EXTRALEVEL)\" \ | ||
5 | -Wall -g -D_FILE_OFFSET_BITS=64 | ||
6 | |||
7 | + LDFLAGS += -lz | ||
8 | + | ||
9 | MODULES := src | ||
10 | |||
11 | BINDIR := /usr/sbin | ||
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/w-keep-existing-mbr-signature.patch b/meta-linaro/recipes-extra/efibootmgr/files/w-keep-existing-mbr-signature.patch new file mode 100644 index 0000000..6934808 --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/w-keep-existing-mbr-signature.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Description: Fix -w option to leave an existing unique MBR signature intact | ||
2 | This makes the implementation match the documentation. | ||
3 | Author: Colin Watson <cjwatson@ubuntu.com> | ||
4 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1065261 | ||
5 | Forwarded: no | ||
6 | Last-Update: 2013-02-01 | ||
7 | |||
8 | Index: b/src/lib/disk.c | ||
9 | =================================================================== | ||
10 | --- a/src/lib/disk.c | ||
11 | +++ b/src/lib/disk.c | ||
12 | @@ -352,7 +352,7 @@ | ||
13 | printf("******************************************************\n\n"); | ||
14 | |||
15 | } | ||
16 | - else if (opts.write_signature) { | ||
17 | + else if (!mbr->unique_mbr_signature && opts.write_signature) { | ||
18 | |||
19 | /* MBR Signatures must be unique for the | ||
20 | EFI Boot Manager | ||
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia/gmetad-example.conf b/meta-linaro/recipes-extra/ganglia/ganglia/gmetad-example.conf new file mode 100644 index 0000000..7f2fd7f --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia/gmetad-example.conf | |||
@@ -0,0 +1,122 @@ | |||
1 | # This is an example of a Ganglia Meta Daemon configuration file | ||
2 | # http://ganglia.sourceforge.net/ | ||
3 | # | ||
4 | #------------------------------------------------------------------------------- | ||
5 | # Setting the debug_level to 1 will keep daemon in the forground and | ||
6 | # show only error messages. Setting this value higher than 1 will make | ||
7 | # gmetad output debugging information and stay in the foreground. | ||
8 | # default: 0 | ||
9 | # debug_level 10 | ||
10 | # | ||
11 | #------------------------------------------------------------------------------- | ||
12 | # What to monitor. The most important section of this file. | ||
13 | # | ||
14 | # The data_source tag specifies either a cluster or a grid to | ||
15 | # monitor. If we detect the source is a cluster, we will maintain a complete | ||
16 | # set of RRD databases for it, which can be used to create historical | ||
17 | # graphs of the metrics. If the source is a grid (it comes from another gmetad), | ||
18 | # we will only maintain summary RRDs for it. | ||
19 | # | ||
20 | # Format: | ||
21 | # data_source "my cluster" [polling interval] address1:port addreses2:port ... | ||
22 | # | ||
23 | # The keyword 'data_source' must immediately be followed by a unique | ||
24 | # string which identifies the source, then an optional polling interval in | ||
25 | # seconds. The source will be polled at this interval on average. | ||
26 | # If the polling interval is omitted, 15sec is asssumed. | ||
27 | # | ||
28 | # A list of machines which service the data source follows, in the | ||
29 | # format ip:port, or name:port. If a port is not specified then 8649 | ||
30 | # (the default gmond port) is assumed. | ||
31 | # default: There is no default value | ||
32 | # | ||
33 | # data_source "my cluster" 10 localhost my.machine.edu:8649 1.2.3.5:8655 | ||
34 | # data_source "my grid" 50 1.3.4.7:8655 grid.org:8651 grid-backup.org:8651 | ||
35 | # data_source "another source" 1.3.4.7:8655 1.3.4.8 | ||
36 | |||
37 | data_source "my cluster" localhost | ||
38 | |||
39 | # | ||
40 | # Round-Robin Archives | ||
41 | # You can specify custom Round-Robin archives here (defaults are listed below) | ||
42 | # | ||
43 | # RRAs "RRA:AVERAGE:0.5:1:244" "RRA:AVERAGE:0.5:24:244" "RRA:AVERAGE:0.5:168:244" "RRA:AVERAGE:0.5:672:244" \ | ||
44 | # "RRA:AVERAGE:0.5:5760:374" | ||
45 | # | ||
46 | |||
47 | # | ||
48 | #------------------------------------------------------------------------------- | ||
49 | # Scalability mode. If on, we summarize over downstream grids, and respect | ||
50 | # authority tags. If off, we take on 2.5.0-era behavior: we do not wrap our output | ||
51 | # in <GRID></GRID> tags, we ignore all <GRID> tags we see, and always assume | ||
52 | # we are the "authority" on data source feeds. This approach does not scale to | ||
53 | # large groups of clusters, but is provided for backwards compatibility. | ||
54 | # default: on | ||
55 | # scalable off | ||
56 | # | ||
57 | #------------------------------------------------------------------------------- | ||
58 | # The name of this Grid. All the data sources above will be wrapped in a GRID | ||
59 | # tag with this name. | ||
60 | # default: unspecified | ||
61 | # gridname "MyGrid" | ||
62 | # | ||
63 | #------------------------------------------------------------------------------- | ||
64 | # The authority URL for this grid. Used by other gmetads to locate graphs | ||
65 | # for our data sources. Generally points to a ganglia/ | ||
66 | # website on this machine. | ||
67 | # default: "http://hostname/ganglia/", | ||
68 | # where hostname is the name of this machine, as defined by gethostname(). | ||
69 | # authority "http://mycluster.org/newprefix/" | ||
70 | # | ||
71 | #------------------------------------------------------------------------------- | ||
72 | # List of machines this gmetad will share XML with. Localhost | ||
73 | # is always trusted. | ||
74 | # default: There is no default value | ||
75 | # trusted_hosts 127.0.0.1 169.229.50.165 my.gmetad.org | ||
76 | # | ||
77 | #------------------------------------------------------------------------------- | ||
78 | # If you want any host which connects to the gmetad XML to receive | ||
79 | # data, then set this value to "on" | ||
80 | # default: off | ||
81 | # all_trusted on | ||
82 | # | ||
83 | #------------------------------------------------------------------------------- | ||
84 | # If you don't want gmetad to setuid then set this to off | ||
85 | # default: on | ||
86 | # setuid off | ||
87 | # | ||
88 | #------------------------------------------------------------------------------- | ||
89 | # User gmetad will setuid to (defaults to "nobody") | ||
90 | # default: "nobody" | ||
91 | # setuid_username "nobody" | ||
92 | # | ||
93 | #------------------------------------------------------------------------------- | ||
94 | # The port gmetad will answer requests for XML | ||
95 | # default: 8651 | ||
96 | # xml_port 8651 | ||
97 | # | ||
98 | #------------------------------------------------------------------------------- | ||
99 | # The port gmetad will answer queries for XML. This facility allows | ||
100 | # simple subtree and summation views of the XML tree. | ||
101 | # default: 8652 | ||
102 | # interactive_port 8652 | ||
103 | # | ||
104 | #------------------------------------------------------------------------------- | ||
105 | # The number of threads answering XML requests | ||
106 | # default: 4 | ||
107 | # server_threads 10 | ||
108 | # | ||
109 | #------------------------------------------------------------------------------- | ||
110 | # Where gmetad stores its round-robin databases | ||
111 | # default: "/var/lib/ganglia/rrds" | ||
112 | # rrd_rootdir "/some/other/place" | ||
113 | # | ||
114 | #------------------------------------------------------------------------------- | ||
115 | # In earlier versions of gmetad, hostnames were handled in a case | ||
116 | # sensitive manner | ||
117 | # If your hostname directories have been renamed to lower case, | ||
118 | # set this option to 0 to disable backward compatibility. | ||
119 | # From version 3.2, backwards compatibility will be disabled by default. | ||
120 | # default: 1 (for gmetad < 3.2) | ||
121 | # default: 0 (for gmetad >= 3.2) | ||
122 | case_sensitive_hostnames 1 | ||
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia/gmetad.init b/meta-linaro/recipes-extra/ganglia/ganglia/gmetad.init new file mode 100755 index 0000000..822f59c --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia/gmetad.init | |||
@@ -0,0 +1,48 @@ | |||
1 | #! /bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: gmetad | ||
4 | # Required-Start: $local_fs | ||
5 | # Should-Start: | ||
6 | # Required-Stop: $local_fs | ||
7 | # Should-Stop: | ||
8 | # Default-Start: 2 3 4 5 | ||
9 | # Default-Stop: 0 1 6 | ||
10 | # Short-Description: gmetad initscript | ||
11 | # Description: Starts the gmetad monitoring daemon | ||
12 | ### END INIT INFO | ||
13 | |||
14 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
15 | |||
16 | DESC="Ganglia Monitor Meta-Daemon" | ||
17 | NAME="gmetad" | ||
18 | GMETAD=`which $NAME` | ||
19 | |||
20 | . /etc/init.d/functions || exit 1 | ||
21 | |||
22 | # Exit if the package is not installed | ||
23 | [ -x "$GMETAD" ] || exit 0 | ||
24 | |||
25 | case "$1" in | ||
26 | start) | ||
27 | echo -n "Starting $DESC: $NAME... " | ||
28 | start-stop-daemon -S -x $GMETAD -- $GMETAD_ARGS | ||
29 | echo "done." | ||
30 | ;; | ||
31 | stop) | ||
32 | echo -n "Stopping $DESC: $NAME... " | ||
33 | start-stop-daemon -K -x $GMETAD | ||
34 | echo "done." | ||
35 | ;; | ||
36 | restart) | ||
37 | echo "Restarting $DESC: $NAME... " | ||
38 | $0 stop | ||
39 | $0 start | ||
40 | echo "done." | ||
41 | ;; | ||
42 | *) | ||
43 | echo "Usage: $0 {start|stop|restart}" | ||
44 | exit 1 | ||
45 | ;; | ||
46 | esac | ||
47 | |||
48 | exit 0 | ||
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia/gmond-example.conf b/meta-linaro/recipes-extra/ganglia/ganglia/gmond-example.conf new file mode 100644 index 0000000..a94b4b5 --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia/gmond-example.conf | |||
@@ -0,0 +1,383 @@ | |||
1 | /* This configuration is as close to 2.5.x default behavior as possible | ||
2 | The values closely match ./gmond/metric.h definitions in 2.5.x */ | ||
3 | globals { | ||
4 | daemonize = yes | ||
5 | setuid = yes | ||
6 | user = nobody | ||
7 | debug_level = 0 | ||
8 | max_udp_msg_len = 1472 | ||
9 | mute = no | ||
10 | deaf = yes | ||
11 | allow_extra_data = yes | ||
12 | host_dmax = 86400 /*secs. Expires (removes from web interface) hosts in 1 day */ | ||
13 | host_tmax = 20 /*secs */ | ||
14 | cleanup_threshold = 300 /*secs */ | ||
15 | gexec = no | ||
16 | # By default gmond will use reverse DNS resolution when displaying your hostname | ||
17 | # Uncommeting following value will override that value. | ||
18 | # override_hostname = "mywebserver.domain.com" | ||
19 | # If you are not using multicast this value should be set to something other than 0. | ||
20 | # Otherwise if you restart aggregator gmond you will get empty graphs. 60 seconds is reasonable | ||
21 | send_metadata_interval = 20 /*secs */ | ||
22 | |||
23 | } | ||
24 | |||
25 | /* | ||
26 | * The cluster attributes specified will be used as part of the <CLUSTER> | ||
27 | * tag that will wrap all hosts collected by this instance. | ||
28 | */ | ||
29 | cluster { | ||
30 | name = "unspecified" | ||
31 | owner = "unspecified" | ||
32 | latlong = "unspecified" | ||
33 | url = "unspecified" | ||
34 | } | ||
35 | |||
36 | /* The host section describes attributes of the host, like the location */ | ||
37 | host { | ||
38 | location = "unspecified" | ||
39 | } | ||
40 | |||
41 | /* Feel free to specify as many udp_send_channels as you like. Gmond | ||
42 | used to only support having a single channel */ | ||
43 | udp_send_channel { | ||
44 | #bind_hostname = yes # Highly recommended, soon to be default. | ||
45 | # This option tells gmond to use a source address | ||
46 | # that resolves to the machine's hostname. Without | ||
47 | # this, the metrics may appear to come from any | ||
48 | # interface and the DNS names associated with | ||
49 | # those IPs will be used to create the RRDs. | ||
50 | mcast_join = 239.2.11.71 | ||
51 | port = 8649 | ||
52 | ttl = 1 | ||
53 | } | ||
54 | |||
55 | /* You can specify as many udp_recv_channels as you like as well. */ | ||
56 | udp_recv_channel { | ||
57 | mcast_join = 239.2.11.71 | ||
58 | port = 8649 | ||
59 | bind = 239.2.11.71 | ||
60 | retry_bind = true | ||
61 | # Size of the UDP buffer. If you are handling lots of metrics you really | ||
62 | # should bump it up to e.g. 10MB or even higher. | ||
63 | # buffer = 10485760 | ||
64 | } | ||
65 | |||
66 | /* You can specify as many tcp_accept_channels as you like to share | ||
67 | an xml description of the state of the cluster */ | ||
68 | tcp_accept_channel { | ||
69 | port = 8649 | ||
70 | # If you want to gzip XML output | ||
71 | gzip_output = no | ||
72 | } | ||
73 | |||
74 | /* Channel to receive sFlow datagrams */ | ||
75 | #udp_recv_channel { | ||
76 | # port = 6343 | ||
77 | #} | ||
78 | |||
79 | /* Optional sFlow settings */ | ||
80 | #sflow { | ||
81 | # udp_port = 6343 | ||
82 | # accept_vm_metrics = yes | ||
83 | # accept_jvm_metrics = yes | ||
84 | # multiple_jvm_instances = no | ||
85 | # accept_http_metrics = yes | ||
86 | # multiple_http_instances = no | ||
87 | # accept_memcache_metrics = yes | ||
88 | # multiple_memcache_instances = no | ||
89 | #} | ||
90 | |||
91 | /* Each metrics module that is referenced by gmond must be specified and | ||
92 | loaded. If the module has been statically linked with gmond, it does | ||
93 | not require a load path. However all dynamically loadable modules must | ||
94 | include a load path. */ | ||
95 | modules { | ||
96 | module { | ||
97 | name = "core_metrics" | ||
98 | } | ||
99 | module { | ||
100 | name = "cpu_module" | ||
101 | path = "modcpu.so" | ||
102 | } | ||
103 | module { | ||
104 | name = "disk_module" | ||
105 | path = "moddisk.so" | ||
106 | } | ||
107 | module { | ||
108 | name = "load_module" | ||
109 | path = "modload.so" | ||
110 | } | ||
111 | module { | ||
112 | name = "mem_module" | ||
113 | path = "modmem.so" | ||
114 | } | ||
115 | module { | ||
116 | name = "net_module" | ||
117 | path = "modnet.so" | ||
118 | } | ||
119 | module { | ||
120 | name = "proc_module" | ||
121 | path = "modproc.so" | ||
122 | } | ||
123 | module { | ||
124 | name = "sys_module" | ||
125 | path = "modsys.so" | ||
126 | } | ||
127 | } | ||
128 | |||
129 | /* The old internal 2.5.x metric array has been replaced by the following | ||
130 | collection_group directives. What follows is the default behavior for | ||
131 | collecting and sending metrics that is as close to 2.5.x behavior as | ||
132 | possible. */ | ||
133 | |||
134 | /* This collection group will cause a heartbeat (or beacon) to be sent every | ||
135 | 20 seconds. In the heartbeat is the GMOND_STARTED data which expresses | ||
136 | the age of the running gmond. */ | ||
137 | collection_group { | ||
138 | collect_once = yes | ||
139 | time_threshold = 20 | ||
140 | metric { | ||
141 | name = "heartbeat" | ||
142 | } | ||
143 | } | ||
144 | |||
145 | /* This collection group will send general info about this host every | ||
146 | 1200 secs. | ||
147 | This information doesn't change between reboots and is only collected | ||
148 | once. */ | ||
149 | collection_group { | ||
150 | collect_once = yes | ||
151 | time_threshold = 1200 | ||
152 | metric { | ||
153 | name = "cpu_num" | ||
154 | title = "CPU Count" | ||
155 | } | ||
156 | metric { | ||
157 | name = "cpu_speed" | ||
158 | title = "CPU Speed" | ||
159 | } | ||
160 | metric { | ||
161 | name = "mem_total" | ||
162 | title = "Memory Total" | ||
163 | } | ||
164 | /* Should this be here? Swap can be added/removed between reboots. */ | ||
165 | metric { | ||
166 | name = "swap_total" | ||
167 | title = "Swap Space Total" | ||
168 | } | ||
169 | metric { | ||
170 | name = "boottime" | ||
171 | title = "Last Boot Time" | ||
172 | } | ||
173 | metric { | ||
174 | name = "machine_type" | ||
175 | title = "Machine Type" | ||
176 | } | ||
177 | metric { | ||
178 | name = "os_name" | ||
179 | title = "Operating System" | ||
180 | } | ||
181 | metric { | ||
182 | name = "os_release" | ||
183 | title = "Operating System Release" | ||
184 | } | ||
185 | metric { | ||
186 | name = "location" | ||
187 | title = "Location" | ||
188 | } | ||
189 | } | ||
190 | |||
191 | /* This collection group will send the status of gexecd for this host | ||
192 | every 300 secs.*/ | ||
193 | /* Unlike 2.5.x the default behavior is to report gexecd OFF. */ | ||
194 | collection_group { | ||
195 | collect_once = yes | ||
196 | time_threshold = 300 | ||
197 | metric { | ||
198 | name = "gexec" | ||
199 | title = "Gexec Status" | ||
200 | } | ||
201 | } | ||
202 | |||
203 | /* This collection group will collect the CPU status info every 20 secs. | ||
204 | The time threshold is set to 90 seconds. In honesty, this | ||
205 | time_threshold could be set significantly higher to reduce | ||
206 | unneccessary network chatter. */ | ||
207 | collection_group { | ||
208 | collect_every = 20 | ||
209 | time_threshold = 90 | ||
210 | /* CPU status */ | ||
211 | metric { | ||
212 | name = "cpu_user" | ||
213 | value_threshold = "1.0" | ||
214 | title = "CPU User" | ||
215 | } | ||
216 | metric { | ||
217 | name = "cpu_system" | ||
218 | value_threshold = "1.0" | ||
219 | title = "CPU System" | ||
220 | } | ||
221 | metric { | ||
222 | name = "cpu_idle" | ||
223 | value_threshold = "5.0" | ||
224 | title = "CPU Idle" | ||
225 | } | ||
226 | metric { | ||
227 | name = "cpu_nice" | ||
228 | value_threshold = "1.0" | ||
229 | title = "CPU Nice" | ||
230 | } | ||
231 | metric { | ||
232 | name = "cpu_aidle" | ||
233 | value_threshold = "5.0" | ||
234 | title = "CPU aidle" | ||
235 | } | ||
236 | metric { | ||
237 | name = "cpu_wio" | ||
238 | value_threshold = "1.0" | ||
239 | title = "CPU wio" | ||
240 | } | ||
241 | metric { | ||
242 | name = "cpu_steal" | ||
243 | value_threshold = "1.0" | ||
244 | title = "CPU steal" | ||
245 | } | ||
246 | /* The next two metrics are optional if you want more detail... | ||
247 | ... since they are accounted for in cpu_system. | ||
248 | metric { | ||
249 | name = "cpu_intr" | ||
250 | value_threshold = "1.0" | ||
251 | title = "CPU intr" | ||
252 | } | ||
253 | metric { | ||
254 | name = "cpu_sintr" | ||
255 | value_threshold = "1.0" | ||
256 | title = "CPU sintr" | ||
257 | } | ||
258 | */ | ||
259 | } | ||
260 | |||
261 | collection_group { | ||
262 | collect_every = 20 | ||
263 | time_threshold = 90 | ||
264 | /* Load Averages */ | ||
265 | metric { | ||
266 | name = "load_one" | ||
267 | value_threshold = "1.0" | ||
268 | title = "One Minute Load Average" | ||
269 | } | ||
270 | metric { | ||
271 | name = "load_five" | ||
272 | value_threshold = "1.0" | ||
273 | title = "Five Minute Load Average" | ||
274 | } | ||
275 | metric { | ||
276 | name = "load_fifteen" | ||
277 | value_threshold = "1.0" | ||
278 | title = "Fifteen Minute Load Average" | ||
279 | } | ||
280 | } | ||
281 | |||
282 | /* This group collects the number of running and total processes */ | ||
283 | collection_group { | ||
284 | collect_every = 80 | ||
285 | time_threshold = 950 | ||
286 | metric { | ||
287 | name = "proc_run" | ||
288 | value_threshold = "1.0" | ||
289 | title = "Total Running Processes" | ||
290 | } | ||
291 | metric { | ||
292 | name = "proc_total" | ||
293 | value_threshold = "1.0" | ||
294 | title = "Total Processes" | ||
295 | } | ||
296 | } | ||
297 | |||
298 | /* This collection group grabs the volatile memory metrics every 40 secs and | ||
299 | sends them at least every 180 secs. This time_threshold can be increased | ||
300 | significantly to reduce unneeded network traffic. */ | ||
301 | collection_group { | ||
302 | collect_every = 40 | ||
303 | time_threshold = 180 | ||
304 | metric { | ||
305 | name = "mem_free" | ||
306 | value_threshold = "1024.0" | ||
307 | title = "Free Memory" | ||
308 | } | ||
309 | metric { | ||
310 | name = "mem_shared" | ||
311 | value_threshold = "1024.0" | ||
312 | title = "Shared Memory" | ||
313 | } | ||
314 | metric { | ||
315 | name = "mem_buffers" | ||
316 | value_threshold = "1024.0" | ||
317 | title = "Memory Buffers" | ||
318 | } | ||
319 | metric { | ||
320 | name = "mem_cached" | ||
321 | value_threshold = "1024.0" | ||
322 | title = "Cached Memory" | ||
323 | } | ||
324 | metric { | ||
325 | name = "swap_free" | ||
326 | value_threshold = "1024.0" | ||
327 | title = "Free Swap Space" | ||
328 | } | ||
329 | } | ||
330 | |||
331 | collection_group { | ||
332 | collect_every = 40 | ||
333 | time_threshold = 300 | ||
334 | metric { | ||
335 | name = "bytes_out" | ||
336 | value_threshold = 4096 | ||
337 | title = "Bytes Sent" | ||
338 | } | ||
339 | metric { | ||
340 | name = "bytes_in" | ||
341 | value_threshold = 4096 | ||
342 | title = "Bytes Received" | ||
343 | } | ||
344 | metric { | ||
345 | name = "pkts_in" | ||
346 | value_threshold = 256 | ||
347 | title = "Packets Received" | ||
348 | } | ||
349 | metric { | ||
350 | name = "pkts_out" | ||
351 | value_threshold = 256 | ||
352 | title = "Packets Sent" | ||
353 | } | ||
354 | } | ||
355 | |||
356 | /* Different than 2.5.x default since the old config made no sense */ | ||
357 | collection_group { | ||
358 | collect_every = 1800 | ||
359 | time_threshold = 3600 | ||
360 | metric { | ||
361 | name = "disk_total" | ||
362 | value_threshold = 1.0 | ||
363 | title = "Total Disk Space" | ||
364 | } | ||
365 | } | ||
366 | |||
367 | collection_group { | ||
368 | collect_every = 40 | ||
369 | time_threshold = 180 | ||
370 | metric { | ||
371 | name = "disk_free" | ||
372 | value_threshold = 1.0 | ||
373 | title = "Disk Space Available" | ||
374 | } | ||
375 | metric { | ||
376 | name = "part_max_used" | ||
377 | value_threshold = 1.0 | ||
378 | title = "Maximum Disk Space Used" | ||
379 | } | ||
380 | } | ||
381 | |||
382 | include ("/etc/conf.d/*.conf") | ||
383 | |||
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia/gmond.init b/meta-linaro/recipes-extra/ganglia/ganglia/gmond.init new file mode 100755 index 0000000..4509329 --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia/gmond.init | |||
@@ -0,0 +1,46 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: gmond | ||
4 | # Required-Start: $local_fs | ||
5 | # Required-Stop: $local_fs | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 0 1 6 | ||
8 | # Short-Description: Starts ganglia monitor | ||
9 | # Description: Starts the gmond monitoring daemon | ||
10 | ### END INIT INFO | ||
11 | |||
12 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
13 | |||
14 | DESC="Ganglia Monitor Daemon" | ||
15 | NAME="gmond" | ||
16 | GMOND=`which $NAME` | ||
17 | |||
18 | . /etc/init.d/functions || exit 1 | ||
19 | |||
20 | # Exit if the package is not installed | ||
21 | [ -x "$GMOND" ] || exit 0 | ||
22 | |||
23 | case "$1" in | ||
24 | start) | ||
25 | echo -n "Starting $DESC: $NAME... " | ||
26 | start-stop-daemon -S -x $GMOND -- $GMOND_ARGS | ||
27 | echo "done." | ||
28 | ;; | ||
29 | stop) | ||
30 | echo -n "Stopping $DESC: $NAME... " | ||
31 | start-stop-daemon -K -x $GMOND | ||
32 | echo "done." | ||
33 | ;; | ||
34 | restart) | ||
35 | echo "Restarting $DESC: $NAME... " | ||
36 | $0 stop | ||
37 | $0 start | ||
38 | echo "done." | ||
39 | ;; | ||
40 | *) | ||
41 | echo "Usage: $0 {start|stop|restart}" | ||
42 | exit 1 | ||
43 | ;; | ||
44 | esac | ||
45 | |||
46 | exit 0 | ||
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb b/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb new file mode 100644 index 0000000..7bed70d --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb | |||
@@ -0,0 +1,70 @@ | |||
1 | DESCRIPTION = "Ganglia is a scalable distributed monitoring \ | ||
2 | system for high-performance computing systems such as \ | ||
3 | clusters and Grids." | ||
4 | HOMEPAGE = "http://ganglia.sourceforge.net/" | ||
5 | SECTION = "console/utils" | ||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://NEWS;md5=ff8c91481123c7d3be4e31fcac997747" | ||
8 | DEPENDS = "apr confuse pcre python rrdtool" | ||
9 | |||
10 | SRC_URI = "\ | ||
11 | ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ | ||
12 | file://gmetad-example.conf \ | ||
13 | file://gmetad.init \ | ||
14 | file://gmond-example.conf \ | ||
15 | file://gmond.init \ | ||
16 | " | ||
17 | SRC_URI[md5sum] = "05926bb18c22af508a3718a90b2e9a2c" | ||
18 | SRC_URI[sha256sum] = "89eae02e1a117040d60b3b561fe55f88d7f8cf41b94af1492969ef68e6797886" | ||
19 | |||
20 | EXTRA_OECONF += " \ | ||
21 | --with-gmetad \ | ||
22 | --disable-python \ | ||
23 | " | ||
24 | |||
25 | inherit pkgconfig autotools-brokensep pythonnative update-rc.d | ||
26 | |||
27 | # The ganglia autoconf setup doesn't include libmetrics in its | ||
28 | # AC_OUTPUT list -- it reconfigures libmetrics using its own rules. | ||
29 | # Unfortunately this means an OE autoreconf will not regenerate | ||
30 | # ltmain.sh (and others) in libmetrics and as such the build will | ||
31 | # fail. We explicitly force regeneration of that directory. | ||
32 | |||
33 | do_configure_append() { | ||
34 | (cd ${S} ; autoreconf -fvi ) | ||
35 | (cd ${S}/libmetrics ; autoreconf -fvi) | ||
36 | } | ||
37 | |||
38 | do_install_append() { | ||
39 | install -d ${D}${sysconfdir}/init.d | ||
40 | # gmetad expects the following directory and owned by user 'nobody' | ||
41 | install -o nobody -d ${D}${localstatedir}/lib/${PN}/rrds | ||
42 | # gmond and gmetad configurations | ||
43 | install -m 0644 ${WORKDIR}/gmetad-example.conf ${D}${sysconfdir}/gmetad.conf | ||
44 | install -m 0644 ${WORKDIR}/gmond-example.conf ${D}${sysconfdir}/gmond.conf | ||
45 | # Init scripts | ||
46 | install -m 0755 ${WORKDIR}/gmetad.init ${D}${sysconfdir}/init.d/gmetad | ||
47 | install -m 0755 ${WORKDIR}/gmond.init ${D}${sysconfdir}/init.d/gmond | ||
48 | # Fixup hard-coded paths | ||
49 | sed -i -e 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/gmetad | ||
50 | sed -i -e 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/gmond | ||
51 | sed -i -e 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/gmetad | ||
52 | sed -i -e 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/gmond | ||
53 | sed -i -e 's!/etc/conf.d/!${sysconfdir}/conf.d/!g' ${D}${sysconfdir}/gmond.conf | ||
54 | } | ||
55 | |||
56 | PACKAGES =+ "gmetad" | ||
57 | |||
58 | RDEPENDS_${PN} = "gmetad" | ||
59 | |||
60 | BBCLASSEXTEND = "native" | ||
61 | |||
62 | FILES_gmetad = "\ | ||
63 | ${sbindir}/gmetad \ | ||
64 | ${sysconfdir}/init.d/gmetad \ | ||
65 | " | ||
66 | |||
67 | INITSCRIPT_PACKAGES = "${PN} gmetad" | ||
68 | INITSCRIPT_NAME_ganglia = "gmond" | ||
69 | INITSCRIPT_NAME_gmetad = "gmetad" | ||
70 | INITSCRIPT_PARAMS = "defaults 66" | ||
diff --git a/meta-linaro/recipes-extra/hiphopvm/files/hrw-check-for-libdwarf-in-our-place-first.patch b/meta-linaro/recipes-extra/hiphopvm/files/hrw-check-for-libdwarf-in-our-place-first.patch new file mode 100644 index 0000000..bcc8352 --- /dev/null +++ b/meta-linaro/recipes-extra/hiphopvm/files/hrw-check-for-libdwarf-in-our-place-first.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
2 | |||
3 | We have two files named dwarf.h: | ||
4 | - /usr/include/dwarf.h from elfutils | ||
5 | - /usr/include/libdwarf/dwarf.h from libdwarf | ||
6 | |||
7 | HHVM checks for dwarf.h and assumes that libdwarf.h is in same directory which | ||
8 | is wrong for OE and probably also in RedHat based systems (Debian handles it in | ||
9 | other way). | ||
10 | |||
11 | Upstream-Status: pending | ||
12 | |||
13 | --- | ||
14 | CMake/FindLibDwarf.cmake | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | --- git.orig/CMake/FindLibDwarf.cmake | ||
18 | +++ git/CMake/FindLibDwarf.cmake | ||
19 | @@ -18,12 +18,12 @@ endif (LIBDWARF_LIBRARIES AND LIBDWARF_I | ||
20 | |||
21 | find_path (DWARF_INCLUDE_DIR | ||
22 | NAMES | ||
23 | dwarf.h | ||
24 | PATHS | ||
25 | - /usr/include | ||
26 | /usr/include/libdwarf | ||
27 | + /usr/include | ||
28 | /usr/local/include | ||
29 | /opt/local/include | ||
30 | /sw/include | ||
31 | ENV CPATH) # PATH and INCLUDE will also work | ||
32 | |||
diff --git a/meta-linaro/recipes-extra/hiphopvm/hiphopvm_git.bb b/meta-linaro/recipes-extra/hiphopvm/hiphopvm_git.bb new file mode 100644 index 0000000..77cd299 --- /dev/null +++ b/meta-linaro/recipes-extra/hiphopvm/hiphopvm_git.bb | |||
@@ -0,0 +1,67 @@ | |||
1 | DEPENDS = " \ | ||
2 | binutils \ | ||
3 | bison-native \ | ||
4 | boost \ | ||
5 | bzip2 \ | ||
6 | cmake \ | ||
7 | elfutils \ | ||
8 | expat \ | ||
9 | flex-native \ | ||
10 | gd \ | ||
11 | glog \ | ||
12 | icu \ | ||
13 | libcap \ | ||
14 | libc-client \ | ||
15 | libdwarf \ | ||
16 | libevent-fb \ | ||
17 | libmcrypt \ | ||
18 | libmemcached \ | ||
19 | libunwind \ | ||
20 | libxml2 \ | ||
21 | mysql5 \ | ||
22 | ncurses \ | ||
23 | onig \ | ||
24 | openldap \ | ||
25 | openssl \ | ||
26 | libpam \ | ||
27 | pcre \ | ||
28 | readline \ | ||
29 | zlib \ | ||
30 | tbb \ | ||
31 | ${EXTRA_DEPENDS} \ | ||
32 | " | ||
33 | |||
34 | # optional (for now) dependencies: | ||
35 | EXTRA_DEPENDS = "gperftools" | ||
36 | EXTRA_DEPENDS_aarch64 = "" | ||
37 | |||
38 | # 64-bit platforms only | ||
39 | COMPATIBLE_HOST = '(x86_64.*|aarch64.*)-linux' | ||
40 | |||
41 | LICENSE = "PHP Zend" | ||
42 | |||
43 | LIC_FILES_CHKSUM = " \ | ||
44 | file://LICENSE.PHP;md5=cb564efdf78cce8ea6e4b5a4f7c05d97 \ | ||
45 | file://LICENSE.ZEND;md5=69e7a9c51846dd6692f1b946f95f6c60" | ||
46 | |||
47 | SRC_URI = "git://github.com/facebook/hhvm.git \ | ||
48 | file://hrw-check-for-libdwarf-in-our-place-first.patch \ | ||
49 | " | ||
50 | |||
51 | SRCREV = "4c4d11304aef8857dcce8524e7fd9223e00191b5" | ||
52 | |||
53 | PV = "2.0.2+git${SRCPV}" | ||
54 | |||
55 | S = "${WORKDIR}/git" | ||
56 | |||
57 | do_configure_prepend() { | ||
58 | export HPHP_HOME="${B}" | ||
59 | export HPHP_LIB="${B}"/bin | ||
60 | export USE_HHVM=1 | ||
61 | export BOOST_INCLUDEDIR=${STAGING_INCDIR} | ||
62 | export BOOST_LIBRARYDIR=${STAGING_LIBDIR} | ||
63 | export LIBGLOG_INCLUDE_DIR=${STAGING_INCDIR} | ||
64 | export LIBGLOG_LIBRARY=${STAGING_LIBDIR} | ||
65 | } | ||
66 | |||
67 | inherit cmake | ||
diff --git a/meta-linaro/recipes-extra/idlestat/idlestat_git.bb b/meta-linaro/recipes-extra/idlestat/idlestat_git.bb new file mode 100644 index 0000000..7018cc1 --- /dev/null +++ b/meta-linaro/recipes-extra/idlestat/idlestat_git.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | DESCRIPTION = "tool to show how long a CPU or cluster enters idle state" | ||
2 | SUMMARY = "Idlestat is a tool which can show how long a CPU or cluster \ | ||
3 | enters idle state. This infomation is obtained using traces from trace-cmd \ | ||
4 | or ftrace tools." | ||
5 | LICENSE = "GPL-2.0" | ||
6 | LIC_FILES_CHKSUM = "file://Makefile;md5=1e2d28a88b081f97157089bb67d4249d" | ||
7 | SRCREV = "6de5e87ccf87beb0946c627c10554efb1480326f" | ||
8 | PV = "0.2+git${SRCPV}" | ||
9 | |||
10 | SRC_URI = "git://git.linaro.org/power/idlestat.git" | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | do_install () { | ||
15 | install -D -p -m0755 idlestat ${D}/${sbindir}/idlestat | ||
16 | } | ||
diff --git a/meta-linaro/recipes-extra/latency-test/latency-test_git.bb b/meta-linaro/recipes-extra/latency-test/latency-test_git.bb new file mode 100644 index 0000000..2d6f0ae --- /dev/null +++ b/meta-linaro/recipes-extra/latency-test/latency-test_git.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | SUMMARY = "Latency test" | ||
2 | DESCRIPTION = "Test to measure the latency of the Linux kernel" | ||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://latency.c;endline=39;md5=0ac97d68f333880973b054365ea2acc5" | ||
5 | SRCREV = "e9671a414d832d37b16359b6a180c7c306199c55" | ||
6 | |||
7 | COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" | ||
8 | |||
9 | SRC_URI = "git://git.linaro.org/people/mike.holmes/latency-test.git" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | do_compile() { | ||
14 | oe_runmake test | ||
15 | } | ||
16 | |||
17 | do_install() { | ||
18 | install -D -p -m0755 latency ${D}${bindir}/latency | ||
19 | } | ||
diff --git a/meta-linaro/recipes-extra/libevent/files/LICENSE.txt b/meta-linaro/recipes-extra/libevent/files/LICENSE.txt new file mode 100644 index 0000000..5a315e4 --- /dev/null +++ b/meta-linaro/recipes-extra/libevent/files/LICENSE.txt | |||
@@ -0,0 +1,74 @@ | |||
1 | Libevent is available for use under the following license, commonly known | ||
2 | as the 3-clause (or "modified") BSD license: | ||
3 | |||
4 | ============================== | ||
5 | Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu> | ||
6 | Copyright (c) 2007-2010 Niels Provos and Nick Mathewson | ||
7 | |||
8 | Redistribution and use in source and binary forms, with or without | ||
9 | modification, are permitted provided that the following conditions | ||
10 | are met: | ||
11 | 1. Redistributions of source code must retain the above copyright | ||
12 | notice, this list of conditions and the following disclaimer. | ||
13 | 2. Redistributions in binary form must reproduce the above copyright | ||
14 | notice, this list of conditions and the following disclaimer in the | ||
15 | documentation and/or other materials provided with the distribution. | ||
16 | 3. The name of the author may not be used to endorse or promote products | ||
17 | derived from this software without specific prior written permission. | ||
18 | |||
19 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
20 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
21 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
22 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
23 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
24 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
28 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
29 | ============================== | ||
30 | |||
31 | Portions of Libevent are based on works by others, also made available by | ||
32 | them under the three-clause BSD license above. The copyright notices are | ||
33 | available in the corresponding source files; the license is as above. Here's | ||
34 | a list: | ||
35 | |||
36 | log.c: | ||
37 | Copyright (c) 2000 Dug Song <dugsong@monkey.org> | ||
38 | Copyright (c) 1993 The Regents of the University of California. | ||
39 | |||
40 | strlcpy.c: | ||
41 | Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> | ||
42 | |||
43 | win32select.c: | ||
44 | Copyright (c) 2003 Michael A. Davis <mike@datanerds.net> | ||
45 | |||
46 | evport.c: | ||
47 | Copyright (c) 2007 Sun Microsystems | ||
48 | |||
49 | ht-internal.h: | ||
50 | Copyright (c) 2002 Christopher Clark | ||
51 | |||
52 | minheap-internal.h: | ||
53 | Copyright (c) 2006 Maxim Yegorushkin <maxim.yegorushkin@gmail.com> | ||
54 | |||
55 | ============================== | ||
56 | |||
57 | The arc4module is available under the following, sometimes called the | ||
58 | "OpenBSD" license: | ||
59 | |||
60 | Copyright (c) 1996, David Mazieres <dm@uun.org> | ||
61 | Copyright (c) 2008, Damien Miller <djm@openbsd.org> | ||
62 | |||
63 | Permission to use, copy, modify, and distribute this software for any | ||
64 | purpose with or without fee is hereby granted, provided that the above | ||
65 | copyright notice and this permission notice appear in all copies. | ||
66 | |||
67 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
68 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
69 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
70 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
71 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
72 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
73 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
74 | |||
diff --git a/meta-linaro/recipes-extra/libevent/files/libevent-1.4.14.fb-changes.diff b/meta-linaro/recipes-extra/libevent/files/libevent-1.4.14.fb-changes.diff new file mode 100644 index 0000000..0f29aac --- /dev/null +++ b/meta-linaro/recipes-extra/libevent/files/libevent-1.4.14.fb-changes.diff | |||
@@ -0,0 +1,611 @@ | |||
1 | diff --git a/event.c b/event.c | ||
2 | index 74ba5c4..06984b8 100644 | ||
3 | --- a/event.c | ||
4 | +++ b/event.c | ||
5 | @@ -138,10 +138,12 @@ detect_monotonic(void) | ||
6 | static int | ||
7 | gettime(struct event_base *base, struct timeval *tp) | ||
8 | { | ||
9 | +/* | ||
10 | if (base->tv_cache.tv_sec) { | ||
11 | *tp = base->tv_cache; | ||
12 | return (0); | ||
13 | } | ||
14 | +*/ | ||
15 | |||
16 | #if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) | ||
17 | if (use_monotonic) { | ||
18 | @@ -481,7 +483,7 @@ event_base_loop(struct event_base *base, int flags) | ||
19 | int res, done; | ||
20 | |||
21 | /* clear time cache */ | ||
22 | - base->tv_cache.tv_sec = 0; | ||
23 | + /* base->tv_cache.tv_sec = 0; */ | ||
24 | |||
25 | if (base->sig.ev_signal_added) | ||
26 | evsignal_base = base; | ||
27 | @@ -533,13 +535,13 @@ event_base_loop(struct event_base *base, int flags) | ||
28 | gettime(base, &base->event_tv); | ||
29 | |||
30 | /* clear time cache */ | ||
31 | - base->tv_cache.tv_sec = 0; | ||
32 | + /* base->tv_cache.tv_sec = 0; */ | ||
33 | |||
34 | res = evsel->dispatch(base, evbase, tv_p); | ||
35 | |||
36 | if (res == -1) | ||
37 | return (-1); | ||
38 | - gettime(base, &base->tv_cache); | ||
39 | + /* gettime(base, &base->tv_cache); */ | ||
40 | |||
41 | timeout_process(base); | ||
42 | |||
43 | @@ -552,7 +554,7 @@ event_base_loop(struct event_base *base, int flags) | ||
44 | } | ||
45 | |||
46 | /* clear time cache */ | ||
47 | - base->tv_cache.tv_sec = 0; | ||
48 | + /* base->tv_cache.tv_sec = 0; */ | ||
49 | |||
50 | event_debug(("%s: asked to terminate loop.", __func__)); | ||
51 | return (0); | ||
52 | diff --git a/evhttp.h b/evhttp.h | ||
53 | index 7ddf720..13c8b79 100644 | ||
54 | --- a/evhttp.h | ||
55 | +++ b/evhttp.h | ||
56 | @@ -81,12 +81,50 @@ struct evhttp *evhttp_new(struct event_base *base); | ||
57 | * @param http a pointer to an evhttp object | ||
58 | * @param address a string containing the IP address to listen(2) on | ||
59 | * @param port the port number to listen on | ||
60 | - * @return a newly allocated evhttp struct | ||
61 | + * @return 0 on success, -1 on error | ||
62 | * @see evhttp_free() | ||
63 | */ | ||
64 | int evhttp_bind_socket(struct evhttp *http, const char *address, u_short port); | ||
65 | |||
66 | /** | ||
67 | + * Binds an HTTP server on the specified address and port, using backlog. | ||
68 | + * | ||
69 | + * Can be called multiple times to bind the same http server | ||
70 | + * to multiple different ports. | ||
71 | + * | ||
72 | + * @param http a pointer to an evhttp object | ||
73 | + * @param address a string containing the IP address to listen(2) on | ||
74 | + * @param port the port number to listen on | ||
75 | + * @param backlog the backlog value for listen(2) | ||
76 | + * @return 0 on success, -1 on error | ||
77 | + * @see evhttp_free() | ||
78 | + */ | ||
79 | +int evhttp_bind_socket_backlog(struct evhttp *http, const char *address, u_short port, int backlog); | ||
80 | + | ||
81 | +/** | ||
82 | + * Like evhttp_bind_socket(), but returns the socket file descriptor. | ||
83 | + * | ||
84 | + * @param http a pointer to an evhttp object | ||
85 | + * @param address a string containing the IP address to listen(2) on | ||
86 | + * @param port the port number to listen on | ||
87 | + * @return Socket file descriptor on success, -1 on failure | ||
88 | + * @see evhttp_bind_socket() | ||
89 | + */ | ||
90 | +int evhttp_bind_socket_with_fd(struct evhttp *http, const char *address, u_short port); | ||
91 | + | ||
92 | +/** | ||
93 | + * Like evhttp_bind_socket(), but returns the socket file descriptor. | ||
94 | + * | ||
95 | + * @param http a pointer to an evhttp object | ||
96 | + * @param address a string containing the IP address to listen(2) on | ||
97 | + * @param port the port number to listen on | ||
98 | + * @param backlog the backlog value for listen(2) | ||
99 | + * @return Socket file descriptor on success, -1 on failure | ||
100 | + * @see evhttp_bind_socket() | ||
101 | + */ | ||
102 | +int evhttp_bind_socket_backlog_fd(struct evhttp *http, const char *address, u_short port, int backlog); | ||
103 | + | ||
104 | +/** | ||
105 | * Makes an HTTP server accept connections on the specified socket | ||
106 | * | ||
107 | * This may be useful to create a socket and then fork multiple instances | ||
108 | @@ -105,6 +143,21 @@ int evhttp_bind_socket(struct evhttp *http, const char *address, u_short port); | ||
109 | int evhttp_accept_socket(struct evhttp *http, int fd); | ||
110 | |||
111 | /** | ||
112 | + * Makes an HTTP server stop accepting connections on the specified socket | ||
113 | + * | ||
114 | + * This may be useful when a socket has been sent via file descriptor passing | ||
115 | + * and is no longer needed by the current process. | ||
116 | + * | ||
117 | + * This function does not close the socket. | ||
118 | + * | ||
119 | + * @param http a pointer to an evhttp object | ||
120 | + * @param fd a socket fd that is currently accepting connections | ||
121 | + * @return 0 on success, -1 on failure. | ||
122 | + * @see evhttp_accept_socket() | ||
123 | + */ | ||
124 | +int evhttp_del_accept_socket(struct evhttp *http, int fd); | ||
125 | + | ||
126 | +/** | ||
127 | * Free the previously created HTTP server. | ||
128 | * | ||
129 | * Works only if no requests are currently being served. | ||
130 | @@ -134,6 +187,28 @@ void evhttp_set_gencb(struct evhttp *, | ||
131 | */ | ||
132 | void evhttp_set_timeout(struct evhttp *, int timeout_in_secs); | ||
133 | |||
134 | +/** | ||
135 | + * Limit the number of simultaneous connections via this http instance. | ||
136 | + * | ||
137 | + * @param http an evhttp object | ||
138 | + * @param nlimit the maximum number of connections, zero is unlimited | ||
139 | + */ | ||
140 | +int evhttp_set_connection_limit(struct evhttp *http, int nlimit); | ||
141 | + | ||
142 | +/** | ||
143 | + * Return the maximum number of connections allowed for this instance. | ||
144 | + * | ||
145 | + * @param http an evhttp object | ||
146 | + */ | ||
147 | +int evhttp_get_connection_limit(struct evhttp *http); | ||
148 | + | ||
149 | +/** | ||
150 | + * Return the number of connections in this instance. | ||
151 | + * | ||
152 | + * @param http an evhttp object | ||
153 | + */ | ||
154 | +int evhttp_get_connection_count(struct evhttp *http); | ||
155 | + | ||
156 | /* Request/Response functionality */ | ||
157 | |||
158 | /** | ||
159 | @@ -157,6 +232,19 @@ void evhttp_send_error(struct evhttp_request *req, int error, | ||
160 | void evhttp_send_reply(struct evhttp_request *req, int code, | ||
161 | const char *reason, struct evbuffer *databuf); | ||
162 | |||
163 | +/** | ||
164 | + * Send an HTML reply synchronously as much as possible by calling _begin(). | ||
165 | + * Great for a worker thread to send the reply immediately without queuing up | ||
166 | + * events back to the loop. Call _end() to send the rest of the packet from | ||
167 | + * event loop. | ||
168 | + * | ||
169 | + * When _begin() returns needs to be fed into _end() as the 1st parameter | ||
170 | + * "nwritten". | ||
171 | + */ | ||
172 | +int evhttp_send_reply_sync_begin(struct evhttp_request *req, int code, | ||
173 | + const char *reason, struct evbuffer *databuf); | ||
174 | +void evhttp_send_reply_sync_end(int nwritten, struct evhttp_request *req); | ||
175 | + | ||
176 | /* Low-level response interface, for streaming/chunked replies */ | ||
177 | void evhttp_send_reply_start(struct evhttp_request *, int, const char *); | ||
178 | void evhttp_send_reply_chunk(struct evhttp_request *, struct evbuffer *); | ||
179 | @@ -210,6 +298,7 @@ struct { | ||
180 | |||
181 | enum evhttp_request_kind kind; | ||
182 | enum evhttp_cmd_type type; | ||
183 | + char *ext_method; /* webdav methods, for example */ | ||
184 | |||
185 | char *uri; /* uri after HTTP request was parsed */ | ||
186 | |||
187 | @@ -224,6 +313,8 @@ struct { | ||
188 | int chunked:1, /* a chunked request */ | ||
189 | userdone:1; /* the user has sent all data */ | ||
190 | |||
191 | + int referenced; | ||
192 | + | ||
193 | struct evbuffer *output_buffer; /* outgoing post or data */ | ||
194 | |||
195 | /* Callback */ | ||
196 | diff --git a/http-internal.h b/http-internal.h | ||
197 | index 9cd03cd..3f60f54 100644 | ||
198 | --- a/http-internal.h | ||
199 | +++ b/http-internal.h | ||
200 | @@ -116,6 +116,9 @@ struct evhttp { | ||
201 | TAILQ_HEAD(httpcbq, evhttp_cb) callbacks; | ||
202 | struct evconq connections; | ||
203 | |||
204 | + int connection_count; | ||
205 | + int connection_limit; | ||
206 | + | ||
207 | int timeout; | ||
208 | |||
209 | void (*gencb)(struct evhttp_request *req, void *); | ||
210 | diff --git a/http.c b/http.c | ||
211 | index efcec40..e10d114 100644 | ||
212 | --- a/http.c | ||
213 | +++ b/http.c | ||
214 | @@ -219,6 +219,13 @@ static int evhttp_decode_uri_internal(const char *uri, size_t length, | ||
215 | void evhttp_read(int, short, void *); | ||
216 | void evhttp_write(int, short, void *); | ||
217 | |||
218 | + | ||
219 | +void evhttp_server_drop_connection(struct evhttp_connection *evcon); | ||
220 | +void evhttp_server_add_connection(struct evhttp *http, | ||
221 | + struct evhttp_connection *evcon); | ||
222 | +void evhttp_pause(struct evhttp *http); | ||
223 | +void evhttp_resume(struct evhttp *http); | ||
224 | + | ||
225 | #ifndef HAVE_STRSEP | ||
226 | /* strsep replacement for platforms that lack it. Only works if | ||
227 | * del is one character long. */ | ||
228 | @@ -478,7 +485,6 @@ evhttp_make_header_response(struct evhttp_connection *evcon, | ||
229 | evhttp_add_header(req->output_headers, | ||
230 | "Connection", "keep-alive"); | ||
231 | |||
232 | - if (req->minor == 1 || is_keepalive) { | ||
233 | /* | ||
234 | * we need to add the content length if the | ||
235 | * user did not give it, this is required for | ||
236 | @@ -488,7 +494,6 @@ evhttp_make_header_response(struct evhttp_connection *evcon, | ||
237 | req->output_headers, | ||
238 | (long)EVBUFFER_LENGTH(req->output_buffer)); | ||
239 | } | ||
240 | - } | ||
241 | |||
242 | /* Potentially add headers for unidentified content. */ | ||
243 | if (EVBUFFER_LENGTH(req->output_buffer)) { | ||
244 | @@ -687,14 +692,14 @@ void | ||
245 | evhttp_write(int fd, short what, void *arg) | ||
246 | { | ||
247 | struct evhttp_connection *evcon = arg; | ||
248 | - int n; | ||
249 | |||
250 | if (what == EV_TIMEOUT) { | ||
251 | evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT); | ||
252 | return; | ||
253 | } | ||
254 | |||
255 | - n = evbuffer_write(evcon->output_buffer, fd); | ||
256 | + if (EVBUFFER_LENGTH(evcon->output_buffer) != 0) { | ||
257 | + int n = evbuffer_write(evcon->output_buffer, fd); | ||
258 | if (n == -1) { | ||
259 | event_debug(("%s: evbuffer_write", __func__)); | ||
260 | evhttp_connection_fail(evcon, EVCON_HTTP_EOF); | ||
261 | @@ -706,6 +711,7 @@ evhttp_write(int fd, short what, void *arg) | ||
262 | evhttp_connection_fail(evcon, EVCON_HTTP_EOF); | ||
263 | return; | ||
264 | } | ||
265 | + } | ||
266 | |||
267 | if (EVBUFFER_LENGTH(evcon->output_buffer) != 0) { | ||
268 | evhttp_add_event(&evcon->ev, | ||
269 | @@ -1012,11 +1018,9 @@ evhttp_connection_free(struct evhttp_connection *evcon) | ||
270 | TAILQ_REMOVE(&evcon->requests, req, next); | ||
271 | evhttp_request_free(req); | ||
272 | } | ||
273 | - | ||
274 | - if (evcon->http_server != NULL) { | ||
275 | - struct evhttp *http = evcon->http_server; | ||
276 | - TAILQ_REMOVE(&http->connections, evcon, next); | ||
277 | - } | ||
278 | + | ||
279 | + if (evcon->http_server != NULL) | ||
280 | + evhttp_server_drop_connection(evcon); | ||
281 | |||
282 | if (event_initialized(&evcon->close_ev)) | ||
283 | event_del(&evcon->close_ev); | ||
284 | @@ -1101,10 +1105,16 @@ evhttp_connection_reset(struct evhttp_connection *evcon) | ||
285 | } | ||
286 | evcon->state = EVCON_DISCONNECTED; | ||
287 | |||
288 | - evbuffer_drain(evcon->input_buffer, | ||
289 | - EVBUFFER_LENGTH(evcon->input_buffer)); | ||
290 | - evbuffer_drain(evcon->output_buffer, | ||
291 | - EVBUFFER_LENGTH(evcon->output_buffer)); | ||
292 | + /* | ||
293 | + * These can grow quite large if processing a large photo or video | ||
294 | + * upload/download. Instead of keeping the buffers around, just | ||
295 | + * free and allocate new. | ||
296 | + */ | ||
297 | + evbuffer_free(evcon->input_buffer); | ||
298 | + evcon->input_buffer = evbuffer_new(); | ||
299 | + | ||
300 | + evbuffer_free(evcon->output_buffer); | ||
301 | + evcon->output_buffer = evbuffer_new(); | ||
302 | } | ||
303 | |||
304 | static void | ||
305 | @@ -1278,19 +1288,52 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line) | ||
306 | if (line == NULL) | ||
307 | return (-1); | ||
308 | uri = strsep(&line, " "); | ||
309 | - if (line == NULL) | ||
310 | - return (-1); | ||
311 | + if (line == NULL) { | ||
312 | + version = "HTTP/1.0"; | ||
313 | + } else { | ||
314 | version = strsep(&line, " "); | ||
315 | if (line != NULL) | ||
316 | return (-1); | ||
317 | + } | ||
318 | |||
319 | /* First line */ | ||
320 | + req->ext_method = NULL; | ||
321 | if (strcmp(method, "GET") == 0) { | ||
322 | req->type = EVHTTP_REQ_GET; | ||
323 | } else if (strcmp(method, "POST") == 0) { | ||
324 | req->type = EVHTTP_REQ_POST; | ||
325 | } else if (strcmp(method, "HEAD") == 0) { | ||
326 | req->type = EVHTTP_REQ_HEAD; | ||
327 | + } else if (strcmp(method, "OPTIONS") == 0) { | ||
328 | + req->type = EVHTTP_REQ_POST; | ||
329 | + req->ext_method = "OPTIONS"; | ||
330 | + } else if (strcmp(method, "REPORT") == 0) { | ||
331 | + req->type = EVHTTP_REQ_POST; | ||
332 | + req->ext_method = "REPORT"; | ||
333 | + } else if (strcmp(method, "PROPFIND") == 0) { | ||
334 | + req->type = EVHTTP_REQ_POST; | ||
335 | + req->ext_method = "PROPFIND"; | ||
336 | + } else if (strcmp(method, "PROPPATH") == 0) { | ||
337 | + req->type = EVHTTP_REQ_POST; | ||
338 | + req->ext_method = "PROPPATH"; | ||
339 | + } else if (strcmp(method, "MKCOL") == 0) { | ||
340 | + req->type = EVHTTP_REQ_POST; | ||
341 | + req->ext_method = "MKCOL"; | ||
342 | + } else if (strcmp(method, "MKCALENDAR") == 0) { | ||
343 | + req->type = EVHTTP_REQ_POST; | ||
344 | + req->ext_method = "MKCALENDAR"; | ||
345 | + } else if (strcmp(method, "PUT") == 0) { | ||
346 | + req->type = EVHTTP_REQ_POST; | ||
347 | + req->ext_method = "PUT"; | ||
348 | + } else if (strcmp(method, "DELETE") == 0) { | ||
349 | + req->type = EVHTTP_REQ_POST; | ||
350 | + req->ext_method = "DELETE"; | ||
351 | + } else if (strcmp(method, "LOCK") == 0) { | ||
352 | + req->type = EVHTTP_REQ_POST; | ||
353 | + req->ext_method = "LOCK"; | ||
354 | + } else if (strcmp(method, "UNLOCK") == 0) { | ||
355 | + req->type = EVHTTP_REQ_POST; | ||
356 | + req->ext_method = "UNLOCK"; | ||
357 | } else { | ||
358 | event_debug(("%s: bad method %s on request %p from %s", | ||
359 | __func__, method, req, req->remote_host)); | ||
360 | @@ -1963,10 +2006,44 @@ evhttp_send_reply(struct evhttp_request *req, int code, const char *reason, | ||
361 | evhttp_send(req, databuf); | ||
362 | } | ||
363 | |||
364 | +int | ||
365 | +evhttp_send_reply_sync_begin(struct evhttp_request *req, int code, | ||
366 | + const char *reason, struct evbuffer *databuf) { | ||
367 | + evhttp_response_code(req, code, reason); | ||
368 | + struct evhttp_connection *evcon = req->evcon; | ||
369 | + | ||
370 | + assert(TAILQ_FIRST(&evcon->requests) == req); | ||
371 | + | ||
372 | + /* xxx: not sure if we really should expose the data buffer this way */ | ||
373 | + if (databuf != NULL) | ||
374 | + evbuffer_add_buffer(req->output_buffer, databuf); | ||
375 | + | ||
376 | + /* Adds headers to the response */ | ||
377 | + evhttp_make_header(evcon, req); | ||
378 | + | ||
379 | + return evbuffer_write(evcon->output_buffer, evcon->fd); | ||
380 | +} | ||
381 | + | ||
382 | +void | ||
383 | +evhttp_send_reply_sync_end(int nwritten, struct evhttp_request *req) { | ||
384 | + struct evhttp_connection *evcon = req->evcon; | ||
385 | + | ||
386 | + if (nwritten <= 0) { | ||
387 | + evhttp_connection_fail(evcon, EVCON_HTTP_EOF); | ||
388 | + } else if (EVBUFFER_LENGTH(evcon->output_buffer) == 0) { | ||
389 | + evhttp_send_done(evcon, NULL); | ||
390 | + } else { | ||
391 | + evhttp_write_buffer(evcon, evhttp_send_done, NULL); | ||
392 | + } | ||
393 | +} | ||
394 | + | ||
395 | + | ||
396 | void | ||
397 | evhttp_send_reply_start(struct evhttp_request *req, int code, | ||
398 | const char *reason) | ||
399 | { | ||
400 | + req->referenced = 1; | ||
401 | + | ||
402 | evhttp_response_code(req, code, reason); | ||
403 | if (req->major == 1 && req->minor == 1) { | ||
404 | /* use chunked encoding for HTTP/1.1 */ | ||
405 | @@ -1986,6 +2063,8 @@ evhttp_send_reply_chunk(struct evhttp_request *req, struct evbuffer *databuf) | ||
406 | if (evcon == NULL) | ||
407 | return; | ||
408 | |||
409 | + if (req->referenced < 0) return; | ||
410 | + | ||
411 | if (req->chunked) { | ||
412 | evbuffer_add_printf(evcon->output_buffer, "%x\r\n", | ||
413 | (unsigned)EVBUFFER_LENGTH(databuf)); | ||
414 | @@ -2007,7 +2086,14 @@ evhttp_send_reply_end(struct evhttp_request *req) | ||
415 | return; | ||
416 | } | ||
417 | |||
418 | - /* we expect no more calls form the user on this request */ | ||
419 | + if (req->referenced < 0) { | ||
420 | + req->referenced = 0; | ||
421 | + evhttp_request_free(req); | ||
422 | + return; | ||
423 | + } | ||
424 | + req->referenced = 0; | ||
425 | + | ||
426 | + /* we expect no more calls form the user on this request */ | ||
427 | req->userdone = 1; | ||
428 | |||
429 | if (req->chunked) { | ||
430 | @@ -2293,7 +2379,8 @@ accept_socket(int fd, short what, void *arg) | ||
431 | } | ||
432 | |||
433 | int | ||
434 | -evhttp_bind_socket(struct evhttp *http, const char *address, u_short port) | ||
435 | +evhttp_bind_socket_backlog_fd(struct evhttp *http, const char *address, | ||
436 | + u_short port, int backlog) | ||
437 | { | ||
438 | int fd; | ||
439 | int res; | ||
440 | @@ -2301,7 +2388,7 @@ evhttp_bind_socket(struct evhttp *http, const char *address, u_short port) | ||
441 | if ((fd = bind_socket(address, port, 1 /*reuse*/)) == -1) | ||
442 | return (-1); | ||
443 | |||
444 | - if (listen(fd, 128) == -1) { | ||
445 | + if (listen(fd, backlog) == -1) { | ||
446 | event_warn("%s: listen", __func__); | ||
447 | EVUTIL_CLOSESOCKET(fd); | ||
448 | return (-1); | ||
449 | @@ -2309,13 +2396,42 @@ evhttp_bind_socket(struct evhttp *http, const char *address, u_short port) | ||
450 | |||
451 | res = evhttp_accept_socket(http, fd); | ||
452 | |||
453 | - if (res != -1) | ||
454 | + if (res != -1) { | ||
455 | event_debug(("Bound to port %d - Awaiting connections ... ", | ||
456 | port)); | ||
457 | + return (fd); | ||
458 | + } | ||
459 | |||
460 | return (res); | ||
461 | } | ||
462 | |||
463 | +static int | ||
464 | +mask_fd(int fd) | ||
465 | +{ | ||
466 | + return fd > 0 ? 0 : fd; | ||
467 | +} | ||
468 | + | ||
469 | +int | ||
470 | +evhttp_bind_socket(struct evhttp *http, const char *address, u_short port) | ||
471 | +{ | ||
472 | + return mask_fd(evhttp_bind_socket_backlog_fd(http, address, port, 128)); | ||
473 | +} | ||
474 | + | ||
475 | +int | ||
476 | +evhttp_bind_socket_with_fd(struct evhttp *http, const char *address, | ||
477 | + u_short port) | ||
478 | +{ | ||
479 | + return evhttp_bind_socket_backlog_fd(http, address, port, 128); | ||
480 | +} | ||
481 | + | ||
482 | +int | ||
483 | +evhttp_bind_socket_backlog(struct evhttp *http, const char *address, | ||
484 | + u_short port, int backlog) | ||
485 | +{ | ||
486 | + return mask_fd( | ||
487 | + evhttp_bind_socket_backlog_fd(http, address, port, backlog)); | ||
488 | +} | ||
489 | + | ||
490 | int | ||
491 | evhttp_accept_socket(struct evhttp *http, int fd) | ||
492 | { | ||
493 | @@ -2345,6 +2461,25 @@ evhttp_accept_socket(struct evhttp *http, int fd) | ||
494 | return (0); | ||
495 | } | ||
496 | |||
497 | +int | ||
498 | +evhttp_del_accept_socket(struct evhttp *http, int fd) | ||
499 | +{ | ||
500 | + struct evhttp_bound_socket *bound; | ||
501 | + TAILQ_FOREACH(bound, &http->sockets, next) { | ||
502 | + if (bound->bind_ev.ev_fd == fd) | ||
503 | + break; | ||
504 | + } | ||
505 | + | ||
506 | + if (bound == NULL) | ||
507 | + return (-1); | ||
508 | + | ||
509 | + TAILQ_REMOVE(&http->sockets, bound, next); | ||
510 | + event_del(&bound->bind_ev); | ||
511 | + free(bound); | ||
512 | + | ||
513 | + return (0); | ||
514 | +} | ||
515 | + | ||
516 | static struct evhttp* | ||
517 | evhttp_new_object(void) | ||
518 | { | ||
519 | @@ -2527,6 +2662,11 @@ evhttp_request_new(void (*cb)(struct evhttp_request *, void *), void *arg) | ||
520 | void | ||
521 | evhttp_request_free(struct evhttp_request *req) | ||
522 | { | ||
523 | + if (req->referenced) { | ||
524 | + req->referenced = -1; | ||
525 | + return; | ||
526 | + } | ||
527 | + | ||
528 | if (req->remote_host != NULL) | ||
529 | free(req->remote_host); | ||
530 | if (req->uri != NULL) | ||
531 | @@ -2657,13 +2797,78 @@ evhttp_get_request(struct evhttp *http, int fd, | ||
532 | * if we want to accept more than one request on a connection, | ||
533 | * we need to know which http server it belongs to. | ||
534 | */ | ||
535 | - evcon->http_server = http; | ||
536 | - TAILQ_INSERT_TAIL(&http->connections, evcon, next); | ||
537 | + | ||
538 | + evhttp_server_add_connection(http, evcon); | ||
539 | |||
540 | if (evhttp_associate_new_request_with_connection(evcon) == -1) | ||
541 | evhttp_connection_free(evcon); | ||
542 | } | ||
543 | |||
544 | +void | ||
545 | +evhttp_pause(struct evhttp *http) | ||
546 | +{ | ||
547 | + struct evhttp_bound_socket *bound; | ||
548 | + TAILQ_FOREACH(bound, &http->sockets, next) { | ||
549 | + event_del(&bound->bind_ev); | ||
550 | + } | ||
551 | +} | ||
552 | + | ||
553 | +void | ||
554 | +evhttp_resume(struct evhttp *http) | ||
555 | +{ | ||
556 | + struct evhttp_bound_socket *bound; | ||
557 | + TAILQ_FOREACH(bound, &http->sockets, next) { | ||
558 | + event_add(&bound->bind_ev, 0); | ||
559 | + } | ||
560 | +} | ||
561 | + | ||
562 | +int | ||
563 | +evhttp_get_connection_limit(struct evhttp *http) | ||
564 | +{ | ||
565 | + return http->connection_limit; | ||
566 | +} | ||
567 | + | ||
568 | +int | ||
569 | +evhttp_set_connection_limit(struct evhttp *http, int nlimit) | ||
570 | +{ | ||
571 | + int olimit = http->connection_limit; | ||
572 | + http->connection_limit = nlimit; | ||
573 | + return olimit; | ||
574 | +} | ||
575 | + | ||
576 | +int | ||
577 | +evhttp_get_connection_count(struct evhttp *http) | ||
578 | +{ | ||
579 | + return http != NULL ? http->connection_count : 0; | ||
580 | +} | ||
581 | + | ||
582 | +void | ||
583 | +evhttp_server_add_connection(struct evhttp *http, | ||
584 | + struct evhttp_connection *evcon) | ||
585 | +{ | ||
586 | + evcon->http_server = http; | ||
587 | + TAILQ_INSERT_TAIL(&http->connections, evcon, next); | ||
588 | + | ||
589 | + http->connection_count++; | ||
590 | + if (http->connection_limit > 0 | ||
591 | + && http->connection_count >= http->connection_limit) | ||
592 | + { | ||
593 | + evhttp_pause(http); | ||
594 | + } | ||
595 | +} | ||
596 | + | ||
597 | +void | ||
598 | +evhttp_server_drop_connection(struct evhttp_connection *evcon) | ||
599 | +{ | ||
600 | + struct evhttp *http = evcon->http_server; | ||
601 | + TAILQ_REMOVE(&http->connections, evcon, next); | ||
602 | + http->connection_count--; | ||
603 | + if (http->connection_limit > 0 | ||
604 | + && http->connection_count < http->connection_limit) | ||
605 | + { | ||
606 | + evhttp_resume(http); | ||
607 | + } | ||
608 | +} | ||
609 | |||
610 | /* | ||
611 | * Network helper functions that we do not want to export to the rest of | ||
diff --git a/meta-linaro/recipes-extra/libevent/libevent-fb_1.4.14b.bb b/meta-linaro/recipes-extra/libevent/libevent-fb_1.4.14b.bb new file mode 100644 index 0000000..fda0390 --- /dev/null +++ b/meta-linaro/recipes-extra/libevent/libevent-fb_1.4.14b.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | require recipes-support/libevent/libevent_2.0.21.bb | ||
2 | |||
3 | PROVIDES = "libevent" | ||
4 | |||
5 | INC_PR = "1" | ||
6 | |||
7 | SRC_URI = "http://github.com/downloads/libevent/libevent/libevent-${PV}-stable.tar.gz;name=archive \ | ||
8 | http://libevent.org/LICENSE.txt;name=license \ | ||
9 | file://libevent-1.4.14.fb-changes.diff" | ||
10 | |||
11 | SRC_URI[archive.md5sum] = "a00e037e4d3f9e4fe9893e8a2d27918c" | ||
12 | SRC_URI[archive.sha256sum] = "afa61b476a222ba43fc7cca2d24849ab0bbd940124400cb699915d3c60e46301" | ||
13 | |||
14 | SRC_URI[license.md5sum] = "412e611443304db6a338ab32728ae297" | ||
15 | SRC_URI[license.sha256sum] = "55739d5492273a7058c66b682012330a84c34eaa666f5c7030b0312573235270" | ||
16 | |||
17 | |||
18 | S = "${WORKDIR}/libevent-${PV}-stable/" | ||
19 | |||
20 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE.txt;md5=412e611443304db6a338ab32728ae297" | ||
diff --git a/meta-linaro/recipes-extra/lng-network-config/files/70-persistent-net.rules b/meta-linaro/recipes-extra/lng-network-config/files/70-persistent-net.rules new file mode 100644 index 0000000..5a8be41 --- /dev/null +++ b/meta-linaro/recipes-extra/lng-network-config/files/70-persistent-net.rules | |||
@@ -0,0 +1,43 @@ | |||
1 | # lng-amarillo-01 | ||
2 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="66:06:3e:f9:4f:ae", | ||
3 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
4 | |||
5 | # lng-arndale-01 | ||
6 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:8e:8f:32:21:98", | ||
7 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
8 | |||
9 | # lng-arndale-02 | ||
10 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:8c:cc:92:21:98", | ||
11 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
12 | |||
13 | # lng-arndale-03 | ||
14 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:f4:0c:d6:16:33", | ||
15 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
16 | |||
17 | # lng-arndale-04 | ||
18 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:8f:4f:09:5e:44", | ||
19 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
20 | |||
21 | # lng-arndale-05 | ||
22 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:b6:8d:b5:c7:24", | ||
23 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
24 | |||
25 | # lng-generator-01 | ||
26 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="d8:9d:67:26:ae:e8", | ||
27 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
28 | |||
29 | # lng-generator-02 | ||
30 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="d8:9d:67:26:cd:d8", | ||
31 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
32 | |||
33 | # lng-keystone-01 | ||
34 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="c4:ed:ba:99:f4:09", | ||
35 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
36 | |||
37 | # lng-keystone-02 | ||
38 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="c4:ed:ba:9a:8c:47", | ||
39 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
40 | |||
41 | # lng-keystone-03 | ||
42 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="c4:ed:ba:9a:67:60", | ||
43 | ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | ||
diff --git a/meta-linaro/recipes-extra/lng-network-config/lng-network-config_0.1.bb b/meta-linaro/recipes-extra/lng-network-config/lng-network-config_0.1.bb new file mode 100644 index 0000000..2987b04 --- /dev/null +++ b/meta-linaro/recipes-extra/lng-network-config/lng-network-config_0.1.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | SUMMARY = "This package contains LNG specific configuration" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
4 | |||
5 | RDEPENDS_${PN} = "udev" | ||
6 | |||
7 | SRC_URI = "file://70-persistent-net.rules" | ||
8 | |||
9 | do_install() { | ||
10 | install -D -p -m644 ${WORKDIR}/70-persistent-net.rules ${D}/etc/udev/rules.d/70-persistent-net.rules | ||
11 | } | ||
diff --git a/meta-linaro/recipes-extra/lshw/files/cross-compile.patch b/meta-linaro/recipes-extra/lshw/files/cross-compile.patch new file mode 100644 index 0000000..221b7e5 --- /dev/null +++ b/meta-linaro/recipes-extra/lshw/files/cross-compile.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | --- | ||
2 | src/Makefile | 2 +- | ||
3 | src/core/Makefile | 2 +- | ||
4 | src/gui/Makefile | 4 ++-- | ||
5 | 3 files changed, 4 insertions(+), 4 deletions(-) | ||
6 | |||
7 | --- a/src/Makefile | ||
8 | +++ b/src/Makefile | ||
9 | @@ -18,7 +18,7 @@ export MANDIR | ||
10 | export DATADIR | ||
11 | export SQLITE | ||
12 | |||
13 | -CXX?=c++ | ||
14 | +CXX?=$(CROSS_COMPILE)c++ | ||
15 | INCLUDES=-I./core/ | ||
16 | DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" | ||
17 | CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) | ||
18 | --- a/src/core/Makefile | ||
19 | +++ b/src/core/Makefile | ||
20 | @@ -1,6 +1,6 @@ | ||
21 | PACKAGENAME?=lshw | ||
22 | |||
23 | -CXX=c++ | ||
24 | +CXX?=$(CROSS_COMPILE)c++ | ||
25 | INCLUDES= | ||
26 | DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" | ||
27 | CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) | ||
28 | --- a/src/gui/Makefile | ||
29 | +++ b/src/gui/Makefile | ||
30 | @@ -1,7 +1,7 @@ | ||
31 | PACKAGENAME?=lshw | ||
32 | |||
33 | -CXX?=c++ | ||
34 | -CC?=cc | ||
35 | +CXX?=$(CROSS_COMPILE)c++ | ||
36 | +CC?=$(CROSS_COMPILE)cc | ||
37 | STRIP?=strip | ||
38 | OBJCOPY?=objcopy | ||
39 | |||
diff --git a/meta-linaro/recipes-extra/lshw/lshw_02.16.bb b/meta-linaro/recipes-extra/lshw/lshw_02.16.bb new file mode 100644 index 0000000..214d2ba --- /dev/null +++ b/meta-linaro/recipes-extra/lshw/lshw_02.16.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | DESCRIPTION = "A small tool to provide detailed information on the hardware \ | ||
2 | configuration of the machine. It can report exact memory configuration, \ | ||
3 | firmware version, mainboard configuration, CPU version and speed, cache \ | ||
4 | configuration, bus speed, etc. on DMI-capable or EFI systems." | ||
5 | SUMMARY = "Hardware lister" | ||
6 | HOMEPAGE = "http://ezix.org/project/wiki/HardwareLiSter" | ||
7 | SECTION = "console/tools" | ||
8 | LICENSE = "GPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
10 | DEPENDS = "pciutils \ | ||
11 | usbutils" | ||
12 | COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" | ||
13 | |||
14 | PR="r1" | ||
15 | |||
16 | SRC_URI="http://ezix.org/software/files/lshw-B.${PV}.tar.gz \ | ||
17 | file://cross-compile.patch" | ||
18 | |||
19 | SRC_URI[md5sum] = "67479167add605e8f001097c30e96d0d" | ||
20 | SRC_URI[sha256sum] = "809882429555b93259785cc261dbff04c16c93d064db5f445a51945bc47157cb" | ||
21 | |||
22 | S="${WORKDIR}/lshw-B.${PV}" | ||
23 | |||
24 | do_compile() { | ||
25 | # build core only - don't ship gui | ||
26 | oe_runmake -C src core | ||
27 | } | ||
28 | |||
29 | do_install() { | ||
30 | oe_runmake install DESTDIR=${D} | ||
31 | # data files provided by dependencies | ||
32 | rm -rf ${D}/usr/share/lshw | ||
33 | } | ||
diff --git a/meta-linaro/recipes-extra/meta-toolchain-hhvm/meta-toolchain-hhvm.bb b/meta-linaro/recipes-extra/meta-toolchain-hhvm/meta-toolchain-hhvm.bb new file mode 100644 index 0000000..bcb84a5 --- /dev/null +++ b/meta-linaro/recipes-extra/meta-toolchain-hhvm/meta-toolchain-hhvm.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | TOOLCHAIN_TARGET_TASK = "packagegroup-core-standalone-hhvm-sdk-target" | ||
2 | TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-hhvm-${DISTRO_VERSION}" | ||
3 | PROVIDES = "meta-toolchain-sdk" | ||
4 | require recipes-core/meta/meta-toolchain.bb | ||
diff --git a/meta-linaro/recipes-extra/meta-toolchain-hhvm/packagegroup-core-standalone-hhvm-sdk-target.bb b/meta-linaro/recipes-extra/meta-toolchain-hhvm/packagegroup-core-standalone-hhvm-sdk-target.bb new file mode 100644 index 0000000..1445eb4 --- /dev/null +++ b/meta-linaro/recipes-extra/meta-toolchain-hhvm/packagegroup-core-standalone-hhvm-sdk-target.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | SUMMARY = "HipHop VM porting SDK (target tools)" | ||
2 | LICENSE = "MIT" | ||
3 | |||
4 | inherit packagegroup | ||
5 | |||
6 | RDEPENDS_${PN} = "\ | ||
7 | packagegroup-core-standalone-sdk-target \ | ||
8 | binutils-dev \ | ||
9 | binutils-staticdev \ | ||
10 | bison \ | ||
11 | boost-dev \ | ||
12 | boost-staticdev \ | ||
13 | boost \ | ||
14 | bzip2-dev \ | ||
15 | cmake \ | ||
16 | curl-dev \ | ||
17 | elfutils-dev \ | ||
18 | elfutils-staticdev \ | ||
19 | expat \ | ||
20 | flex \ | ||
21 | gd-dev \ | ||
22 | gd-staticdev \ | ||
23 | glog-dev \ | ||
24 | icu-dev \ | ||
25 | libcap-dev \ | ||
26 | libcap-staticdev \ | ||
27 | libc-client-dev \ | ||
28 | libc-client-staticdev \ | ||
29 | libdwarf-dev \ | ||
30 | libdwarf-staticdev \ | ||
31 | libevent-fb-dev \ | ||
32 | libevent-fb-staticdev \ | ||
33 | libglade-dev \ | ||
34 | libmcrypt-dev \ | ||
35 | libmemcached-dev \ | ||
36 | libmemcached-staticdev \ | ||
37 | libmysqlclient-dev \ | ||
38 | libmysqlclient-staticdev \ | ||
39 | libmysqlclient-r-dev \ | ||
40 | libmysqlclient-r-staticdev \ | ||
41 | libpam-dev \ | ||
42 | libpcre-dev \ | ||
43 | libpcre-staticdev \ | ||
44 | libunwind-dev \ | ||
45 | libunwind-staticdev \ | ||
46 | libxml2-dev \ | ||
47 | libxml2-staticdev \ | ||
48 | ncurses-dev \ | ||
49 | ncurses-staticdev \ | ||
50 | onig-dev \ | ||
51 | openldap-dev \ | ||
52 | openssl-dev \ | ||
53 | openssl-staticdev \ | ||
54 | readline-dev \ | ||
55 | tbb-dev \ | ||
56 | zlib-dev \ | ||
57 | " | ||
diff --git a/meta-linaro/recipes-extra/odp/odp.bb b/meta-linaro/recipes-extra/odp/odp.bb new file mode 100644 index 0000000..c62f4dc --- /dev/null +++ b/meta-linaro/recipes-extra/odp/odp.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | DESCRIPTION = "OpenDataPlane (ODP) provides a data plane application programming \ | ||
2 | environment that is easy to use, high performance, and portable between networking SoCs." | ||
3 | HOMEPAGE = "http://www.opendataplane.org" | ||
4 | SECTION = "console/network" | ||
5 | |||
6 | LICENSE = "BSD | GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4ccfa994aa96974cfcd39a59faee20a2" | ||
8 | PV = "20140820+git${SRCPV}" | ||
9 | |||
10 | DEPENDS = "openssl" | ||
11 | |||
12 | SRC_URI = "git://git.linaro.org/lng/odp.git;name=odp" | ||
13 | |||
14 | SRCREV_odp = "26238333b5b0896366c844aeb7253e60abd99f5a" | ||
15 | SRCREV_FORMAT = "odp" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit autotools | ||
20 | |||
21 | RDEPENDS_${PN} = "libcrypto" | ||
22 | |||
23 | # ODP primary shipped as static library plus some API test and samples/ | ||
24 | FILES_${PN}-staticdev += "${datadir}/opendataplane/*.la" | ||
diff --git a/meta-linaro/recipes-extra/powerdebug/powerdebug_0.7.3.bb b/meta-linaro/recipes-extra/powerdebug/powerdebug_0.7.3.bb new file mode 100644 index 0000000..9b6f3a0 --- /dev/null +++ b/meta-linaro/recipes-extra/powerdebug/powerdebug_0.7.3.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | DESCRIPTION = "tool to display regulator, sensor and clock information" | ||
2 | SUMMARY = "PowerDebug is a tool to display regulator, sensor and clock \ | ||
3 | information. Data is refreshed every few seconds. There is also dump option \ | ||
4 | to display the information just once." | ||
5 | LICENSE = "EPL-1.0" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=cdd7b8fa70e88be67e325baae3b8ee95" | ||
7 | DEPENDS = "ncurses" | ||
8 | |||
9 | MMYY = "14.06" | ||
10 | RELEASE = "20${MMYY}" | ||
11 | |||
12 | SRC_URI = "http://releases.linaro.org/${MMYY}/components/power-management/powerdebug/linaro-powerdebug-${PV}-${RELEASE}.tar.bz2" | ||
13 | |||
14 | SRC_URI[md5sum] = "f381946c5ca2f8075ed1bedc5f2a2876" | ||
15 | SRC_URI[sha256sum] = "bfc4c92d8a8a1c8ee208a12310d3c763f111cf76d283facedb7ef56cafd074a1" | ||
16 | |||
17 | S = "${WORKDIR}/powerdebug-${PV}-${RELEASE}" | ||
18 | |||
19 | do_install () { | ||
20 | install -D -p -m0755 powerdebug ${D}/${sbindir}/powerdebug | ||
21 | install -D -p -m0644 powerdebug.8 ${D}${mandir}/man8/powerdebug.8 | ||
22 | } | ||
diff --git a/meta-linaro/recipes-extra/stress/files/texinfo.patch b/meta-linaro/recipes-extra/stress/files/texinfo.patch new file mode 100644 index 0000000..5ac5951 --- /dev/null +++ b/meta-linaro/recipes-extra/stress/files/texinfo.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | --- a/doc/stress.texi | ||
2 | +++ b/doc/stress.texi | ||
3 | @@ -62,47 +62,47 @@ | ||
4 | |||
5 | @table @samp | ||
6 | @item -? | ||
7 | -@itemx --help | ||
8 | +@item --help | ||
9 | Show help information. | ||
10 | |||
11 | -@itemx --version | ||
12 | +@item --version | ||
13 | Show version information. | ||
14 | |||
15 | @item -v | ||
16 | -@itemx --verbose | ||
17 | +@item --verbose | ||
18 | Turn up verbosity. | ||
19 | |||
20 | @item -q | ||
21 | -@itemx --quiet | ||
22 | +@item --quiet | ||
23 | Turn down verbosity. | ||
24 | |||
25 | @item -n | ||
26 | -@itemx --dry-run | ||
27 | +@item --dry-run | ||
28 | Show what would have been done. | ||
29 | |||
30 | @item -t @var{secs} | ||
31 | -@itemx --timeout @var{secs} | ||
32 | +@item --timeout @var{secs} | ||
33 | Time out after @var{secs} seconds. | ||
34 | |||
35 | -@itemx --backoff @var{usecs} | ||
36 | +@item --backoff @var{usecs} | ||
37 | Wait for factor of @var{usecs} microseconds before starting work. | ||
38 | |||
39 | @item -c @var{forks} | ||
40 | -@itemx --cpu @var{forks} | ||
41 | +@item --cpu @var{forks} | ||
42 | Spawn @var{forks} processes each spinning on @samp{sqrt()}. | ||
43 | |||
44 | @item -i @var{forks} | ||
45 | -@itemx --io @var{forks} | ||
46 | +@item --io @var{forks} | ||
47 | Spawn @var{forks} processes each spinning on @samp{sync()}. | ||
48 | |||
49 | @item -m @var{forks} | ||
50 | -@itemx --vm @var{forks} | ||
51 | +@item --vm @var{forks} | ||
52 | Spawn @var{forks} processes each spinning on @samp{malloc()}. | ||
53 | |||
54 | -@itemx --vm-bytes @var{bytes} | ||
55 | +@item --vm-bytes @var{bytes} | ||
56 | Allocate @var{bytes} number of bytes. The default is 1. | ||
57 | |||
58 | -@itemx --vm-hang | ||
59 | +@item --vm-hang | ||
60 | Instruct each vm hog process to go to sleep after allocating memory. This | ||
61 | contrasts with their normal behavior, which is to free the memory and | ||
62 | reallocate @emph{ad infinitum}. This is useful for simulating low memory | ||
63 | @@ -114,13 +114,13 @@ | ||
64 | @end example | ||
65 | |||
66 | @item -d @var{forks} | ||
67 | -@itemx --hdd @var{forks} | ||
68 | +@item --hdd @var{forks} | ||
69 | Spawn @var{forks} processes each spinning on @samp{write()}. | ||
70 | |||
71 | -@itemx --hdd-bytes @var{bytes} | ||
72 | +@item --hdd-bytes @var{bytes} | ||
73 | Write @var{bytes} number of bytes. The default is 1GB. | ||
74 | |||
75 | -@itemx --hdd-noclean | ||
76 | +@item --hdd-noclean | ||
77 | Do not unlink file(s) to which random ASCII data is written. | ||
78 | |||
79 | @end table | ||
diff --git a/meta-linaro/recipes-extra/stress/stress_1.0.4.bb b/meta-linaro/recipes-extra/stress/stress_1.0.4.bb new file mode 100644 index 0000000..44f2fc6 --- /dev/null +++ b/meta-linaro/recipes-extra/stress/stress_1.0.4.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \ | ||
2 | imposes a configurable amount of CPU, memory, I/O, and disk stress on the system." | ||
3 | HOMEPAGE = "http://people.seas.harvard.edu/~apw/stress/" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
6 | |||
7 | SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/stress/stress-${PV}.tar.gz/a607afa695a511765b40993a64c6e2f4/stress-${PV}.tar.gz \ | ||
8 | file://texinfo.patch \ | ||
9 | " | ||
10 | |||
11 | SRC_URI[md5sum] = "a607afa695a511765b40993a64c6e2f4" | ||
12 | SRC_URI[sha256sum] = "369c997f65e8426ae8b318d4fdc8e6f07a311cfa77cc4b25dace465c582163c0" | ||
13 | |||
14 | inherit autotools | ||
diff --git a/meta-linaro/recipes-extra/trinity/trinity_1.3.bb b/meta-linaro/recipes-extra/trinity/trinity_1.3.bb new file mode 100644 index 0000000..a4f2777 --- /dev/null +++ b/meta-linaro/recipes-extra/trinity/trinity_1.3.bb | |||
@@ -0,0 +1,42 @@ | |||
1 | SUMMARY = "a Linux System call fuzz teste." | ||
2 | DESCRIPTION = "Trinity, a Linux System call fuzz tester." | ||
3 | HOMEPAGE = "http://codemonkey.org.uk/projects/trinity/" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=96094d47cfbd2cc45eb46ce0fc423c04" | ||
6 | |||
7 | COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" | ||
8 | |||
9 | # v1.3 tag | ||
10 | SRCREV = "7f333fdbb1933e38a67aa136cbf6a1e5df06c775" | ||
11 | SRC_URI = "git://github.com/kernelslacker/trinity.git;protocol=https \ | ||
12 | " | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | inherit useradd | ||
17 | |||
18 | USERADD_PACKAGES = "${PN}" | ||
19 | USERADD_PARAM_${PN} = "--system --create-home --shell /bin/sh ${PN} " | ||
20 | |||
21 | do_configure () { | ||
22 | ./configure.sh | ||
23 | } | ||
24 | |||
25 | # workaround random build failures | ||
26 | do_compile () { | ||
27 | ${MAKE} | ||
28 | } | ||
29 | |||
30 | do_install () { | ||
31 | oe_runmake install DESTDIR=${D}/usr | ||
32 | install -o ${PN} -d -m 0755 ${D}/${datadir}/${PN} | ||
33 | install -o ${PN} -m 0755 ${S}/scripts/test-all-syscalls-parallel.sh ${D}/${datadir}/${PN} | ||
34 | install -o ${PN} -m 0755 ${S}/scripts/test-all-syscalls-sequentially.sh ${D}/${datadir}/${PN} | ||
35 | install -o ${PN} -m 0755 ${S}/scripts/test-multi.sh ${D}/${datadir}/${PN} | ||
36 | install -o ${PN} -m 0755 ${S}/scripts/test-vm.sh ${D}/${datadir}/${PN} | ||
37 | } | ||
38 | |||
39 | PACKAGES =+ "${PN}-example" | ||
40 | |||
41 | FILES_${PN} = "${bindir}/trinity" | ||
42 | FILES_${PN}-example = "${datadir}/${PN}" | ||
diff --git a/meta-linaro/recipes-extra/usecpu/usecpu_git.bb b/meta-linaro/recipes-extra/usecpu/usecpu_git.bb new file mode 100644 index 0000000..69c4677 --- /dev/null +++ b/meta-linaro/recipes-extra/usecpu/usecpu_git.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "Uses the CPU" | ||
2 | DESCRIPTION = "This program uses the CPU on a System" | ||
3 | LICENSE = "GPLv2+" | ||
4 | LIC_FILES_CHKSUM = "file://use_cpu.c;endline=39;md5=f39117026e553ebdce39f633b7b92f9f" | ||
5 | SRCREV = "e246c70aa6cac5df0e593ef3416380ff75a70dc0" | ||
6 | PV = "0.1+git${SRCPV}" | ||
7 | |||
8 | SRC_URI = "git://git.linaro.org/lng/usecpu.git" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | do_compile() { | ||
13 | oe_runmake use_cpu | ||
14 | } | ||
15 | |||
16 | do_install() { | ||
17 | install -D -p -m0755 use_cpu ${D}${bindir}/use_cpu | ||
18 | } | ||