From: Reza Arbab <arbab@linux.ibm.com>
To: buildroot@buildroot.org
Cc: Reza Arbab <arbab@linux.ibm.com>,
Laurent Vivier <laurent@vivier.eu>, Joel Stanley <joel@jms.id.au>
Subject: [Buildroot] [PATCH 3/5] package/petitboot: poll removable devices
Date: Wed, 6 Sep 2023 14:46:07 -0500 [thread overview]
Message-ID: <20230906194609.74080-4-arbab@linux.ibm.com> (raw)
In-Reply-To: <20230906194609.74080-1-arbab@linux.ibm.com>
Add a udev rule to enable notification of media change events on
removable devices, so petitboot can dynamically adapt to them.
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
---
package/petitboot/petitboot.mk | 2 ++
package/petitboot/removable-event-poll.rules | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 package/petitboot/removable-event-poll.rules
diff --git a/package/petitboot/petitboot.mk b/package/petitboot/petitboot.mk
index 556d41230237..9326738aa038 100644
--- a/package/petitboot/petitboot.mk
+++ b/package/petitboot/petitboot.mk
@@ -57,6 +57,8 @@ define PETITBOOT_POST_INSTALL
$(TARGET_DIR)/etc/init.d/S15pb-discover
$(INSTALL) -D -m 0755 $(PETITBOOT_PKGDIR)/petitboot-console-ui.rules \
$(TARGET_DIR)/etc/udev/rules.d/petitboot-console-ui.rules
+ $(INSTALL) -D -m 0755 $(PETITBOOT_PKGDIR)/removable-event-poll.rules \
+ $(TARGET_DIR)/etc/udev/rules.d/removable-event-poll.rules
$(INSTALL) -D -m 0755 $(PETITBOOT_PKGDIR)/sysctl.conf \
$(TARGET_DIR)/etc/sysctl.d/petitboot.conf
mkdir -p $(TARGET_DIR)/usr/share/udhcpc/default.script.d/
diff --git a/package/petitboot/removable-event-poll.rules b/package/petitboot/removable-event-poll.rules
new file mode 100644
index 000000000000..57bb74d3c00c
--- /dev/null
+++ b/package/petitboot/removable-event-poll.rules
@@ -0,0 +1,3 @@
+# petitboot needs notification for media change events on removable devices,
+# which we only get if we've set the poll_msecs sysfs attribute.
+ACTION!="remove", ATTR{removable}=="1", ATTR{events_poll_msecs}="2000"
--
2.39.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-09-06 19:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 19:46 [Buildroot] [PATCH 0/5] package/petitboot: misc enhancement Reza Arbab
2023-09-06 19:46 ` [Buildroot] [PATCH 1/5] package/petitboot: fix HOST_PROG_SHUTDOWN value Reza Arbab
2023-09-07 8:48 ` Laurent Vivier
2023-09-25 5:30 ` Peter Korsgaard
2023-09-06 19:46 ` [Buildroot] [PATCH 2/5] package/petitboot: run pb-console at boot Reza Arbab
2023-09-07 8:51 ` Laurent Vivier
2023-09-07 19:41 ` Reza Arbab
2023-09-13 15:54 ` Reza Arbab
2023-09-06 19:46 ` Reza Arbab [this message]
2023-09-07 8:53 ` [Buildroot] [PATCH 3/5] package/petitboot: poll removable devices Laurent Vivier
2023-09-06 19:46 ` [Buildroot] [PATCH 4/5] package/petitboot: enable discovery of software RAID devices Reza Arbab
2023-09-07 8:54 ` Laurent Vivier
2023-09-06 19:46 ` [Buildroot] [PATCH 5/5] package/petitboot: enable discovery of SCSI devices Reza Arbab
2023-09-07 8:55 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230906194609.74080-4-arbab@linux.ibm.com \
--to=arbab@linux.ibm.com \
--cc=buildroot@buildroot.org \
--cc=joel@jms.id.au \
--cc=laurent@vivier.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.