summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-bsp/apmd/apmd/apmd.service (renamed from meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd.service)0
-rw-r--r--meta/recipes-bsp/apmd/apmd/apmd_proxy (renamed from meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy)0
-rw-r--r--meta/recipes-bsp/apmd/apmd/apmd_proxy.conf (renamed from meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy.conf)0
-rw-r--r--meta/recipes-bsp/apmd/apmd/default (renamed from meta/recipes-bsp/apmd/apmd-3.2.2-14/default)0
-rwxr-xr-xmeta/recipes-bsp/apmd/apmd/init (renamed from meta/recipes-bsp/apmd/apmd-3.2.2-14/init)0
-rw-r--r--meta/recipes-bsp/apmd/apmd/legacy.patch133
-rw-r--r--meta/recipes-bsp/apmd/apmd/libtool.patch (renamed from meta/recipes-bsp/apmd/apmd-3.2.2-14/libtool.patch)0
-rw-r--r--meta/recipes-bsp/apmd/apmd/unlinux.patch (renamed from meta/recipes-bsp/apmd/apmd-3.2.2-14/unlinux.patch)0
-rw-r--r--meta/recipes-bsp/apmd/apmd_3.2.2-15.bb (renamed from meta/recipes-bsp/apmd/apmd_3.2.2-14.bb)6
9 files changed, 134 insertions, 5 deletions
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd.service b/meta/recipes-bsp/apmd/apmd/apmd.service
index ffab82334f..ffab82334f 100644
--- a/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd.service
+++ b/meta/recipes-bsp/apmd/apmd/apmd.service
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy b/meta/recipes-bsp/apmd/apmd/apmd_proxy
index c48ee4e5d5..c48ee4e5d5 100644
--- a/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy
+++ b/meta/recipes-bsp/apmd/apmd/apmd_proxy
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy.conf b/meta/recipes-bsp/apmd/apmd/apmd_proxy.conf
index 751145c522..751145c522 100644
--- a/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy.conf
+++ b/meta/recipes-bsp/apmd/apmd/apmd_proxy.conf
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/default b/meta/recipes-bsp/apmd/apmd/default
index 4b7965abf8..4b7965abf8 100644
--- a/meta/recipes-bsp/apmd/apmd-3.2.2-14/default
+++ b/meta/recipes-bsp/apmd/apmd/default
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/init b/meta/recipes-bsp/apmd/apmd/init
index c0b41aa9d1..c0b41aa9d1 100755
--- a/meta/recipes-bsp/apmd/apmd-3.2.2-14/init
+++ b/meta/recipes-bsp/apmd/apmd/init
diff --git a/meta/recipes-bsp/apmd/apmd/legacy.patch b/meta/recipes-bsp/apmd/apmd/legacy.patch
new file mode 100644
index 0000000000..5db895e8fe
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd/legacy.patch
@@ -0,0 +1,133 @@
1From 3595933d221f0ba836917debc0776b8723972ec9 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 11 Aug 2015 17:40:50 +0300
4Subject: [PATCH 1/3] Patch with fixes provided by Debian.
5
6This patch is taken from
7ftp://ftp.debian.org/debian/pool/main/a/apmd/apmd_3.2.2-15.debian.tar.xz
8
9Upstream-Status: Inappropriate [upstream is dead]
10Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
11
12---
13 Makefile | 2 +-
14 apm.c | 3 ++-
15 apm.h | 9 +++++++++
16 apmd.c | 15 ++++++++-------
17 4 files changed, 20 insertions(+), 9 deletions(-)
18
19diff --git a/Makefile b/Makefile
20index bf346d9..92fc0fd 100644
21--- a/Makefile
22+++ b/Makefile
23@@ -43,7 +43,7 @@ DESTDIR=
24
25 CC=gcc
26 CFLAGS=-O -g
27-XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include \
28+XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include -I/usr/X11R6/include \
29 -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include \
30 -DVERSION=\"$(VERSION)\" \
31 -DDEFAULT_PROXY_NAME=\"$(PROXY_DIR)/apmd_proxy\"
32diff --git a/apm.c b/apm.c
33index b21c057..0359b1c 100644
34--- a/apm.c
35+++ b/apm.c
36@@ -219,12 +219,13 @@ int main(int argc, char **argv)
37 }
38 }
39
40-
41+#if 0
42 if (!(i.apm_flags & APM_32_BIT_SUPPORT))
43 {
44 fprintf(stderr, "32-bit APM interface not supported\n");
45 exit(1);
46 }
47+#endif
48
49 if (verbose && (i.apm_flags & 0x10))
50 printf("APM BIOS Power Management is currently disabled\n");
51diff --git a/apm.h b/apm.h
52index fb24dfd..824cc06 100644
53--- a/apm.h
54+++ b/apm.h
55@@ -20,6 +20,13 @@
56 * $Id: apm.h,v 1.7 1999/07/05 22:31:11 apenwarr Exp $
57 *
58 */
59+#ifndef _APM_H
60+#define _APM_H 1
61+
62+#ifndef __KERNEL_STRICT_NAMES
63+#define __KERNEL_STRICT_NAMES
64+#endif
65+
66 #include <linux/apm_bios.h>
67 #include <sys/types.h>
68
69@@ -93,3 +100,5 @@ extern int apm_reject(int fd);
70 #else
71 #define apm_reject(fd) (-EINVAL)
72 #endif
73+
74+#endif
75diff --git a/apmd.c b/apmd.c
76index 49ed3a1..560f536 100644
77--- a/apmd.c
78+++ b/apmd.c
79@@ -343,7 +343,7 @@ static int call_proxy(apm_event_t event)
80 /* parent */
81 int status, retval;
82 ssize_t len;
83- time_t time_limit;
84+ time_t countdown;
85
86 if (pid < 0) {
87 /* Couldn't fork */
88@@ -356,8 +356,9 @@ static int call_proxy(apm_event_t event)
89 /* Capture the child's output, if any, but only until it terminates */
90 close(fds[1]);
91 fcntl(fds[0], F_SETFL, O_RDONLY|O_NONBLOCK);
92- time_limit = time(0) + proxy_timeout;
93+ countdown = proxy_timeout;
94 do {
95+ countdown -= 1;
96 while ((len = read(fds[0], line, sizeof(line)-1)) > 0) {
97 line[len] = 0;
98 APMD_SYSLOG(LOG_INFO, "+ %s", line);
99@@ -372,16 +373,16 @@ static int call_proxy(apm_event_t event)
100 goto proxy_done;
101 }
102
103- sleep(1);
104+ while (sleep(1) > 0) ;
105 } while (
106- (time(0) < time_limit)
107+ (countdown >= 0)
108 || (proxy_timeout < 0)
109 );
110
111 APMD_SYSLOG(LOG_NOTICE, "Proxy has been running more than %d seconds; killing it", proxy_timeout);
112
113 kill(pid, SIGTERM);
114- time_limit = time(0) + 5;
115+ countdown = 5;
116 do {
117 retval = waitpid(pid, &status, WNOHANG);
118 if (retval == pid)
119@@ -392,9 +393,9 @@ static int call_proxy(apm_event_t event)
120 goto proxy_done;
121 }
122
123- sleep(1);
124+ while (sleep(1) > 0) ;
125
126- } while (time(0) < time_limit);
127+ } while (countdown >= 0);
128
129 kill(pid, SIGKILL);
130 status = __W_EXITCODE(0, SIGKILL);
131--
1322.1.4
133
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/libtool.patch b/meta/recipes-bsp/apmd/apmd/libtool.patch
index 834ee080a1..834ee080a1 100644
--- a/meta/recipes-bsp/apmd/apmd-3.2.2-14/libtool.patch
+++ b/meta/recipes-bsp/apmd/apmd/libtool.patch
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/unlinux.patch b/meta/recipes-bsp/apmd/apmd/unlinux.patch
index ec8206cf17..ec8206cf17 100644
--- a/meta/recipes-bsp/apmd/apmd-3.2.2-14/unlinux.patch
+++ b/meta/recipes-bsp/apmd/apmd/unlinux.patch
diff --git a/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb b/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
index 65dd01b229..ea105268a6 100644
--- a/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb
+++ b/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
@@ -8,10 +8,9 @@ LICENSE = "GPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ 8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
9 file://apm.h;beginline=6;endline=18;md5=7d4acc1250910a89f84ce3cc6557c4c2" 9 file://apm.h;beginline=6;endline=18;md5=7d4acc1250910a89f84ce3cc6557c4c2"
10DEPENDS = "libtool-cross" 10DEPENDS = "libtool-cross"
11PR = "r2"
12 11
13SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \ 12SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \
14 ${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.diff.gz;name=patch \ 13 file://legacy.patch \
15 file://libtool.patch \ 14 file://libtool.patch \
16 file://unlinux.patch \ 15 file://unlinux.patch \
17 file://init \ 16 file://init \
@@ -23,9 +22,6 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \
23SRC_URI[tarball.md5sum] = "b1e6309e8331e0f4e6efd311c2d97fa8" 22SRC_URI[tarball.md5sum] = "b1e6309e8331e0f4e6efd311c2d97fa8"
24SRC_URI[tarball.sha256sum] = "7f7d9f60b7766b852881d40b8ff91d8e39fccb0d1d913102a5c75a2dbb52332d" 23SRC_URI[tarball.sha256sum] = "7f7d9f60b7766b852881d40b8ff91d8e39fccb0d1d913102a5c75a2dbb52332d"
25 24
26SRC_URI[patch.md5sum] = "57e1b689264ea80f78353519eece0c92"
27SRC_URI[patch.sha256sum] = "7905ff96be93d725544d0040e425c42f9c05580db3c272f11cff75b9aa89d430"
28
29S = "${WORKDIR}/apmd-3.2.2.orig" 25S = "${WORKDIR}/apmd-3.2.2.orig"
30 26
31inherit update-rc.d systemd 27inherit update-rc.d systemd