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,32 @@
From fb39f9600d464ce761917c0e787b940097f6024c Mon Sep 17 00:00:00 2001
From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Date: Thu, 23 Jun 2022 16:52:49 +0200
Subject: [PATCH] shm.c: use _Static_assert instead of static_assert for uclibc
Both are C11 constructs. The first one is defined by the compiler in
gnu11 mode, but the second one should be a macro defined in assert.h
The macro exists in glibc >= 2.16 and musl >= 1.1.10 but not in
uclibc 1.0.41. It is expected to be present in uclibc 1.0.42.
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
---
src/pulsecore/shm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index e464f6bce..5220cc90d 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -94,7 +94,7 @@ struct shm_marker {
};
// Ensure struct is appropriately packed
-static_assert(sizeof(struct shm_marker) == 8 * 5, "`struct shm_marker` is not tightly packed");
+_Static_assert(sizeof(struct shm_marker) == 8 * 5, "`struct shm_marker` is not tightly packed");
static inline size_t shm_marker_size(pa_mem_type_t type) {
if (type == PA_MEM_TYPE_SHARED_POSIX)
--
2.36.1

View File

@@ -0,0 +1,50 @@
config BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC
bool
default y if BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS || \
BR2_TOOLCHAIN_HAS_SYNC_4
config BR2_PACKAGE_PULSEAUDIO_ENABLE_ATOMIC
bool
select BR2_PACKAGE_LIBATOMIC_OPS if !BR2_TOOLCHAIN_HAS_SYNC_4
config BR2_PACKAGE_PULSEAUDIO
bool "pulseaudio"
depends on BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC
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_ALSA_LIB_PCM if BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_ALSA_LIB_MIXER if BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_ALSA_LIB_UCM if BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_AUDIO if BR2_PACKAGE_BLUEZ5_UTILS # runtime
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_LIBTOOL
select BR2_PACKAGE_LIBSNDFILE
select BR2_PACKAGE_PULSEAUDIO_ENABLE_ATOMIC
help
PulseAudio is a sound system for POSIX OSes, meaning that it
is a proxy for your sound applications. It allows you to do
advanced operations on your sound data as it passes between
your application and your hardware. Things like transferring
the audio to a different machine, changing the sample format
or channel count and mixing several sounds into one are
easily achieved using a sound server.
http://pulseaudio.org
if BR2_PACKAGE_PULSEAUDIO
config BR2_PACKAGE_PULSEAUDIO_DAEMON
bool "start as a system daemon"
help
PulseAudio can be started as a system daemon. This is not the
recommended way of using PulseAudio unless you are building a
headless system.
endif
comment "pulseaudio needs a toolchain w/ wchar, threads, dynamic library"
depends on BR2_USE_MMU
depends on BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS

View File

@@ -0,0 +1,46 @@
#!/bin/sh
#
# Starts pulseaudio.
#
start() {
printf "Starting pulseaudio: "
umask 077
/usr/bin/pulseaudio \
--system \
--daemonize \
--disallow-module-loading \
--disallow-exit \
--exit-idle-time=-1 \
--use-pid-file \
--disable-shm
echo "OK"
}
stop() {
printf "Stopping pulseaudio: "
PULSE_RUNTIME_PATH=/var/run/pulse /usr/bin/pulseaudio --kill
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,6 @@
# From https://lists.freedesktop.org/archives/pulseaudio-discuss/2024-January/032426.html
sha256 053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5 pulseaudio-17.0.tar.xz
# Locally computed
sha256 c38aee9e3c8c4d5d594ff548a1be05453023016d6286931f6512db215ec1fd42 GPL
sha256 a9bdde5616ecdd1e980b44f360600ee8783b1f99b8cc83a2beb163a0a390e861 LGPL
sha256 a1064b9838b6b4feee61eaeb0925da4b4834c984b77716558860c4294ed6c015 LICENSE

View File

@@ -0,0 +1,217 @@
################################################################################
#
# pulseaudio
#
################################################################################
PULSEAUDIO_VERSION = 17.0
PULSEAUDIO_SOURCE = pulseaudio-$(PULSEAUDIO_VERSION).tar.xz
PULSEAUDIO_SITE = https://freedesktop.org/software/pulseaudio/releases
PULSEAUDIO_INSTALL_STAGING = YES
PULSEAUDIO_LICENSE = LGPL-2.1+ (specific license for modules, see LICENSE file)
PULSEAUDIO_LICENSE_FILES = LICENSE GPL LGPL
PULSEAUDIO_CPE_ID_VENDOR = pulseaudio
PULSEAUDIO_SELINUX_MODULES = pulseaudio xdg
PULSEAUDIO_CONF_OPTS = \
-Ddoxygen=false \
-Dlegacy-database-entry-format=false \
-Dman=false \
-Drunning-from-build-tree=false \
-Dtests=false
PULSEAUDIO_DEPENDENCIES = \
host-pkgconf libtool libsndfile libglib2 \
$(TARGET_NLS_DEPENDENCIES)
PULSEAUDIO_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
PULSEAUDIO_CONF_OPTS += -Davahi=enabled
PULSEAUDIO_DEPENDENCIES += avahi
else
PULSEAUDIO_CONF_OPTS += -Davahi=disabled
endif
ifeq ($(BR2_PACKAGE_DBUS),y)
PULSEAUDIO_CONF_OPTS += -Ddbus=enabled
PULSEAUDIO_DEPENDENCIES += dbus
else
PULSEAUDIO_CONF_OPTS += -Ddbus=disabled
endif
ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
PULSEAUDIO_CONF_OPTS += -Dfftw=enabled
PULSEAUDIO_DEPENDENCIES += fftw-single
else
PULSEAUDIO_CONF_OPTS += -Dfftw=disabled
endif
ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
PULSEAUDIO_CONF_OPTS += -Dsamplerate=enabled
PULSEAUDIO_DEPENDENCIES += libsamplerate
else
PULSEAUDIO_CONF_OPTS += -Dsamplerate=disabled
endif
ifeq ($(BR2_PACKAGE_GDBM),y)
PULSEAUDIO_CONF_OPTS += -Ddatabase=gdbm
PULSEAUDIO_DEPENDENCIES += gdbm
else
PULSEAUDIO_CONF_OPTS += -Ddatabase=simple
endif
ifeq ($(BR2_PACKAGE_JACK2),y)
PULSEAUDIO_CONF_OPTS += -Djack=enabled
PULSEAUDIO_DEPENDENCIES += jack2
else
PULSEAUDIO_CONF_OPTS += -Djack=disabled
endif
ifeq ($(BR2_PACKAGE_LIBATOMIC_OPS),y)
PULSEAUDIO_DEPENDENCIES += libatomic_ops
ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
PULSEAUDIO_CFLAGS = $(TARGET_CFLAGS) -DAO_NO_SPARC_V9
endif
endif
ifeq ($(BR2_PACKAGE_LIRC_TOOLS),y)
PULSEAUDIO_DEPENDENCIES += lirc-tools
PULSEAUDIO_CONF_OPTS += -Dlirc=enabled
else
PULSEAUDIO_CONF_OPTS += -Dlirc=disabled
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
PULSEAUDIO_CONF_OPTS += -Dopenssl=enabled
PULSEAUDIO_DEPENDENCIES += openssl
else
PULSEAUDIO_CONF_OPTS += -Dopenssl=disabled
endif
ifeq ($(BR2_PACKAGE_ORC),y)
PULSEAUDIO_DEPENDENCIES += orc
PULSEAUDIO_CONF_ENV += ORCC=$(HOST_DIR)/bin/orcc
PULSEAUDIO_CONF_OPTS += -Dorc=enabled
else
PULSEAUDIO_CONF_OPTS += -Dorc=disabled
endif
ifeq ($(BR2_PACKAGE_LIBCAP),y)
PULSEAUDIO_DEPENDENCIES += libcap
endif
# gtk3 support needs X11 backend
ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y)
PULSEAUDIO_DEPENDENCIES += libgtk3
PULSEAUDIO_CONF_OPTS += -Dgtk=enabled
else
PULSEAUDIO_CONF_OPTS += -Dgtk=disabled
endif
ifeq ($(BR2_PACKAGE_LIBSOXR),y)
PULSEAUDIO_CONF_OPTS += -Dsoxr=enabled
PULSEAUDIO_DEPENDENCIES += libsoxr
else
PULSEAUDIO_CONF_OPTS += -Dsoxr=disabled
endif
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS)$(BR2_PACKAGE_SBC),yy)
PULSEAUDIO_CONF_OPTS += -Dbluez5=enabled
PULSEAUDIO_DEPENDENCIES += bluez5_utils sbc
else
PULSEAUDIO_CONF_OPTS += -Dbluez5=disabled
endif
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
PULSEAUDIO_CONF_OPTS += -Dudev=enabled
PULSEAUDIO_DEPENDENCIES += udev
else
PULSEAUDIO_CONF_OPTS += -Dudev=disabled
endif
ifeq ($(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),y)
PULSEAUDIO_CONF_OPTS += -Dwebrtc-aec=enabled
PULSEAUDIO_DEPENDENCIES += webrtc-audio-processing
else
PULSEAUDIO_CONF_OPTS += -Dwebrtc-aec=disabled
endif
# our Config.in makes sure that all needed alsa-lib features are
# enabled
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
PULSEAUDIO_DEPENDENCIES += alsa-lib
PULSEAUDIO_CONF_OPTS += -Dalsa=enabled
else
PULSEAUDIO_CONF_OPTS += -Dalsa=disabled
endif
ifeq ($(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_XLIB_LIBSM)$(BR2_PACKAGE_XLIB_LIBXTST),yyy)
PULSEAUDIO_DEPENDENCIES += libxcb xlib_libSM xlib_libXtst
# .desktop file generation needs nls support, so fake it for !locale builds
# https://bugs.freedesktop.org/show_bug.cgi?id=54658
ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
define PULSEAUDIO_FIXUP_DESKTOP_FILES
cp $(@D)/src/daemon/pulseaudio.desktop.in \
$(@D)/src/daemon/pulseaudio.desktop
endef
PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FIXUP_DESKTOP_FILES
endif
else
PULSEAUDIO_CONF_OPTS += -Dx11=disabled
endif
# This is not a mistake: the option is called speex, but what it
# really needs is speexdsp
ifeq ($(BR2_PACKAGE_SPEEXDSP),y)
PULSEAUDIO_CONF_OPTS += -Dspeex=enabled
PULSEAUDIO_DEPENDENCIES += speexdsp
else
PULSEAUDIO_CONF_OPTS += -Dspeex=disabled
endif
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
PULSEAUDIO_CONF_OPTS += -Dsystemd=enabled
PULSEAUDIO_DEPENDENCIES += systemd
else
PULSEAUDIO_CONF_OPTS += -Dsystemd=disabled
endif
ifeq ($(BR2_PACKAGE_VALGRIND),y)
PULSEAUDIO_CONF_OPTS += -Dvalgrind=enabled
PULSEAUDIO_DEPENDENCIES += valgrind
else
PULSEAUDIO_CONF_OPTS += -Dvalgrind=disabled
endif
# ConsoleKit module init failure breaks user daemon startup
define PULSEAUDIO_REMOVE_CONSOLE_KIT
rm -f $(TARGET_DIR)/usr/lib/pulse-$(PULSEAUDIO_VERSION)/modules/module-console-kit.so
endef
define PULSEAUDIO_REMOVE_VALA
rm -rf $(TARGET_DIR)/usr/share/vala
endef
PULSEAUDIO_POST_INSTALL_TARGET_HOOKS += PULSEAUDIO_REMOVE_VALA \
PULSEAUDIO_REMOVE_CONSOLE_KIT
ifeq ($(BR2_PACKAGE_PULSEAUDIO_DAEMON),y)
define PULSEAUDIO_USERS
pulse -1 pulse -1 * /var/run/pulse - audio,pulse-access
endef
define PULSEAUDIO_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/pulseaudio/S50pulseaudio \
$(TARGET_DIR)/etc/init.d/S50pulseaudio
endef
define PULSEAUDIO_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/pulseaudio/pulseaudio.service \
$(TARGET_DIR)/usr/lib/systemd/system/pulseaudio.service
endef
endif
$(eval $(meson-package))

View File

@@ -0,0 +1,11 @@
[Unit]
Description=PulseAudio Sound System
After=syslog.target
[Service]
UMask=077
ExecStart=/usr/bin/pulseaudio --system --daemonize=no
Restart=always
[Install]
WantedBy=multi-user.target