initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
[PATCH] fix build on uClibc without UCLIBC_HAS_BACKTRACE
Backtrace support is only used for logging on signal errors, which
isn't really critical, so simply remove backtrace info if not
available in uClibc.
NOTE: based on patch from Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
--- ofono-1.7.orig/src/log.c
+++ ofono-1.7/src/log.c
@@ -30,7 +30,8 @@
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !(defined(__UCLIBC__) && !defined (__UCLIBC_HAS_BACKTRACE__))
+#define HAVE_BACKTRACE
#include <execinfo.h>
#endif
#include <dlfcn.h>
@@ -115,7 +116,7 @@
va_end(ap);
}
-#ifdef __GLIBC__
+#ifdef HAVE_BACKTRACE
static void print_backtrace(unsigned int offset)
{
void *frames[99];
@@ -312,7 +313,7 @@
if (detach == FALSE)
option |= LOG_PERROR;
-#ifdef __GLIBC__
+#ifdef HAVE_BACKTRACE
signal_setup(signal_handler);
#endif
@@ -329,7 +330,7 @@
closelog();
-#ifdef __GLIBC__
+#ifdef HAVE_BACKTRACE
signal_setup(SIG_DFL);
#endif
+37
View File
@@ -0,0 +1,37 @@
From 4a1d114fa3a5d6bef1f71222787c1f6c3a952284 Mon Sep 17 00:00:00 2001
From: Nicolas Serafini <nicolas.serafini@sensefly.com>
Date: Thu, 24 Jan 2019 10:11:42 +0100
Subject: [PATCH] mbim: add optional copy of TEMP_FAILURE_RETRY macro (fix musl
compile)
TEMP_FAILURE_RETRY is not available on musl.
Signed-off-by: Nicolas Serafini <nicolas.serafini@sensefly.com>
---
drivers/mbimmodem/mbim.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mbimmodem/mbim.c b/drivers/mbimmodem/mbim.c
index 54b18acf..4b040528 100644
--- a/drivers/mbimmodem/mbim.c
+++ b/drivers/mbimmodem/mbim.c
@@ -37,6 +37,16 @@
#include "mbim-message.h"
#include "mbim-private.h"
+/* taken from glibc unistd.h for musl support */
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) \
+ (__extension__ \
+ ({ long int __result; \
+ do __result = (long int) (expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; }))
+#endif
+
#define MAX_CONTROL_TRANSFER 4096
#define HEADER_SIZE (sizeof(struct mbim_message_header) + \
sizeof(struct mbim_fragment_header))
--
2.20.1
+26
View File
@@ -0,0 +1,26 @@
config BR2_PACKAGE_OFONO
bool "ofono"
depends on BR2_USE_WCHAR # gettext, libglib2, ell
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
depends on BR2_USE_MMU # dbus, libglib2
depends on !BR2_STATIC_LIBS # dlopen(), ell
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 # ell
select BR2_PACKAGE_DBUS
select BR2_PACKAGE_ELL
select BR2_PACKAGE_LIBCAP_NG
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_MOBILE_BROADBAND_PROVIDER_INFO
help
oFono is a free, open source project for mobile telephony
(GSM/UMTS) applications. It uses high-level D-Bus API for
use by telephony applications. It uses 3GPP standard.
http://ofono.org/
comment "ofono needs a toolchain w/ dynamic library, wchar, threads, headers >= 4.12"
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || \
!BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
+22
View File
@@ -0,0 +1,22 @@
#!/bin/sh
case "$1" in
start)
printf "Starting ofono ... "
start-stop-daemon -S -q -m -b -p /var/run/ofonod.pid --exec /usr/sbin/ofonod -- -n
echo "done."
;;
stop)
printf "Stopping ofono ..."
start-stop-daemon -K -q -p /var/run/ofonod.pid
echo "done."
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
;;
esac
+4
View File
@@ -0,0 +1,4 @@
# From https://www.kernel.org/pub/linux/network/ofono/sha256sums.asc
sha256 a15c5d28096c10eb30e47a68b6dc2e7c4a5a99d7f4cfedf0b69624f33d859e9b ofono-1.31.tar.xz
# Locally computed
sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 COPYING
+48
View File
@@ -0,0 +1,48 @@
################################################################################
#
# ofono
#
################################################################################
OFONO_VERSION = 1.31
OFONO_SOURCE = ofono-$(OFONO_VERSION).tar.xz
OFONO_SITE = $(BR2_KERNEL_MIRROR)/linux/network/ofono
OFONO_LICENSE = GPL-2.0
OFONO_LICENSE_FILES = COPYING
OFONO_DEPENDENCIES = \
host-pkgconf \
dbus \
ell \
libcap-ng \
libglib2 \
mobile-broadband-provider-info
OFONO_CONF_OPTS = \
--enable-external-ell \
--disable-test \
--with-dbusconfdir=/etc \
$(if $(BR2_INIT_SYSTEMD),--with-systemdunitdir=/usr/lib/systemd/system)
# N.B. Qualcomm QMI modem support requires O_CLOEXEC; so
# make sure that it is defined.
OFONO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
define OFONO_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/ofono/S46ofono $(TARGET_DIR)/etc/init.d/S46ofono
endef
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
OFONO_CONF_OPTS += --enable-udev
OFONO_DEPENDENCIES += udev
else
OFONO_CONF_OPTS += --disable-udev
endif
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS),y)
OFONO_CONF_OPTS += --enable-bluetooth
OFONO_DEPENDENCIES += bluez5_utils
else
OFONO_CONF_OPTS += --disable-bluetooth
endif
$(eval $(autotools-package))