firmwared: add recipe
PATCH 1/1 firmwared: add recipe
This program is needed for loading external firmware via Linux' fallback mechanism.
---
I wasn't sure which subdirectory to put it in, but I picked recipes-bsp. Thanks.
.../firmwared/firmwared/firmwared.service | 9 +++++++ meta-oe/recipes-bsp/firmwared/firmwared_git.bb | 29 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service create mode 100644 meta-oe/recipes-bsp/firmwared/firmwared_git.bb
meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service new file +9 -0
@@ -0,0 +1,9 @@ +[Unit] +Description=Linux Firmware Loader Daemon + +[Service] +Type=simple +ExecStart=@BINDIR@/firmwared -d /lib/firmware + +[Install] +WantedBy=multi-user.target
meta-oe/recipes-bsp/firmwared/firmwared_git.bb new file +29 -0
@@ -0,0 +1,29 @@ +SUMMARY = "Linux Firmware Loader Daemon" +DESCRIPTION = "The Linux Firmware Loader Daemon monitors the kernel for \ +firmware requests and uploads the firmware blobs it has via the sysfs \ +interface." +HOMEPAGE = "https://github.com/teg/firmwared" +PR = "r0" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=7b486c2338d225a1405d979ed2c15ce8 \ + file://COPYING;md5=daa868b8e1ae17d03228a1145b4060da" + +SRC_URI = "git://github.com/teg/firmwared.git \ + file://firmwared.service" + +PV = "1+git${SRCPV}" +SRCREV = "2e6b5db43d63a5c0283a4cae9a6a20b7ad107a04" + +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 systemd" + +inherit pkgconfig autotools systemd + +SYSTEMD_SERVICE_${PN} = "firmwared.service" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/firmwared.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/firmwared.service +}
Signature · 1 line
2.7.4
Robert Karszniewicz <[email protected]> escreveu no dia sexta, 4/12/2020 à(s) 17:05:
Quoted 67 lines
This program is needed for loading external firmware via Linux' fallback mechanism.
Signed-off-by Robert Karszniewicz <[email protected]>---
I wasn't sure which subdirectory to put it in, but I picked recipes-bsp. Thanks..../firmwared/firmwared/firmwared.service | 9 +++++++ meta-oe/recipes-bsp/firmwared/firmwared_git.bb | 29 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service create mode 100644 meta-oe/recipes-bsp/firmwared/firmwared_git.bbmeta-oe/recipes-bsp/firmwared/firmwared/firmwared.service new file +9
-0@@ -0,0 +1,9 @@ +[Unit] +Description=Linux Firmware Loader Daemon + +[Service] +Type=simple +ExecStart=@BINDIR@/firmwared -d /lib/firmware + +[Install] +WantedBy=multi-user.targetmeta-oe/recipes-bsp/firmwared/firmwared_git.bb new file +8
-0@@ -0,0 +1,29 @@ +SUMMARY = "Linux Firmware Loader Daemon" +DESCRIPTION = "The Linux Firmware Loader Daemon monitors the kernel for \ +firmware requests and uploads the firmware blobs it has via the sysfs \ +interface." +HOMEPAGE = "https://github.com/teg/firmwared" +PR = "r0" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM ="file://LICENSE-APACHE;md5=7b486c2338d225a1405d979ed2c15ce8 \
meta-oe/recipes-bsp/firmwared/firmwared_git.bb new file +19
-0+ file://COPYING;md5=daa868b8e1ae17d03228a1145b4060da" + +SRC_URI = "git://github.com/teg/firmwared.git \ + file://firmwared.service" + +PV = "1+git${SRCPV}" +SRCREV = "2e6b5db43d63a5c0283a4cae9a6a20b7ad107a04" + +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 systemd" + +inherit pkgconfig autotools systemd + +SYSTEMD_SERVICE_${PN} = "firmwared.service" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/firmwared.service
Quoted 2 lines
${D}${systemd_unitdir}/system
you can using systemd_system_unitdir
-install -m 0644 ${WORKDIR}/firmwared.service ${D}${systemd_unitdir}/system +install -m 0644 ${WORKDIR}/firmwared.service ${D}${systemd_system_unitdir}
+ sed -i -e 's,@BINDIR@,${bindir},g'
Quoted 9 lines
${D}${systemd_unitdir}/system/firmwared.service
+}
--
2.7.4
Signature · 2 lines
best regards, José Quaresma
Quoted 4 lines · Robert Karszniewicz
This program is needed for loading external firmware via Linux' fallback mechanism.
Please add it to packagegroup-meta-oe as well.
Quoted 32 lines
Signed-off-by Robert Karszniewicz <[email protected]>---
I wasn't sure which subdirectory to put it in, but I picked recipes-bsp. Thanks..../firmwared/firmwared/firmwared.service | 9 +++++++ meta-oe/recipes-bsp/firmwared/firmwared_git.bb | 29 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service create mode 100644 meta-oe/recipes-bsp/firmwared/firmwared_git.bbmeta-oe/recipes-bsp/firmwared/firmwared/firmwared.service new file +9
-0@@ -0,0 +1,9 @@ +[Unit] +Description=Linux Firmware Loader Daemon + +[Service] +Type=simple +ExecStart=@BINDIR@/firmwared -d /lib/firmware + +[Install] +WantedBy=multi-user.targetmeta-oe/recipes-bsp/firmwared/firmwared_git.bb new file +0
-0
meta-oe/recipes-bsp/firmwared/firmwared_git.bb line 6
Quoted 6 lines
meta-oe/recipes-bsp/firmwared/firmwared_git.bb new file +6
-0@@ -0,0 +1,29 @@ +SUMMARY = "Linux Firmware Loader Daemon" +DESCRIPTION = "The Linux Firmware Loader Daemon monitors the kernel for \ +firmware requests and uploads the firmware blobs it has via the sysfs \ +interface." +HOMEPAGE = "https://github.com/teg/firmwared" +PR = "r0"
remove PR setting
meta-oe/recipes-bsp/firmwared/firmwared_git.bb line 14
Quoted 8 lines
meta-oe/recipes-bsp/firmwared/firmwared_git.bb new file +8
-0+LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=7b486c2338d225a1405d979ed2c15ce8 \ + file://COPYING;md5=daa868b8e1ae17d03228a1145b4060da" + +SRC_URI = "git://github.com/teg/firmwared.git \ + file://firmwared.service" + +PV = "1+git${SRCPV}"
Lets start with 0+git.... if there is no official version released yet.
meta-oe/recipes-bsp/firmwared/firmwared_git.bb line 19
Quoted 5 lines
meta-oe/recipes-bsp/firmwared/firmwared_git.bb new file +5
-0+SRCREV = "2e6b5db43d63a5c0283a4cae9a6a20b7ad107a04" + +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 systemd"
Does it depend on systemd at runtime ? if so lets also add
inherit features_checkREQUIRED_DISTRO_FEATURES = "systemd"
Quoted 16 lines
meta-oe/recipes-bsp/firmwared/firmwared_git.bb new file +10
-1+ +inherit pkgconfig autotools systemd + +SYSTEMD_SERVICE_${PN} = "firmwared.service" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/firmwared.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/firmwared.service +} --2.7.4
Last touched four years ago. Isn't this what udev does? If this is for people who don't want udev, I suggest you make that clear in the summary.
Ross
Quoted 71 lines · Robert Karszniewicz
This program is needed for loading external firmware via Linux' fallback mechanism.
Signed-off-by Robert Karszniewicz <[email protected]>---
I wasn't sure which subdirectory to put it in, but I picked recipes-bsp. Thanks..../firmwared/firmwared/firmwared.service | 9 +++++++ meta-oe/recipes-bsp/firmwared/firmwared_git.bb | 29 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service create mode 100644 meta-oe/recipes-bsp/firmwared/firmwared_git.bbmeta-oe/recipes-bsp/firmwared/firmwared/firmwared.service new file +9
-0@@ -0,0 +1,9 @@ +[Unit] +Description=Linux Firmware Loader Daemon + +[Service] +Type=simple +ExecStart=@BINDIR@/firmwared -d /lib/firmware + +[Install] +WantedBy=multi-user.targetmeta-oe/recipes-bsp/firmwared/firmwared_git.bb new file +29
-1@@ -0,0 +1,29 @@ +SUMMARY = "Linux Firmware Loader Daemon" +DESCRIPTION = "The Linux Firmware Loader Daemon monitors the kernel for \ +firmware requests and uploads the firmware blobs it has via the sysfs \ +interface." +HOMEPAGE = "https://github.com/teg/firmwared" +PR = "r0" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=7b486c2338d225a1405d979ed2c15ce8 \ + file://COPYING;md5=daa868b8e1ae17d03228a1145b4060da" + +SRC_URI = "git://github.com/teg/firmwared.git \ + file://firmwared.service" + +PV = "1+git${SRCPV}" +SRCREV = "2e6b5db43d63a5c0283a4cae9a6a20b7ad107a04" + +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 systemd" + +inherit pkgconfig autotools systemd + +SYSTEMD_SERVICE_${PN} = "firmwared.service" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/firmwared.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/firmwared.service +} --2.7.4
Quoted 3 lines · Ross Burton
Last touched four years ago. Isn't this what udev does? If this is for people who don't want udev, I suggest you make that clear in the summary.
It's not a matter of whether they want to, but they can't. At least from what I can see, udev has removed support for loading firmware six years ago. Am I missing something?
See this paragraph in kernel documentation Documentation/driver-api/firmware/fallback-mechanisms.rst:
Different implementations have been supported in userspace to take
advantage of
this fallback mechanism. When firmware loading was only possible
using the
sysfs mechanism the userspace component "hotplug" provided the
functionality of
monitoring for kobject events. Historically this was superseded be
systemd's
udev, however firmware loading support was removed from udev as of
systemd
commit be2ea723b1d0 ("udev: remove userspace firmware loading support") as of v217 on August, 2014. This means most Linux distributions today are not using or taking advantage of the firmware fallback mechanism provided by kobject uevents. This is specially exacerbated due to the fact
that most
distributions today disable CONFIG_FW_LOADER_USER_HELPER_FALLBACK.
Regards,
Robert
Fair enough, thanks. Pretty slim use case if most distributions turn it off, and the tool is unmaintained. I wonder if anyone is testing that codepath...
Ross
Quoted 33 lines · Robert Karszniewicz
Quoted 3 lines · Ross Burton
Last touched four years ago. Isn't this what udev does? If this is for people who don't want udev, I suggest you make that clear in the summary.
It's not a matter of whether they want to, but they can't. At least from what I
can see, udev has removed support for loading firmware six years ago. Am I missing something?See this paragraph in kernel documentation
Documentation/driver-api/firmware/fallback-mechanisms.rst:Different implementations have been supported in userspace to take
advantage of
this fallback mechanism. When firmware loading was only possible
using the
sysfs mechanism the userspace component "hotplug" provided the
functionality of
monitoring for kobject events. Historically this was superseded be
systemd's
udev, however firmware loading support was removed from udev as of
systemd
commitbe2ea723b1d0("udev: remove userspace firmware loading support") as of v217 on August, 2014. This means most Linux distributions today are not using or taking advantage of the firmware fallback mechanism provided by kobject uevents. This is specially exacerbated due to the fact
that most
distributions today disableCONFIG_FW_LOADER_USER_HELPER_FALLBACK.Regards,
Robert