update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed
|
||||
since released versions of uClibc don't support isfdtype().
|
||||
|
||||
Signed-off-by: Gustavo Zaarias <gustavo@zacarias.com.ar>
|
||||
|
||||
diff -Nura acpid-2.0.22.orig/sock.c acpid-2.0.22/sock.c
|
||||
--- acpid-2.0.22.orig/sock.c 2014-04-22 18:04:19.706841764 -0300
|
||||
+++ acpid-2.0.22/sock.c 2014-04-22 18:05:08.285479625 -0300
|
||||
@@ -53,7 +53,10 @@
|
||||
int
|
||||
is_socket(int fd)
|
||||
{
|
||||
- return (isfdtype(fd, S_IFSOCK) == 1);
|
||||
+ int v;
|
||||
+ socklen_t l = sizeof(int);
|
||||
+
|
||||
+ return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
|
||||
}
|
||||
|
||||
/* accept a new client connection */
|
||||
@@ -0,0 +1,40 @@
|
||||
Add missing MSG_CMSG_CLOEXEC
|
||||
|
||||
Unpatched uClibc toolchains, even using the latest 0.9.33.2, do not
|
||||
have the MSG_CMSG_CLOEXEC definition. Even though the Buildroot
|
||||
internal toolchain backend has a uClibc patch to provide it, it
|
||||
doesn't apply to external toolchains. This patch provides the
|
||||
definition of MSG_CMSG_CLOEXEC.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
Index: b/libnetlink.h
|
||||
===================================================================
|
||||
--- a/libnetlink.h
|
||||
+++ b/libnetlink.h
|
||||
@@ -7,6 +7,10 @@
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
|
||||
+#ifndef MSG_CMSG_CLOEXEC
|
||||
+#define MSG_CMSG_CLOEXEC 0x40000000
|
||||
+#endif
|
||||
+
|
||||
struct rtnl_handle
|
||||
{
|
||||
int fd;
|
||||
Index: b/kacpimon/libnetlink.h
|
||||
===================================================================
|
||||
--- a/kacpimon/libnetlink.h
|
||||
+++ b/kacpimon/libnetlink.h
|
||||
@@ -7,6 +7,10 @@
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
|
||||
+#ifndef MSG_CMSG_CLOEXEC
|
||||
+#define MSG_CMSG_CLOEXEC 0x40000000
|
||||
+#endif
|
||||
+
|
||||
struct rtnl_handle
|
||||
{
|
||||
int fd;
|
||||
10
bsp/buildroot-2017.02.11/package/acpid/Config.in
Normal file
10
bsp/buildroot-2017.02.11/package/acpid/Config.in
Normal file
@@ -0,0 +1,10 @@
|
||||
config BR2_PACKAGE_ACPID
|
||||
bool "acpid"
|
||||
depends on BR2_x86_64 || BR2_i386
|
||||
help
|
||||
Advanced Configuration and Power Interface event daemon.
|
||||
|
||||
Acpid is designed to notify user-space programs of ACPI events,
|
||||
and allows you to configure specific actions for specific events.
|
||||
|
||||
http://sourceforge.net/projects/acpid2/
|
||||
22
bsp/buildroot-2017.02.11/package/acpid/S02acpid
Executable file
22
bsp/buildroot-2017.02.11/package/acpid/S02acpid
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting acpid: "
|
||||
start-stop-daemon -S -q -m -b -p /var/run/acpid.pid --exec /usr/sbin/acpid -- -n
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping acpid: "
|
||||
start-stop-daemon -K -q -p /var/run/acpid.pid
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
restart)
|
||||
"$0" stop
|
||||
sleep 1
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
;;
|
||||
esac
|
||||
3
bsp/buildroot-2017.02.11/package/acpid/acpid.hash
Normal file
3
bsp/buildroot-2017.02.11/package/acpid/acpid.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# From https://sourceforge.net/projects/acpid2/files/
|
||||
md5 0432407b5ff75ae8e08afb43052fde2b acpid-2.0.28.tar.xz
|
||||
sha1 a5cb34d53eb6965293c436db23dc81550273975b acpid-2.0.28.tar.xz
|
||||
26
bsp/buildroot-2017.02.11/package/acpid/acpid.mk
Normal file
26
bsp/buildroot-2017.02.11/package/acpid/acpid.mk
Normal file
@@ -0,0 +1,26 @@
|
||||
################################################################################
|
||||
#
|
||||
# acpid
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ACPID_VERSION = 2.0.28
|
||||
ACPID_SOURCE = acpid-$(ACPID_VERSION).tar.xz
|
||||
ACPID_SITE = http://downloads.sourceforge.net/project/acpid2
|
||||
ACPID_LICENSE = GPLv2+
|
||||
ACPID_LICENSE_FILES = COPYING
|
||||
|
||||
define ACPID_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/acpid/S02acpid \
|
||||
$(TARGET_DIR)/etc/init.d/S02acpid
|
||||
endef
|
||||
|
||||
define ACPID_SET_EVENTS
|
||||
mkdir -p $(TARGET_DIR)/etc/acpi/events
|
||||
printf "event=button[ /]power\naction=/sbin/poweroff\n" \
|
||||
>$(TARGET_DIR)/etc/acpi/events/powerbtn
|
||||
endef
|
||||
|
||||
ACPID_POST_INSTALL_TARGET_HOOKS += ACPID_SET_EVENTS
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user