All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] firmwared: add recipe
@ 2020-12-04 17:05 r.karszniewicz
  2020-12-04 17:54 ` [oe] " Jose Quaresma
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: r.karszniewicz @ 2020-12-04 17:05 UTC (permalink / raw)
  To: openembedded-devel

This program is needed for loading external firmware via Linux' fallback
mechanism.

Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>
---
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

diff --git a/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service b/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service
new file mode 100644
index 000000000000..c2106a25168c
--- /dev/null
+++ b/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Linux Firmware Loader Daemon
+
+[Service]
+Type=simple
+ExecStart=@BINDIR@/firmwared -d /lib/firmware
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-oe/recipes-bsp/firmwared/firmwared_git.bb b/meta-oe/recipes-bsp/firmwared/firmwared_git.bb
new file mode 100644
index 000000000000..3b2a8070bdd3
--- /dev/null
+++ b/meta-oe/recipes-bsp/firmwared/firmwared_git.bb
@@ -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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [oe] [meta-oe][PATCH] firmwared: add recipe
  2020-12-04 17:05 [meta-oe][PATCH] firmwared: add recipe r.karszniewicz
@ 2020-12-04 17:54 ` Jose Quaresma
  2020-12-04 19:27 ` Khem Raj
  2020-12-07 10:49 ` Ross Burton
  2 siblings, 0 replies; 6+ messages in thread
From: Jose Quaresma @ 2020-12-04 17:54 UTC (permalink / raw)
  To: Robert Karszniewicz; +Cc: openembeded-devel

[-- Attachment #1: Type: text/plain, Size: 2815 bytes --]

Robert Karszniewicz <r.karszniewicz@phytec.de> escreveu no dia sexta,
4/12/2020 à(s) 17:05:

> This program is needed for loading external firmware via Linux' fallback
> mechanism.
>
> Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>
> ---
> 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
>
> diff --git a/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service
> b/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service
> new file mode 100644
> index 000000000000..c2106a25168c
> --- /dev/null
> +++ b/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service
> @@ -0,0 +1,9 @@
> +[Unit]
> +Description=Linux Firmware Loader Daemon
> +
> +[Service]
> +Type=simple
> +ExecStart=@BINDIR@/firmwared -d /lib/firmware
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-oe/recipes-bsp/firmwared/firmwared_git.bb
> b/meta-oe/recipes-bsp/firmwared/firmwared_git.bb
> new file mode 100644
> index 000000000000..3b2a8070bdd3
> --- /dev/null
> +++ b/meta-oe/recipes-bsp/firmwared/firmwared_git.bb
> @@ -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
>

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'
> ${D}${systemd_unitdir}/system/firmwared.service
> +}
> --
> 2.7.4
>
>
> 
>
>

-- 
best regards,
José Quaresma

[-- Attachment #2: Type: text/html, Size: 4346 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [oe] [meta-oe][PATCH] firmwared: add recipe
  2020-12-04 17:05 [meta-oe][PATCH] firmwared: add recipe r.karszniewicz
  2020-12-04 17:54 ` [oe] " Jose Quaresma
@ 2020-12-04 19:27 ` Khem Raj
  2020-12-07 10:49 ` Ross Burton
  2 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2020-12-04 19:27 UTC (permalink / raw)
  To: Robert Karszniewicz; +Cc: openembeded-devel

On Fri, Dec 4, 2020 at 9:05 AM Robert Karszniewicz
<r.karszniewicz@phytec.de> wrote:
>
> This program is needed for loading external firmware via Linux' fallback
> mechanism.
>

Please add it to packagegroup-meta-oe as well.

> Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>
> ---
> 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
>
> diff --git a/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service b/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service
> new file mode 100644
> index 000000000000..c2106a25168c
> --- /dev/null
> +++ b/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service
> @@ -0,0 +1,9 @@
> +[Unit]
> +Description=Linux Firmware Loader Daemon
> +
> +[Service]
> +Type=simple
> +ExecStart=@BINDIR@/firmwared -d /lib/firmware
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-oe/recipes-bsp/firmwared/firmwared_git.bb b/meta-oe/recipes-bsp/firmwared/firmwared_git.bb
> new file mode 100644
> index 000000000000..3b2a8070bdd3
> --- /dev/null
> +++ b/meta-oe/recipes-bsp/firmwared/firmwared_git.bb
> @@ -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

> +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.

> +SRCREV = "2e6b5db43d63a5c0283a4cae9a6a20b7ad107a04"
> +
> +S = "${WORKDIR}/git"
> +
> +DEPENDS = "glib-2.0 systemd"

Does it depend on systemd at runtime ? if so lets also add

inherit features_check
REQUIRED_DISTRO_FEATURES = "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
>
>
> 
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [oe] [meta-oe][PATCH] firmwared: add recipe
  2020-12-04 17:05 [meta-oe][PATCH] firmwared: add recipe r.karszniewicz
  2020-12-04 17:54 ` [oe] " Jose Quaresma
  2020-12-04 19:27 ` Khem Raj
@ 2020-12-07 10:49 ` Ross Burton
  2020-12-08 15:33   ` Robert Karszniewicz
  2 siblings, 1 reply; 6+ messages in thread
From: Ross Burton @ 2020-12-07 10:49 UTC (permalink / raw)
  To: Robert Karszniewicz; +Cc: openembedded-devel

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

On Fri, 4 Dec 2020 at 17:05, Robert Karszniewicz
<r.karszniewicz@phytec.de> wrote:
>
> This program is needed for loading external firmware via Linux' fallback
> mechanism.
>
> Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>
> ---
> 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
>
> diff --git a/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service b/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service
> new file mode 100644
> index 000000000000..c2106a25168c
> --- /dev/null
> +++ b/meta-oe/recipes-bsp/firmwared/firmwared/firmwared.service
> @@ -0,0 +1,9 @@
> +[Unit]
> +Description=Linux Firmware Loader Daemon
> +
> +[Service]
> +Type=simple
> +ExecStart=@BINDIR@/firmwared -d /lib/firmware
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-oe/recipes-bsp/firmwared/firmwared_git.bb b/meta-oe/recipes-bsp/firmwared/firmwared_git.bb
> new file mode 100644
> index 000000000000..3b2a8070bdd3
> --- /dev/null
> +++ b/meta-oe/recipes-bsp/firmwared/firmwared_git.bb
> @@ -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
>
>
> 
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [oe] [meta-oe][PATCH] firmwared: add recipe
  2020-12-07 10:49 ` Ross Burton
@ 2020-12-08 15:33   ` Robert Karszniewicz
  2020-12-08 15:57     ` Ross Burton
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Karszniewicz @ 2020-12-08 15:33 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-devel

On 12/7/20 11:49 AM, Ross Burton wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [oe] [meta-oe][PATCH] firmwared: add recipe
  2020-12-08 15:33   ` Robert Karszniewicz
@ 2020-12-08 15:57     ` Ross Burton
  0 siblings, 0 replies; 6+ messages in thread
From: Ross Burton @ 2020-12-08 15:57 UTC (permalink / raw)
  To: Robert Karszniewicz; +Cc: openembedded-devel

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

On Tue, 8 Dec 2020 at 15:33, Robert Karszniewicz
<r.karszniewicz@phytec.de> wrote:
>
> On 12/7/20 11:49 AM, Ross Burton wrote:
> > 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-08 15:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 17:05 [meta-oe][PATCH] firmwared: add recipe r.karszniewicz
2020-12-04 17:54 ` [oe] " Jose Quaresma
2020-12-04 19:27 ` Khem Raj
2020-12-07 10:49 ` Ross Burton
2020-12-08 15:33   ` Robert Karszniewicz
2020-12-08 15:57     ` Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.