Update buidlroot to version 2016.08.1
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
From 723bbfd8bdb76012a3da937c7499cf3c0b111dd5 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Sat, 20 Aug 2016 11:13:56 +0200
|
||||
Subject: [PATCH] kernel_netlink.c: don't include <linux/if_bridge.h>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Including <linux/if_bridge.h> causes the inclusion of <linux/in6.h>,
|
||||
which defines 'struct in6_addr', also defined in <netinet/in.h>, causing
|
||||
a build failure with the musl C library:
|
||||
|
||||
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_bridge.h:18:0,
|
||||
from kernel_netlink.c:42,
|
||||
from kernel.c:31:
|
||||
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’
|
||||
struct in6_addr {
|
||||
^
|
||||
In file included from kernel_netlink.c:33:0,
|
||||
from kernel.c:31:
|
||||
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: note: originally defined here
|
||||
struct in6_addr {
|
||||
^
|
||||
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_bridge.h:18:0,
|
||||
from kernel_netlink.c:42,
|
||||
from kernel.c:31:
|
||||
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:49:8: error: redefinition of ‘struct sockaddr_in6’
|
||||
struct sockaddr_in6 {
|
||||
^
|
||||
In file included from kernel_netlink.c:33:0,
|
||||
from kernel.c:31:
|
||||
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: note: originally defined here
|
||||
struct sockaddr_in6 {
|
||||
^
|
||||
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_bridge.h:18:0,
|
||||
from kernel_netlink.c:42,
|
||||
from kernel.c:31:
|
||||
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:59:8: error: redefinition of ‘struct ipv6_mreq’
|
||||
struct ipv6_mreq {
|
||||
^
|
||||
In file included from kernel_netlink.c:33:0,
|
||||
from kernel.c:31:
|
||||
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: note: originally defined here
|
||||
struct ipv6_mreq {
|
||||
^
|
||||
|
||||
In order to address this, this patch removes the <linux/if_bridge.h>
|
||||
inclusion, and instead defines BRCTL_GET_BRIDGES to the appropriate
|
||||
value if it's not provided by the C library.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
kernel_netlink.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kernel_netlink.c b/kernel_netlink.c
|
||||
index 4eadc39..1a5b3dd 100644
|
||||
--- a/kernel_netlink.c
|
||||
+++ b/kernel_netlink.c
|
||||
@@ -39,10 +39,14 @@ THE SOFTWARE.
|
||||
#include <sys/socket.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
-#include <linux/if_bridge.h>
|
||||
#include <linux/fib_rules.h>
|
||||
#include <net/if_arp.h>
|
||||
|
||||
+/* From <linux/if_bridge.h> */
|
||||
+#ifndef BRCTL_GET_BRIDGES
|
||||
+#define BRCTL_GET_BRIDGES 1
|
||||
+#endif
|
||||
+
|
||||
#if(__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 5)
|
||||
#define RTA_TABLE 15
|
||||
#endif
|
||||
--
|
||||
2.7.4
|
||||
|
||||
8
bsp/buildroot/package/babeld/Config.in
Normal file
8
bsp/buildroot/package/babeld/Config.in
Normal file
@@ -0,0 +1,8 @@
|
||||
config BR2_PACKAGE_BABELD
|
||||
bool "babeld"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
Babel is a loop-avoiding distance-vector routing protocol for IPv6
|
||||
and IPv4 with fast convergence properties.
|
||||
|
||||
http://www.pps.univ-paris-diderot.fr/~jch/software/babel/
|
||||
40
bsp/buildroot/package/babeld/S50babeld
Normal file
40
bsp/buildroot/package/babeld/S50babeld
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Starts babeld.
|
||||
#
|
||||
|
||||
# Allow a few customizations from a config file
|
||||
test -r /etc/default/babeld && . /etc/default/babeld
|
||||
|
||||
start() {
|
||||
printf "Starting babeld: "
|
||||
start-stop-daemon -S -q -p /run/babeld.pid \
|
||||
--exec /usr/sbin/babeld -- $DAEMON_ARGS
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
stop() {
|
||||
printf "Stopping babeld: "
|
||||
start-stop-daemon -K -q -p /run/babeld.pid
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
2
bsp/buildroot/package/babeld/babeld.hash
Normal file
2
bsp/buildroot/package/babeld/babeld.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed
|
||||
sha256 2c955e7d4ad971da1e860e5cedbaf1dd79903468ff6488b3f67102b2a8d087b6 babeld-1.7.1.tar.gz
|
||||
35
bsp/buildroot/package/babeld/babeld.mk
Normal file
35
bsp/buildroot/package/babeld/babeld.mk
Normal file
@@ -0,0 +1,35 @@
|
||||
################################################################################
|
||||
#
|
||||
# babeld
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BABELD_VERSION = 1.7.1
|
||||
BABELD_SITE = http://www.pps.univ-paris-diderot.fr/~jch/software/files
|
||||
BALELD_LICENSE = MIT
|
||||
BALELD_LICENSE_FILES = LICENSE
|
||||
|
||||
define BABELD_BUILD_CMDS
|
||||
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
|
||||
endef
|
||||
|
||||
define BABELD_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 755 $(@D)/babeld $(TARGET_DIR)/usr/sbin/babeld
|
||||
endef
|
||||
|
||||
define BABELD_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 755 package/babeld/S50babeld \
|
||||
$(TARGET_DIR)/etc/init.d/S50babeld
|
||||
endef
|
||||
|
||||
define BABELD_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/babeld/babeld.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/babeld.service
|
||||
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
|
||||
ln -fs ../../../../usr/lib/systemd/system/babeld.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/babeld.service
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
10
bsp/buildroot/package/babeld/babeld.service
Normal file
10
bsp/buildroot/package/babeld/babeld.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Babel daemon
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/default/babeld
|
||||
ExecStart=/usr/sbin/babeld $DAEMON_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user