first commit: base 2024.08

Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
This commit is contained in:
tao89959
2025-02-12 17:59:29 +08:00
committed by maoxiaochuan
commit f3217a7708
14356 changed files with 572894 additions and 0 deletions
@@ -0,0 +1,42 @@
From 74909db0342c7aff29e15972c9928f3bef56d5a6 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 21 Apr 2020 12:14:13 +0200
Subject: [PATCH] plugins/devinput.c: fix build with musl 1.2.0
time element is deprecated on new input_event structure in kernel's
input.h [1]
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
plugins/devinput.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/plugins/devinput.c b/plugins/devinput.c
index 77828b44..e5a52e42 100644
--- a/plugins/devinput.c
+++ b/plugins/devinput.c
@@ -51,6 +51,10 @@
#define LONG(x) ((x) / BITS_PER_LONG)
#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
+#ifndef input_event_sec
+#define input_event_sec time.tv_sec
+#define input_event_usec time.tv_usec
+#endif
static const logchannel_t logchannel = LOG_DRIVER;
@@ -458,7 +462,7 @@ char* devinput_rec(struct ir_remote* remotes)
return 0;
}
- log_trace("time %ld.%06ld type %d code %d value %d", event.time.tv_sec, event.time.tv_usec, event.type,
+ log_trace("time %ld.%06ld type %d code %d value %d", event.input_event_sec, event.input_event_usec, event.type,
event.code, event.value);
value = (unsigned)event.value;
--
2.25.1
@@ -0,0 +1,52 @@
From e9d5cbc01e3c0d6a31e2dba2f224b7f3dd21db37 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 23 Oct 2022 16:10:50 +0200
Subject: [PATCH] configure: add --disable-doc option
Allow the user to disable documentation through --disable-doc
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Makefile.am | 6 +++++-
configure.ac | 8 ++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 6718af13..58a321d8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,7 +45,11 @@ if WITH_SYSTEMDSYSTEMUNITDIR
SYSTEMD_DIR = systemd
endif
-SUBDIRS = lib daemons tools plugins configs doc $(SYSTEMD_DIR)
+if HAVE_DOC
+ DOC_DIR = doc
+endif
+
+SUBDIRS = lib daemons tools plugins configs $(DOC_DIR) $(SYSTEMD_DIR)
if INSTALL_ETC
diff --git a/configure.ac b/configure.ac
index d28c6732..f3384c95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -486,6 +486,14 @@ AC_ARG_VAR(SETUPTOOLS_ENV,
)
+AC_ARG_ENABLE(doc,
+ [ --enable-doc Build and install documentation (default=yes)],
+ [ enable_doc="${enableval}" ],
+ [ enable_doc=yes]
+)
+AM_CONDITIONAL([HAVE_DOC], [test x$enable_doc = xyes])
+
+
suffix=$(echo "$VERSION" | sed 's/.*-//')
AM_CONDITIONAL(DEVEL, [test x$suffix = xdevel])
--
2.35.1
+24
View File
@@ -0,0 +1,24 @@
config BR2_PACKAGE_LIRC_TOOLS
bool "lirc-tools"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_INSTALL_LIBSTDCPP
# dlopen()
depends on !BR2_STATIC_LIBS
help
LIRC is a package that supports receiving and sending IR
signals of the most common IR remote controls. It contains a
daemon that decodes and sends IR signals, a mouse daemon
that translates IR signals to mouse movements and a couple
of user programs that allow to control your computer with a
remote control.
It requires the kernel LIRC interface driver, make sure to
enable the kernel drivers to support your hardware.
http://www.lirc.org/
comment "lirc-tools needs a toolchain w/ threads, dynamic library, C++"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
|| !BR2_INSTALL_LIBSTDCPP
+38
View File
@@ -0,0 +1,38 @@
#!/bin/sh
#
# Start lirc
#
# Support for remotes - Add remotes to /etc/lirc/lircd.conf.d/
#
start() {
printf "Starting lirc: "
mkdir -p /var/run/lirc
ln -sf /var/run/lirc/lircd /dev/lircd
start-stop-daemon -b -S -q -m -p /var/run/lirc.pid --exec /usr/sbin/lircd -- -n -O /etc/lirc/lirc_options.conf
echo "OK"
}
stop() {
printf "Stopping lirc: "
start-stop-daemon -K -q -p /var/run/lirc.pid
echo "OK"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
+6
View File
@@ -0,0 +1,6 @@
# hash from https://sourceforge.net/projects/lirc/files/LIRC/0.10.2/
sha1 02092890205891b6de5a699294485a1eedba46c5 lirc-0.10.2.tar.bz2
md5 cb96cfb0af8067c0062e2f5a100f426a lirc-0.10.2.tar.bz2
# Locally computed
sha256 3d44ec8274881cf262f160805641f0827ffcc20ade0d85e7e6f3b90e0d3d222a lirc-0.10.2.tar.bz2
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
+61
View File
@@ -0,0 +1,61 @@
################################################################################
#
# lirc-tools
#
################################################################################
LIRC_TOOLS_VERSION = 0.10.2
LIRC_TOOLS_SOURCE = lirc-$(LIRC_TOOLS_VERSION).tar.bz2
LIRC_TOOLS_SITE = http://downloads.sourceforge.net/project/lirc/LIRC/$(LIRC_TOOLS_VERSION)
LIRC_TOOLS_LICENSE = GPL-2.0+
LIRC_TOOLS_LICENSE_FILES = COPYING
LIRC_TOOLS_SELINUX_MODULES = lircd
LIRC_TOOLS_DEPENDENCIES = host-libxslt host-pkgconf host-python3
LIRC_TOOLS_INSTALL_STAGING = YES
# Patching configure.ac and Makefile.am
LIRC_TOOLS_AUTORECONF = YES
LIRC_TOOLS_CONF_ENV = XSLTPROC=yes HAVE_WORKING_POLL=yes
LIRC_TOOLS_CONF_OPTS = --without-x --enable-devinput --enable-uinput
ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4),y)
LIRC_TOOLS_CONF_ENV += \
DEVINPUT_HEADER=$(STAGING_DIR)/usr/include/linux/input-event-codes.h
else
LIRC_TOOLS_CONF_ENV += \
DEVINPUT_HEADER=$(STAGING_DIR)/usr/include/linux/input.h
endif
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
LIRC_TOOLS_DEPENDENCIES += udev
endif
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
LIRC_TOOLS_DEPENDENCIES += alsa-lib
endif
ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
LIRC_TOOLS_DEPENDENCIES += libusb-compat
endif
ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
LIRC_TOOLS_DEPENDENCIES += portaudio
endif
ifeq ($(BR2_PACKAGE_LIBFTDI1),y)
LIRC_TOOLS_DEPENDENCIES += libftdi1
endif
ifeq ($(BR2_PACKAGE_PYTHON3),y)
LIRC_TOOLS_DEPENDENCIES += python3 host-python-setuptools
LIRC_TOOLS_MAKE_ENV += \
CC="$(TARGET_CC)" \
SETUPTOOLS_ENV='$(PKG_PYTHON_SETUPTOOLS_ENV)'
endif
define LIRC_TOOLS_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/lirc-tools/S25lircd \
$(TARGET_DIR)/etc/init.d/S25lircd
endef
$(eval $(autotools-package))