Yocto Raspberry Pi 更改 psplash 图像 [英] Yocto Raspberry Pi Change psplash image

查看:43
本文介绍了Yocto Raspberry Pi 更改 psplash 图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用此处的说明成功构建了 raspberry pi Yocto 映像:http://www.jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Yocto.html.当系统启动时,我看到带有加载栏的 Raspberry Pi 的默认 psplash 启动画面.

I've successfully built a raspberry pi Yocto image using the instructions here: http://www.jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Yocto.html. When the system boots, I see the default psplash splash screen of a Raspberry Pi with a loading bar.

meta-raspberrypi 层有一个 psplash bbappend 配方文件,它定义了系统启动时看到的树莓派镜像.

The meta-raspberrypi layer has a psplash bbappend recipe file that defines the raspberry pi image seen when the system boots.

me@me:~/poky-morty/meta-raspberrypi$ grep -R SPLASH *
conf/machine/include/rpi-base.inc:SPLASH = "psplash-raspberrypi"
recipes-core/images/rpi-basic-image.bb:SPLASH = "psplash-raspberrypi"
recipes-core/psplash/psplash_git.bbappend:SPLASH_IMAGES += "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi"

dpi-base.inc 中的 SPLASH 变量定义了要使用的启动画面(我认为...),并且 psplash_git.bbappend 文件假装图像与 raspberry pi 的匹配后缀.

The SPLASH variable in dpi-base.inc defines the splash screen to use ( I think... ) and the psplash_git.bbappend file pretends the image with the matching out suffix of raspberry pi.

bbappend 看起来像这样:

The bbappend looks like this:

me@me:~/poky-morty/meta-raspberrypi$ cat recipes-core/psplash/psplash_git.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SPLASH_IMAGES += "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi"

我有一个自定义层,我在该层中创建了另一个 psplash_git.bbappend,其中包含以下内容 - 尝试用我自己的图像覆盖用于 raspberry pi 启动画面的图像:

I have a custom layer and I made another psplash_git.bbappend in that layer with the following contents - attempting to override the image used for the raspberry pi splash screen with my own image:

me@me:~/rpi/meta-me/recipes-me/psplash$ cat psplash_git.bbappend 
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SPLASH_IMAGES += "file://social.jpg-img.h;outsuffix=raspberrypi"

如果我尝试在包含自定义 bbappend 的情况下构建图像,则会收到以下错误:

If I try to build my image with my custom bbappend included, I get the following error:

Initialising tasks: 100% |##################################| Time: 0:00:05
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: psplash-0.1+gitAUTOINC+88343ad23c-r15 do_package: QA Issue: psplash-raspberrypi is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]
ERROR: psplash-0.1+gitAUTOINC+88343ad23c-r15 do_package: Fatal QA errors found, failing task.
ERROR: psplash-0.1+gitAUTOINC+88343ad23c-r15 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /home/me/rpi/build/tmp/work/arm1176jzfshf-vfp-poky-linux-gnueabi/psplash/0.1+gitAUTOINC+88343ad23c-r15/temp/log.do_package.63289
ERROR: Task (/home/me/poky-morty/meta/recipes-core/psplash/psplash_git.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3439 tasks of which 3430 didn't need to be rerun and 1 failed.

如果我将外后缀更改为默认值,我会收到相同的错误(重复目标).

I get the same error ( duplicate target ) if I change the outsuffix to default.

我可以通过将 bbappend 更改为以下内容来解决此错误:

I can get around this error by changing my bbappend to this:

me@me:~/rpi/meta-me/recipes-me/psplash$ cat psplash_git.bbappend 
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SPLASH_IMAGES += "file://social.jpg-img.h;outsuffix=me"

然后我尝试像这样覆盖我的 local.conf 中的 SPLASH 配置变量:

And then I try to override the SPLASH configuration variable in my local.conf like this:

# Set the Custom Splash screen
SPLASH = "psplash-me"

但无论我做什么,它总是呈现默认的 Raspberry Pi.

But no matter what I seem to do, it always renders the default Raspberry Pi one.

如何用我自己的图像覆盖默认的 psplash 启动画面?谢谢.

How can I override the default psplash splash screen with my own image? Thanks.

推荐答案

文件名应符合格式 psplash-%s 其中 %s>raspberrypi 所以最快的方法是把你的 social.jpg-img.h 改成 psplash-raspberrypi-img.h 并在原来的 raspberrypi 上覆盖它psplash.bbappend.

The name of the file should match the format psplash-%s where %s is raspberrypi so the quickest way is to change your social.jpg-img.h to psplash-raspberrypi-img.h and overwrite it on the original raspberrypi psplash.bbappend.

下面是关于它如何获取outsuffix变量的信息;

Below is information on how it gets the outsuffix variable;

for uri in splashfiles:
        fetcher = bb.fetch2.Fetch([uri], d)
        flocal = os.path.basename(fetcher.localpath(uri))
        fbase = os.path.splitext(flocal)[0]
        outsuffix = fetcher.ud[uri].parm.get("outsuffix")
        if not outsuffix:
            if fbase.startswith("psplash-"):
                outsuffix = fbase[8:]
            else:
                outsuffix = fbase
            if outsuffix.endswith('-img'):
                outsuffix = outsuffix[:-4]
        outname = "psplash-%s" % outsuffix
        if outname == '' or outname in oldpkgs:
            bb.fatal("The output name '%s' derived from the URI %s is not valid, please specify the outsuffix parameter" % (outname, uri))
        else:
            pkgs.append(outname)
        if flocal.endswith(".png"):
            haspng = True
        localpaths.append(flocal)

SPLASH_IMAGES 基本上是具有 outsuffix 键的文件的映射.

SPLASH_IMAGES is basically map of files that has key with outsuffix.

SPLASH_IMAGES = "file://splash-file-one.h;outsuffix=one 
                       file://splash-file-two.h;outsuffix=two"

这将自动为每个启动图像条目创建 psplash- 包(即 psplash-one 和 psplash-two).

This will automatically create psplash- packages for each splash image entry (i.e. psplash-one and psplash-two).

splash:启用在启动期间显示闪屏.默认情况下,这screen 由 psplash 提供,它允许自定义.如果你更喜欢使用替代的闪屏包,你可以这样做将 SPLASH 变量设置为不同的包名称(或名称)在图像配方中或在发行版配置级别.

splash: Enables showing a splash screen during boot. By default, this screen is provided by psplash, which does allow customization. If you prefer to use an alternative splash screen package, you can do so by setting the SPLASH variable to a different package name (or names) within the image recipe or at the distro configuration level.

raspberrypi 提供了在机器配置中选择启动图像的替代方法,而不是使用默认值;此链接提供了更多信息https://lists.yoctoproject.org/pipermail/yocto/2013-五月/013902.html

Instead of using default, raspberrypi provides alternative to choose the splash image in the machine configuration; This link gives more information https://lists.yoctoproject.org/pipermail/yocto/2013-May/013902.html

+# Set raspberrypi splash image
+SPLASH = "psplash-raspberrypi"
diff --git a/recipes-core/psplash/psplash_git.bbappend b/recipes-core/psplash/psplash_git.bbappend
index eea8dfb..65dc30f 100644
--- a/recipes-core/psplash/psplash_git.bbappend
+++ b/recipes-core/psplash/psplash_git.bbappend
@@ -1,2 +1,2 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SPLASH_IMAGES = "file://psplash-raspberrypi-img.h;outsuffix=default"
+SPLASH_IMAGES += "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi"
-- 
1.8.2.2

这篇关于Yocto Raspberry Pi 更改 psplash 图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆