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 2/5] package/petitboot: run pb-console at boot
Date: Wed, 6 Sep 2023 14:46:06 -0500 [thread overview]
Message-ID: <20230906194609.74080-3-arbab@linux.ibm.com> (raw)
In-Reply-To: <20230906194609.74080-1-arbab@linux.ibm.com>
Install a udev rule to run the petitboot UI on commonly-known consoles.
To prevent the kernel's console output from trampling the UI, also add
a sysctl file to reduce the kernel log levels to KERN_ALERT.
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
---
package/petitboot/petitboot-console-ui.rules | 4 ++++
package/petitboot/petitboot.mk | 4 ++++
package/petitboot/sysctl.conf | 1 +
3 files changed, 9 insertions(+)
create mode 100644 package/petitboot/petitboot-console-ui.rules
create mode 100644 package/petitboot/sysctl.conf
diff --git a/package/petitboot/petitboot-console-ui.rules b/package/petitboot/petitboot-console-ui.rules
new file mode 100644
index 000000000000..de3b4b1c035f
--- /dev/null
+++ b/package/petitboot/petitboot-console-ui.rules
@@ -0,0 +1,4 @@
+# spawn a petitboot UI on common user-visible interface devices
+SUBSYSTEM=="tty", KERNEL=="hvc*", RUN+="/usr/libexec/petitboot/pb-console --getty --detach -- -n -i 0 $name linux"
+SUBSYSTEM=="tty", KERNEL=="tty0", RUN+="/usr/libexec/petitboot/pb-console --getty --detach -- -n -i 0 $name linux"
+SUBSYSTEM=="tty", KERNEL=="ttyS*", RUN+="/usr/libexec/petitboot/pb-console --getty --detach -- -n -i 0 $name linux"
diff --git a/package/petitboot/petitboot.mk b/package/petitboot/petitboot.mk
index 8d220f88f45a..556d41230237 100644
--- a/package/petitboot/petitboot.mk
+++ b/package/petitboot/petitboot.mk
@@ -55,6 +55,10 @@ define PETITBOOT_POST_INSTALL
$(TARGET_DIR)/etc/petitboot/boot.d/90-sort-dtb
$(INSTALL) -m 0755 -D $(PETITBOOT_PKGDIR)/S15pb-discover \
$(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)/sysctl.conf \
+ $(TARGET_DIR)/etc/sysctl.d/petitboot.conf
mkdir -p $(TARGET_DIR)/usr/share/udhcpc/default.script.d/
ln -sf /usr/sbin/pb-udhcpc \
$(TARGET_DIR)/usr/share/udhcpc/default.script.d/
diff --git a/package/petitboot/sysctl.conf b/package/petitboot/sysctl.conf
new file mode 100644
index 000000000000..02ab8e3275b5
--- /dev/null
+++ b/package/petitboot/sysctl.conf
@@ -0,0 +1 @@
+kernel.printk = 1 1 1 1
--
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 ` Reza Arbab [this message]
2023-09-07 8:51 ` [Buildroot] [PATCH 2/5] package/petitboot: run pb-console at boot Laurent Vivier
2023-09-07 19:41 ` Reza Arbab
2023-09-13 15:54 ` Reza Arbab
2023-09-06 19:46 ` [Buildroot] [PATCH 3/5] package/petitboot: poll removable devices Reza Arbab
2023-09-07 8:53 ` 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-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox