簡體   English   中英

當 psplash 從初始化腳本 (PID=1) 啟動時,psplash-write 不起作用

[英]psplash-write does not work when psplash is started from the init script (PID=1)

我已將 psplash 集成到 NVIDIA Jetson Nano 的自定義 Yocto 層。 我想從第一個初始化腳本 (PID=1) 運行 psplash。 原因是為了覆蓋 systemd 加載單元和服務文件所花費的時間。 我已將init=/bin/newinit.sh到 Linux kernel 參數中。 這是替換我的/bin/newinit.sh的內容/sbin/init

#!/bin/sh
/usr/bin/psplash &
/bin/psplashanimator.sh &
exec /sbin/init

這是/bin/psplashanimator.sh的內容

#!/bin/sh
/bin/sleep 0.1 && /usr/bin/psplash-write "PROGRESS 50"

我通過禁用 systemd 守護進程(psplash-start、psplash-systemd)確保psplash-write不會被任何其他進程調用。 但是,我無法使用這些腳本更新進度條。 Psplash 顯示很好,但進度條上沒有任何內容。 如果我將/bin/sleep 0.1 && /usr/bin/psplash-write "PROGRESS 50"移動到/bin/newinit.sh之前exec ,它工作正常; 但它阻止了 init 腳本的主要執行。

總而言之,如果我在自定義初始化腳本中啟動 psplash,則 psplash-write 僅在調用 exec 之前起作用。 我不知道為什么會這樣以及如何解決。

如果有一個簡單的解決方案或理由說明為什么這不起作用,我將非常感謝您的指導。

注意1:請注意,當使用psplash-start.service啟動 psplash 時,使用 systemd 服務 ( psplash-systemd.service ) 更新 psplash 的傳統方法工作正常,我得到進度條更新。

注 2: Psplash 使用幀緩沖驅動程序和 FIFO。

注3 相關源文件: psplash.c psplash-write.c

注 4:當前的 systemd 執行(讓你看看我是否遺漏了一些在運行 psplash 之前必須准備好的東西)

系統執行

我對 psplash 和 systemd 不是 100% 確定,但在您的環境中可能需要這樣的東西來控制 psplash:

導出 TMPDIR=/mnt/.psplash

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM