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

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

问题描述

我已经按照此处的说明成功构建了树莓派Yocto图像:

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配方文件,该文件定义了系统启动时看到的raspberry pi图像.

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文件将图像假装成具有树莓派的匹配后缀.

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-one和psplash-two)自动创建psplash-程序包.

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

启动画面:在启动过程中显示启动画面.默认情况下,屏幕由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-May/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天全站免登陆