Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
From ddb06335935ef1458fe98f99cdc5d5fe6757fd02 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 3 Oct 2018 19:06:40 +0200
Subject: [PATCH] Fix linking error on mips64el
Patch that was fixing build on mips64el was reverted:
https://github.com/brltty/brltty/commit/9e7d62c869d3c1cbe12dda8b0291a4692c193416
So fix the issue again, this time by checking if $(GCC) is available as
suggested by Arnout during review of buildroot patch:
https://patchwork.ozlabs.org/patch/972614
Fixes:
- http://autobuild.buildroot.org/results/31f682838b3d3b2c7103b5c51f2aba0b89d4f630
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/brltty/brltty/pull/149]
---
configure.ac | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 1e2774abf..a488d3d52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -481,7 +481,12 @@ AC_CACHE_CHECK([for make relocatable object command], [brltty_cv_prog_make_objec
case "${host_os}"
in
*)
- brltty_cv_prog_make_object_relocatable="\$(LD) -r -o"
+ if test "${GCC}" = "yes"
+ then
+ brltty_cv_prog_make_object_relocatable="\$(CC) -shared -o"
+ else
+ brltty_cv_prog_make_object_relocatable="\$(LD) -r -o"
+ fi
;;
esac])
MKREL="${brltty_cv_prog_make_object_relocatable}"
--
2.17.1

View File

@@ -0,0 +1,58 @@
From a4f55ee941fdc94511c72c1831dedcf5bea7935d Mon Sep 17 00:00:00 2001
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Date: Thu, 30 Oct 2025 16:52:53 +0100
Subject: [PATCH] configure.ac: link fv driver with -ltinfo only if available
During the brltty bump to version 6.8 in Buildroot, the build failed on
systems without libtinfo:
/usr/bin/ld: cannot find -ltinfo: No such file or directory
Link libtinfo only if the library is present.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Upstream: https://github.com/brltty/brltty/pull/503
---
configure.ac | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 68c9c6d1b7f5..5c931f71b79a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -813,6 +813,7 @@ BRLTTY_ARG_ENABLE(
])
AC_SUBST(fuzzer_libs)
+have_tinfo="no"
brltty_curses_libs_save="${LIBS}"
BRLTTY_PACKAGE_CHOOSE([curses],
[ncursesw ncursesw/ncurses.h],
@@ -823,8 +824,10 @@ BRLTTY_PACKAGE_CHOOSE([curses],
[pdcurses curses.h])
if test -n "${curses_package}"
then
- AC_CHECK_LIB([tinfo], [intrflush])
+ AC_CHECK_LIB([tinfo], [intrflush],
+ [have_tinfo="yes"])
fi
+
curses_libs="${LIBS%${brltty_curses_libs_save}}"
LIBS="${brltty_curses_libs_save}"
AC_SUBST([curses_libs])
@@ -1882,7 +1885,11 @@ in
;;
esac
-BRLTTY_SCREEN_DRIVER([fv], [FileViewer], [-ltinfo])
+if test "${have_tinfo}" = "yes"; then
+ BRLTTY_SCREEN_DRIVER([fv], [FileViewer], [-ltinfo])
+else
+ BRLTTY_SCREEN_DRIVER([fv], [FileViewer])
+fi
all_brltty_pty=""
install_brltty_pty=""
--
2.43.0

View File

@@ -0,0 +1,72 @@
From 229a5c4319ef32ab837c7029d3a565c4673fdbf7 Mon Sep 17 00:00:00 2001
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Date: Mon, 3 Nov 2025 11:39:53 +0100
Subject: [PATCH] =?UTF-8?q?Fix=20initialization=20of=20=E2=80=98iconv=5Ft?=
=?UTF-8?q?=E2=80=99=20with=20GCC=2014.x=20and=20uClibc?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The patch fixes the following error raised by the compilation of brltty
with the combination of GCC 14.x and uClibc.
./unicode.c:349:27: error: initialization of ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
349 | static iconv_t handle = NULL;
| ^~~~
make[3]: *** [Makefile:366: unicode.o] Error 1
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Upstream: https://github.com/brltty/brltty/pull/504
---
Drivers/Braille/TTY/braille.c | 7 ++++---
Programs/unicode.c | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Drivers/Braille/TTY/braille.c b/Drivers/Braille/TTY/braille.c
index c8cba4999459..a2080532bc53 100644
--- a/Drivers/Braille/TTY/braille.c
+++ b/Drivers/Braille/TTY/braille.c
@@ -30,7 +30,8 @@
#ifdef HAVE_ICONV_H
#include <iconv.h>
-static iconv_t conversionDescriptor = NULL;
+#define ICONV_NULL ((iconv_t)-1)
+static iconv_t conversionDescriptor = ICONV_NULL;
#endif /* HAVE_ICONV_H */
#include "log.h"
@@ -211,7 +212,7 @@ brl_construct (BrailleDisplay *brl, char **parameters, const char *device) {
logSystemError("iconv_open");
}
- conversionDescriptor = NULL;
+ conversionDescriptor = ICONV_NULL;
#endif /* HAVE_ICONV_H */
return 0;
@@ -240,7 +241,7 @@ brl_destruct (BrailleDisplay *brl) {
#ifdef HAVE_ICONV_H
if (conversionDescriptor) {
iconv_close(conversionDescriptor);
- conversionDescriptor = NULL;
+ conversionDescriptor = ICONV_NULL;
}
#endif /* HAVE_ICONV_H */
}
diff --git a/Programs/unicode.c b/Programs/unicode.c
index 45e43be292c7..cbdcb4382291 100644
--- a/Programs/unicode.c
+++ b/Programs/unicode.c
@@ -346,7 +346,7 @@ getBaseCharacter (wchar_t character) {
wchar_t
getTransliteratedCharacter (wchar_t character) {
#ifdef HAVE_ICONV_H
- static iconv_t handle = NULL;
+ static iconv_t handle = (iconv_t)-1;
if (!handle) handle = iconv_open("ASCII//TRANSLIT", "WCHAR_T");
if (handle != (iconv_t)-1) {
--
2.43.0

View File

@@ -0,0 +1,98 @@
From 876bdd3153c791a51422a43403143ff10acb6e82 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd@kuhls.net>
Date: Sat, 3 Jan 2026 15:35:48 +0100
Subject: [PATCH] check for functions inb & outb
Musl C library provides sys/io.h but inb and outb are missing on some
archs. This patch adds a configure check ported from sane-backends:
https://github.com/solanoalves/sane-backend/blob/059b97962ecb1b1ab068f524988d16c5b55bbd29/configure.ac#L314
to fix build errors detected by buildroot autobuilders:
https://autobuild.buildroot.net/results/76d/76d18437241d1281566b76ed1cec2ba99c3532da//build-end.log
./ports_glibc.c: In function 'readPort1':
./ports_glibc.c:54:10: error: implicit declaration of function 'inb' [-Wimplicit-function-declaration]
54 | return inb(port);
| ^~~
./ports_glibc.c: In function 'writePort1':
./ports_glibc.c:63:3: error: implicit declaration of function 'outb' [-Wimplicit-function-declaration]
63 | outb(value, port);
| ^~~~
Upstream: https://github.com/brltty/brltty/commit/85cadac951cda709ce53d49923114595c16a8f16
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Programs/ports_glibc.c | 4 ++--
config.h.in | 3 +++
configure.ac | 19 +++++++++++++++++++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/Programs/ports_glibc.c b/Programs/ports_glibc.c
index 4233f9ea0..4a57f626d 100644
--- a/Programs/ports_glibc.c
+++ b/Programs/ports_glibc.c
@@ -50,7 +50,7 @@ disablePorts (unsigned short int base, unsigned short int count) {
unsigned char
readPort1 (unsigned short int port) {
-#ifdef HAVE_SYS_IO_H
+#ifdef BRLTTY_HAVE_SYS_IO_H_WITH_INB_OUTB
return inb(port);
#else /* HAVE_SYS_IO_H */
return 0;
@@ -59,7 +59,7 @@ readPort1 (unsigned short int port) {
void
writePort1 (unsigned short int port, unsigned char value) {
-#ifdef HAVE_SYS_IO_H
+#ifdef BRLTTY_HAVE_SYS_IO_H_WITH_INB_OUTB
outb(value, port);
#endif /* HAVE_SYS_IO_H */
}
diff --git a/config.h.in b/config.h.in
index 537d3af92..edea70cea 100644
--- a/config.h.in
+++ b/config.h.in
@@ -331,6 +331,9 @@ extern "C" {
/* Define this if the header file sys/io.h exists. */
#undef HAVE_SYS_IO_H
+/* Define to 1 if you have the <sys/io.h> providing inb,outb. */
+#undef BRLTTY_HAVE_SYS_IO_H_WITH_INB_OUTB
+
/* Define this if the header file sys/modem.h exists. */
#undef HAVE_SYS_MODEM_H
diff --git a/configure.ac b/configure.ac
index b78d482f6..0a2a70dd0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -961,6 +961,25 @@ AC_CHECK_FUNCS([shmget shm_open])
AC_CHECK_FUNCS([getpeereid getpeerucred getzoneid])
AC_CHECK_FUNCS([mempcpy wmempcpy])
+dnl sys/io.h might provide ioperm but not inb,outb (like for
+dnl non i386/x32/x86_64 with musl libc)
+if test "${ac_cv_header_sys_io_h}" = "yes"; then
+ AC_MSG_CHECKING([for inb,outb (provided by sys/io.h)])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/io.h>]],
+ [[inb(0);outb(0,0);]])],
+ [AC_MSG_RESULT([yes])
+ brltty_cv_have_sys_io_h_with_inb_outb="yes"],
+ [AC_MSG_RESULT([no])
+ brltty_cv_have_sys_io_h_with_inb_outb="no"
+ AC_MSG_WARN([sys/io.h does not provide inb,outb (non i386/x32/x86_64 arch?)])])
+ if test "$brltty_cv_have_sys_io_h_with_inb_outb" = "yes"; then
+ AC_DEFINE(BRLTTY_HAVE_SYS_IO_H_WITH_INB_OUTB, 1, [Define to 1 if you have the <sys/io.h> providing inb,outb.])
+ fi
+else
+ brltty_cv_have_sys_io_h_with_inb_outb="no"
+fi
+
case "${host_os}"
in
cygwin*|mingw*)
--
2.47.3

24
package/brltty/Config.in Normal file
View File

@@ -0,0 +1,24 @@
config BR2_PACKAGE_BRLTTY
bool "brltty"
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_NCURSES
select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID if BR2_PACKAGE_BLUEZ5_UTILS && BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 # runtime
help
A daemon providing access to the Linux console for a blind
person using a refreshable braille display.
http://brltty.app/
if BR2_PACKAGE_BRLTTY
config BR2_PACKAGE_BRLTTY_TEXT_TABLE
string "text-table"
endif
comment "brltty needs a toolchain w/ dynamic lib, threads, wchar"
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR

40
package/brltty/S10brltty Normal file
View File

@@ -0,0 +1,40 @@
#!/bin/sh
#
# brltty Starts brltty.
#
start() {
printf "Starting brltty: "
start-stop-daemon -S -q -p /var/run/brltty.pid \
--exec /usr/bin/brltty -- -P /var/run/brltty.pid "$@"
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping brltty: "
start-stop-daemon -K -q -p /var/run/brltty.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
restart() {
stop
start "$@"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
force-reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,4 @@
# Locally computed
sha256 9f3c6dc2b65059d20f60836e8f9ebc58d8e518d6a8f8fee33e1d1e50ab43c3bc brltty-6.8.tar.xz
sha256 d80c9d084ebfb50ea1ed91bfbc2410d6ce542097a32c43b00781b83adcb8c77f LICENSE-LGPL
sha256 a9a8b3eef5f3e2b4716912a4ed60eca78a3f561515ed17ebe80348f2f033b395 README

143
package/brltty/brltty.mk Normal file
View File

@@ -0,0 +1,143 @@
################################################################################
#
# brltty
#
################################################################################
BRLTTY_VERSION = 6.8
BRLTTY_SOURCE = brltty-$(BRLTTY_VERSION).tar.xz
BRLTTY_SITE = http://brltty.com/archive
BRLTTY_INSTALL_STAGING_OPTS = INSTALL_ROOT=$(STAGING_DIR) install
BRLTTY_INSTALL_TARGET_OPTS = INSTALL_ROOT=$(TARGET_DIR) install
BRLTTY_LICENSE = LGPL-2.1+
BRLTTY_LICENSE_FILES = LICENSE-LGPL README
BRLTTY_DEPENDENCIES = \
$(TARGET_NLS_DEPENDENCIES) \
host-autoconf \
host-gawk \
host-pkgconf \
ncurses \
$(if $(BR2_PACKAGE_AT_SPI2_CORE),at-spi2-core)
BRLTTY_CONF_ENV = \
PKG_CONFIG_FOR_BUILD=$(HOST_DIR)/bin/pkgconf
BRLTTY_CONF_OPTS = \
--disable-emacs-bindings \
--disable-java-bindings \
--disable-lisp-bindings \
--disable-lua-bindings \
--disable-ocaml-bindings \
--disable-python-bindings \
--disable-tcl-bindings \
--disable-x \
--without-espeak-ng \
--without-midi-package \
--without-mikropuhe --without-speechd --without-swift \
--without-theta
# Autoreconf is needed because we're patching configure.ac in
# 0001-Fix-linking-error-on-mips64el and
# 0002-configure.ac-link-fv-driver-with-ltinfo-only-if-avai.
# 0004-check-for-functions-inb-outb.patch
# However, a plain autoreconf doesn't work, because this package
# is only autoconf-based.
define BRLTTY_AUTOCONF
cd $(BRLTTY_SRCDIR) && $(AUTOCONF)
endef
BRLTTY_PRE_CONFIGURE_HOOKS += BRLTTY_AUTOCONF
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS),y)
BRLTTY_DEPENDENCIES += bluez5_utils
BRLTTY_CONF_OPTS += --with-bluetooth-package
else
BRLTTY_CONF_OPTS += --without-bluetooth-package
endif
ifeq ($(BR2_PACKAGE_ESPEAK),y)
BRLTTY_DEPENDENCIES += espeak
BRLTTY_CONF_OPTS += --with-espeak=$(TARGET_DIR)/usr
else
BRLTTY_CONF_OPTS += --without-espeak
endif
ifeq ($(BR2_PACKAGE_EXPAT),y)
# host-expat is needed by tbl2hex's host program
BRLTTY_DEPENDENCIES += host-expat expat
BRLTTY_CONF_OPTS += --enable-expat
else
BRLTTY_CONF_OPTS += --disable-expat
endif
ifeq ($(BR2_PACKAGE_FLITE),y)
BRLTTY_DEPENDENCIES += flite
BRLTTY_CONF_OPTS += --with-flite=$(STAGING_DIR)/usr
else
BRLTTY_CONF_OPTS += --without-flite
endif
ifeq ($(BR2_PACKAGE_ICU),y)
BRLTTY_DEPENDENCIES += icu
BRLTTY_CONF_OPTS += --enable-icu
else
BRLTTY_CONF_OPTS += --disable-icu
endif
ifeq ($(BR2_PACKAGE_NCURSES),y)
BRLTTY_DEPENDENCIES += ncurses
BRLTTY_CONF_OPTS += --with-curses
else
BRLTTY_CONF_OPTS += --without-curses
endif
ifeq ($(BR2_PACKAGE_PCRE2_32),y)
BRLTTY_DEPENDENCIES += pcre2
BRLTTY_CONF_OPTS += --with-rgx-package
else
BRLTTY_CONF_OPTS += --without-rgx-package
endif
ifeq ($(BR2_PACKAGE_POLKIT),y)
BRLTTY_DEPENDENCIES += polkit
BRLTTY_CONF_OPTS += --enable-polkit
else
BRLTTY_CONF_OPTS += --disable-polkit
endif
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
BRLTTY_DEPENDENCIES += systemd
BRLTTY_CONF_OPTS += --with-service-package
else
BRLTTY_CONF_OPTS += --without-service-package
endif
ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
BRLTTY_CONF_OPTS += --enable-i18n
else
BRLTTY_CONF_OPTS += --disable-i18n
endif
BRLTTY_TEXT_TABLE = $(call qstrip,$(BR2_PACKAGE_BRLTTY_TEXT_TABLE))
ifneq ($(BRLTTY_TEXT_TABLE),)
BRLTTY_CONF_OPTS += --with-text-table=$(BRLTTY_TEXT_TABLE)
endif
define BRLTTY_INSTALL_CONF
$(INSTALL) -D -m 644 $(@D)/Documents/brltty.conf $(TARGET_DIR)/etc/brltty.conf
endef
BRLTTY_POST_INSTALL_TARGET_HOOKS += BRLTTY_INSTALL_CONF
define BRLTTY_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/brltty/S10brltty \
$(TARGET_DIR)/etc/init.d/S10brltty
endef
define BRLTTY_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 package/brltty/brltty.service \
$(TARGET_DIR)/usr/lib/systemd/system/brltty.service
endef
$(eval $(autotools-package))

View File

@@ -0,0 +1,23 @@
[Unit]
Description=Braille Device Support
Documentation=man:brltty(1)
Documentation=http://brltty.com/
DefaultDependencies=no
Before=sysinit.target
After=systemd-udev-settle.service
Wants=systemd-udev-settle.service
[Service]
Type=simple
ExecStart=/usr/bin/brltty --no-daemon
TimeoutStartSec=5
TimeoutStopSec=10
Restart=always
RestartSec=30
Nice=-10
OOMScoreAdjust=-900
[Install]
WantedBy=sysinit.target