Skip to contentSkip to conversation

package/sema-linux-ec: add ADLINK sema drivers package

PATCH Superseded Thomas Devoogdt 2 participants 9 messages Dec 23, 2025 – Oct 26

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/sema-linux-ec: add ADLINK sema drivers package

From: Devreese Jorik <[email protected]>

---
 package/Config.in                        |  1 +
 package/sema-linux-ec/Config.in          | 13 ++++++++++++
 package/sema-linux-ec/sema-linux-ec.hash |  7 ++++++
 package/sema-linux-ec/sema-linux-ec.mk   | 27 ++++++++++++++++++++++++
 4 files changed, 48 insertions(+)
 create mode 100644 package/sema-linux-ec/Config.in
 create mode 100644 package/sema-linux-ec/sema-linux-ec.hash
 create mode 100644 package/sema-linux-ec/sema-linux-ec.mk
package/Config.in +1 -0
index 22970b4d45a..edafe20eefe 100644
@@ -608,6 +608,7 @@ endmenu
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/sedutil/Config.in"
+	source "package/sema-linux-ec/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
 	source "package/sigrok-cli/Config.in"
package/sema-linux-ec/Config.in new file +13 -0
new file mode 100644
index 00000000000..664f24ebe55
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_SEMA_LINUX_EC
+	bool "sema-linux-ec"
+	depends on !BR2_s390x
+	depends on BR2_LINUX_KERNEL
+	help
+	  ADLINK SEMA Linux EC drivers.
+	  Provides support for embedded controller functionality on
+	  ADLINK embedded computing platforms.
+
+	  https://github.com/ADLINK/sema-linux-ec
+
+comment "sema-linux-ec needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
package/sema-linux-ec/sema-linux-ec.hash new file +7 -0
new file mode 100644
index 00000000000..460edba0a88
@@ -0,0 +1,7 @@
+# sha256 locally computed: https://github.com/ADLINK/sema-linux-ec/archive/v4.3.11/sema-linux-ec-v4.3.11.tar.gz
+sha256  5ea7379f94d21a3f92d97631b7ee28912be4990e4708d47bff44aa4f4ca9784f  sema-linux-ec-v4.3.11.tar.gz
+
+# hash for the license files, locally computed:
+sha256  c45298c445058c0f8413c94be71ecedd55f306f3149ed2aea90b0e098ddc8810  LICENSE.BSD3
+sha256  2358eef45f799ab496fe93f4791f509524d3d65ca046e562706e62d72f738f20  LICENSE.dual
+sha256  d8c320ffc0030d1b096ae4732b50d2b811cf95e9a9b7377c1127b2563e0a0388  LICENSE.GPLv2
package/sema-linux-ec/sema-linux-ec.mk new file +27 -0
new file mode 100644
index 00000000000..427ee09943d
@@ -0,0 +1,27 @@
+################################################################################
+#
+# sema-linux-ec
+#
+################################################################################
+
+SEMA_LINUX_EC_VERSION = v4.3.11
+SEMA_LINUX_EC_SITE = $(call github,ADLINK,sema-linux-ec,$(SEMA_LINUX_EC_VERSION))
+SEMA_LINUX_EC_LICENSE = GPL-2.0
+SEMA_LINUX_EC_LICENSE_FILES = LICENSE
+
+SEMA_LINUX_EC_MAKE_OPTS = KERNELDIR=$(LINUX_DIR)
+
+define SEMA_LINUX_EC_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HWMON)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_BOARDINFO)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG_CORE)
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
Signature · 6 lines
2.43.0

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

PATCH v2 1/1 package/sema-linux-ec: add new adlink sema drivers package

From: Devreese Jorik <[email protected]>

SEMA (Smart Embedded Management Agent) is an agent used to manage system health and access the I/O pins through an API.

---
v2: reworked patch
- Added user sw step.
- Fixed help text.
- Fixed hash and license info.

---
 package/Config.in                             |  1 +
 ...CC-variable-instead-of-hardcoded-gcc.patch | 54 +++++++++++++++++++
 package/sema-linux-ec/Config.in               | 12 +++++
 package/sema-linux-ec/sema-linux-ec.hash      |  5 ++
 package/sema-linux-ec/sema-linux-ec.mk        | 40 ++++++++++++++
 5 files changed, 112 insertions(+)
 create mode 100644 package/sema-linux-ec/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch
 create mode 100644 package/sema-linux-ec/Config.in
 create mode 100644 package/sema-linux-ec/sema-linux-ec.hash
 create mode 100644 package/sema-linux-ec/sema-linux-ec.mk
package/Config.in +1 -0
index 07d7e49ae7b..ef1920edb58 100644
@@ -604,6 +604,7 @@ endmenu
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/sedutil/Config.in"
+	source "package/sema-linux-ec/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
 	source "package/sigrok-cli/Config.in"
package/sema-linux-ec/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch new file +54 -0

54 lines not on this page · raw message

package/sema-linux-ec/Config.in new file +12 -0
new file mode 100644
index 00000000000..8d6d0e17a53
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_SEMA_LINUX_EC
+	bool "sema-linux-ec"
+	depends on !BR2_s390x
+	depends on BR2_LINUX_KERNEL
+	help
+	  SEMA (Smart Embedded Management Agent) is an agent used to
+	  manage system health and access the I/O pins through an API.
+
+	  https://github.com/ADLINK/sema-linux-ec
+
+comment "sema-linux-ec needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
package/sema-linux-ec/sema-linux-ec.hash new file +5 -0
new file mode 100644
index 00000000000..d32864316e1
@@ -0,0 +1,5 @@
+# locally computed
+sha256  daef5a95e686ce1fa59511280759ccdaf59d41eb698b7c5df0a35e98c0718127  sema-linux-ec-v4.3.12.tar.gz
+sha256  c45298c445058c0f8413c94be71ecedd55f306f3149ed2aea90b0e098ddc8810  LICENSE.BSD3
+sha256  d8c320ffc0030d1b096ae4732b50d2b811cf95e9a9b7377c1127b2563e0a0388  LICENSE.GPLv2
+sha256  2358eef45f799ab496fe93f4791f509524d3d65ca046e562706e62d72f738f20  LICENSE.dual
package/sema-linux-ec/sema-linux-ec.mk new file +40 -0
new file mode 100644
index 00000000000..475f8a8c371
@@ -0,0 +1,40 @@
+################################################################################
+#
+# sema-linux-ec
+#
+################################################################################
+
+SEMA_LINUX_EC_VERSION = v4.3.12
+SEMA_LINUX_EC_SITE = $(call github,ADLINK,sema-linux-ec,$(SEMA_LINUX_EC_VERSION))
+SEMA_LINUX_EC_LICENSE = BSD-3-Clause or GPL-2.0
+SEMA_LINUX_EC_LICENSE_FILES = LICENSE.BSD3 LICENSE.GPLv2 LICENSE.dual
+
+SEMA_LINUX_EC_MAKE_OPTS = \
+	$(LINUX_MAKE_FLAGS) \
+	KERNELDIR=$(LINUX_DIR)
+
+define SEMA_LINUX_EC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(SEMA_LINUX_EC_MAKE_OPTS) -C $(@D) \
+		libsema.so semautil wdogtest
+endef
+
+define SEMA_LINUX_EC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/lib/libsema.so $(TARGET_DIR)/usr/lib/libsema.so
+	$(INSTALL) -D -m 0755 $(@D)/semautil $(TARGET_DIR)/usr/bin/semautil
+	$(INSTALL) -D -m 0755 $(@D)/wdogtest $(TARGET_DIR)/usr/bin/wdogtest
+endef
+
+define SEMA_LINUX_EC_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HWMON)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_BOARDINFO)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG_CORE)
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
Signature · 6 lines
2.43.0

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

PATCH v3 1/1 package/sema-linux-ec: add new adlink sema drivers package

From: Devreese Jorik <[email protected]>

SEMA (Smart Embedded Management Agent) is an agent used to manage system health and access the I/O pins through an API.

---
v2: reworked patch
- added user sw step
- fixed help text
- fixed hash and license info
v3: fixed build args

---
 package/Config.in                             |  1 +
 ...CC-variable-instead-of-hardcoded-gcc.patch | 54 +++++++++++++++++++
 package/sema-linux-ec/Config.in               | 12 +++++
 package/sema-linux-ec/sema-linux-ec.hash      |  5 ++
 package/sema-linux-ec/sema-linux-ec.mk        | 36 +++++++++++++
 5 files changed, 108 insertions(+)
 create mode 100644 package/sema-linux-ec/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch
 create mode 100644 package/sema-linux-ec/Config.in
 create mode 100644 package/sema-linux-ec/sema-linux-ec.hash
 create mode 100644 package/sema-linux-ec/sema-linux-ec.mk
package/Config.in +1 -0
index 0da9dc29287..ae32bcdd055 100644
@@ -604,6 +604,7 @@ endmenu
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/sedutil/Config.in"
+	source "package/sema-linux-ec/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
 	source "package/sigrok-cli/Config.in"
package/sema-linux-ec/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch new file +54 -0

54 lines not on this page · raw message

package/sema-linux-ec/Config.in new file +12 -0
new file mode 100644
index 00000000000..8d6d0e17a53
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_SEMA_LINUX_EC
+	bool "sema-linux-ec"
+	depends on !BR2_s390x
+	depends on BR2_LINUX_KERNEL
+	help
+	  SEMA (Smart Embedded Management Agent) is an agent used to
+	  manage system health and access the I/O pins through an API.
+
+	  https://github.com/ADLINK/sema-linux-ec
+
+comment "sema-linux-ec needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
package/sema-linux-ec/sema-linux-ec.hash new file +5 -0
new file mode 100644
index 00000000000..d32864316e1
@@ -0,0 +1,5 @@
+# locally computed
+sha256  daef5a95e686ce1fa59511280759ccdaf59d41eb698b7c5df0a35e98c0718127  sema-linux-ec-v4.3.12.tar.gz
+sha256  c45298c445058c0f8413c94be71ecedd55f306f3149ed2aea90b0e098ddc8810  LICENSE.BSD3
+sha256  d8c320ffc0030d1b096ae4732b50d2b811cf95e9a9b7377c1127b2563e0a0388  LICENSE.GPLv2
+sha256  2358eef45f799ab496fe93f4791f509524d3d65ca046e562706e62d72f738f20  LICENSE.dual
package/sema-linux-ec/sema-linux-ec.mk new file +36 -0
new file mode 100644
index 00000000000..425496916cf
@@ -0,0 +1,36 @@
+################################################################################
+#
+# sema-linux-ec
+#
+################################################################################
+
+SEMA_LINUX_EC_VERSION = v4.3.12
+SEMA_LINUX_EC_SITE = $(call github,ADLINK,sema-linux-ec,$(SEMA_LINUX_EC_VERSION))
+SEMA_LINUX_EC_LICENSE = BSD-3-Clause or GPL-2.0
+SEMA_LINUX_EC_LICENSE_FILES = LICENSE.BSD3 LICENSE.GPLv2 LICENSE.dual
+
+define SEMA_LINUX_EC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
+		libsema.so semautil wdogtest
+endef
+
+define SEMA_LINUX_EC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/lib/libsema.so $(TARGET_DIR)/usr/lib/libsema.so
+	$(INSTALL) -D -m 0755 $(@D)/semautil $(TARGET_DIR)/usr/bin/semautil
+	$(INSTALL) -D -m 0755 $(@D)/wdogtest $(TARGET_DIR)/usr/bin/wdogtest
+endef
+
+define SEMA_LINUX_EC_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HWMON)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_BOARDINFO)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG_CORE)
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
Signature · 6 lines
2.43.0

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

PATCH v4 1/1 package/sema-linux-ec: add new adlink sema drivers package

From: Devreese Jorik <[email protected]>

SEMA (Smart Embedded Management Agent) is an agent used to manage system health and access the I/O pins through an API.

---
v2: reworked patch
- added user sw step
- fixed help text
- fixed hash and license info
v3: fixed build args
v4: fix missing util-linux dependency

--> Actually, I found this missing dependency after removing $(eval $(kernel-module)) and the kernel dependency, only then I was able to run ./utils/test-pkg -p sema-linux-ec -a. So there is not really a way to check for the generic package compilation by using ./utils/test-pkg when there is a kernel-module defined. We should perhaps fix that.

$ ./utils/test-pkg -p sema-linux-ec -a
                             arm-aarch64 [ 1/32]: OK
                   bootlin-aarch64-glibc [ 2/32]: OK
               bootlin-aarch64-glibc-old [ 3/32]: OK
               bootlin-arcle-hs38-uclibc [ 4/32]: OK
                    bootlin-armv5-uclibc [ 5/32]: OK
                     bootlin-armv7-glibc [ 6/32]: OK
                   bootlin-armv7m-uclibc [ 7/32]: SKIPPED
                      bootlin-armv7-musl [ 8/32]: OK
                bootlin-m68k-5208-uclibc [ 9/32]: SKIPPED
               bootlin-m68k-68040-uclibc [10/32]: OK
             bootlin-microblazeel-uclibc [11/32]: OK
                  bootlin-mips64el-glibc [12/32]: OK
                bootlin-mipsel32r6-glibc [13/32]: OK
                   bootlin-mipsel-uclibc [14/32]: OK
                 bootlin-openrisc-uclibc [15/32]: OK
        bootlin-powerpc64le-power8-glibc [16/32]: OK
           bootlin-powerpc-e500mc-uclibc [17/32]: OK
                   bootlin-riscv32-glibc [18/32]: OK
                   bootlin-riscv64-glibc [19/32]: OK
                    bootlin-riscv64-musl [20/32]: OK
                 bootlin-s390x-z13-glibc [21/32]: OK
                      bootlin-sh4-uclibc [22/32]: OK
                   bootlin-sparc64-glibc [23/32]: OK
                    bootlin-sparc-uclibc [24/32]: OK
                    bootlin-x86-64-glibc [25/32]: OK
                     bootlin-x86-64-musl [26/32]: OK
                   bootlin-x86-64-uclibc [27/32]: OK
                   bootlin-x86-i686-musl [28/32]: OK
                   bootlin-xtensa-uclibc [29/32]: OK
                            br-arm-basic [30/32]: OK
                    br-arm-full-nothread [31/32]: OK
                      br-arm-full-static [32/32]: SKIPPED
32 builds, 3 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
---
 package/Config.in                             |  1 +
 ...CC-variable-instead-of-hardcoded-gcc.patch | 54 +++++++++++++++++++
 package/sema-linux-ec/Config.in               | 14 +++++
 package/sema-linux-ec/sema-linux-ec.hash      |  5 ++
 package/sema-linux-ec/sema-linux-ec.mk        | 37 +++++++++++++
 5 files changed, 111 insertions(+)
 create mode 100644 package/sema-linux-ec/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch
 create mode 100644 package/sema-linux-ec/Config.in
 create mode 100644 package/sema-linux-ec/sema-linux-ec.hash
 create mode 100644 package/sema-linux-ec/sema-linux-ec.mk
package/Config.in +1 -0
index 0da9dc29287..ae32bcdd055 100644
@@ -604,6 +604,7 @@ endmenu
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/sedutil/Config.in"
+	source "package/sema-linux-ec/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
 	source "package/sigrok-cli/Config.in"
package/sema-linux-ec/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch new file +54 -0

54 lines not on this page · raw message

package/sema-linux-ec/Config.in new file +14 -0
new file mode 100644
index 00000000000..39663d542cf
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_SEMA_LINUX_EC
+	bool "sema-linux-ec"
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_LINUX_KERNEL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  SEMA (Smart Embedded Management Agent) is an agent used to
+	  manage system health and access the I/O pins through an API.
+
+	  https://github.com/ADLINK/sema-linux-ec
+
+comment "sema-linux-ec needs a toolchain w/ dynamic library, Linux kernel"
+	depends on BR2_STATIC_LIBS || !BR2_LINUX_KERNEL
package/sema-linux-ec/sema-linux-ec.hash new file +5 -0
new file mode 100644
index 00000000000..d32864316e1
@@ -0,0 +1,5 @@
+# locally computed
+sha256  daef5a95e686ce1fa59511280759ccdaf59d41eb698b7c5df0a35e98c0718127  sema-linux-ec-v4.3.12.tar.gz
+sha256  c45298c445058c0f8413c94be71ecedd55f306f3149ed2aea90b0e098ddc8810  LICENSE.BSD3
+sha256  d8c320ffc0030d1b096ae4732b50d2b811cf95e9a9b7377c1127b2563e0a0388  LICENSE.GPLv2
+sha256  2358eef45f799ab496fe93f4791f509524d3d65ca046e562706e62d72f738f20  LICENSE.dual
package/sema-linux-ec/sema-linux-ec.mk new file +37 -0
new file mode 100644
index 00000000000..fc8a2c7a284
@@ -0,0 +1,37 @@
+################################################################################
+#
+# sema-linux-ec
+#
+################################################################################
+
+SEMA_LINUX_EC_VERSION = v4.3.12
+SEMA_LINUX_EC_SITE = $(call github,ADLINK,sema-linux-ec,$(SEMA_LINUX_EC_VERSION))
+SEMA_LINUX_EC_LICENSE = BSD-3-Clause or GPL-2.0
+SEMA_LINUX_EC_LICENSE_FILES = LICENSE.BSD3 LICENSE.GPLv2 LICENSE.dual
+SEMA_LINUX_EC_DEPENDENCIES = util-linux
+
+define SEMA_LINUX_EC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
+		libsema.so semautil wdogtest
+endef
+
+define SEMA_LINUX_EC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/lib/libsema.so $(TARGET_DIR)/usr/lib/libsema.so
+	$(INSTALL) -D -m 0755 $(@D)/semautil $(TARGET_DIR)/usr/bin/semautil
+	$(INSTALL) -D -m 0755 $(@D)/wdogtest $(TARGET_DIR)/usr/bin/wdogtest
+endef
+
+define SEMA_LINUX_EC_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HWMON)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_BOARDINFO)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG_CORE)
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
Signature · 6 lines
2.43.0

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

PATCH v5 1/1 package/sema-linux-ec: add new adlink sema drivers package

From: Devreese Jorik <[email protected]>

SEMA (Smart Embedded Management Agent) is an agent used to manage system health and access the I/O pins through an API.

---
v2: reworked patch
- added user sw step
- fixed help text
- fixed hash and license info
v3: fixed build args
v4: fix missing util-linux dependency
v5: reworked patch
- fix parallel build
- add and use app_build/app_install

--> Actually, I found this missing dependency after removing $(eval $(kernel-module)) and the kernel dependency, only then I was able to run ./utils/test-pkg -p sema-linux-ec -a. So there is not really a way to check for the generic package compilation by using ./utils/test-pkg when there is a kernel-module defined. We should perhaps fix that.

$ ./utils/test-pkg -p sema-linux-ec -a
                             arm-aarch64 [ 1/32]: OK
                   bootlin-aarch64-glibc [ 2/32]: OK
               bootlin-aarch64-glibc-old [ 3/32]: OK
               bootlin-arcle-hs38-uclibc [ 4/32]: OK
                    bootlin-armv5-uclibc [ 5/32]: OK
                     bootlin-armv7-glibc [ 6/32]: OK
                   bootlin-armv7m-uclibc [ 7/32]: SKIPPED
                      bootlin-armv7-musl [ 8/32]: OK
                bootlin-m68k-5208-uclibc [ 9/32]: SKIPPED
               bootlin-m68k-68040-uclibc [10/32]: OK
             bootlin-microblazeel-uclibc [11/32]: OK
                  bootlin-mips64el-glibc [12/32]: OK
                bootlin-mipsel32r6-glibc [13/32]: OK
                   bootlin-mipsel-uclibc [14/32]: OK
                 bootlin-openrisc-uclibc [15/32]: OK
        bootlin-powerpc64le-power8-glibc [16/32]: OK
           bootlin-powerpc-e500mc-uclibc [17/32]: OK
                   bootlin-riscv32-glibc [18/32]: OK
                   bootlin-riscv64-glibc [19/32]: OK
                    bootlin-riscv64-musl [20/32]: OK
                 bootlin-s390x-z13-glibc [21/32]: OK
                      bootlin-sh4-uclibc [22/32]: OK
                   bootlin-sparc64-glibc [23/32]: OK
                    bootlin-sparc-uclibc [24/32]: OK
                    bootlin-x86-64-glibc [25/32]: OK
                     bootlin-x86-64-musl [26/32]: OK
                   bootlin-x86-64-uclibc [27/32]: OK
                   bootlin-x86-i686-musl [28/32]: OK
                   bootlin-xtensa-uclibc [29/32]: OK
                            br-arm-basic [30/32]: OK
                    br-arm-full-nothread [31/32]: OK
                      br-arm-full-static [32/32]: SKIPPED
32 builds, 3 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
---
 package/Config.in                             |  1 +
 ...CC-variable-instead-of-hardcoded-gcc.patch | 54 +++++++++++++++++++
 ...ure-that-lsema-is-always-built-first.patch | 32 +++++++++++
 ...3-Makefile-add-cross-install-support.patch | 40 ++++++++++++++
 ...file-add-a-separate-app_build-target.patch | 42 +++++++++++++++
 package/sema-linux-ec/Config.in               | 14 +++++
 package/sema-linux-ec/sema-linux-ec.hash      |  5 ++
 package/sema-linux-ec/sema-linux-ec.mk        | 34 ++++++++++++
 8 files changed, 222 insertions(+)
 create mode 100644 package/sema-linux-ec/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch
 create mode 100644 package/sema-linux-ec/0002-Makefile-ensure-that-lsema-is-always-built-first.patch
 create mode 100644 package/sema-linux-ec/0003-Makefile-add-cross-install-support.patch
 create mode 100644 package/sema-linux-ec/0004-Makefile-add-a-separate-app_build-target.patch
 create mode 100644 package/sema-linux-ec/Config.in
 create mode 100644 package/sema-linux-ec/sema-linux-ec.hash
 create mode 100644 package/sema-linux-ec/sema-linux-ec.mk
package/Config.in +1 -0
index 0da9dc29287..ae32bcdd055 100644
@@ -604,6 +604,7 @@ endmenu
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/sedutil/Config.in"
+	source "package/sema-linux-ec/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
 	source "package/sigrok-cli/Config.in"
package/sema-linux-ec/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch new file +54 -0

54 lines not on this page · raw message

package/sema-linux-ec/0002-Makefile-ensure-that-lsema-is-always-built-first.patch new file +32 -0
new file mode 100644
index 00000000000..3cab4315537
@@ -0,0 +1,32 @@
+From f14f0874bc3dcc5cee1f9c1b4ae1d9918a005139 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 10 Mar 2026 09:08:05 +0100
+Subject: [PATCH] Makefile: ensure that -lsema is always built first
+
+When using parallel builds, there is no guarantee that libsema.so
+is built first.
+
+Upstream: https://github.com/ADLINK/sema-linux-ec/pull/14
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index ad02cf9..b6d9af9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -90,8 +90,8 @@ driver_clean:
+ app_clean:
+ 	@rm -f semautil wdogtest app/*.o lib/*.o lib/*.so
+ 
+-semautil: $(APP_OBJS)
+-	@$(CC) -g -o $@ $^ -Llib -lsema -luuid
++semautil: libsema.so $(APP_OBJS)
++	@$(CC) -g -o $@ $(APP_OBJS) -Llib -lsema -luuid
+ 
+ wdogtest: $(WDOG_OBJS)
+ 	@$(CC) $^ -g -o $@
+-- 
+2.43.0
+
package/sema-linux-ec/0003-Makefile-add-cross-install-support.patch new file +40 -0
new file mode 100644
index 00000000000..1178253a21a
@@ -0,0 +1,40 @@
+From 6e1e0e69682a92c22d07b0db1dd083273eb6fa15 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 10 Mar 2026 09:09:59 +0100
+Subject: [PATCH] Makefile: add cross install support
+
+Add support to override the DESTDIR & PREFIX.
+
+Upstream: https://github.com/ADLINK/sema-linux-ec/pull/14
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ Makefile | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b6d9af9..fefae79 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,7 @@
+ # SPDX-License-Identifier: BSD-3-Clause
++DESTDIR ?=
++PREFIX ?= /usr
++
+ SEMA_OBJS = $(patsubst %.c,%.o,$(wildcard lib/*.c))
+ WDOG_OBJS = $(patsubst %.c,%.o,$(wildcard watchdogtest/*.c))
+ APP_OBJS = $(patsubst %.c,%.o,$(wildcard app/*.c))
+@@ -77,8 +80,9 @@ driver_install:
+ 	@depmod -a
+ 
+ app_install:
+-	@cp lib/libsema.so /usr/lib
+-	@cp wdogtest semautil /usr/bin
++	@install -d $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/bin
++	@install -m 755 lib/libsema.so $(DESTDIR)$(PREFIX)/lib
++	@install -m 755 wdogtest semautil $(DESTDIR)$(PREFIX)/bin
+ 
+ driver_clean:
+ 	@make -C /lib/modules/`uname -r`/build M=`pwd` clean
+-- 
+2.43.0
+
package/sema-linux-ec/0004-Makefile-add-a-separate-app_build-target.patch new file +42 -0

42 lines not on this page · raw message

package/sema-linux-ec/Config.in new file +14 -0
new file mode 100644
index 00000000000..39663d542cf
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_SEMA_LINUX_EC
+	bool "sema-linux-ec"
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_LINUX_KERNEL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  SEMA (Smart Embedded Management Agent) is an agent used to
+	  manage system health and access the I/O pins through an API.
+
+	  https://github.com/ADLINK/sema-linux-ec
+
+comment "sema-linux-ec needs a toolchain w/ dynamic library, Linux kernel"
+	depends on BR2_STATIC_LIBS || !BR2_LINUX_KERNEL
package/sema-linux-ec/sema-linux-ec.hash new file +5 -0
new file mode 100644
index 00000000000..d32864316e1
@@ -0,0 +1,5 @@
+# locally computed
+sha256  daef5a95e686ce1fa59511280759ccdaf59d41eb698b7c5df0a35e98c0718127  sema-linux-ec-v4.3.12.tar.gz
+sha256  c45298c445058c0f8413c94be71ecedd55f306f3149ed2aea90b0e098ddc8810  LICENSE.BSD3
+sha256  d8c320ffc0030d1b096ae4732b50d2b811cf95e9a9b7377c1127b2563e0a0388  LICENSE.GPLv2
+sha256  2358eef45f799ab496fe93f4791f509524d3d65ca046e562706e62d72f738f20  LICENSE.dual
package/sema-linux-ec/sema-linux-ec.mk new file +34 -0
new file mode 100644
index 00000000000..58af1bb2220
@@ -0,0 +1,34 @@
+################################################################################
+#
+# sema-linux-ec
+#
+################################################################################
+
+SEMA_LINUX_EC_VERSION = v4.3.12
+SEMA_LINUX_EC_SITE = $(call github,ADLINK,sema-linux-ec,$(SEMA_LINUX_EC_VERSION))
+SEMA_LINUX_EC_LICENSE = BSD-3-Clause or GPL-2.0
+SEMA_LINUX_EC_LICENSE_FILES = LICENSE.BSD3 LICENSE.GPLv2 LICENSE.dual
+SEMA_LINUX_EC_DEPENDENCIES = util-linux
+
+define SEMA_LINUX_EC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) app_build
+endef
+
+define SEMA_LINUX_EC_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) app_install
+endef
+
+define SEMA_LINUX_EC_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HWMON)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_BOARDINFO)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG_CORE)
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
Signature · 6 lines
2.43.0

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

PATCH v6 1/1 package/sema-linux: add new unified adlink sema drivers package

From: Devreese Jorik <[email protected]>

Add the unified sema-linux package, which replaces the archived sema-linux-ec repository from Adlink. This unified upstream repository provides support for both BMC (Board Management Controller) and EC (Embedded Controller) devices.

---
v2: reworked patch
- added user sw step
- fixed help text
- fixed hash and license info
v3: fixed build args
v4: fix missing util-linux dependency
v5: reworked patch
- fix parallel build
- add and use app_build/app_install
v6: rework to use sema-linux as sema-linux-ec was archived

---
 package/Config.in                             |  1 +
 ...CC-variable-instead-of-hardcoded-gcc.patch | 54 +++++++++++++++++++
 ...ure-that-lsema-is-always-built-first.patch | 32 +++++++++++
 ...3-Makefile-add-cross-install-support.patch | 38 +++++++++++++
 ...file-add-a-separate-app_build-target.patch | 42 +++++++++++++++
 package/sema-linux/Config.in                  | 14 +++++
 package/sema-linux/sema-linux.hash            |  5 ++
 package/sema-linux/sema-linux.mk              | 34 ++++++++++++
 8 files changed, 220 insertions(+)
 create mode 100644 package/sema-linux/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch
 create mode 100644 package/sema-linux/0002-Makefile-ensure-that-lsema-is-always-built-first.patch
 create mode 100644 package/sema-linux/0003-Makefile-add-cross-install-support.patch
 create mode 100644 package/sema-linux/0004-Makefile-add-a-separate-app_build-target.patch
 create mode 100644 package/sema-linux/Config.in
 create mode 100644 package/sema-linux/sema-linux.hash
 create mode 100644 package/sema-linux/sema-linux.mk
package/Config.in +1 -0
index 6058800682..b0793ed6cf 100644
@@ -609,6 +609,7 @@ endmenu
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/sedutil/Config.in"
+	source "package/sema-linux/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
 	source "package/sigrok-cli/Config.in"
package/sema-linux/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch new file +54 -0

54 lines not on this page · raw message

package/sema-linux/0002-Makefile-ensure-that-lsema-is-always-built-first.patch new file +32 -0
new file mode 100644
index 0000000000..d278b30b06
@@ -0,0 +1,32 @@
+From 2f1e58beeee7aedd1000f85e5f3a63766d131bc5 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 10 Mar 2026 09:08:05 +0100
+Subject: [PATCH] Makefile: ensure that -lsema is always built first
+
+When using parallel builds, there is no guarantee that libsema.so
+is built first.
+
+Upstream: https://github.com/ADLINK/sema-linux/pull/2
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index cfad0c7..37926e1 100755
+--- a/Makefile
++++ b/Makefile
+@@ -51,8 +51,8 @@ driver_clean:
+ app_clean:
+ 	@rm -f semautil wdogtest app/*.o lib/*.o lib/*.so
+ 
+-semautil: $(APP_OBJS)
+-	@$(CC) -g -o $@ $^ -Llib -lsema -luuid
++semautil: libsema.so $(APP_OBJS)
++	@$(CC) -g -o $@ $(APP_OBJS) -Llib -lsema -luuid
+ 
+ wdogtest: $(WDOG_OBJS)
+ 	@$(CC) $^ -g -o $@
+-- 
+2.43.0
+
package/sema-linux/0003-Makefile-add-cross-install-support.patch new file +38 -0
new file mode 100644
index 0000000000..0e84e9cbb6
@@ -0,0 +1,38 @@
+From dcd82a06551ade5c7dd85c3dbb472bd3593602ef Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 10 Mar 2026 09:09:59 +0100
+Subject: [PATCH] Makefile: add cross install support
+
+Add support to override the DESTDIR & PREFIX.
+
+Upstream: https://github.com/ADLINK/sema-linux/pull/2
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ Makefile | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 37926e1..1432e0d 100755
+--- a/Makefile
++++ b/Makefile
+@@ -1,3 +1,5 @@
++DESTDIR ?=
++PREFIX ?= /usr
+ 
+ SEMA_OBJS = $(patsubst %.c,%.o,$(wildcard lib/*.c))
+ WDOG_OBJS = $(patsubst %.c,%.o,$(wildcard watchdogtest/*.c))
+@@ -38,8 +40,9 @@ driver_install:
+ 	@depmod -a
+ 
+ app_install:
+-	@cp lib/libsema.so /usr/lib
+-	@cp wdogtest semautil /usr/bin
++	@install -d $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/bin
++	@install -m 755 lib/libsema.so $(DESTDIR)$(PREFIX)/lib
++	@install -m 755 wdogtest semautil $(DESTDIR)$(PREFIX)/bin
+ 
+ driver_clean:
+ 	@make -C /lib/modules/`uname -r`/build M=`pwd` clean
+-- 
+2.43.0
+
package/sema-linux/0004-Makefile-add-a-separate-app_build-target.patch new file +42 -0

42 lines not on this page · raw message

package/sema-linux/Config.in new file +14 -0
new file mode 100644
index 0000000000..04a1448444
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_SEMA_LINUX
+	bool "sema-linux"
+	depends on !BR2_s390x
+	depends on BR2_LINUX_KERNEL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  SEMA (Smart Embedded Management Agent) is an agent used to
+	  manage system health and access the I/O pins through an API.
+
+	  https://github.com/ADLINK/sema-linux
+
+comment "sema-linux needs a toolchain w/ dynamic library, Linux kernel"
+	depends on BR2_STATIC_LIBS || !BR2_LINUX_KERNEL
package/sema-linux/sema-linux.hash new file +5 -0
new file mode 100644
index 0000000000..c2e086c5c5
@@ -0,0 +1,5 @@
+# locally computed
+sha256  fe67c77b12db6db02e2c745dce79085b5fc16be2dabd3eedda625d53ccbd5b26  sema-linux-ec-v4.3.12.tar.gz
+sha256  71be2577bc5028f0e15bb170439878b61593967460e88e0d26a889430a32db00  LICENSE.BSD3
+sha256  d8c320ffc0030d1b096ae4732b50d2b811cf95e9a9b7377c1127b2563e0a0388  LICENSE.GPLv2
+sha256  f484be998be05569aa68e5afb1d29a37cbe2cc7947aea66df83bab7bbdfd74f3  LICENSE.dual
package/sema-linux/sema-linux.mk new file +34 -0
new file mode 100644
index 0000000000..daabd8b8c0
@@ -0,0 +1,34 @@
+################################################################################
+#
+# sema-linux
+#
+################################################################################
+
+SEMA_LINUX_VERSION = v4.4.3
+SEMA_LINUX_SITE = $(call github,ADLINK,sema-linux,$(SEMA_LINUX_VERSION))
+SEMA_LINUX_LICENSE = BSD-3-Clause or GPL-2.0
+SEMA_LINUX_LICENSE_FILES = LICENSE.BSD3 LICENSE.GPLv2 LICENSE.dual
+SEMA_LINUX_DEPENDENCIES = util-linux
+
+define SEMA_LINUX_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) app_build
+endef
+
+define SEMA_LINUX_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) app_install
+endef
+
+define SEMA_LINUX_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HWMON)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_BOARDINFO)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG_CORE)
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
Signature · 6 lines
2.43.0

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

PATCH v7 1/1 package/sema-linux: add new unified adlink sema drivers package

From: Devreese Jorik <[email protected]>

Add the unified sema-linux package, which replaces the archived sema-linux-ec repository from Adlink. This unified upstream repository provides support for both BMC (Board Management Controller) and EC (Embedded Controller) devices.

---
v2: reworked patch
- added user sw step
- fixed help text
- fixed hash and license info
v3: fixed build args
v4: fix missing util-linux dependency
v5: reworked patch
- fix parallel build
- add and use app_build/app_install
v6: rework to use sema-linux as sema-linux-ec was archived
v7: fix wrong hash entry

---
 package/Config.in                             |  1 +
 ...CC-variable-instead-of-hardcoded-gcc.patch | 54 +++++++++++++++++++
 ...ure-that-lsema-is-always-built-first.patch | 32 +++++++++++
 ...3-Makefile-add-cross-install-support.patch | 38 +++++++++++++
 ...file-add-a-separate-app_build-target.patch | 42 +++++++++++++++
 package/sema-linux/Config.in                  | 14 +++++
 package/sema-linux/sema-linux.hash            |  5 ++
 package/sema-linux/sema-linux.mk              | 34 ++++++++++++
 8 files changed, 220 insertions(+)
 create mode 100644 package/sema-linux/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch
 create mode 100644 package/sema-linux/0002-Makefile-ensure-that-lsema-is-always-built-first.patch
 create mode 100644 package/sema-linux/0003-Makefile-add-cross-install-support.patch
 create mode 100644 package/sema-linux/0004-Makefile-add-a-separate-app_build-target.patch
 create mode 100644 package/sema-linux/Config.in
 create mode 100644 package/sema-linux/sema-linux.hash
 create mode 100644 package/sema-linux/sema-linux.mk
package/Config.in +1 -0
index 6058800682..b0793ed6cf 100644
@@ -609,6 +609,7 @@ endmenu
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/sedutil/Config.in"
+	source "package/sema-linux/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
 	source "package/sigrok-cli/Config.in"
package/sema-linux/0001-Makefile-use-CC-variable-instead-of-hardcoded-gcc.patch new file +54 -0

54 lines not on this page · raw message

package/sema-linux/0002-Makefile-ensure-that-lsema-is-always-built-first.patch new file +32 -0
new file mode 100644
index 0000000000..d278b30b06
@@ -0,0 +1,32 @@
+From 2f1e58beeee7aedd1000f85e5f3a63766d131bc5 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 10 Mar 2026 09:08:05 +0100
+Subject: [PATCH] Makefile: ensure that -lsema is always built first
+
+When using parallel builds, there is no guarantee that libsema.so
+is built first.
+
+Upstream: https://github.com/ADLINK/sema-linux/pull/2
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index cfad0c7..37926e1 100755
+--- a/Makefile
++++ b/Makefile
+@@ -51,8 +51,8 @@ driver_clean:
+ app_clean:
+ 	@rm -f semautil wdogtest app/*.o lib/*.o lib/*.so
+ 
+-semautil: $(APP_OBJS)
+-	@$(CC) -g -o $@ $^ -Llib -lsema -luuid
++semautil: libsema.so $(APP_OBJS)
++	@$(CC) -g -o $@ $(APP_OBJS) -Llib -lsema -luuid
+ 
+ wdogtest: $(WDOG_OBJS)
+ 	@$(CC) $^ -g -o $@
+-- 
+2.43.0
+
package/sema-linux/0003-Makefile-add-cross-install-support.patch new file +38 -0
new file mode 100644
index 0000000000..0e84e9cbb6
@@ -0,0 +1,38 @@
+From dcd82a06551ade5c7dd85c3dbb472bd3593602ef Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 10 Mar 2026 09:09:59 +0100
+Subject: [PATCH] Makefile: add cross install support
+
+Add support to override the DESTDIR & PREFIX.
+
+Upstream: https://github.com/ADLINK/sema-linux/pull/2
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ Makefile | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 37926e1..1432e0d 100755
+--- a/Makefile
++++ b/Makefile
+@@ -1,3 +1,5 @@
++DESTDIR ?=
++PREFIX ?= /usr
+ 
+ SEMA_OBJS = $(patsubst %.c,%.o,$(wildcard lib/*.c))
+ WDOG_OBJS = $(patsubst %.c,%.o,$(wildcard watchdogtest/*.c))
+@@ -38,8 +40,9 @@ driver_install:
+ 	@depmod -a
+ 
+ app_install:
+-	@cp lib/libsema.so /usr/lib
+-	@cp wdogtest semautil /usr/bin
++	@install -d $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/bin
++	@install -m 755 lib/libsema.so $(DESTDIR)$(PREFIX)/lib
++	@install -m 755 wdogtest semautil $(DESTDIR)$(PREFIX)/bin
+ 
+ driver_clean:
+ 	@make -C /lib/modules/`uname -r`/build M=`pwd` clean
+-- 
+2.43.0
+
package/sema-linux/0004-Makefile-add-a-separate-app_build-target.patch new file +42 -0

42 lines not on this page · raw message

package/sema-linux/Config.in new file +14 -0
new file mode 100644
index 0000000000..04a1448444
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_SEMA_LINUX
+	bool "sema-linux"
+	depends on !BR2_s390x
+	depends on BR2_LINUX_KERNEL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  SEMA (Smart Embedded Management Agent) is an agent used to
+	  manage system health and access the I/O pins through an API.
+
+	  https://github.com/ADLINK/sema-linux
+
+comment "sema-linux needs a toolchain w/ dynamic library, Linux kernel"
+	depends on BR2_STATIC_LIBS || !BR2_LINUX_KERNEL
package/sema-linux/sema-linux.hash new file +5 -0
new file mode 100644
index 0000000000..20e4d74995
@@ -0,0 +1,5 @@
+# locally computed
+sha256  fe67c77b12db6db02e2c745dce79085b5fc16be2dabd3eedda625d53ccbd5b26  sema-linux-v4.4.3.tar.gz
+sha256  71be2577bc5028f0e15bb170439878b61593967460e88e0d26a889430a32db00  LICENSE.BSD3
+sha256  d8c320ffc0030d1b096ae4732b50d2b811cf95e9a9b7377c1127b2563e0a0388  LICENSE.GPLv2
+sha256  f484be998be05569aa68e5afb1d29a37cbe2cc7947aea66df83bab7bbdfd74f3  LICENSE.dual
package/sema-linux/sema-linux.mk new file +34 -0
new file mode 100644
index 0000000000..daabd8b8c0
@@ -0,0 +1,34 @@
+################################################################################
+#
+# sema-linux
+#
+################################################################################
+
+SEMA_LINUX_VERSION = v4.4.3
+SEMA_LINUX_SITE = $(call github,ADLINK,sema-linux,$(SEMA_LINUX_VERSION))
+SEMA_LINUX_LICENSE = BSD-3-Clause or GPL-2.0
+SEMA_LINUX_LICENSE_FILES = LICENSE.BSD3 LICENSE.GPLv2 LICENSE.dual
+SEMA_LINUX_DEPENDENCIES = util-linux
+
+define SEMA_LINUX_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) app_build
+endef
+
+define SEMA_LINUX_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) app_install
+endef
+
+define SEMA_LINUX_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HWMON)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_BOARDINFO)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG_CORE)
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
Signature · 6 lines
2.43.0

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

PATCH v8 1/1 package/sema-linux: add new unified adlink sema drivers package

From: Devreese Jorik <[email protected]>

Add the unified sema-linux package, which replaces the archived sema-linux-ec repository from Adlink. This unified upstream repository provides support for both BMC (Board Management Controller) and EC (Embedded Controller) devices.

---
v2: reworked patch
- added user sw step
- fixed help text
- fixed hash and license info
v3: fixed build args
v4: fix missing util-linux dependency
v5: reworked patch
- fix parallel build
- add and use app_build/app_install
v6: rework to use sema-linux as sema-linux-ec was archived
v7: fix wrong hash entry
v8: bump to v4.4.5

---
 package/Config.in                  |  1 +
 package/sema-linux/Config.in       | 14 ++++++++++++
 package/sema-linux/sema-linux.hash |  5 +++++
 package/sema-linux/sema-linux.mk   | 34 ++++++++++++++++++++++++++++++
 4 files changed, 54 insertions(+)
 create mode 100644 package/sema-linux/Config.in
 create mode 100644 package/sema-linux/sema-linux.hash
 create mode 100644 package/sema-linux/sema-linux.mk
package/Config.in +1 -0
index 9c2800781e5..fc964be7198 100644
@@ -610,6 +610,7 @@ endmenu
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/sedutil/Config.in"
+	source "package/sema-linux/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
 	source "package/sigrok-cli/Config.in"
package/sema-linux/Config.in new file +14 -0
new file mode 100644
index 00000000000..04a14484449
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_SEMA_LINUX
+	bool "sema-linux"
+	depends on !BR2_s390x
+	depends on BR2_LINUX_KERNEL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  SEMA (Smart Embedded Management Agent) is an agent used to
+	  manage system health and access the I/O pins through an API.
+
+	  https://github.com/ADLINK/sema-linux
+
+comment "sema-linux needs a toolchain w/ dynamic library, Linux kernel"
+	depends on BR2_STATIC_LIBS || !BR2_LINUX_KERNEL
package/sema-linux/sema-linux.hash new file +5 -0
new file mode 100644
index 00000000000..a66c0ade050
@@ -0,0 +1,5 @@
+# locally computed
+sha256  510d30023e8216626bfd0fafa9bc75ad5f9f8e7c98eed3fe2a23884c6a3b361f  sema-linux-v4.4.5.tar.gz
+sha256  71be2577bc5028f0e15bb170439878b61593967460e88e0d26a889430a32db00  LICENSE.BSD3
+sha256  d8c320ffc0030d1b096ae4732b50d2b811cf95e9a9b7377c1127b2563e0a0388  LICENSE.GPLv2
+sha256  f484be998be05569aa68e5afb1d29a37cbe2cc7947aea66df83bab7bbdfd74f3  LICENSE.dual
package/sema-linux/sema-linux.mk new file +34 -0
new file mode 100644
index 00000000000..1fd2e371675
@@ -0,0 +1,34 @@
+################################################################################
+#
+# sema-linux
+#
+################################################################################
+
+SEMA_LINUX_VERSION = v4.4.5
+SEMA_LINUX_SITE = $(call github,ADLINK,sema-linux,$(SEMA_LINUX_VERSION))
+SEMA_LINUX_LICENSE = BSD-3-Clause or GPL-2.0
+SEMA_LINUX_LICENSE_FILES = LICENSE.BSD3 LICENSE.GPLv2 LICENSE.dual
+SEMA_LINUX_DEPENDENCIES = util-linux
+
+define SEMA_LINUX_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) app_build
+endef
+
+define SEMA_LINUX_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) app_install
+endef
+
+define SEMA_LINUX_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HWMON)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_BOARDINFO)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG_CORE)
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
Signature · 6 lines
2.43.0

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

Re: [Buildroot] [PATCH v8] package/sema-linux: add new unified adlink sema drivers package

Quoted 9 lines · Thomas Devoogdt

From: Devreese Jorik <[email protected]>

Add the unified sema-linux package, which replaces the archived sema-linux-ec repository from Adlink. This unified upstream repository provides support for both BMC (Board Management Controller) and EC (Embedded Controller) devices.

An entry in the DEVELOPERS file was missing, so I've added two: one for Jorik, one for you, so that both of you will receive the e-mail notifications about sema-linux. Other than that: patch applied, thanks!

Best regards,

Thomas Petazzoni

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