initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
From ec1c348b4fd67619fa0c2f55ae644f6a8014d971 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 19 Sep 2021 21:17:44 +0200
|
||||
Subject: build: Add reallocarray to missing.h
|
||||
|
||||
reallocarray has been added to glibc relatively recently (version 2.26,
|
||||
from 2017) and apparently not all users run new enough glibc. Moreover,
|
||||
reallocarray is not available with uclibc-ng. So use realloc if
|
||||
reallocarray is not available to avoid the following build failure
|
||||
raised since commit 891b78e9e892a3bcd800eb3a298e6380e9a15dd1:
|
||||
|
||||
/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: src/sae.o: in function `sae_rx_authenticate':
|
||||
sae.c:(.text+0xd74): undefined reference to `reallocarray'
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/c6d3f86282c44645b4f1c61882dc63ccfc8eb35a
|
||||
|
||||
[Retrieved from:
|
||||
https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=ec1c348b4fd67619fa0c2f55ae644f6a8014d971]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
configure.ac | 1 +
|
||||
src/missing.h | 7 +++++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c6250401..51d9da93 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -129,6 +129,7 @@ AC_DEFINE_UNQUOTED(WIRED_STORAGEDIR, "${wired_storagedir}",
|
||||
|
||||
AC_CHECK_FUNCS(explicit_bzero)
|
||||
AC_CHECK_FUNCS(rawmemchr)
|
||||
+AC_CHECK_FUNCS(reallocarray)
|
||||
|
||||
AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
|
||||
|
||||
diff --git a/src/missing.h b/src/missing.h
|
||||
index 2cc80aee..a5b92952 100644
|
||||
--- a/src/missing.h
|
||||
+++ b/src/missing.h
|
||||
@@ -37,3 +37,10 @@ _Pragma("GCC diagnostic ignored \"-Wstringop-overflow=\"")
|
||||
_Pragma("GCC diagnostic pop")
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#ifndef HAVE_REALLOCARRAY
|
||||
+static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
|
||||
+{
|
||||
+ return realloc(ptr, nmemb * size);
|
||||
+}
|
||||
+#endif
|
||||
--
|
||||
cgit 1.2.3-1.el7
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 42bd5ba7c2665c5bf95ba102a8115c4cf01d31d7 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Zaborowski <andrew.zaborowski@intel.com>
|
||||
Date: Thu, 16 Sep 2021 01:58:29 +0200
|
||||
Subject: netconfig: Remove usage of in6_addr.__in6_u
|
||||
|
||||
in6_addr.__in6_u.__u6_addr8 is glibc-specific and named differently in
|
||||
the headers shipped with musl libc for example. The POSIX compliant and
|
||||
universal way of accessing it is in6_addr.s6_addr.
|
||||
|
||||
[Retrieved from:
|
||||
https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=42bd5ba7c2665c5bf95ba102a8115c4cf01d31d7]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
src/netconfig.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/netconfig.c b/src/netconfig.c
|
||||
index ce95db0b..421270c9 100644
|
||||
--- a/src/netconfig.c
|
||||
+++ b/src/netconfig.c
|
||||
@@ -171,7 +171,7 @@ static inline char *netconfig_ipv6_to_string(const uint8_t *addr)
|
||||
struct in6_addr in6_addr;
|
||||
char *addr_str = l_malloc(INET6_ADDRSTRLEN);
|
||||
|
||||
- memcpy(in6_addr.__in6_u.__u6_addr8, addr, 16);
|
||||
+ memcpy(in6_addr.s6_addr, addr, 16);
|
||||
|
||||
if (L_WARN_ON(unlikely(!inet_ntop(AF_INET6, &in6_addr, addr_str,
|
||||
INET6_ADDRSTRLEN)))) {
|
||||
--
|
||||
cgit 1.2.3-1.el7
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
config BR2_PACKAGE_IWD
|
||||
bool "iwd"
|
||||
depends on BR2_USE_MMU # dbus
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # ell
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 # ell
|
||||
depends on BR2_USE_WCHAR # ell
|
||||
select BR2_PACKAGE_DBUS # runtime
|
||||
select BR2_PACKAGE_ELL
|
||||
select BR2_PACKAGE_OPENRESOLV if !BR2_PACKAGE_SYSTEMD_RESOLVED
|
||||
help
|
||||
iNet Wireless daemon (iwd)
|
||||
|
||||
https://iwd.wiki.kernel.org/
|
||||
|
||||
comment "iwd needs a toolchain w/ threads, wchar, headers >= 4.12"
|
||||
depends on BR2_USE_MMU # dbus
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # ell
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
|
||||
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="/usr/libexec/iwd"
|
||||
PIDFILE="/var/run/iwd.pid"
|
||||
|
||||
IWD_ARGS=""
|
||||
|
||||
[ -r "/etc/default/iwd" ] && . "/etc/default/iwd"
|
||||
|
||||
start() {
|
||||
printf "Starting iwd:"
|
||||
mkdir -p /tmp/iwd/hotspot
|
||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "$DAEMON" \
|
||||
-- $IWD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping iwd:"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop)
|
||||
"$1";;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,5 @@
|
||||
# From https://mirrors.edge.kernel.org/pub/linux/network/wireless/sha256sums.asc
|
||||
sha256 0225ab81579f027e0fcbf255517f432fcf355d14f3645c36813c71a441dfab55 iwd-1.18.tar.xz
|
||||
|
||||
# License files
|
||||
sha256 ec60b993835e2c6b79e6d9226345f4e614e686eb57dc13b6420c15a33a8996e5 COPYING
|
||||
@@ -0,0 +1,66 @@
|
||||
################################################################################
|
||||
#
|
||||
# iwd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
IWD_VERSION = 1.18
|
||||
IWD_SOURCE = iwd-$(IWD_VERSION).tar.xz
|
||||
IWD_SITE = $(BR2_KERNEL_MIRROR)/linux/network/wireless
|
||||
IWD_LICENSE = LGPL-2.1+
|
||||
IWD_LICENSE_FILES = COPYING
|
||||
IWD_CPE_ID_VENDOR = intel
|
||||
IWD_CPE_ID_PRODUCT = inet_wireless_daemon
|
||||
IWD_SELINUX_MODULES = networkmanager
|
||||
# We're patching configure.ac
|
||||
IWD_AUTORECONF = YES
|
||||
|
||||
IWD_CONF_OPTS = \
|
||||
--disable-manual-pages \
|
||||
--enable-external-ell
|
||||
IWD_DEPENDENCIES = ell
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DBUS),y)
|
||||
IWD_CONF_OPTS += --enable-dbus-policy --with-dbus-datadir=/usr/share
|
||||
IWD_DEPENDENCIES += dbus
|
||||
else
|
||||
IWD_CONF_OPTS += --disable-dbus-policy
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_READLINE),y)
|
||||
# iwd client depends on readline (GPL-3.0+)
|
||||
IWD_LICENSE += , GPL-3.0+ (client)
|
||||
IWD_CONF_OPTS += --enable-client
|
||||
IWD_DEPENDENCIES += readline
|
||||
else
|
||||
IWD_CONF_OPTS += --disable-client
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
IWD_CONF_OPTS += --enable-systemd-service
|
||||
IWD_DEPENDENCIES += systemd
|
||||
else
|
||||
IWD_CONF_OPTS += --disable-systemd-service
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
|
||||
IWD_RESOLV_SERVICE = systemd
|
||||
else
|
||||
IWD_RESOLV_SERVICE = resolvconf
|
||||
endif
|
||||
|
||||
define IWD_INSTALL_CONFIG_FILE
|
||||
$(INSTALL) -D -m 644 package/iwd/main.conf $(TARGET_DIR)/etc/iwd/main.conf
|
||||
$(SED) 's,__RESOLV_SERVICE__,$(IWD_RESOLV_SERVICE),' $(TARGET_DIR)/etc/iwd/main.conf
|
||||
endef
|
||||
|
||||
IWD_POST_INSTALL_TARGET_HOOKS += IWD_INSTALL_CONFIG_FILE
|
||||
|
||||
define IWD_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 0755 -D package/iwd/S40iwd \
|
||||
$(TARGET_DIR)/etc/init.d/S40iwd
|
||||
mkdir -p $(TARGET_DIR)/var/lib/iwd
|
||||
ln -sf /tmp/iwd/hotspot $(TARGET_DIR)/var/lib/iwd/hotspot
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
@@ -0,0 +1,5 @@
|
||||
# use built-in dhcp client
|
||||
[General]
|
||||
EnableNetworkConfiguration=true
|
||||
[Network]
|
||||
NameResolvingService=__RESOLV_SERVICE__
|
||||
Reference in New Issue
Block a user