aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/psplash
diff options
context:
space:
mode:
authorChase Maupin <chasemaupin03@gmail.com>2010-09-09 05:11:40 +0000
committerKoen Kooi <koen@openembedded.org>2010-09-10 13:00:42 +0200
commit46bcffb8d700c31dcca1fda02d8c825425e729ab (patch)
treeabbf477c6af406f1899a7b805e6c7cdb481d1e32 /recipes/psplash
parent5a7d77d927a934a6c8ce0cb6fb552f679f34877a (diff)
downloadopenembedded-46bcffb8d700c31dcca1fda02d8c825425e729ab.tar.gz
psplash-ti: update configurability patch
* Update the configurability patch to work with revision 422 of the psplash sources. This patch causes the psplash background to be black which is the color we want to use. * Bump the PR Signed-off-by: Chase Maupin <chase.maupin@ti.com> Signed-off-by: Koen Kooi <koen@openembedded.org>
Diffstat (limited to 'recipes/psplash')
-rw-r--r--recipes/psplash/psplash-ti/0001-configurability-for-rev-422.patch251
-rw-r--r--recipes/psplash/psplash-ti_svn.bb1
-rw-r--r--recipes/psplash/psplash.inc2
3 files changed, 253 insertions, 1 deletions
diff --git a/recipes/psplash/psplash-ti/0001-configurability-for-rev-422.patch b/recipes/psplash/psplash-ti/0001-configurability-for-rev-422.patch
new file mode 100644
index 0000000000..7f62197b7f
--- /dev/null
+++ b/recipes/psplash/psplash-ti/0001-configurability-for-rev-422.patch
@@ -0,0 +1,251 @@
+From 1c962c46c8060ae3f2c78c238199a915d261ea31 Mon Sep 17 00:00:00 2001
+From: Chase Maupin <chase.maupin@ti.com>
+Date: Thu, 9 Sep 2010 07:34:29 -0500
+Subject: [PATCH] configurability for rev 422
+
+* Update the configurability.patch file to work with revision
+ 422 of the psplash sources.
+
+Signed-off-by: Chase Maupin <chase.maupin@ti.com>
+---
+ psplash.c | 90 ++++++++++++++++++++++++++++++------------------------------
+ psplash.h | 15 ++++++++++
+ 2 files changed, 60 insertions(+), 45 deletions(-)
+
+diff --git a/psplash.c b/psplash.c
+index 7a52e05..da6005d 100644
+--- a/psplash.c
++++ b/psplash.c
+@@ -44,17 +44,17 @@ psplash_draw_msg (PSplashFB *fb, const char *msg)
+
+ /* Clear */
+
+- psplash_fb_draw_rect (fb,
+- 0,
+- fb->height - (fb->height/6) - h,
++ psplash_fb_draw_rect (fb,
++ 0,
++ fb->height - (fb->height/PSPLASH_TEXT_DIVIDER) - h,
+ fb->width,
+ h,
+- 0xec, 0xec, 0xe1);
++ PSPLASH_BACKGROUND_COLOR_R, PSPLASH_BACKGROUND_COLOR_G, PSPLASH_BACKGROUND_COLOR_B);
+
+ psplash_fb_draw_text (fb,
+- (fb->width-w)/2,
+- fb->height - (fb->height/6) - h,
+- 0x6d, 0x6d, 0x70,
++ (fb->width-w)/2,
++ fb->height - (fb->height/PSPLASH_TEXT_DIVIDER) - h,
++ PSPLASH_TEXT_COLOR_R, PSPLASH_TEXT_COLOR_G, PSPLASH_TEXT_COLOR_B,
+ &radeon_font,
+ msg);
+ }
+@@ -66,36 +66,36 @@ psplash_draw_progress (PSplashFB *fb, int value)
+
+ /* 4 pix border */
+ x = ((fb->width - BAR_IMG_WIDTH)/2) + 4 ;
+- y = fb->height - (fb->height/6) + 4;
+- width = BAR_IMG_WIDTH - 8;
++ y = fb->height - (fb->height/PSPLASH_PROGRESS_DIVIDER) + 4;
++ width = BAR_IMG_WIDTH - 8;
+ height = BAR_IMG_HEIGHT - 8;
+
+ if (value > 0)
+ {
+ barwidth = (CLAMP(value,0,100) * width) / 100;
+- psplash_fb_draw_rect (fb, x + barwidth, y,
++ psplash_fb_draw_rect (fb, x + barwidth, y,
+ width - barwidth, height,
+- 0xec, 0xec, 0xe1);
++ PSPLASH_BACKGROUND_COLOR_R, PSPLASH_BACKGROUND_COLOR_G, PSPLASH_BACKGROUND_COLOR_B);
+ psplash_fb_draw_rect (fb, x, y, barwidth,
+- height, 0x6d, 0x6d, 0x70);
++ height, PSPLASH_PROGRESS_COLOR_R, PSPLASH_PROGRESS_COLOR_G, PSPLASH_PROGRESS_COLOR_B);
+ }
+ else
+ {
+ barwidth = (CLAMP(-value,0,100) * width) / 100;
+- psplash_fb_draw_rect (fb, x, y,
++ psplash_fb_draw_rect (fb, x, y,
+ width - barwidth, height,
+- 0xec, 0xec, 0xe1);
++ PSPLASH_BACKGROUND_COLOR_R, PSPLASH_BACKGROUND_COLOR_G, PSPLASH_BACKGROUND_COLOR_B);
+ psplash_fb_draw_rect (fb, x + width - barwidth,
+ y, barwidth, height,
+- 0x6d, 0x6d, 0x70);
++ PSPLASH_PROGRESS_COLOR_R, PSPLASH_PROGRESS_COLOR_G, PSPLASH_PROGRESS_COLOR_B);
+ }
+
+- DBG("value: %i, width: %i, barwidth :%i\n", value,
++ DBG("value: %i, width: %i, barwidth :%i\n", value,
+ width, barwidth);
+ }
+
+-static int
+-parse_command (PSplashFB *fb, char *string, int length)
++static int
++parse_command (PSplashFB *fb, char *string, int length)
+ {
+ char *command;
+ int parsed=0;
+@@ -103,21 +103,21 @@ parse_command (PSplashFB *fb, char *string, int length)
+ parsed = strlen(string)+1;
+
+ DBG("got cmd %s", string);
+-
++
+ if (strcmp(string,"QUIT") == 0)
+ return 1;
+
+ command = strtok(string," ");
+
+- if (!strcmp(command,"PROGRESS"))
++ if (!strcmp(command,"PROGRESS"))
+ {
+ psplash_draw_progress (fb, atoi(strtok(NULL,"\0")));
+- }
+- else if (!strcmp(command,"MSG"))
++ }
++ else if (!strcmp(command,"MSG"))
+ {
+ psplash_draw_msg (fb, strtok(NULL,"\0"));
+- }
+- else if (!strcmp(command,"QUIT"))
++ }
++ else if (!strcmp(command,"QUIT"))
+ {
+ return 1;
+ }
+@@ -125,8 +125,8 @@ parse_command (PSplashFB *fb, char *string, int length)
+ return 0;
+ }
+
+-void
+-psplash_main (PSplashFB *fb, int pipe_fd, int timeout)
++void
++psplash_main (PSplashFB *fb, int pipe_fd, int timeout)
+ {
+ int err;
+ ssize_t length = 0;
+@@ -143,14 +143,14 @@ psplash_main (PSplashFB *fb, int pipe_fd, int timeout)
+
+ end = command;
+
+- while (1)
++ while (1)
+ {
+- if (timeout != 0)
++ if (timeout != 0)
+ err = select(pipe_fd+1, &descriptors, NULL, NULL, &tv);
+ else
+ err = select(pipe_fd+1, &descriptors, NULL, NULL, NULL);
+-
+- if (err <= 0)
++
++ if (err <= 0)
+ {
+ /*
+ if (errno == EINTR)
+@@ -223,10 +223,10 @@ main (int argc, char** argv)
+ angle = atoi(argv[i]);
+ continue;
+ }
+-
++
+ fail:
+- fprintf(stderr,
+- "Usage: %s [-n|--no-console-switch][-a|--angle <0|90|180|270>]\n",
++ fprintf(stderr,
++ "Usage: %s [-n|--no-console-switch][-a|--angle <0|90|180|270>]\n",
+ argv[0]);
+ exit(-1);
+ }
+@@ -240,7 +240,7 @@ main (int argc, char** argv)
+
+ if (mkfifo(PSPLASH_FIFO, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP))
+ {
+- if (errno!=EEXIST)
++ if (errno!=EEXIST)
+ {
+ perror("mkfifo");
+ exit(-1);
+@@ -248,8 +248,8 @@ main (int argc, char** argv)
+ }
+
+ pipe_fd = open (PSPLASH_FIFO,O_RDONLY|O_NONBLOCK);
+-
+- if (pipe_fd==-1)
++
++ if (pipe_fd==-1)
+ {
+ perror("pipe open");
+ exit(-2);
+@@ -264,29 +264,29 @@ main (int argc, char** argv)
+ }
+
+ /* Clear the background with #ecece1 */
+- psplash_fb_draw_rect (fb, 0, 0, fb->width, fb->height, 0xec, 0xec, 0xe1);
++ psplash_fb_draw_rect (fb, 0, 0, fb->width, fb->height, PSPLASH_BACKGROUND_COLOR_R, PSPLASH_BACKGROUND_COLOR_G, PSPLASH_BACKGROUND_COLOR_B);
+
+ /* Draw the OH logo */
+- psplash_fb_draw_image (fb,
+- (fb->width - POKY_IMG_WIDTH)/2,
+- ((fb->height * 5) / 6 - POKY_IMG_HEIGHT)/2,
++ psplash_fb_draw_image (fb,
++ (fb->width - POKY_IMG_WIDTH)/2,
++ (fb->height - POKY_IMG_HEIGHT)/2,
+ POKY_IMG_WIDTH,
+ POKY_IMG_HEIGHT,
+ POKY_IMG_BYTES_PER_PIXEL,
+ POKY_IMG_RLE_PIXEL_DATA);
+
+ /* Draw progress bar border */
+- psplash_fb_draw_image (fb,
+- (fb->width - BAR_IMG_WIDTH)/2,
+- fb->height - (fb->height/6),
++ psplash_fb_draw_image (fb,
++ (fb->width - BAR_IMG_WIDTH)/2,
++ fb->height - (fb->height/PSPLASH_PROGRESS_DIVIDER),
+ BAR_IMG_WIDTH,
+ BAR_IMG_HEIGHT,
+ BAR_IMG_BYTES_PER_PIXEL,
+ BAR_IMG_RLE_PIXEL_DATA);
+
+- psplash_draw_progress (fb, 0);
++ psplash_draw_progress (fb, 0); /* draw initial progress */
+
+- psplash_draw_msg (fb, MSG);
++ if (strlen(MSG)) psplash_draw_msg (fb, MSG);
+
+ psplash_main (fb, pipe_fd, 0);
+
+diff --git a/psplash.h b/psplash.h
+index 22d73a3..1b015b6 100644
+--- a/psplash.h
++++ b/psplash.h
+@@ -55,6 +55,21 @@ typedef int bool;
+ #define TRUE 1
+ #endif
+
++#define PSPLASH_BACKGROUND_COLOR_R 0x00
++#define PSPLASH_BACKGROUND_COLOR_G 0x00
++#define PSPLASH_BACKGROUND_COLOR_B 0x00
++
++#define PSPLASH_PROGRESS_COLOR_R 0xe3
++#define PSPLASH_PROGRESS_COLOR_G 0x71
++#define PSPLASH_PROGRESS_COLOR_B 0x00
++
++#define PSPLASH_TEXT_COLOR_R 0xff
++#define PSPLASH_TEXT_COLOR_G 0xff
++#define PSPLASH_TEXT_COLOR_B 0xff
++
++#define PSPLASH_PROGRESS_DIVIDER 3
++#define PSPLASH_TEXT_DIVIDER 3
++
+ #define PSPLASH_FIFO "psplash_fifo"
+
+ #define CLAMP(x, low, high) \
+--
+1.7.0.4
+
diff --git a/recipes/psplash/psplash-ti_svn.bb b/recipes/psplash/psplash-ti_svn.bb
index 2667cc456d..b754d098a8 100644
--- a/recipes/psplash/psplash-ti_svn.bb
+++ b/recipes/psplash/psplash-ti_svn.bb
@@ -12,6 +12,7 @@ ALTERNATIVE_PRIORITY = "20"
SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=psplash;proto=http \
file://psplash-18bpp.patch \
file://logo-math.patch \
+ file://0001-configurability-for-rev-422.patch \
file://psplash-poky-img.h \
file://psplash-bar-img.h \
file://psplash-default \
diff --git a/recipes/psplash/psplash.inc b/recipes/psplash/psplash.inc
index d3d99209df..efd6a0c37f 100644
--- a/recipes/psplash/psplash.inc
+++ b/recipes/psplash/psplash.inc
@@ -9,7 +9,7 @@ RCONFLICTS_${PN} = "exquisite"
SRCREV = "422"
PV = "0.0+svnr${SRCPV}"
-PR = "r32"
+PR = "r33"
# You can create your own pslash-poky-img.h by doing
# ./make-image-header.sh <file>.png POKY