Skip to contentSkip to conversation

package: add rasdaemon support.

PATCH Superseded Bastien Curutchet via buildroot 1 participant 7 messages Dec 1, 2025 – Dec 17, 2025

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover package: add rasdaemon support.

Hi all,

Rasdaemon is a tool that provides a way to collect all hardware error events reported by the Linux kernel in a common framework.

My use case is on a PowerPC P2020. I use to it to monitor and react to the PCIe AER events caught by the SoC's EDAC.

The first patch adds the package. The second one adds a small test for it in support/testing. Adding fake error injections in the selftest isn't trivial so it only ensures the daemon does run.

---
Changes in v3:
- PATCH 1: Init script: Run the daemon in foreground and use
--background to leave the PID file creation to start-stop-daemon
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- PATCH 1:
Init script: Use a PID file
Config.in: Add comment for the BR2_SHARED_LIBS dependency, fix the AER feature description rasdaemon.mk: Add License's hash
- PATCH 2:
Add a check to ensure the daemon does run once started by the init
script.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Bastien Curutchet (2):
package/rasdaemon: Add rasdaemon package
support/testing: add rasdaemon tests

 DEVELOPERS                                         |  4 ++
 package/Config.in                                  |  1 +
 package/rasdaemon/Config.in                        | 25 +++++++++
 package/rasdaemon/S95rasdaemon                     | 63 ++++++++++++++++++++++
 package/rasdaemon/rasdaemon.hash                   |  3 ++
 package/rasdaemon/rasdaemon.mk                     | 33 ++++++++++++
 support/testing/tests/package/test_rasdaemon.py    | 46 ++++++++++++++++
 .../package/test_rasdaemon/linux-debugfs.fragment  |  8 +++
 8 files changed, 183 insertions(+)

---
base-commit: c8cb1a238de5a803228f12ad32b36cae2acfc778
change-id: 20251125-rasdaemon-1df4904ddfde

Best regards,

Signature · 6 lines
Bastien Curutchet <[email protected]>

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v3 1/2 package/rasdaemon: Add rasdaemon package

Rasdaemon is a tool that aims to replace the edac-tool and provide a way to collect all hardware error events reported by the Linux kernel in a common framework.

Add a new package to support rasdaemon in the 'Hardware handling' section. It depends on libtraceevents to detect the ftrace events generated by the kernel and on sqlite to store these events.

Support for the PCIe AER events is optionnal and implies a dependency on pciutils so also add a dedicated 'sub-option' to enable it.

Add a SYSV init script to start / stop the daemon

Add myself to the DEVELOPERS file.

---
 DEVELOPERS                       |  3 ++
 package/Config.in                |  1 +
 package/rasdaemon/Config.in      | 25 ++++++++++++++++
 package/rasdaemon/S95rasdaemon   | 63 ++++++++++++++++++++++++++++++++++++++++
 package/rasdaemon/rasdaemon.hash |  3 ++
 package/rasdaemon/rasdaemon.mk   | 33 +++++++++++++++++++++
 6 files changed, 128 insertions(+)
DEVELOPERS +3 -0
index db001d6bb0707a5877c0849fa85fa736377e60dd..b1ead6d26c4e8ff160bcc7ed85b0945ac5e551dc 100644
@@ -341,6 +341,9 @@ F:	package/tcpdump/
 F:	package/ti-uim/
 F:	package/uhubctl/
 
+N:	Bastien Curutchet <[email protected]>
+F:	package/rasdaemon/
+
 N:	Baxiche Su <[email protected]>
 F:	package/qt6/qt6multimedia/
 
package/Config.in +1 -0
index 12f327cb273526781d931b834e24d0df5024e80e..1a93cec2fa22e3a6e70acbf799b32b00d5e8b5de 100644
@@ -584,6 +584,7 @@ endmenu
 	source "package/pru-software-support/Config.in"
 	source "package/pulseview/Config.in"
 	source "package/qoriq-cadence-dp-firmware/Config.in"
+	source "package/rasdaemon/Config.in"
 	source "package/raspi-gpio/Config.in"
 	source "package/rdma-core/Config.in"
 	source "package/read-edid/Config.in"
package/rasdaemon/Config.in new file +25 -0
new file mode 100644
index 0000000000000000000000000000000000000000..68cef3a313bf2b82a8306ed5e0ec581cd618531d
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_RASDAEMON
+	bool "rasdaemon"
+	depends on !BR2_STATIC_LIBS # libtraceevent
+	select BR2_PACKAGE_LIBTRACEEVENT
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
+	help
+	  rasdaemon is a tool that collects all hardware error events
+	  reported by the Linux Kernel from several sources (EDAC, MCE
+	  PCI, ...) into one common framework.
+	  See https://github.com/mchehab/rasdaemon for details.
+
+if BR2_PACKAGE_RASDAEMON
+
+config BR2_PACKAGE_RASDAEMON_AER
+	bool "Enable AER support"
+	select BR2_PACKAGE_PCIUTILS
+	help
+	  Enable handling of AER (Advanced Error Reporting) events on
+	  PCIe
+
+endif
+
+comment "rasdaemon needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
package/rasdaemon/S95rasdaemon new file +63 -0

63 lines not on this page · raw message

package/rasdaemon/rasdaemon.hash new file +3 -0
new file mode 100644
index 0000000000000000000000000000000000000000..e1b600a4893bef2f58c86f6d742fb7cbcb480fc8
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  7e12459f9477036491ac2b1e4c07cc3e8efea6dcd30525a263ab1f83910b773a  rasdaemon-0.8.4.tar.gz
+sha256  39bc367cd7cd291d217447632b28a74be414a52b142b1875ac8789184aeca7b2  COPYING
package/rasdaemon/rasdaemon.mk new file +33 -0
new file mode 100644
index 0000000000000000000000000000000000000000..50ac97a37dcbe63443bddca505ebc7c929116e53
@@ -0,0 +1,33 @@
+################################################################################
+#
+# rasdaemon
+#
+################################################################################
+
+RASDAEMON_VERSION = 0.8.4
+RASDAEMON_SITE = $(call github,mchehab,rasdaemon,v$(RASDAEMON_VERSION))
+RASDAEMON_LICENSE = GPL-2.0+
+RASDAEMON_LICENSE_FILES = COPYING
+RASDAEMON_AUTORECONF = YES
+
+RASDAEMON_DEPENDENCIES = libtraceevent sqlite
+# rasdaemon uses argp.h which is not provided by uclibc or musl by default.
+# Use the argp-standalone package to provide this.
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
+RASDAEMON_DEPENDENCIES += argp-standalone
+RASDAEMON_CONF_ENV += LIBS="-largp"
+endif
+
+ifeq ($(BR2_PACKAGE_RASDAEMON_AER),y)
+RASDAEMON_DEPENDENCIES += pciutils
+RASDAEMON_CONF_OPTS += --enable-aer
+else
+RASDAEMON_CONF_OPTS += --disable-aer
+endif
+
+define RASDAEMON_INSTALL_INIT_SYSV
+	$(INSTALL) -m 0755 -D package/rasdaemon/S95rasdaemon \
+		$(TARGET_DIR)/etc/init.d/S95rasdaemon
+endef
+
+$(eval $(autotools-package))
Signature · 6 lines
2.51.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author Reviewed-by Fiona Klute on v3 1/2
#2 lore raw

Re: [Buildroot] [PATCH v3 1/2] package/rasdaemon: Add rasdaemon package

Am 01.12.25 um 15:08 schrieb Bastien Curutchet:

Quoted 8 lines

Rasdaemon is a tool that aims to replace the edac-tool and provide a way to collect all hardware error events reported by the Linux kernel in a common framework.

Add a new package to support rasdaemon in the 'Hardware handling' section. It depends on libtraceevents to detect the ftrace events generated by the kernel and on sqlite to store these events.

Quoted 8 lines

Support for the PCIe AER events is optionnal and implies a dependency on pciutils so also add a dedicated 'sub-option' to enable it.

Add a SYSV init script to start / stop the daemon

Add myself to the DEVELOPERS file.

Best regards,
Fiona

Quoted 174 lines
---
  DEVELOPERS                       |  3 ++
  package/Config.in                |  1 +
  package/rasdaemon/Config.in      | 25 ++++++++++++++++
  package/rasdaemon/S95rasdaemon   | 63 ++++++++++++++++++++++++++++++++++++++++
  package/rasdaemon/rasdaemon.hash |  3 ++
  package/rasdaemon/rasdaemon.mk   | 33 +++++++++++++++++++++
  6 files changed, 128 insertions(+)
DEVELOPERS +3 -0
index db001d6bb0707a5877c0849fa85fa736377e60dd..b1ead6d26c4e8ff160bcc7ed85b0945ac5e551dc 100644
@@ -341,6 +341,9 @@ F:	package/tcpdump/
  F:	package/ti-uim/
  F:	package/uhubctl/
 
+N:	Bastien Curutchet <[email protected]>
+F:	package/rasdaemon/
+
  N:	Baxiche Su <[email protected]>
  F:	package/qt6/qt6multimedia/
 
package/Config.in +1 -0
index 12f327cb273526781d931b834e24d0df5024e80e..1a93cec2fa22e3a6e70acbf799b32b00d5e8b5de 100644
@@ -584,6 +584,7 @@ endmenu
  	source "package/pru-software-support/Config.in"
  	source "package/pulseview/Config.in"
  	source "package/qoriq-cadence-dp-firmware/Config.in"
+	source "package/rasdaemon/Config.in"
  	source "package/raspi-gpio/Config.in"
  	source "package/rdma-core/Config.in"
  	source "package/read-edid/Config.in"
package/rasdaemon/Config.in new file +25 -0
new file mode 100644
index 0000000000000000000000000000000000000000..68cef3a313bf2b82a8306ed5e0ec581cd618531d
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_RASDAEMON
+	bool "rasdaemon"
+	depends on !BR2_STATIC_LIBS # libtraceevent
+	select BR2_PACKAGE_LIBTRACEEVENT
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
+	help
+	  rasdaemon is a tool that collects all hardware error events
+	  reported by the Linux Kernel from several sources (EDAC, MCE
+	  PCI, ...) into one common framework.
+	  See https://github.com/mchehab/rasdaemon for details.
+
+if BR2_PACKAGE_RASDAEMON
+
+config BR2_PACKAGE_RASDAEMON_AER
+	bool "Enable AER support"
+	select BR2_PACKAGE_PCIUTILS
+	help
+	  Enable handling of AER (Advanced Error Reporting) events on
+	  PCIe
+
+endif
+
+comment "rasdaemon needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
package/rasdaemon/S95rasdaemon new file +63 -0
new file mode 100644
index 0000000000000000000000000000000000000000..390ff9c9029ba9122217f13eb88bac7715c1c05f
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# S95rasdaemon	Starts Rasdaemon.
+#
+# shellcheck disable=SC2317 # functions are called via variable
+
+DAEMON="rasdaemon"
+PIDFILE="/var/run/$DAEMON.pid"
+
+start() {
+	printf "Starting %s: " "$DAEMON"
+
+	if ! grep -q debugfs /proc/mounts ; then
+		echo "FAIL : debugfs is missing"
+		return 1
+	fi
+
+	start-stop-daemon --start --pidfile "$PIDFILE" --make-pidfile \
+		--background --exec "/usr/sbin/$DAEMON" -- -f
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+stop() {
+	printf "Stopping %s: " "$DAEMON"
+	start-stop-daemon --stop --pidfile "$PIDFILE" --exec "/usr/sbin/$DAEMON"
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+		return "$status"
+	fi
+	while start-stop-daemon --stop --test --quiet --pidfile "$PIDFILE" \
+		--exec "/sbin/$DAEMON"; do
+		sleep 0.1
+	done
+	rm -f "$PIDFILE"
+	return "$status"
+}
+
+restart() {
+	stop
+	start
+}
+
+reload() {
+	restart
+}
+
+case "$1" in
+	start|stop|reload|restart)
+		"$1"
+		;;
+	*)
+		echo "Usage: $0 {start|stop|reload|restart}"
+		exit 1
+esac
package/rasdaemon/rasdaemon.hash new file +3 -0
new file mode 100644
index 0000000000000000000000000000000000000000..e1b600a4893bef2f58c86f6d742fb7cbcb480fc8
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  7e12459f9477036491ac2b1e4c07cc3e8efea6dcd30525a263ab1f83910b773a  rasdaemon-0.8.4.tar.gz
+sha256  39bc367cd7cd291d217447632b28a74be414a52b142b1875ac8789184aeca7b2  COPYING
package/rasdaemon/rasdaemon.mk new file +23 -0
new file mode 100644
index 0000000000000000000000000000000000000000..50ac97a37dcbe63443bddca505ebc7c929116e53
@@ -0,0 +1,33 @@
+################################################################################
+#
+# rasdaemon
+#
+################################################################################
+
+RASDAEMON_VERSION = 0.8.4
+RASDAEMON_SITE = $(call github,mchehab,rasdaemon,v$(RASDAEMON_VERSION))
+RASDAEMON_LICENSE = GPL-2.0+
+RASDAEMON_LICENSE_FILES = COPYING
+RASDAEMON_AUTORECONF = YES
+
+RASDAEMON_DEPENDENCIES = libtraceevent sqlite
+# rasdaemon uses argp.h which is not provided by uclibc or musl by default.
+# Use the argp-standalone package to provide this.
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
+RASDAEMON_DEPENDENCIES += argp-standalone
+RASDAEMON_CONF_ENV += LIBS="-largp"
+endif
+
+ifeq ($(BR2_PACKAGE_RASDAEMON_AER),y)
+RASDAEMON_DEPENDENCIES += pciutils
+RASDAEMON_CONF_OPTS += --enable-aer

package/rasdaemon/rasdaemon.mk line 33

Quoted 10 lines
package/rasdaemon/rasdaemon.mk new file +10 -0
+else
+RASDAEMON_CONF_OPTS += --disable-aer
+endif
+
+define RASDAEMON_INSTALL_INIT_SYSV
+	$(INSTALL) -m 0755 -D package/rasdaemon/S95rasdaemon \
+		$(TARGET_DIR)/etc/init.d/S95rasdaemon
+endef
+
+$(eval $(autotools-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Re: [Buildroot] [PATCH v3 1/2] package/rasdaemon: Add rasdaemon package

In reply to Bastien Curutchet via buildroot

Hi Bastien,

Thanks for the patch. I have few comments. See below.

Quoted 17 lines · Bastien Curutchet via buildroot

Rasdaemon is a tool that aims to replace the edac-tool and provide a way to collect all hardware error events reported by the Linux kernel in a common framework.

Add a new package to support rasdaemon in the 'Hardware handling' section. It depends on libtraceevents to detect the ftrace events generated by the kernel and on sqlite to store these events.

Support for the PCIe AER events is optionnal and implies a dependency on pciutils so also add a dedicated 'sub-option' to enable it.

Add a SYSV init script to start / stop the daemon

Add myself to the DEVELOPERS file.

---

[...]

package/rasdaemon/Config.in line 3

Quoted 9 lines
package/rasdaemon/Config.in new file +3 -0
new file mode 100644
index 0000000000000000000000000000000000000000..68cef3a313bf2b82a8306ed5e0ec581cd618531d
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_RASDAEMON
+	bool "rasdaemon"
+	depends on !BR2_STATIC_LIBS # libtraceevent

rasdaemon seems to use unconditionally threads. See:
https://github.com/mchehab/rasdaemon/blob/v0.8.4/ras-events.h#L10

So you probably miss here a "depends on BR2_TOOLCHAIN_HAS_THREADS". The Config.in comment also needs to be updated at the end of the file.

package/rasdaemon/Config.in line 5

Quoted 2 lines
package/rasdaemon/Config.in new file +2 -0
+	select BR2_PACKAGE_LIBTRACEEVENT
+	select BR2_PACKAGE_SQLITE

SQLite is an optional dependency. See:
https://github.com/mchehab/rasdaemon/blob/v0.8.4/configure.ac#L28

So you don't need to select BR2_PACKAGE_SQLITE here, and you could preferably have in the .mk file something like:

ifeq ($(BR2_PACKAGE_SQLITE),y)
RASDAEMON_CONF_OPTS += --enable-sqlite3
RASDAEMON_DEPENDENCIES += sqlite
else
RASDAEMON_CONF_OPTS += --disable-sqlite3
endif

package/rasdaemon/Config.in line 10

Quoted 6 lines
package/rasdaemon/Config.in new file +1 -0
+	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || 

BR2_TOOLCHAIN_USES_MUSL

package/rasdaemon/Config.in new file +4 -0
+	help
+	  rasdaemon is a tool that collects all hardware error events
+	  reported by the Linux Kernel from several sources (EDAC, MCE
+	  PCI, ...) into one common framework.

Could format the help string like other Buildroot packages, please?

You should have a blank line, followed by just the homepage url:

https://github.com/mchehab/rasdaemon

Quoted 4 lines
package/rasdaemon/Config.in new file +4 -0
+	  See https://github.com/mchehab/rasdaemon for details.
+
+if BR2_PACKAGE_RASDAEMON
+

package/rasdaemon/Config.in line 24

Quoted 10 lines
package/rasdaemon/Config.in new file +10 -0
+config BR2_PACKAGE_RASDAEMON_AER
+	bool "Enable AER support"
+	select BR2_PACKAGE_PCIUTILS
+	help
+	  Enable handling of AER (Advanced Error Reporting) events on
+	  PCIe
+
+endif
+
+comment "rasdaemon needs a toolchain w/ dynamic library"

The comment should become:
comment "rasdaemon needs a toolchain w/ threads, dynamic library"

package/rasdaemon/Config.in line 25

Quoted 1 line
package/rasdaemon/Config.in new file +1 -0
+	depends on BR2_STATIC_LIBS

Here the condition should become:
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS

Quoted 15 lines
package/rasdaemon/rasdaemon.mk new file +8 -0
new file mode 100644
index 0000000000000000000000000000000000000000..50ac97a37dcbe63443bddca505ebc7c929116e53
@@ -0,0 +1,33 @@
+################################################################################
+#
+# rasdaemon
+#
+################################################################################
+
+RASDAEMON_VERSION = 0.8.4
+RASDAEMON_SITE = $(call 

github,mchehab,rasdaemon,v$(RASDAEMON_VERSION))

package/rasdaemon/rasdaemon.mk line 13

Quoted 5 lines
package/rasdaemon/rasdaemon.mk new file +5 -0
+RASDAEMON_LICENSE = GPL-2.0+
+RASDAEMON_LICENSE_FILES = COPYING
+RASDAEMON_AUTORECONF = YES
+
+RASDAEMON_DEPENDENCIES = libtraceevent sqlite

The "sqlite" dependency could be removed and added in a conditional block, as I suggested.

Quoted 23 lines

+# rasdaemon uses argp.h which is not provided by uclibc or musl by default.

package/rasdaemon/rasdaemon.mk new file +19 -1
+# Use the argp-standalone package to provide this.
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
+RASDAEMON_DEPENDENCIES += argp-standalone
+RASDAEMON_CONF_ENV += LIBS="-largp"
+endif
+
+ifeq ($(BR2_PACKAGE_RASDAEMON_AER),y)
+RASDAEMON_DEPENDENCIES += pciutils
+RASDAEMON_CONF_OPTS += --enable-aer
+else
+RASDAEMON_CONF_OPTS += --disable-aer
+endif
+
+define RASDAEMON_INSTALL_INIT_SYSV
+	$(INSTALL) -m 0755 -D package/rasdaemon/S95rasdaemon \
+		$(TARGET_DIR)/etc/init.d/S95rasdaemon
+endef
+
+$(eval $(autotools-package))
 
--
Quoted 1 line

2.51.1

Could you send an updated patch, please?

Best regards,

Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

Re: [Buildroot] [PATCH v3 1/2] package/rasdaemon: Add rasdaemon package

Hi Julien,

Quoted 36 lines · Julien Olivain

Hi Bastien,

Thanks for the patch.  I have few comments. See below.

Quoted 17 lines · Bastien Curutchet via buildroot

Rasdaemon is a tool that aims to replace the edac-tool and provide a way to collect all hardware error events reported by the Linux kernel in a common framework.

Add a new package to support rasdaemon in the 'Hardware handling' section. It depends on libtraceevents to detect the ftrace events generated by the kernel and on sqlite to store these events.

Support for the PCIe AER events is optionnal and implies a dependency on pciutils so also add a dedicated 'sub-option' to enable it.

Add a SYSV init script to start / stop the daemon

Add myself to the DEVELOPERS file.

---

[...]

package/rasdaemon/Config.in line 3

Quoted 9 lines
package/rasdaemon/Config.in new file +3 -0
new file mode 100644
index 0000000000000000000000000000000000000000..68cef3a313bf2b82a8306ed5e0ec581cd618531d
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_RASDAEMON
+    bool "rasdaemon"
+    depends on !BR2_STATIC_LIBS # libtraceevent

rasdaemon seems to use unconditionally threads. See:
https://github.com/mchehab/rasdaemon/blob/v0.8.4/ras-events.h#L10

Quoted 3 lines

So you probably miss here a "depends on BR2_TOOLCHAIN_HAS_THREADS". The Config.in comment also needs to be updated at the end of the file.

Indeed, I'll add it.

Quoted 9 lines

package/rasdaemon/Config.in line 5

Quoted 2 lines
package/rasdaemon/Config.in new file +2 -0
+    select BR2_PACKAGE_LIBTRACEEVENT
+    select BR2_PACKAGE_SQLITE

SQLite is an optional dependency. See:
https://github.com/mchehab/rasdaemon/blob/v0.8.4/configure.ac#L28

So you don't need to select BR2_PACKAGE_SQLITE here, and you could preferably have in the .mk file something like:

Quoted 7 lines

ifeq ($(BR2_PACKAGE_SQLITE),y)
RASDAEMON_CONF_OPTS += --enable-sqlite3
RASDAEMON_DEPENDENCIES += sqlite
else
RASDAEMON_CONF_OPTS += --disable-sqlite3
endif

So far the rasdaemon's build without --enable-sqlite3 fails, this is why I had added it unconditionally. But you're right, it isn't the proper of doing so I just opened a PR on rasdaemon's github to fix this.

Quoted 7 lines
Quoted 6 lines
package/rasdaemon/Config.in new file +1 -0
+    select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC 

|| BR2_TOOLCHAIN_USES_MUSL
+    help
+      rasdaemon is a tool that collects all hardware error events +      reported by the Linux Kernel from several sources (EDAC, MCE +      PCI, ...) into one common framework.

Quoted 7 lines

Could format the help string like other Buildroot packages, please?

You should have a blank line, followed by just the homepage url:

https://github.com/mchehab/rasdaemon

Sure, will do.

Quoted 9 lines
Quoted 9 lines

+      See https://github.com/mchehab/rasdaemon for details.

package/rasdaemon/Config.in new file +8 -0
+
+if BR2_PACKAGE_RASDAEMON
+
+config BR2_PACKAGE_RASDAEMON_AER
+    bool "Enable AER support"
+    select BR2_PACKAGE_PCIUTILS
+    help
+      Enable handling of AER (Advanced Error Reporting) events on
Quoted 9 lines

package/rasdaemon/Config.in line 24

Quoted 5 lines

+      PCIe

package/rasdaemon/Config.in new file +4 -0
+
+endif
+
+comment "rasdaemon needs a toolchain w/ dynamic library"

The comment should become:
comment "rasdaemon needs a toolchain w/ threads, dynamic library"

Ok, thanks.

Quoted 5 lines
Quoted 1 line

+    depends on BR2_STATIC_LIBS

Here the condition should become:
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS

Ok, thanks.

Quoted 14 lines
Quoted 14 lines
package/rasdaemon/rasdaemon.mk new file +8 -0
new file mode 100644
index 0000000000000000000000000000000000000000..50ac97a37dcbe63443bddca505ebc7c929116e53
@@ -0,0 +1,33 @@
+################################################################################
+#
+# rasdaemon
+#
+################################################################################
+
+RASDAEMON_VERSION = 0.8.4
+RASDAEMON_SITE = $(call github,mchehab,rasdaemon,v$(RASDAEMON_VERSION))
Quoted 9 lines

package/rasdaemon/rasdaemon.mk line 13

Quoted 5 lines
package/rasdaemon/rasdaemon.mk new file +5 -0
+RASDAEMON_LICENSE = GPL-2.0+
+RASDAEMON_LICENSE_FILES = COPYING
+RASDAEMON_AUTORECONF = YES
+
+RASDAEMON_DEPENDENCIES = libtraceevent sqlite

The "sqlite" dependency could be removed and added in a conditional block, as I suggested.

Ok, I'll do this.

Quoted 22 lines
Quoted 22 lines
package/rasdaemon/rasdaemon.mk new file +1 -0
+# rasdaemon uses argp.h which is not provided by uclibc or musl by 

default.

package/rasdaemon/rasdaemon.mk new file +19 -0
+# Use the argp-standalone package to provide this.
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
+RASDAEMON_DEPENDENCIES += argp-standalone
+RASDAEMON_CONF_ENV += LIBS="-largp"
+endif
+
+ifeq ($(BR2_PACKAGE_RASDAEMON_AER),y)
+RASDAEMON_DEPENDENCIES += pciutils
+RASDAEMON_CONF_OPTS += --enable-aer
+else
+RASDAEMON_CONF_OPTS += --disable-aer
+endif
+
+define RASDAEMON_INSTALL_INIT_SYSV
+    $(INSTALL) -m 0755 -D package/rasdaemon/S95rasdaemon \
+        $(TARGET_DIR)/etc/init.d/S95rasdaemon
+endef
+
+$(eval $(autotools-package))
Quoted 4 lines
Quoted 2 lines
Signature · 1 line
2.51.1

Could you send an updated patch, please?

Sure, I'll just wait for my PR to be merged before doing so.

Best regards,
Bastien

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw

Re: [Buildroot] [PATCH v3 1/2] package/rasdaemon: Add rasdaemon package

Quoted 1 line · On Wed, 17 Dec 2025 16:30:22 +0100 Bastien Curutchet…

Sure, I'll just wait for my PR to be merged before doing so.

Your upstream patch is simple enough that you can take it into Buildroot and put it in package/rasdaemon/. Make sure to add an
Upstream: tag that points to the upstream PR. Indeed, it may be some time before upstream (1) merges it and (2) makes a new release with it.

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

PATCH v3 2/2 support/testing: add rasdaemon tests

In reply to Bastien Curutchet via buildroot

Rasdaemon was added in previous patch.

Add a test_rasdaemon that allows to test it.
Test is done on x86. It first checks the daemon's version, then mounts debugfs and finally ensures that the init script allows to start/restart/stop the daemon.

---
 DEVELOPERS                                         |  1 +
 support/testing/tests/package/test_rasdaemon.py    | 46 ++++++++++++++++++++++
 .../package/test_rasdaemon/linux-debugfs.fragment  |  8 ++++
 3 files changed, 55 insertions(+)
DEVELOPERS +1 -0
index b1ead6d26c4e8ff160bcc7ed85b0945ac5e551dc..c9aaa8c9c8aa3d54c930476d9d450e7f990d9aac 100644
@@ -343,6 +343,7 @@ F:	package/uhubctl/
 
 N:	Bastien Curutchet <[email protected]>
 F:	package/rasdaemon/
+F:	support/testing/tests/package/test_rasdaemon.py
 
 N:	Baxiche Su <[email protected]>
 F:	package/qt6/qt6multimedia/
support/testing/tests/package/test_rasdaemon.py new file +46 -0

46 lines not on this page · raw message

support/testing/tests/package/test_rasdaemon/linux-debugfs.fragment new file +8 -0
new file mode 100644
index 0000000000000000000000000000000000000000..a334bc373179623f3c5b2c3727ee7738a0c2542e
@@ -0,0 +1,8 @@
+CONFIG_DEBUG_FS=y
+CONFIG_FTRACE=y
+CONFIG_USER_EVENTS=y
+CONFIG_TRACE_EVENT_INJECT=y
+CONFIG_PCI=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
+CONFIG_MEMORY_FAILURE=y
Signature · 6 lines
2.51.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot