Skip to content
Snippets Groups Projects
Verified Commit c7dd7fe2 authored by Clayton Craft's avatar Clayton Craft :speech_balloon:
Browse files

main/postmarketos-initramfs: drop console=null warning on boot (MR 5752)

fixes #2989
parent a2b2c0ee
No related branches found
No related tags found
No related merge requests found
# Maintainer: Caleb Connolly <caleb@postmarketos.org>
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-initramfs
pkgver=3.4.1
pkgver=3.4.2
pkgrel=0
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
url="https://postmarketos.org"
......@@ -106,7 +106,7 @@ sha512sums="
c0233d22858a5901db64e1d2fe1f6d39a2e2cfd1b94a10932483f55fed9461e9b8aa2d73b154b9d99a7a8b49ee02abfbddfe917ce0c6d7576601ba2668589c01 00-initramfs-base.files
d0db184a5af00047b5f2c4ae869324968cdd396a17ed2c146e2523669bcf25f9ffd805eba2ec01ea74850ec674e6d0a490cdba7dcbb264bb5c512af3b212f166 00-initramfs-extra-base.files
966284e8ef8f840258a84019db4a6ddd436cdc50193e0673532f70fef86a6e4c1bfd21b682f3708251b6b670ca569c90016926d0926babc5a0257bb33ae55d79 init.sh
bbfbec0690386e81d1a43420e7898a1e32fdf10eab88dc8d1d500a5def84c60a6dbb7055f66dc163429faf46d540dd4e8e44642b27743ea783eed6b41e0ff019 init_functions.sh
ede2654283ab99d56260612b95d2637da9998ba6d74527795c635cca27785587616565b241745a80167c7f3011c2acd6de9b613bd767aba37b97588c88ccfbd6 init_functions.sh
18a0ca97bca094aeb8cb1c2582205ac0aff131085c39f1715246541cacfb35434aba515cd5d338703843efb36b9effd494a51361c51fb39be6052ad866346d3d init_2nd.sh
30fb52456376020e70116169752582d25a011a858111a347c2e53eccaddea8765fab502371cfdc0c2a8ca93034795b7e689e4cd3393ad601268c02024c4e84ab init_functions_2nd.sh
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
......
......@@ -22,7 +22,6 @@ deviceinfo_create_initfs_extra="${deviceinfo_create_initfs_extra:-}"
setup_log() {
local console
console="$(cat /sys/devices/virtual/tty/console/active)"
local warn_null_console=""
# Stash fd1/2 so we can restore them before switch_root, but only if the
# console is not null
......@@ -37,11 +36,11 @@ setup_log() {
# initramfs a lot harder. Let's encourage people to stop using this by printing a warning to dmesg
# and logging to every console we can.
# Instead folks should add 'quiet' or 'silent' to the kernel cmdline to disable logging.
# See related: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/2989
console="/dev/$(echo "$deviceinfo_getty" | cut -d';' -f1)"
if ! [ -e "$console" ]; then
console="/dev/null"
fi
warn_null_console="true"
fi
# Disable kmsg ratelimiting for userspace (it gets re-enabled again before switch_root)
......@@ -61,15 +60,6 @@ setup_log() {
# Process substitution is technically non-POSIX, but is supported by busybox
# shellcheck disable=SC3001
exec > >(tee /pmOS_init.log "$pmsg" "$console" | logger -t "$LOG_PREFIX" -p user.info) 2>&1
if [ -n "$warn_null_console" ]; then
# Log to the display as well just to be sure.
echo "postmarketOS: ****************************************************" | tee /dev/tty1
echo "WARNING: 'console=null' on kernel cmdline. This is NOT supported!" | tee /dev/tty1
echo "WARNING: Use 'quiet' instead if you want to disable logging." | tee /dev/tty1
echo "WARNING: Logging initramfs output to $console, as a fallback." | tee /dev/tty1
echo "postmarketOS: ****************************************************" | tee /dev/tty1
fi
}
mount_proc_sys_dev() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment