From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,MISSING_DATE,MISSING_MID, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 From: "Leonid Krivoshein" To: make-initrd@lists.altlinux.org Subject: [make-initrd] [PATCH v6 22/22] bootchain-core: adds ability for log to the early console X-BeenThere: make-initrd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: make-initrd@lists.altlinux.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 24 Oct 2021 17:23:32 -0000 X-List-Received-Date: Sun, 24 Oct 2021 17:23:32 -0000 Message-ID: <20211024172332._HPseZ2YEgNcw0hBuHcAywF16ZuRS0MKSYN70SaJjWc@z> Archived-At: List-Archive: To use this feature, you can use, for example, the following set of parameters: rdlog=printk bc_debug ignore_loglevel earlycon=uart8250,0x03F8 console=ttyS0 Signed-off-by: Leonid Krivoshein --- features/bootchain-core/data/sbin/chaind | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/bootchain-core/data/sbin/chaind b/features/bootchain-core/data/sbin/chaind index 68a1aae..c1cf765 100755 --- a/features/bootchain-core/data/sbin/chaind +++ b/features/bootchain-core/data/sbin/chaind @@ -35,6 +35,10 @@ if [ "x${1-}" != "x--foreground" ]; then if [ "${RDLOG-}" = console ]; then BC_LOGFILE=/dev/console + elif [ "${RDLOG-}" = printk ]; then + BC_LOGFILE=/dev/ttyprintk + [ -e "$BC_LOGFILE" ] || + mknod "$BC_LOGFILE" c 5 3 elif [ -z "${CONSOLE-}" ] && [ -n "$BC_LOG_VT" ] && [ -z "${NOASKUSER-}" ] && -- 2.24.1