package/bmx7: new package

This patch will provide an initial package for bmx7 project.

Signed-off-by: José Pekkarinen <jose.pekkarinen@unikie.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
José Pekkarinen 2021-12-10 16:12:05 +02:00 committed by Thomas Petazzoni
parent ae2c55df06
commit 8e06506577
8 changed files with 133 additions and 0 deletions

View File

@ -1485,6 +1485,7 @@ F: package/zfs/
F: support/testing/tests/package/test_zfs.py
N: José Pekkarinen <jose.pekkarinen@unikie.com>
F: package/bmx7/
F: package/softhsm2/
N: Joseph Kogut <joseph.kogut@gmail.com>

View File

@ -2145,6 +2145,7 @@ endif
source "package/bluez-tools/Config.in"
source "package/bluez5_utils/Config.in"
source "package/bmon/Config.in"
source "package/bmx7/Config.in"
source "package/boinc/Config.in"
source "package/brcm-patchram-plus/Config.in"
source "package/bridge-utils/Config.in"

View File

@ -0,0 +1,28 @@
From f16fa9796e05ca9ea6ee764b3c1f0b8baed535e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Pekkarinen?= <jose.pekkarinen@unikie.com>
Date: Fri, 10 Dec 2021 14:35:45 +0200
Subject: [PATCH] Fix schedule.c:378:36: error: 'SIOCGSTAMP' undeclared
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: José Pekkarinen <jose.pekkarinen@unikie.com>
---
src/schedule.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/schedule.c b/src/schedule.c
index 8868b01..09ab248 100644
--- a/src/schedule.c
+++ b/src/schedule.c
@@ -23,6 +23,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <linux/sockios.h>
#include "list.h"
--
2.30.2

View File

@ -0,0 +1,29 @@
From 974541b80bf8d7ec78ed9214a1b541957670f9cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Pekkarinen?= <jose.pekkarinen@unikie.com>
Date: Fri, 10 Dec 2021 14:36:55 +0200
Subject: [PATCH] Fix linking error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: José Pekkarinen <jose.pekkarinen@unikie.com>
---
src/bmx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bmx.h b/src/bmx.h
index 4269903..7789f7f 100644
--- a/src/bmx.h
+++ b/src/bmx.h
@@ -290,7 +290,7 @@ enum ADGSN {
#define SUCCESS 0
#define FAILURE -1
-const void* FAILURE_PTR;
+extern const void* FAILURE_PTR;
#define MAX_SELECT_TIMEOUT_MS 1100 /* MUST be smaller than (1000/2) to fit into max tv_usec */
--
2.30.2

View File

@ -0,0 +1,35 @@
From fc13da06c1de4d085e21dc2bf45e1e95eb6145d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Pekkarinen?= <jose.pekkarinen@unikie.com>
Date: Fri, 10 Dec 2021 14:37:37 +0200
Subject: [PATCH] Reorder includes to avoid ethhdr collision
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: José Pekkarinen <jose.pekkarinen@unikie.com>
---
src/ip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ip.c b/src/ip.c
index cd50074..4198e92 100644
--- a/src/ip.c
+++ b/src/ip.c
@@ -43,13 +43,13 @@
#include <net/if_arp.h>
#include <linux/if_tunnel.h>
-#include <linux/if_tun.h> /* TUNSETPERSIST, ... */
#include <linux/ip6_tunnel.h>
#ifndef BMX7_LIB_IWINFO
#define BMX7_LIB_IW
#include <iwlib.h>
#endif
+#include <linux/if_tun.h> /* TUNSETPERSIST, ... */
//#include <iwlib.h>
// apt-get install libiw-dev
//#include <math.h>
--
2.30.2

15
package/bmx7/Config.in Normal file
View File

@ -0,0 +1,15 @@
config BR2_PACKAGE_BMX7
bool "bmx7"
depends on !BR2_STATIC_LIBS # dlopen()
select BR2_PACKAGE_ZLIB
select BR2_PACKAGE_MBEDTLS
select BR2_PACKAGE_WIRELESS_TOOLS
select BR2_PACKAGE_WIRELESS_TOOLS_LIB
help
BMX7 is a mesh routing protocol for Linux based
operating systems.
https://github.com/bmx-routing/bmx7
comment "bmx7 needs a toolchain with dynamic library support"
depends on BR2_STATIC_LIBS

3
package/bmx7/bmx7.hash Normal file
View File

@ -0,0 +1,3 @@
# Locally computed
sha256 5f88df1c95e5cb842a6016bb1604e3e7f6097c63c5c9916edc3c84e96d4f5f65 bmx7-7.1.1.tar.gz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE

21
package/bmx7/bmx7.mk Normal file
View File

@ -0,0 +1,21 @@
################################################################################
#
# bmx7
#
################################################################################
BMX7_VERSION = 7.1.1
BMX7_SITE = $(call github,bmx-routing,bmx7,v$(BMX7_VERSION))
BMX7_LICENSE = GPL-2.0
BMX7_LICENSE_FILES = LICENSE
BMX7_DEPENDENCIES = zlib mbedtls wireless_tools
define BMX7_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/$(d)/src
endef
define BMX7_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/src/bmx7 $(TARGET_DIR)/usr/bin/bmx7
endef
$(eval $(generic-package))