Date   

Re: [PATCH 1/3] Support --with-font configure option to use other font headers

Andrei Gherzan
 

Hello,

On Tue, Dec 17, 2019 at 10:19 AM <andrei@...> wrote:
From: David Steinberg <david@...>

Signed-off-by: David Steinberg <david@...>

Please ignore this series. I've re-sent it with the correct "psplash" email subject tag. Sorry for the extra noise.

Regards,
Andrei


[psplash][PATCH 3/3] Add configure flags for fullscreen logo and no startup message

Andrei Gherzan
 

From: Andrei Gherzan <agherzan@...>

Signed-off-by: Andrei Gherzan <agherzan@...>
---
Makefile.am | 2 +-
configure.ac | 18 ++++++++++++++++++
psplash-config.h | 4 ++++
3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 3721a6e..3f1cfc2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
bin_PROGRAMS=psplash psplash-write

-AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE -DFONT_HEADER=\"$(FONT_NAME)-font.h\" -DFONT_DEF=$(FONT_NAME)_font
+AM_CFLAGS = $(GCC_FLAGS) $(EXTRA_GCC_FLAGS) -D_GNU_SOURCE -DFONT_HEADER=\"$(FONT_NAME)-font.h\" -DFONT_DEF=$(FONT_NAME)_font

psplash_SOURCES = psplash.c psplash.h psplash-fb.c psplash-fb.h \
psplash-console.c psplash-console.h \
diff --git a/configure.ac b/configure.ac
index 9e78ac0..e2b7f58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,24 @@ AC_ARG_WITH([font],
[FONT_NAME=radeon])
AC_SUBST([FONT_NAME])

+AC_ARG_ENABLE([startup-msg],
+ AS_HELP_STRING([--disable-startup-msg], [Disable text banner output on startup]),
+ [disable_startup_msg=true],
+ [disable_startup_msg=false])
+AS_IF([test x$disable_startup_msg = xtrue], [
+ EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_STARTUP_MSG"
+])
+
+AC_ARG_ENABLE([img-fullscreen],
+ AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in fullscreen mode)]),
+ [img_fullscreen=true],
+ [img_fullscreen=false])
+AS_IF([test x$img_fullscreen = xtrue], [
+ EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_IMG_FULLSCREEN=1"
+])
+
+AC_SUBST(EXTRA_GCC_FLAGS)
+
AC_OUTPUT([
Makefile
])
diff --git a/psplash-config.h b/psplash-config.h
index 82bb76d..ecbf3df 100644
--- a/psplash-config.h
+++ b/psplash-config.h
@@ -20,10 +20,14 @@
#define _HAVE_PSPLASH_CONFIG_H

/* Text to output on program start; if undefined, output nothing */
+#ifndef PSPLASH_DISABLE_STARTUP_MSG
#define PSPLASH_STARTUP_MSG ""
+#endif

/* Bool indicating if the image is fullscreen, as opposed to split screen */
+#ifndef PSPLASH_IMG_FULLSCREEN
#define PSPLASH_IMG_FULLSCREEN 0
+#endif

/* Position of the image split from top edge, numerator of fraction */
#define PSPLASH_IMG_SPLIT_NUMERATOR 5
--
2.17.1


[psplash][PATCH 2/3] Double buffering support

Andrei Gherzan
 

From: Andrei Gherzan <agherzan@...>

'psplash' uses only one buffer which can cause tearing artifacts. This
change uses the FBIOPAN_DISPLAY ioctl as a way to handle page flipping
and also does that after a vsync interrupt to remove any tearing issues.

Signed-off-by: Andrei Gherzan <agherzan@...>
---
psplash-fb.c | 121 ++++++++++++++++++++++++++++++++++++++++++---------
psplash-fb.h | 8 ++++
psplash.c | 10 ++++-
3 files changed, 118 insertions(+), 21 deletions(-)

diff --git a/psplash-fb.c b/psplash-fb.c
index c064d18..3cb5d2d 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -18,6 +18,46 @@
#include <endian.h>
#include "psplash.h"

+static void
+psplash_wait_for_vsync(PSplashFB *fb)
+{
+ int err = ioctl(fb->fd, FBIO_WAITFORVSYNC, 0);
+ if (err != 0)
+ fprintf(stderr, "Error, FB vsync ioctl [%d]\n", err);
+}
+
+void
+psplash_fb_flip(PSplashFB *fb, int sync)
+{
+ char *tmp;
+
+ if (fb->double_buffering) {
+
+ /* Carry out the flip after a vsync */
+ psplash_wait_for_vsync(fb);
+
+ /* Switch the current activate area in fb */
+ if (fb->fb_var.yoffset == 0 ) {
+ fb->fb_var.yoffset = fb->real_height;
+ } else {
+ fb->fb_var.yoffset = 0;
+ }
+ if (ioctl(fb->fd, FBIOPAN_DISPLAY, &fb->fb_var) == -1 ) {
+ fprintf(stderr, "psplash_fb_flip: FBIOPAN_DISPLAY failed\n");
+ }
+
+ /* Switch the front and back data pointers */
+ tmp = fb->fdata;
+ fb->fdata = fb->bdata;
+ fb->bdata = tmp;
+
+ /* Sync new front to new back when requested */
+ if (sync) {
+ memcpy(fb->bdata, fb->fdata, fb->stride * fb->real_height);
+ }
+ }
+}
+
void
psplash_fb_destroy (PSplashFB *fb)
{
@@ -163,6 +203,29 @@ psplash_fb_new (int angle, int fbdev_id)
goto fail;
}

+ /* Setup double virtual resolution for double buffering */
+ if (ioctl(fb->fd, FBIOPAN_DISPLAY, &fb_var) == -1) {
+ fprintf(stderr, "FBIOPAN_DISPLAY not supported, double buffering disabled");
+ } else {
+ if (fb_var.yres_virtual == fb_var.yres * 2) {
+ DBG("Virtual resolution already double");
+ fb->double_buffering = 1;
+ } else {
+ fb_var.yres_virtual = fb_var.yres * 2;
+ if (ioctl(fb->fd, FBIOPUT_VSCREENINFO, &fb_var) == -1) {
+ fprintf(stderr, "FBIOPUT_VSCREENINFO failed, double buffering disabled");
+ } else {
+ if (ioctl(fb->fd, FBIOGET_FSCREENINFO, &fb_fix) == -1) {
+ perror(" Error getting the fixed framebuffer info");
+ goto fail;
+ } else {
+ DBG("Virtual resolution set to double");
+ fb->double_buffering = 1;
+ }
+ }
+ }
+ }
+
fb->real_width = fb->width = fb_var.xres;
fb->real_height = fb->height = fb_var.yres;
fb->bpp = fb_var.bits_per_pixel;
@@ -201,8 +264,7 @@ psplash_fb_new (int angle, int fbdev_id)
fb->width, fb->height, fb->bpp, fb->stride);

fb->base = (char *) mmap ((caddr_t) NULL,
- /*fb_fix.smem_len */
- fb->stride * fb->height,
+ fb_fix.smem_len,
PROT_READ|PROT_WRITE,
MAP_SHARED,
fb->fd, 0);
@@ -217,6 +279,23 @@ psplash_fb_new (int angle, int fbdev_id)

fb->data = fb->base + off;

+ if (fb->double_buffering) {
+ /* fb_var is needed when flipping the buffers */
+ memcpy(&fb->fb_var, &fb_var, sizeof(struct fb_var_screeninfo));
+ if (fb->fb_var.yoffset == 0) {
+ printf("to back\n");
+ fb->fdata = fb->data;
+ fb->bdata = fb->data + fb->stride * fb->height;
+ } else {
+ printf("to front\n");
+ fb->fdata = fb->data + fb->stride * fb->height;
+ fb->bdata = fb->data;
+ }
+ } else {
+ fb->fdata = fb->data;
+ fb->bdata = fb->data;
+ }
+
#if 0
/* FIXME: No support for 8pp as yet */
if (visual == FB_VISUAL_PSEUDOCOLOR
@@ -274,6 +353,8 @@ psplash_fb_plot_pixel (PSplashFB *fb,
uint8 green,
uint8 blue)
{
+ /* Always write to back data (bdata) which points to the right data with or
+ * without double buffering support */
int off;

if (x < 0 || x > fb->width-1 || y < 0 || y > fb->height-1)
@@ -301,22 +382,22 @@ psplash_fb_plot_pixel (PSplashFB *fb,
{
case 24:
#if __BYTE_ORDER == __BIG_ENDIAN
- *(fb->data + off + 0) = red;
- *(fb->data + off + 1) = green;
- *(fb->data + off + 2) = blue;
+ *(fb->bdata + off + 0) = red;
+ *(fb->bdata + off + 1) = green;
+ *(fb->bdata + off + 2) = blue;
#else
- *(fb->data + off + 0) = blue;
- *(fb->data + off + 1) = green;
- *(fb->data + off + 2) = red;
+ *(fb->bdata + off + 0) = blue;
+ *(fb->bdata + off + 1) = green;
+ *(fb->bdata + off + 2) = red;
#endif
break;
case 32:
- *(volatile uint32_t *) (fb->data + off)
+ *(volatile uint32_t *) (fb->bdata + off)
= (red << 16) | (green << 8) | (blue);
break;

case 16:
- *(volatile uint16_t *) (fb->data + off)
+ *(volatile uint16_t *) (fb->bdata + off)
= ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
break;
default:
@@ -328,21 +409,21 @@ psplash_fb_plot_pixel (PSplashFB *fb,
{
case 24:
#if __BYTE_ORDER == __BIG_ENDIAN
- *(fb->data + off + 0) = blue;
- *(fb->data + off + 1) = green;
- *(fb->data + off + 2) = red;
+ *(fb->bdata + off + 0) = blue;
+ *(fb->bdata + off + 1) = green;
+ *(fb->bdata + off + 2) = red;
#else
- *(fb->data + off + 0) = red;
- *(fb->data + off + 1) = green;
- *(fb->data + off + 2) = blue;
+ *(fb->bdata + off + 0) = red;
+ *(fb->bdata + off + 1) = green;
+ *(fb->bdata + off + 2) = blue;
#endif
break;
case 32:
- *(volatile uint32_t *) (fb->data + off)
+ *(volatile uint32_t *) (fb->bdata + off)
= (blue << 16) | (green << 8) | (red);
break;
case 16:
- *(volatile uint16_t *) (fb->data + off)
+ *(volatile uint16_t *) (fb->bdata + off)
= ((blue >> 3) << 11) | ((green >> 2) << 5) | (red >> 3);
break;
default:
@@ -353,13 +434,13 @@ psplash_fb_plot_pixel (PSplashFB *fb,
switch (fb->bpp)
{
case 32:
- *(volatile uint32_t *) (fb->data + off)
+ *(volatile uint32_t *) (fb->bdata + off)
= ((red >> (8 - fb->red_length)) << fb->red_offset)
| ((green >> (8 - fb->green_length)) << fb->green_offset)
| ((blue >> (8 - fb->blue_length)) << fb->blue_offset);
break;
case 16:
- *(volatile uint16_t *) (fb->data + off)
+ *(volatile uint16_t *) (fb->bdata + off)
= ((red >> (8 - fb->red_length)) << fb->red_offset)
| ((green >> (8 - fb->green_length)) << fb->green_offset)
| ((blue >> (8 - fb->blue_length)) << fb->blue_offset);
diff --git a/psplash-fb.h b/psplash-fb.h
index d0dce10..2f0cdff 100644
--- a/psplash-fb.h
+++ b/psplash-fb.h
@@ -29,6 +29,7 @@ enum RGBMode {
typedef struct PSplashFB
{
int fd;
+ struct fb_var_screeninfo fb_var;
struct termios save_termios;
int type;
int visual;
@@ -38,6 +39,11 @@ typedef struct PSplashFB
char *data;
char *base;

+ /* Support for double buffering */
+ int double_buffering;
+ char *bdata;
+ char *fdata;
+
int angle, fbdev_id;
int real_width, real_height;

@@ -93,5 +99,7 @@ psplash_fb_draw_text (PSplashFB *fb,
const PSplashFont *font,
const char *text);

+void
+psplash_fb_flip(PSplashFB *fb, int sync);

#endif
diff --git a/psplash.c b/psplash.c
index f6442f1..61122fc 100644
--- a/psplash.c
+++ b/psplash.c
@@ -126,6 +126,7 @@ parse_command (PSplashFB *fb, char *string)
return 1;
}

+ psplash_fb_flip(fb, 0);
return 0;
}

@@ -309,8 +310,15 @@ main (int argc, char** argv)
psplash_draw_msg (fb, PSPLASH_STARTUP_MSG);
#endif

- psplash_main (fb, pipe_fd, 0);
+ /* Scene set so let's flip the buffers. */
+ /* The first time we also synchronize the buffers so we can build on an
+ * existing scene. After the first scene is set in both buffers, only the
+ * text and progress bar change which overwrite the specific areas with every
+ * update.
+ */
+ psplash_fb_flip(fb, 1);

+ psplash_main (fb, pipe_fd, 0);

psplash_fb_destroy (fb);

--
2.17.1


[psplash][PATCH 1/3] Support --with-font configure option to use other font headers

Andrei Gherzan
 

From: David Steinberg <david@...>

Signed-off-by: David Steinberg <david@...>
---
Makefile.am | 4 ++--
configure.ac | 6 ++++++
psplash.c | 6 +++---
3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index a14152a..3721a6e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,11 +1,11 @@
bin_PROGRAMS=psplash psplash-write

-AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE
+AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE -DFONT_HEADER=\"$(FONT_NAME)-font.h\" -DFONT_DEF=$(FONT_NAME)_font

psplash_SOURCES = psplash.c psplash.h psplash-fb.c psplash-fb.h \
psplash-console.c psplash-console.h \
psplash-colors.h psplash-config.h \
- psplash-poky-img.h psplash-bar-img.h radeon-font.h
+ psplash-poky-img.h psplash-bar-img.h $(FONT_NAME)-font.h

psplash_write_SOURCES = psplash-write.c psplash.h

diff --git a/configure.ac b/configure.ac
index 1c4d919..9e78ac0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,12 @@ fi

AC_SUBST(GCC_FLAGS)

+AC_ARG_WITH([font],
+ AS_HELP_STRING([--with-font], [Set font to use (default is 'radeon')]),
+ [FONT_NAME=$withval],
+ [FONT_NAME=radeon])
+AC_SUBST([FONT_NAME])
+
AC_OUTPUT([
Makefile
])
diff --git a/psplash.c b/psplash.c
index 992e199..f6442f1 100644
--- a/psplash.c
+++ b/psplash.c
@@ -23,7 +23,7 @@
#include "psplash-colors.h"
#include "psplash-poky-img.h"
#include "psplash-bar-img.h"
-#include "radeon-font.h"
+#include FONT_HEADER

#define SPLIT_LINE_POS(fb) \
( (fb)->height \
@@ -45,7 +45,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg)
{
int w, h;

- psplash_fb_text_size (&w, &h, &radeon_font, msg);
+ psplash_fb_text_size (&w, &h, &FONT_DEF, msg);

DBG("displaying '%s' %ix%i\n", msg, w, h);

@@ -62,7 +62,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg)
(fb->width-w)/2,
SPLIT_LINE_POS(fb) - h,
PSPLASH_TEXT_COLOR,
- &radeon_font,
+ &FONT_DEF,
msg);
}

--
2.17.1


[PATCH 3/3] Add configure flags for fullscreen logo and no startup message

Andrei Gherzan
 

From: Andrei Gherzan <agherzan@...>

Signed-off-by: Andrei Gherzan <agherzan@...>
---
Makefile.am | 2 +-
configure.ac | 18 ++++++++++++++++++
psplash-config.h | 4 ++++
3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 3721a6e..3f1cfc2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
bin_PROGRAMS=psplash psplash-write

-AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE -DFONT_HEADER=\"$(FONT_NAME)-font.h\" -DFONT_DEF=$(FONT_NAME)_font
+AM_CFLAGS = $(GCC_FLAGS) $(EXTRA_GCC_FLAGS) -D_GNU_SOURCE -DFONT_HEADER=\"$(FONT_NAME)-font.h\" -DFONT_DEF=$(FONT_NAME)_font

psplash_SOURCES = psplash.c psplash.h psplash-fb.c psplash-fb.h \
psplash-console.c psplash-console.h \
diff --git a/configure.ac b/configure.ac
index 9e78ac0..e2b7f58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,24 @@ AC_ARG_WITH([font],
[FONT_NAME=radeon])
AC_SUBST([FONT_NAME])

+AC_ARG_ENABLE([startup-msg],
+ AS_HELP_STRING([--disable-startup-msg], [Disable text banner output on startup]),
+ [disable_startup_msg=true],
+ [disable_startup_msg=false])
+AS_IF([test x$disable_startup_msg = xtrue], [
+ EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_STARTUP_MSG"
+])
+
+AC_ARG_ENABLE([img-fullscreen],
+ AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in fullscreen mode)]),
+ [img_fullscreen=true],
+ [img_fullscreen=false])
+AS_IF([test x$img_fullscreen = xtrue], [
+ EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_IMG_FULLSCREEN=1"
+])
+
+AC_SUBST(EXTRA_GCC_FLAGS)
+
AC_OUTPUT([
Makefile
])
diff --git a/psplash-config.h b/psplash-config.h
index 82bb76d..ecbf3df 100644
--- a/psplash-config.h
+++ b/psplash-config.h
@@ -20,10 +20,14 @@
#define _HAVE_PSPLASH_CONFIG_H

/* Text to output on program start; if undefined, output nothing */
+#ifndef PSPLASH_DISABLE_STARTUP_MSG
#define PSPLASH_STARTUP_MSG ""
+#endif

/* Bool indicating if the image is fullscreen, as opposed to split screen */
+#ifndef PSPLASH_IMG_FULLSCREEN
#define PSPLASH_IMG_FULLSCREEN 0
+#endif

/* Position of the image split from top edge, numerator of fraction */
#define PSPLASH_IMG_SPLIT_NUMERATOR 5
--
2.17.1


[PATCH 2/3] Double buffering support

Andrei Gherzan
 

From: Andrei Gherzan <agherzan@...>

'psplash' uses only one buffer which can cause tearing artifacts. This
change uses the FBIOPAN_DISPLAY ioctl as a way to handle page flipping
and also does that after a vsync interrupt to remove any tearing issues.

Signed-off-by: Andrei Gherzan <agherzan@...>
---
psplash-fb.c | 121 ++++++++++++++++++++++++++++++++++++++++++---------
psplash-fb.h | 8 ++++
psplash.c | 10 ++++-
3 files changed, 118 insertions(+), 21 deletions(-)

diff --git a/psplash-fb.c b/psplash-fb.c
index c064d18..3cb5d2d 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -18,6 +18,46 @@
#include <endian.h>
#include "psplash.h"

+static void
+psplash_wait_for_vsync(PSplashFB *fb)
+{
+ int err = ioctl(fb->fd, FBIO_WAITFORVSYNC, 0);
+ if (err != 0)
+ fprintf(stderr, "Error, FB vsync ioctl [%d]\n", err);
+}
+
+void
+psplash_fb_flip(PSplashFB *fb, int sync)
+{
+ char *tmp;
+
+ if (fb->double_buffering) {
+
+ /* Carry out the flip after a vsync */
+ psplash_wait_for_vsync(fb);
+
+ /* Switch the current activate area in fb */
+ if (fb->fb_var.yoffset == 0 ) {
+ fb->fb_var.yoffset = fb->real_height;
+ } else {
+ fb->fb_var.yoffset = 0;
+ }
+ if (ioctl(fb->fd, FBIOPAN_DISPLAY, &fb->fb_var) == -1 ) {
+ fprintf(stderr, "psplash_fb_flip: FBIOPAN_DISPLAY failed\n");
+ }
+
+ /* Switch the front and back data pointers */
+ tmp = fb->fdata;
+ fb->fdata = fb->bdata;
+ fb->bdata = tmp;
+
+ /* Sync new front to new back when requested */
+ if (sync) {
+ memcpy(fb->bdata, fb->fdata, fb->stride * fb->real_height);
+ }
+ }
+}
+
void
psplash_fb_destroy (PSplashFB *fb)
{
@@ -163,6 +203,29 @@ psplash_fb_new (int angle, int fbdev_id)
goto fail;
}

+ /* Setup double virtual resolution for double buffering */
+ if (ioctl(fb->fd, FBIOPAN_DISPLAY, &fb_var) == -1) {
+ fprintf(stderr, "FBIOPAN_DISPLAY not supported, double buffering disabled");
+ } else {
+ if (fb_var.yres_virtual == fb_var.yres * 2) {
+ DBG("Virtual resolution already double");
+ fb->double_buffering = 1;
+ } else {
+ fb_var.yres_virtual = fb_var.yres * 2;
+ if (ioctl(fb->fd, FBIOPUT_VSCREENINFO, &fb_var) == -1) {
+ fprintf(stderr, "FBIOPUT_VSCREENINFO failed, double buffering disabled");
+ } else {
+ if (ioctl(fb->fd, FBIOGET_FSCREENINFO, &fb_fix) == -1) {
+ perror(" Error getting the fixed framebuffer info");
+ goto fail;
+ } else {
+ DBG("Virtual resolution set to double");
+ fb->double_buffering = 1;
+ }
+ }
+ }
+ }
+
fb->real_width = fb->width = fb_var.xres;
fb->real_height = fb->height = fb_var.yres;
fb->bpp = fb_var.bits_per_pixel;
@@ -201,8 +264,7 @@ psplash_fb_new (int angle, int fbdev_id)
fb->width, fb->height, fb->bpp, fb->stride);

fb->base = (char *) mmap ((caddr_t) NULL,
- /*fb_fix.smem_len */
- fb->stride * fb->height,
+ fb_fix.smem_len,
PROT_READ|PROT_WRITE,
MAP_SHARED,
fb->fd, 0);
@@ -217,6 +279,23 @@ psplash_fb_new (int angle, int fbdev_id)

fb->data = fb->base + off;

+ if (fb->double_buffering) {
+ /* fb_var is needed when flipping the buffers */
+ memcpy(&fb->fb_var, &fb_var, sizeof(struct fb_var_screeninfo));
+ if (fb->fb_var.yoffset == 0) {
+ printf("to back\n");
+ fb->fdata = fb->data;
+ fb->bdata = fb->data + fb->stride * fb->height;
+ } else {
+ printf("to front\n");
+ fb->fdata = fb->data + fb->stride * fb->height;
+ fb->bdata = fb->data;
+ }
+ } else {
+ fb->fdata = fb->data;
+ fb->bdata = fb->data;
+ }
+
#if 0
/* FIXME: No support for 8pp as yet */
if (visual == FB_VISUAL_PSEUDOCOLOR
@@ -274,6 +353,8 @@ psplash_fb_plot_pixel (PSplashFB *fb,
uint8 green,
uint8 blue)
{
+ /* Always write to back data (bdata) which points to the right data with or
+ * without double buffering support */
int off;

if (x < 0 || x > fb->width-1 || y < 0 || y > fb->height-1)
@@ -301,22 +382,22 @@ psplash_fb_plot_pixel (PSplashFB *fb,
{
case 24:
#if __BYTE_ORDER == __BIG_ENDIAN
- *(fb->data + off + 0) = red;
- *(fb->data + off + 1) = green;
- *(fb->data + off + 2) = blue;
+ *(fb->bdata + off + 0) = red;
+ *(fb->bdata + off + 1) = green;
+ *(fb->bdata + off + 2) = blue;
#else
- *(fb->data + off + 0) = blue;
- *(fb->data + off + 1) = green;
- *(fb->data + off + 2) = red;
+ *(fb->bdata + off + 0) = blue;
+ *(fb->bdata + off + 1) = green;
+ *(fb->bdata + off + 2) = red;
#endif
break;
case 32:
- *(volatile uint32_t *) (fb->data + off)
+ *(volatile uint32_t *) (fb->bdata + off)
= (red << 16) | (green << 8) | (blue);
break;

case 16:
- *(volatile uint16_t *) (fb->data + off)
+ *(volatile uint16_t *) (fb->bdata + off)
= ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
break;
default:
@@ -328,21 +409,21 @@ psplash_fb_plot_pixel (PSplashFB *fb,
{
case 24:
#if __BYTE_ORDER == __BIG_ENDIAN
- *(fb->data + off + 0) = blue;
- *(fb->data + off + 1) = green;
- *(fb->data + off + 2) = red;
+ *(fb->bdata + off + 0) = blue;
+ *(fb->bdata + off + 1) = green;
+ *(fb->bdata + off + 2) = red;
#else
- *(fb->data + off + 0) = red;
- *(fb->data + off + 1) = green;
- *(fb->data + off + 2) = blue;
+ *(fb->bdata + off + 0) = red;
+ *(fb->bdata + off + 1) = green;
+ *(fb->bdata + off + 2) = blue;
#endif
break;
case 32:
- *(volatile uint32_t *) (fb->data + off)
+ *(volatile uint32_t *) (fb->bdata + off)
= (blue << 16) | (green << 8) | (red);
break;
case 16:
- *(volatile uint16_t *) (fb->data + off)
+ *(volatile uint16_t *) (fb->bdata + off)
= ((blue >> 3) << 11) | ((green >> 2) << 5) | (red >> 3);
break;
default:
@@ -353,13 +434,13 @@ psplash_fb_plot_pixel (PSplashFB *fb,
switch (fb->bpp)
{
case 32:
- *(volatile uint32_t *) (fb->data + off)
+ *(volatile uint32_t *) (fb->bdata + off)
= ((red >> (8 - fb->red_length)) << fb->red_offset)
| ((green >> (8 - fb->green_length)) << fb->green_offset)
| ((blue >> (8 - fb->blue_length)) << fb->blue_offset);
break;
case 16:
- *(volatile uint16_t *) (fb->data + off)
+ *(volatile uint16_t *) (fb->bdata + off)
= ((red >> (8 - fb->red_length)) << fb->red_offset)
| ((green >> (8 - fb->green_length)) << fb->green_offset)
| ((blue >> (8 - fb->blue_length)) << fb->blue_offset);
diff --git a/psplash-fb.h b/psplash-fb.h
index d0dce10..2f0cdff 100644
--- a/psplash-fb.h
+++ b/psplash-fb.h
@@ -29,6 +29,7 @@ enum RGBMode {
typedef struct PSplashFB
{
int fd;
+ struct fb_var_screeninfo fb_var;
struct termios save_termios;
int type;
int visual;
@@ -38,6 +39,11 @@ typedef struct PSplashFB
char *data;
char *base;

+ /* Support for double buffering */
+ int double_buffering;
+ char *bdata;
+ char *fdata;
+
int angle, fbdev_id;
int real_width, real_height;

@@ -93,5 +99,7 @@ psplash_fb_draw_text (PSplashFB *fb,
const PSplashFont *font,
const char *text);

+void
+psplash_fb_flip(PSplashFB *fb, int sync);

#endif
diff --git a/psplash.c b/psplash.c
index f6442f1..61122fc 100644
--- a/psplash.c
+++ b/psplash.c
@@ -126,6 +126,7 @@ parse_command (PSplashFB *fb, char *string)
return 1;
}

+ psplash_fb_flip(fb, 0);
return 0;
}

@@ -309,8 +310,15 @@ main (int argc, char** argv)
psplash_draw_msg (fb, PSPLASH_STARTUP_MSG);
#endif

- psplash_main (fb, pipe_fd, 0);
+ /* Scene set so let's flip the buffers. */
+ /* The first time we also synchronize the buffers so we can build on an
+ * existing scene. After the first scene is set in both buffers, only the
+ * text and progress bar change which overwrite the specific areas with every
+ * update.
+ */
+ psplash_fb_flip(fb, 1);

+ psplash_main (fb, pipe_fd, 0);

psplash_fb_destroy (fb);

--
2.17.1


[PATCH 1/3] Support --with-font configure option to use other font headers

Andrei Gherzan
 

From: David Steinberg <david@...>

Signed-off-by: David Steinberg <david@...>
---
Makefile.am | 4 ++--
configure.ac | 6 ++++++
psplash.c | 6 +++---
3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index a14152a..3721a6e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,11 +1,11 @@
bin_PROGRAMS=psplash psplash-write

-AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE
+AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE -DFONT_HEADER=\"$(FONT_NAME)-font.h\" -DFONT_DEF=$(FONT_NAME)_font

psplash_SOURCES = psplash.c psplash.h psplash-fb.c psplash-fb.h \
psplash-console.c psplash-console.h \
psplash-colors.h psplash-config.h \
- psplash-poky-img.h psplash-bar-img.h radeon-font.h
+ psplash-poky-img.h psplash-bar-img.h $(FONT_NAME)-font.h

psplash_write_SOURCES = psplash-write.c psplash.h

diff --git a/configure.ac b/configure.ac
index 1c4d919..9e78ac0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,12 @@ fi

AC_SUBST(GCC_FLAGS)

+AC_ARG_WITH([font],
+ AS_HELP_STRING([--with-font], [Set font to use (default is 'radeon')]),
+ [FONT_NAME=$withval],
+ [FONT_NAME=radeon])
+AC_SUBST([FONT_NAME])
+
AC_OUTPUT([
Makefile
])
diff --git a/psplash.c b/psplash.c
index 992e199..f6442f1 100644
--- a/psplash.c
+++ b/psplash.c
@@ -23,7 +23,7 @@
#include "psplash-colors.h"
#include "psplash-poky-img.h"
#include "psplash-bar-img.h"
-#include "radeon-font.h"
+#include FONT_HEADER

#define SPLIT_LINE_POS(fb) \
( (fb)->height \
@@ -45,7 +45,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg)
{
int w, h;

- psplash_fb_text_size (&w, &h, &radeon_font, msg);
+ psplash_fb_text_size (&w, &h, &FONT_DEF, msg);

DBG("displaying '%s' %ix%i\n", msg, w, h);

@@ -62,7 +62,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg)
(fb->width-w)/2,
SPLIT_LINE_POS(fb) - h,
PSPLASH_TEXT_COLOR,
- &radeon_font,
+ &FONT_DEF,
msg);
}

--
2.17.1


Last Live Coding with Yocto Project session in 2019

Volosincu, Andreea S
 

Today, wrapping up the year with another live coding session.

 

When: Dec 17, 2019, 4:00 PM CET/Berlin

Where: Yocto Project Twitch channel - https://www.twitch.tv/yocto_project

What: Yocto Project developer, Josef Holzmayr, will talk about build inspection, diagnosing recipe builds, dependencies, and package sizes

 

Best,

Yocto Project Advocacy Team

 


Re: #raspberrypi #raspberrypi

Stefano Babic
 

Hi Khem, Wojciech,

On 17/12/19 05:48, Khem Raj wrote:
On Mon, Dec 16, 2019 at 1:56 PM <wojciech.st@...> wrote:

Problem with rootfs boot on my raspberrypi.

Hi
I am building simple image for my raspbery pi 3 A+ and connect to the pi via USB-UART converter and see the following in the console
...
[ 2.071459] Run /bin/init as init process
[ 2.076507] Run /bin/sh as init process
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
sh-4.4#



I build with the "bitbake core-image-base" and tried to run it on rpi 3A+, 3B, 3B+ and the problem is always the same it cannot switch to the rootfs on the sd card it seem like it stack at initramfs or some middle ground.

I burn the *.rpi-sdimg image to SD card with dd from my Ubuntu16.04 host machine.
I tried with two branches thud and warrior and the problem is exactly the same.
The strange thing is that in this initramfs there are no tools like find grep modprobe etc. but I see my extra tools "i2c-tools vim"

Here is my local.conf adjustments:
MACHINE ?= "raspberrypi3"
ENABLE_I2C = "1"
ENABLE_UART = "1"
IMAGE_INSTALL += "i2c-tools vim"
Can you turn this into
IMAGE_INSTALL_append = " i2c-tools vim"


and the bblayer.conf
BBLAYERS ?= " \
/media/dave/Develop/yoctopi/warrior/sources/poky/meta \
/media/dave/Develop/yoctopi/warrior/sources/poky/meta-poky \
/media/dave/Develop/yoctopi/warrior/sources/poky/meta-yocto-bsp \
/media/dave/Develop/yoctopi/warrior/sources/meta-openembedded/meta-oe \
/media/dave/Develop/yoctopi/warrior/sources/meta-raspberrypi \
"

I tried also to build with the deprecated image "bitbake rpi-basic-image" but then I did not get my extra tools "i2c-tools vim".

Anyone have any idea what can be wrong with my approach ?
Strange enough, I had the same behaviour a couple of days ago but I
thought it was something on my setup. I built core-iage-full-cmdline on
TOT, and systemd as init manager. The issue was due because adding
"userland", bash was added due RDEPENDS to the image and busybox with
all related tools was dropped. After removing bash from image, it works
again - but I have not git-bisect to check which is the cause.

Regards,
Stefano

Regards,

Wojciech


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#47702): https://lists.yoctoproject.org/g/yocto/message/47702
Mute This Topic: https://lists.yoctoproject.org/mt/68744766/1997914
Mute #raspberrypi: https://lists.yoctoproject.org/mk?hashtag=raspberrypi&subid=6692173
Group Owner: yocto+owner@...
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@...]
-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#47712): https://lists.yoctoproject.org/g/yocto/message/47712
Mute This Topic: https://lists.yoctoproject.org/mt/68752649/3618551
Mute #raspberrypi: https://lists.yoctoproject.org/mk?hashtag=raspberrypi&subid=6692235
Group Owner: yocto+owner@...
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [sbabic@...]
-=-=-=-=-=-=-=-=-=-=-=-

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@...
=====================================================================


Dynamic layer or recipe not working

Andy Pont
 

Hello,

I have created a new dynamic layer within my projects custom meta-layer and have added a new recipe to it.  When I try to build the image it tells me that nothing RPROVIDES the recipe and if I try to build the recipe on its own it says “Nothing PROVIDES…”.

I have tried running:

$ bitbake-layers show-recipes | grep <recipe_name>

…and nothing is returned.

How do I determine whether it is the dynamic layer that isn’t being found or the recipe itself that isn’t correct.

-Andy.

 
 
 


[patchest-oe][PATCH] Add SPDX-License-Identifier: GPL-2.0-or-later to source files

Changqing Li
 

From: Changqing Li <changqing.li@...>

[YOCTO #13532]

Signed-off-by: Changqing Li <changqing.li@...>
---
selftest/selftest | 2 ++
tests/base.py | 2 ++
tests/pyparsing/common.py | 2 ++
tests/pyparsing/parse_shortlog.py | 2 ++
tests/pyparsing/parse_signed_off_by.py | 2 ++
tests/pyparsing/parse_upstream_status.py | 2 ++
tests/test_mbox_author.py | 2 ++
tests/test_mbox_bugzilla.py | 2 ++
tests/test_mbox_description.py | 2 ++
tests/test_mbox_format.py | 2 ++
tests/test_mbox_mailinglist.py | 2 ++
tests/test_mbox_merge.py | 2 ++
tests/test_mbox_shortlog.py | 2 ++
tests/test_mbox_signed_off_by.py | 2 ++
tests/test_metadata_lic_files_chksum.py | 2 ++
tests/test_metadata_license.py | 2 ++
tests/test_metadata_max_length.py | 2 ++
tests/test_metadata_src_uri.py | 2 ++
tests/test_metadata_summary.py | 2 ++
tests/test_patch_cve.py | 2 ++
tests/test_patch_signed_off_by.py | 2 ++
tests/test_patch_upstream_status.py | 2 ++
tests/test_python_pylint.py | 2 ++
23 files changed, 46 insertions(+)

diff --git a/selftest/selftest b/selftest/selftest
index f42045b..b6db621 100755
--- a/selftest/selftest
+++ b/selftest/selftest
@@ -17,6 +17,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import os
import subprocess

diff --git a/tests/base.py b/tests/base.py
index 3810a67..ca40d3d 100644
--- a/tests/base.py
+++ b/tests/base.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import unittest
import logging
import json
diff --git a/tests/pyparsing/common.py b/tests/pyparsing/common.py
index 04a4fde..7ac23f7 100644
--- a/tests/pyparsing/common.py
+++ b/tests/pyparsing/common.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import pyparsing

# general
diff --git a/tests/pyparsing/parse_shortlog.py b/tests/pyparsing/parse_shortlog.py
index 8e67bcc..ecd008c 100644
--- a/tests/pyparsing/parse_shortlog.py
+++ b/tests/pyparsing/parse_shortlog.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
# NOTE:This is an oversimplified syntax of the mbox's summary

import pyparsing
diff --git a/tests/pyparsing/parse_signed_off_by.py b/tests/pyparsing/parse_signed_off_by.py
index db12b83..fc39a6c 100644
--- a/tests/pyparsing/parse_signed_off_by.py
+++ b/tests/pyparsing/parse_signed_off_by.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+

import pyparsing
import common
diff --git a/tests/pyparsing/parse_upstream_status.py b/tests/pyparsing/parse_upstream_status.py
index 232e617..c846fcb 100644
--- a/tests/pyparsing/parse_upstream_status.py
+++ b/tests/pyparsing/parse_upstream_status.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+

import common
import pyparsing
diff --git a/tests/test_mbox_author.py b/tests/test_mbox_author.py
index 5f3d74e..b5f7908 100644
--- a/tests/test_mbox_author.py
+++ b/tests/test_mbox_author.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import re

diff --git a/tests/test_mbox_bugzilla.py b/tests/test_mbox_bugzilla.py
index bb2e0bf..66ccbe8 100644
--- a/tests/test_mbox_bugzilla.py
+++ b/tests/test_mbox_bugzilla.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import re
import base

diff --git a/tests/test_mbox_description.py b/tests/test_mbox_description.py
index a5b322d..237290b 100644
--- a/tests/test_mbox_description.py
+++ b/tests/test_mbox_description.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base

class CommitMessage(base.Base):
diff --git a/tests/test_mbox_format.py b/tests/test_mbox_format.py
index 11467bd..fde1938 100644
--- a/tests/test_mbox_format.py
+++ b/tests/test_mbox_format.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import re

diff --git a/tests/test_mbox_mailinglist.py b/tests/test_mbox_mailinglist.py
index e5700b4..36c0c1e 100644
--- a/tests/test_mbox_mailinglist.py
+++ b/tests/test_mbox_mailinglist.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import subprocess
import collections
import base
diff --git a/tests/test_mbox_merge.py b/tests/test_mbox_merge.py
index 76eef62..6c30db8 100644
--- a/tests/test_mbox_merge.py
+++ b/tests/test_mbox_merge.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import subprocess
import base
from patchtestdata import PatchTestInput as pti
diff --git a/tests/test_mbox_shortlog.py b/tests/test_mbox_shortlog.py
index 94f78f8..e6a4410 100644
--- a/tests/test_mbox_shortlog.py
+++ b/tests/test_mbox_shortlog.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import parse_shortlog
import pyparsing
diff --git a/tests/test_mbox_signed_off_by.py b/tests/test_mbox_signed_off_by.py
index efb9e35..e50bb8e 100644
--- a/tests/test_mbox_signed_off_by.py
+++ b/tests/test_mbox_signed_off_by.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import parse_signed_off_by
import re
diff --git a/tests/test_metadata_lic_files_chksum.py b/tests/test_metadata_lic_files_chksum.py
index 28a8ae6..da4598e 100644
--- a/tests/test_metadata_lic_files_chksum.py
+++ b/tests/test_metadata_lic_files_chksum.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import re
import patchtestdata
diff --git a/tests/test_metadata_license.py b/tests/test_metadata_license.py
index 5721f28..ed98cea 100644
--- a/tests/test_metadata_license.py
+++ b/tests/test_metadata_license.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import os
from patchtestdata import PatchTestInput as pti
diff --git a/tests/test_metadata_max_length.py b/tests/test_metadata_max_length.py
index eaf58b2..e31181a 100644
--- a/tests/test_metadata_max_length.py
+++ b/tests/test_metadata_max_length.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import re

diff --git a/tests/test_metadata_src_uri.py b/tests/test_metadata_src_uri.py
index a4c5caa..c0e8145 100644
--- a/tests/test_metadata_src_uri.py
+++ b/tests/test_metadata_src_uri.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import patchtestdata
import subprocess
import base
diff --git a/tests/test_metadata_summary.py b/tests/test_metadata_summary.py
index f820f5d..c7ee24b 100644
--- a/tests/test_metadata_summary.py
+++ b/tests/test_metadata_summary.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
from patchtestdata import PatchTestInput as pti

diff --git a/tests/test_patch_cve.py b/tests/test_patch_cve.py
index df6fe46..46ed9ef 100644
--- a/tests/test_patch_cve.py
+++ b/tests/test_patch_cve.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import os
import re
diff --git a/tests/test_patch_signed_off_by.py b/tests/test_patch_signed_off_by.py
index b620cd4..c26759e 100644
--- a/tests/test_patch_signed_off_by.py
+++ b/tests/test_patch_signed_off_by.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import parse_signed_off_by
import re
diff --git a/tests/test_patch_upstream_status.py b/tests/test_patch_upstream_status.py
index a477dfb..2179764 100644
--- a/tests/test_patch_upstream_status.py
+++ b/tests/test_patch_upstream_status.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import parse_upstream_status
import pyparsing
diff --git a/tests/test_python_pylint.py b/tests/test_python_pylint.py
index df6a5de..fe24d69 100644
--- a/tests/test_python_pylint.py
+++ b/tests/test_python_pylint.py
@@ -15,6 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+# SPDX-License-Identifier: GPL-2.0-or-later
+
import base
import patchtestdata
import pylint.epylint as lint
--
2.7.4


[thud] packaging error in python3

kweihmann@...
 

Hi All,

I know thud is already out of support, but I'm experiencing some weird packaging error with thud in my CI pipelines, which I don't see with warrior or later releases.
(when building from scratch this occurs 3 out of 5 runs)

2019-12-16T20:59:49.8840822Z ERROR: python3-3.5.6-r1.0 do_package: Error executing a python function in exec_python_func() autogenerated:
2019-12-16T20:59:49.8845177Z
2019-12-16T20:59:49.8845406Z The stack trace of python calls that resulted in this exception/failure was:
2019-12-16T20:59:49.8847595Z File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
2019-12-16T20:59:49.8847758Z 0001:
2019-12-16T20:59:49.8847839Z *** 0002:emit_pkgdata(d)
2019-12-16T20:59:49.8847938Z 0003:
2019-12-16T20:59:49.8848324Z File: '/home/runner/work/poky/meta/classes/package.bbclass', lineno: 1436, function: emit_pkgdata
2019-12-16T20:59:49.8848450Z 1432: total_size = 0
2019-12-16T20:59:49.8848550Z 1433: seen = set()
2019-12-16T20:59:49.8848663Z 1434: for f in pkgfiles[pkg]:
2019-12-16T20:59:49.8848767Z 1435: relpth = os.path.relpath(f, pkgdestpkg)
2019-12-16T20:59:49.8848872Z *** 1436: fstat = os.lstat(f)
2019-12-16T20:59:49.8848974Z 1437: files[os.sep + relpth] = fstat.st_size
2019-12-16T20:59:49.8849071Z 1438: if fstat.st_ino not in seen:
2019-12-16T20:59:49.8849172Z 1439: seen.add(fstat.st_ino)
2019-12-16T20:59:49.8849275Z 1440: total_size += fstat.st_size
2019-12-16T20:59:49.8849809Z Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/poky/build/tmp/work/i586-test-linux/python3/3.5.6-r1.0/packages-split/python3-tests/usr/lib/python3.5/test/test_warnings/data/__pycache__/stacklevel.cpython-35.pyc'
Does anyone remember if that has been fixed somewhere on the way?
A quick look at the git history didn't reveal anything that fits here.

What I see most of the time is, that packaging doesn't find some pyc-files from internal python tests.

Thanks
Konrad


[meta-security][PATCH] suricata: update to 4.1.6

Armin Kuster
 

Signed-off-by: Armin Kuster <akuster808@...>
---
recipes-ids/suricata/suricata.inc | 6 +++---
.../suricata/{suricata_4.1.5.bb => suricata_4.1.6.bb} | 1 -
2 files changed, 3 insertions(+), 4 deletions(-)
rename recipes-ids/suricata/{suricata_4.1.5.bb => suricata_4.1.6.bb} (98%)

diff --git a/recipes-ids/suricata/suricata.inc b/recipes-ids/suricata/suricata.inc
index 1f4baff..3adbcf6 100644
--- a/recipes-ids/suricata/suricata.inc
+++ b/recipes-ids/suricata/suricata.inc
@@ -2,8 +2,8 @@ HOMEPAGE = "http://suricata-ids.org/"
SECTION = "security Monitor/Admin"
LICENSE = "GPLv2"

-VER = "4.1.5"
+VER = "4.1.6"
SRC_URI = "http://www.openinfosecfoundation.org/download/suricata-${VER}.tar.gz"

-SRC_URI[md5sum] = "0dfd68f6f4314c5c2eed7128112eff3b"
-SRC_URI[sha256sum] = "cee5f6535cd7fe63fddceab62eb3bc66a63fc464466c88ec7a41b7a1331ac74b"
+SRC_URI[md5sum] = "da5de1e8053f05cbd295793210117d34"
+SRC_URI[sha256sum] = "8441ac89016106459ade2112fcde58b3f789e4beb2fd8bfa081ffb75eec75fe0"
diff --git a/recipes-ids/suricata/suricata_4.1.5.bb b/recipes-ids/suricata/suricata_4.1.6.bb
similarity index 98%
rename from recipes-ids/suricata/suricata_4.1.5.bb
rename to recipes-ids/suricata/suricata_4.1.6.bb
index b2700d6..9b7122b 100644
--- a/recipes-ids/suricata/suricata_4.1.5.bb
+++ b/recipes-ids/suricata/suricata_4.1.6.bb
@@ -10,7 +10,6 @@ SRC_URI += " \
file://suricata.yaml \
file://suricata.service \
file://run-ptest \
- file://0001-af-packet-fix-build-on-recent-Linux-kernels.patch \
"

inherit autotools-brokensep pkgconfig python3-dir systemd ptest
--
2.17.1


Re: #raspberrypi #raspberrypi

Khem Raj
 

On Mon, Dec 16, 2019 at 1:56 PM <wojciech.st@...> wrote:

Problem with rootfs boot on my raspberrypi.

Hi
I am building simple image for my raspbery pi 3 A+ and connect to the pi via USB-UART converter and see the following in the console
...
[ 2.071459] Run /bin/init as init process
[ 2.076507] Run /bin/sh as init process
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
sh-4.4#



I build with the "bitbake core-image-base" and tried to run it on rpi 3A+, 3B, 3B+ and the problem is always the same it cannot switch to the rootfs on the sd card it seem like it stack at initramfs or some middle ground.

I burn the *.rpi-sdimg image to SD card with dd from my Ubuntu16.04 host machine.
I tried with two branches thud and warrior and the problem is exactly the same.
The strange thing is that in this initramfs there are no tools like find grep modprobe etc. but I see my extra tools "i2c-tools vim"

Here is my local.conf adjustments:
MACHINE ?= "raspberrypi3"
ENABLE_I2C = "1"
ENABLE_UART = "1"
IMAGE_INSTALL += "i2c-tools vim"
Can you turn this into
IMAGE_INSTALL_append = " i2c-tools vim"


and the bblayer.conf
BBLAYERS ?= " \
/media/dave/Develop/yoctopi/warrior/sources/poky/meta \
/media/dave/Develop/yoctopi/warrior/sources/poky/meta-poky \
/media/dave/Develop/yoctopi/warrior/sources/poky/meta-yocto-bsp \
/media/dave/Develop/yoctopi/warrior/sources/meta-openembedded/meta-oe \
/media/dave/Develop/yoctopi/warrior/sources/meta-raspberrypi \
"

I tried also to build with the deprecated image "bitbake rpi-basic-image" but then I did not get my extra tools "i2c-tools vim".

Anyone have any idea what can be wrong with my approach ?

Regards,

Wojciech


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#47702): https://lists.yoctoproject.org/g/yocto/message/47702
Mute This Topic: https://lists.yoctoproject.org/mt/68744766/1997914
Mute #raspberrypi: https://lists.yoctoproject.org/mk?hashtag=raspberrypi&subid=6692173
Group Owner: yocto+owner@...
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@...]
-=-=-=-=-=-=-=-=-=-=-=-


[meta-security][PATCH 3/3] lib/oeqa/runtime: suricata add tests

Armin Kuster
 

drop the unit test as it should be run via ptest
add more tests for python3-suricata-update

Signed-off-by: Armin Kuster <akuster808@...>
---
lib/oeqa/runtime/cases/suricata.py | 63 ++++++++++++++++++++++++++----
1 file changed, 56 insertions(+), 7 deletions(-)

diff --git a/lib/oeqa/runtime/cases/suricata.py b/lib/oeqa/runtime/cases/suricata.py
index 17fc8c5..7f052ec 100644
--- a/lib/oeqa/runtime/cases/suricata.py
+++ b/lib/oeqa/runtime/cases/suricata.py
@@ -1,6 +1,7 @@
# Copyright (C) 2019 Armin Kuster <akuster808@...>
#
import re
+from tempfile import mkstemp

from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
@@ -9,6 +10,22 @@ from oeqa.runtime.decorator.package import OEHasPackage

class SuricataTest(OERuntimeTestCase):

+ @classmethod
+ def setUpClass(cls):
+ cls.tmp_fd, cls.tmp_path = mkstemp()
+ with os.fdopen(cls.tmp_fd, 'w') as f:
+ # use google public dns
+ f.write("nameserver 8.8.8.8")
+ f.write(os.linesep)
+ f.write("nameserver 8.8.4.4")
+ f.write(os.linesep)
+ f.write("nameserver 127.0.0.1")
+ f.write(os.linesep)
+
+ @classmethod
+ def tearDownClass(cls):
+ os.remove(cls.tmp_path)
+
@OEHasPackage(['suricata'])
@OETestDepends(['ssh.SSHTest.test_ssh'])
def test_suricata_help(self):
@@ -18,10 +35,42 @@ class SuricataTest(OERuntimeTestCase):
self.assertEqual(status, 1, msg = msg)

@OETestDepends(['suricata.SuricataTest.test_suricata_help'])
- def test_suricata_unittest(self):
- status, output = self.target.run('suricata -u')
- match = re.search('FAILED: 0 ', output)
- if not match:
- msg = ('suricata unittest had an unexpected failure. '
- 'Status and output:%s and %s' % (status, output))
- self.assertEqual(status, 0, msg = msg)
+ def test_ping_openinfosecfoundation_org(self):
+ dst = '/etc/resolv.conf'
+ self.tc.target.run('rm -f %s' % dst)
+ (status, output) = self.tc.target.copyTo(self.tmp_path, dst)
+ msg = 'File could not be copied. Output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ status, output = self.target.run('ping -c 1 openinfosecfoundation.org')
+ msg = ('ping openinfosecfoundation.org failed: output is:\n%s' % output)
+ self.assertEqual(status, 0, msg = msg)
+
+ @OEHasPackage(['python3-suricata-update'])
+ @OETestDepends(['suricata.SuricataTest.test_ping_openinfosecfoundation_org'])
+ def test_suricata_update(self):
+ status, output = self.tc.target.run('suricata-update')
+ msg = ('suricata-update had an unexpected failure. '
+ 'Status and output:%s and %s' % (status, output))
+ self.assertEqual(status, 0, msg = msg)
+
+ @OETestDepends(['suricata.SuricataTest.test_suricata_update'])
+ def test_suricata_update_sources_list(self):
+ status, output = self.tc.target.run('suricata-update list-sources')
+ msg = ('suricata-update list-sources had an unexpected failure. '
+ 'Status and output:%s and %s' % (status, output))
+ self.assertEqual(status, 0, msg = msg)
+
+ @OETestDepends(['suricata.SuricataTest.test_suricata_update_sources_list'])
+ def test_suricata_update_sources(self):
+ status, output = self.tc.target.run('suricata-update update-sources')
+ msg = ('suricata-update update-sources had an unexpected failure. '
+ 'Status and output:%s and %s' % (status, output))
+ self.assertEqual(status, 0, msg = msg)
+
+ @OETestDepends(['suricata.SuricataTest.test_suricata_update_sources'])
+ def test_suricata_update_enable_source(self):
+ status, output = self.tc.target.run('suricata-update enable-source oisf/trafficid')
+ msg = ('suricata-update enable-source oisf/trafficid had an unexpected failure. '
+ 'Status and output:%s and %s' % (status, output))
+ self.assertEqual(status, 0, msg = msg)
--
2.17.1


[meta-security][PATCH 2/3] libhtp: bugfix only update 0.5.32

Armin Kuster
 

Signed-off-by: Armin Kuster <akuster808@...>
---
recipes-ids/suricata/{libhtp_0.5.31.bb => libhtp_0.5.32.bb} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename recipes-ids/suricata/{libhtp_0.5.31.bb => libhtp_0.5.32.bb} (100%)

diff --git a/recipes-ids/suricata/libhtp_0.5.31.bb b/recipes-ids/suricata/libhtp_0.5.32.bb
similarity index 100%
rename from recipes-ids/suricata/libhtp_0.5.31.bb
rename to recipes-ids/suricata/libhtp_0.5.32.bb
--
2.17.1


[meta-security][PATCH 1/3] python3-suricata-update: update to 1.1.1

Armin Kuster
 

Signed-off-by: Armin Kuster <akuster808@...>
---
...icata-update_1.0.5.bb => python3-suricata-update_1.1.1.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename recipes-ids/suricata/{python3-suricata-update_1.0.5.bb => python3-suricata-update_1.1.1.bb} (86%)

diff --git a/recipes-ids/suricata/python3-suricata-update_1.0.5.bb b/recipes-ids/suricata/python3-suricata-update_1.1.1.bb
similarity index 86%
rename from recipes-ids/suricata/python3-suricata-update_1.0.5.bb
rename to recipes-ids/suricata/python3-suricata-update_1.1.1.bb
index 63f75e0..0070b5b 100644
--- a/recipes-ids/suricata/python3-suricata-update_1.0.5.bb
+++ b/recipes-ids/suricata/python3-suricata-update_1.1.1.bb
@@ -5,8 +5,8 @@ LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548"

-SRCREV = "dcd0f630e13463750efb1593ad3ccae1ae6c27d4"
-SRC_URI = "git://github.com/OISF/suricata-update;branch='master-1.0.x'"
+SRCREV = "9630630ffc493ca26299d174ee2066aa1405b2d4"
+SRC_URI = "git://github.com/OISF/suricata-update;branch='master-1.1.x'"

S = "${WORKDIR}/git"

--
2.17.1


[yocto-autobuilder-helper][PATCH] config.json: Add meta-multimedia to meta-oe job

Khem Raj
 

meta-oe recipes/packagegroups needs meta-multimedia packagegroups
Whitelist ffmpeg so packages depending on it can be tested

Fixes
ERROR: Nothing PROVIDES 'ffmpeg' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.12.bb DEPENDS on or otherwise requires it)
ffmpeg was skipped: because it has a restricted license 'commercial'. Which is not whitelisted in LICENSE_FLAGS_WHITELIST

Signed-off-by: Khem Raj <raj.khem@...>
Cc: Armin Kuster <akuster808@...>
---
config.json | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/config.json b/config.json
index b0856a0..a790d08 100644
--- a/config.json
+++ b/config.json
@@ -729,8 +729,12 @@
"ADDLAYER" : [
"${BUILDDIR}/../meta-openembedded/meta-oe",
"${BUILDDIR}/../meta-openembedded/meta-python",
+ "${BUILDDIR}/../meta-openembedded/meta-multimedia",
"${BUILDDIR}/../meta-openembedded/meta-networking",
"${BUILDDIR}/../meta-openembedded/meta-filesystems"
+ ],
+ "extravars" : [
+ "LICENSE_FLAGS_WHITELIST_append = ' commercial_ffmpeg commercial_x264 '"
]
},
"meta-virt" : {
--
2.24.0


Re: [error-report-web][PATCH V2] Add local.conf and auto.conf into error details

Changqing Li
 

correct the mail list to yocto@...

On 12/11/19 1:45 PM, Changqing Li wrote:

On 11/13/19 6:36 PM, Paul Eggleton wrote:
Hi Changqing,

Some comments below.

On Tuesday, 12 November 2019 9:32:53 PM NZDT changqing.li@... wrote:
From: Changqing Li <changqing.li@...>

Support to display local.conf and auto.conf on error report web.
Here is commit in oe-core, which add local.conf/auto.conf into error report
https://git.openembedded.org/openembedded-core/commit/?id=7adf9707c04d8ef6bcd8d8bda555687f705e6ee6

This commit is related to YOCTO #13252

Signed-off-by: Changqing Li <changqing.li@...>
---
  Post/0006_auto_20190917_0419.py | 24 ++++++++++++++++++++++++
  Post/models.py                  |  2 ++
  Post/parser.py                  |  2 ++
  Post/test.py                    |  2 ++
  templates/error-details.html    | 10 ++++++++++
  test-data/test-payload.json     |  4 +++-
  6 files changed, 43 insertions(+), 1 deletion(-)
  create mode 100644 Post/0006_auto_20190917_0419.py

diff --git a/Post/0006_auto_20190917_0419.py b/Post/0006_auto_20190917_0419.py
new file mode 100644
index 0000000..827944e
--- /dev/null
+++ b/Post/0006_auto_20190917_0419.py
Could you please give the migration a proper name (-n option to makemigrations) e.g. local_conf_auto_conf
OK, thanks

--- a/Post/models.py
+++ b/Post/models.py
@@ -43,6 +43,8 @@ class Build(models.Model):
      LINK_BACK = models.TextField(max_length=300, blank=True, null=True)
      ERROR_TYPE = models.CharField(max_length=20, choices=ERROR_TYPE_CHOICES,
                                    default=ErrorType.RECIPE)
+    LOCAL_CONF = models.TextField(max_length=int(settings.MAX_UPLOAD_SIZE), default="")
+    AUTO_CONF = models.TextField(max_length=int(settings.MAX_UPLOAD_SIZE), default="")
I'm not sure this is practical, for two reasons:

1) Field sizes should not be variable like this; changing the MAX_UPLOAD_SIZE value after the fact would not change the database structure
2) The value could never actually reach MAX_UPLOAD_SIZE because the overhead of the surrounding JSON would block it from being uploaded if it did

However, since this is a TextField we don't actually have to specify a max_length (for a TextField max_length only actually affects the frontend, and we don't expose this field in a form) so it can just be removed.

Another thing, instead of default="" you should use blank=True.
OK,  I will fix this.


+        {% if detail.BUILD.LOCAL_CONF != "" %}
+        <dt></a>Local Conf:</dt>
+        <dd style="white-space: pre-wrap;">{{ detail.BUILD.LOCAL_CONF | safe }}</dd>
+        {% endif %}
+
+        {% if detail.BUILD.AUTO_CONF != "" %}
+        <dt></a>Auto Conf:</dt>
+        <dd style="white-space: pre-wrap;">{{ detail.BUILD.AUTO_CONF | safe }}</dd>
+        {% endif %}
We cannot use the safe filter here - doing so could open up an XSS vulnerability, since anyone can upload anything to the error-report application and the content could include links or other malicious HTML data. We should allow it to be auto-escaped. Is there a particular issue you were using this to solve?
This is for resolve a problem when there is angle brackets in local.conf/auto.conf.

I have a patch in oe-core [OE-core] [PATCH] report-error.bbclass: replace angle brackets with &lt; and &gt;]

when we have below content in local.conf or auto.conf:
BUILDHISTORY_COMMIT_AUTHOR ?= "Khem Raj<raj.khem@...>"
send-error-report will fail with "HTTP Error 500: OK"

error-report-web do rudimentary check on all fields that are
passed to the graphs page to avoid any XSS happening, if contains
'<', the server will return error(Invalid characters in json).
fixed by use escape of <> to replace it.

NOTE: with this change, error-report-web need to add filter 'safe'
for the string wanted to display to avoid further HTML escaping
prior to output. Below is how the content displayed on webpage:
with the filter 'safe':
BUILDHISTORY_COMMIT_AUTHOR ?= "Khem Raj<raj.khem@...>"
without the filter 'safe':
BUILDHISTORY_COMMIT_AUTHOR ?= "Khem Raj &lt;raj.khem@...&gt;"

Do you have good idea to resolve this? Thanks.


Cheers
Paul


Yocto Project Newcomer & Unassigned Bugs - Help Needed

Stephen Jolley
 

All,

 

The triage team is starting to try and collect up and classify bugs which a newcomer to the project would be able to work on in a way which means people can find them. They're being listed on the triage page under the appropriate heading:

 

https://wiki.yoctoproject.org/wiki/Bug_Triage#Newcomer_Bugs

 

The idea is these bugs should be straight forward for a person to help work on who doesn't have deep experience with the project.  If anyone can help, please take ownership of the bug and send patches!  If anyone needs help/advice there are people on irc who can likely do so, or some of the more experienced contributors will likely be happy to help too.

 

Also, the triage team meets weekly and does its best to handle the bugs reported into the Bugzilla. The number of people attending that meeting has fallen, as have the number of people available to help fix bugs. One of the things we hear users report is they don't know how to help. We (the triage team) are therefore going to start reporting out the currently 298 unassigned or newcomer bugs.

 

We're hoping people may be able to spare some time now and again to help out with these.  Bugs are split into two types, "true bugs" where things don't work as they should and "enhancements" which are features we'd want to add to the system.  There are also roughly four different "priority" classes right now, “3.1”, “3.2, "3.99" and "Future", the more pressing/urgent issues being in "3.1" and then “3.2”.

 

Please review this link and if a bug is something you would be able to help with either take ownership of the bug, or send me (sjolley.yp.pm@...) an e-mail with the bug number you would like and I will assign it to you (please make sure you have a Bugzilla account).  The list is at: https://wiki.yoctoproject.org/wiki/Bug_Triage#Unassigned_or_Newcomer_Bugs

 

Thanks,

 

Stephen K. Jolley

Yocto Project Project Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 

9661 - 9680 of 57384