[yocto] [PATCH] psplash: Add custom bar image and color options.

2012-10-03 Thread Julian Scheel
To make more use of the option to overwrite the splash image this adds the
possibility to overwrite the bar image as well as the color header file to
make a consistent splash screen even when a different background color is
desired.

Signed-off-by: Julian Scheel jul...@jusst.de
---
 meta/recipes-core/psplash/psplash_git.bb | 22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/psplash/psplash_git.bb 
b/meta/recipes-core/psplash/psplash_git.bb
index 7c033e7..85c239c 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -11,9 +11,15 @@ PR = r5
 
 SRC_URI = git://git.yoctoproject.org/${BPN};protocol=git \
file://psplash-init \
-   ${SPLASH_IMAGES}
+   ${SPLASH_IMAGES} \
+   ${BAR_IMAGE} \
+   ${COLORS}
 
+# Overwrite these to use custom splash images (multiple possible),
+# a custom bar image (only one possible) and a custom color header file.
 SPLASH_IMAGES = file://psplash-poky-img.h;outsuffix=default
+BAR_IMAGE = 
+COLORS = 
 
 python __anonymous() {
 oldpkgs = d.getVar(PACKAGES, True).split()
@@ -69,6 +75,20 @@ ALTERNATIVE_LINK_NAME[psplash] = ${bindir}/psplash
 python do_compile () {
 import shutil, commands
 
+# update the bar file
+barimage = d.getVar('BAR_IMAGE', True)
+if barimage:
+fetcher = bb.fetch2.Fetch([barimage], d)
+flocal = fetcher.localpath(barimage)
+shutil.copyfile(flocal, psplash-bar-img.h);
+
+# update the colors file
+colors = d.getVar('COLORS', True)
+if colors:
+fetcher = bb.fetch2.Fetch([colors], d)
+flocal = fetcher.localpath(colors)
+shutil.copyfile(flocal, psplash-colors.h);
+
 # Build a separate executable for each splash image
 destfile = %s/psplash-poky-img.h % d.getVar('S', True)
 localfiles = d.getVar('SPLASH_LOCALPATHS', True).split()
-- 
1.7.12.2

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PATCH] psplash: Add custom bar image and color options.

2012-10-03 Thread Aws Ismail

I have sent this a about two months ago but did not get a reply.
So I am sending it again to see if anyone has comments on it.

Thanks.

Aws\


-
Author: Aws Ismail aws.ism...@windriver.com
Date:   Thu Aug 16 11:06:13 2012 -0400

Use correct blue offset value for BGR888

fs-blue_offset should be compared to 16 instead
of 8 in order to detect BGR.

Credit goes to Ulrich Feichter u.feich...@avibit.com
for detecting this.

Signed-off-by: Aws Ismail aws.ism...@windriver.com
---
 psplash-fb.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/psplash-fb.c b/psplash-fb.c
index 71740cd..f65d67e 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -185,7 +185,7 @@ psplash_fb_new (int angle)
  fb-rgbmode = RGB888;
   } else if (fb-red_offset == 0  fb-red_length == 8 
   fb-green_offset == 8  fb-green_length == 8 
-  fb-blue_offset == 8  fb-blue_length == 8) {
+  fb-blue_offset == 16  fb-blue_length == 8) {
  fb-rgbmode = BGR888;
   } else {
  fb-rgbmode = GENERIC;

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto