我已经用这里的说明成功地构建了一个树莓pi Yocto图像:http://www.jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Yocto.html。当系统启动时,我看到一个带有加载条的覆盆子Pi的默认psplash启动屏幕。
元raspberry pi层有一个psplash bbappend recipe文件,该文件定义了系统启动时看到的raspberry pi图像。

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文件使用匹配的树莓pi后缀来伪装图像。
bbappend如下所示:
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,其中包含以下内容-尝试用自己的图像覆盖覆盆子pi启动屏幕所用的图像:
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的图像,则会出现以下错误:
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.

如果将outsuffix更改为默认值,我将得到相同的错误(重复目标)。
我可以通过将bbappend更改为以下内容来避免此错误:
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配置变量,如下所示:
# Set the Custom Splash screen
SPLASH = "psplash-me"

但不管我看起来做了什么,它总是呈现默认的覆盆子Pi。
如何使用自己的图像覆盖默认的psplash启动屏幕?谢谢。

最佳答案

文件名应与psplash-%s格式匹配,其中%sraspberrypi,因此最快的方法是将social.jpg-img.h更改为psplash-raspberrypi-img.h,并将其覆盖在原始的raspberrypi psplash.bbappend上。
下面是它如何获取outsuffix变量的信息;

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 = "file://splash-file-one.h;outsuffix=one \
                       file://splash-file-two.h;outsuffix=two"

这将为每个splash图像条目(即psplash one和psplash two)自动创建psplash-packages。
启动:启用启动时显示启动屏幕。默认情况下,这个
屏幕由psplash提供,它允许自定义。如果你
更喜欢使用另一个启动屏幕包,您可以通过
将SPLASH变量设置为不同的包名(或名称)
在映像配方中或在发行版配置级别。
raspberrypi提供了在机器配置中选择启动映像的替代方法,而不是使用默认值;此链接提供了更多信息
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

10-07 22:55