WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Missing fbv.tcz FrameBuffer on piCore  (Read 4857 times)

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Missing fbv.tcz FrameBuffer on piCore
« on: July 19, 2021, 06:43:06 AM »
Hi There,

Missing the extension fbv.tcz FrameBuffer on PiCore v13.x/armv7

http://s-tech.elsat.net.pl/fbv/
https://github.com/godspeed1989/fbv

Thx

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #1 on: July 23, 2021, 06:28:55 PM »
Do I remember wrongly or do the arms not have framebuffer support like intel?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #2 on: July 25, 2021, 05:19:17 AM »
It would be easy to compile fbv yourself and test

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #3 on: July 25, 2021, 06:42:21 AM »
Hi Juanito,

i will try that
Thx

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #4 on: July 27, 2021, 10:51:40 AM »
Hi Juanito,

i downloaded the latest version of fbv "fbv-1.0b.tar.gz" and i am trying to copmile it

so here what i did:

installed all needed extensions (giflib.tcz | giflib-dev.tcz | libjpeg-turbo.tcz | libjpeg-turbo-dev.tcz | libpng-dev.tcz | libpng.tcz)

unpack the archive
./configure

and the it check for the libraries
Code: [Select]
checking for libungif presence... no   (i think this is the problem)
checking for libjpeg presence... yes
checking for libpng presence... yes
building with bmp support... yes
checking for DEFAULT_FRAMEBUFFER... /dev/fb0
installation dir: /usr/local/bin
manuals dir: /usr/local/man

if i continue with "make" anyway, i get an error:

make
Code: [Select]
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o gif.o gif.c
gif.c: In function ‘fh_gif_load’:
gif.c:84:9: error: too few arguments to function ‘DGifOpenFileName’
   84 |     gft=DGifOpenFileName(name);
      |         ^~~~~~~~~~~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:179:14: note: declared here
  179 | GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);
      |              ^~~~~~~~~~~~~~~~
gif.c:34:19: error: too few arguments to function ‘DGifCloseFile’
   34 | #define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                   ^~~~~~~~~~~~~
gif.c:88:46: note: in expansion of macro ‘grflush’
   88 |  if(DGifGetRecordType(gft,&rt) == GIF_ERROR) grflush;
      |                                              ^~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:34:19: error: too few arguments to function ‘DGifCloseFile’
   34 | #define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                   ^~~~~~~~~~~~~
gif.c:92:40: note: in expansion of macro ‘grflush’
   92 |   if(DGifGetImageDesc(gft)==GIF_ERROR) grflush;
      |                                        ^~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:35:41: error: too few arguments to function ‘DGifCloseFile’
   35 | #define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                                         ^~~~~~~~~~~~~
gif.c:119:62: note: in expansion of macro ‘mgrflush’
  119 |        if(DGifGetLine(gft,(GifPixelType*)slb,px)==GIF_ERROR) mgrflush;
      |                                                              ^~~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:35:41: error: too few arguments to function ‘DGifCloseFile’
   35 | #define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                                         ^~~~~~~~~~~~~
gif.c:140:59: note: in expansion of macro ‘mgrflush’
  140 |     if(DGifGetLine(gft,(GifPixelType*)slb,px)==GIF_ERROR) mgrflush; /////////////
      |                                                           ^~~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:34:19: error: too few arguments to function ‘DGifCloseFile’
   34 | #define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                   ^~~~~~~~~~~~~
gif.c:153:60: note: in expansion of macro ‘grflush’
  153 |   if(DGifGetExtension(gft,&extcode,&extension)==GIF_ERROR) grflush; //////////
      |                                                            ^~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:34:19: error: too few arguments to function ‘DGifCloseFile’
   34 | #define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                   ^~~~~~~~~~~~~
gif.c:166:61: note: in expansion of macro ‘grflush’
  166 |       if(DGifGetExtensionNext(gft,&extension) == GIF_ERROR) grflush
      |                                                             ^~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:173:5: error: too few arguments to function ‘DGifCloseFile’
  173 |     DGifCloseFile(gft);
      |     ^~~~~~~~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c: In function ‘fh_gif_getsize’:
gif.c:187:9: error: too few arguments to function ‘DGifOpenFileName’
  187 |     gft=DGifOpenFileName(name);
      |         ^~~~~~~~~~~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:179:14: note: declared here
  179 | GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);
      |              ^~~~~~~~~~~~~~~~
gif.c:34:19: error: too few arguments to function ‘DGifCloseFile’
   34 | #define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                   ^~~~~~~~~~~~~
gif.c:191:46: note: in expansion of macro ‘grflush’
  191 |  if(DGifGetRecordType(gft,&rt) == GIF_ERROR) grflush;
      |                                              ^~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:34:19: error: too few arguments to function ‘DGifCloseFile’
   34 | #define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                   ^~~~~~~~~~~~~
gif.c:196:40: note: in expansion of macro ‘grflush’
  196 |   if(DGifGetImageDesc(gft)==GIF_ERROR) grflush;
      |                                        ^~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:200:3: error: too few arguments to function ‘DGifCloseFile’
  200 |   DGifCloseFile(gft);
      |   ^~~~~~~~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:34:19: error: too few arguments to function ‘DGifCloseFile’
   34 | #define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                   ^~~~~~~~~~~~~
gif.c:204:60: note: in expansion of macro ‘grflush’
  204 |   if(DGifGetExtension(gft,&extcode,&extension)==GIF_ERROR) grflush;
      |                                                            ^~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:34:19: error: too few arguments to function ‘DGifCloseFile’
   34 | #define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
      |                   ^~~~~~~~~~~~~
gif.c:206:59: note: in expansion of macro ‘grflush’
  206 |       if(DGifGetExtensionNext(gft,&extension)==GIF_ERROR) grflush;
      |                                                           ^~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
gif.c:213:5: error: too few arguments to function ‘DGifCloseFile’
  213 |     DGifCloseFile(gft);
      |     ^~~~~~~~~~~~~
In file included from gif.c:27:
/usr/local/include/gif_lib.h:183:9: note: declared here
  183 |     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      |         ^~~~~~~~~~~~~
make: *** [<builtin>: gif.o] Error 1


what do you think i am doing wrong ?

Thx
« Last Edit: July 27, 2021, 11:04:10 AM by Rabie »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #5 on: July 27, 2021, 11:33:52 AM »
Hi Rabie
Try this:
Code: [Select]
./configure --prefix=/usr/local --without-libungif

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #6 on: July 27, 2021, 03:15:04 PM »
Hi Rich,

Code: [Select]
./ configure --prefix=/ usr/ local --without-libungif
checking for libungif presence... disabled
checking for libjpeg presence... yes
checking for libpng presence... yes
building with bmp support... yes
checking for DEFAULT_FRAMEBUFFER... / dev/ fb0
installation dir: / usr/ local/ bin
manuals dir: / usr/ local/ man

Make:
Code: [Select]
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o main.o main.c
main.c: In function ‘show_image’:
main.c:431:4: warning: ‘i.do_free’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  431 |  if(i.do_free)
      |    ^
main.c:434:3: warning: ‘i.alpha’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  434 |   free(i.alpha);
      |   ^~~~~~~~~~~~~
main.c:433:3: warning: ‘i.rgb’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  433 |   free(i.rgb);
      |   ^~~~~~~~~~~
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o jpeg.o jpeg.c
jpeg.c: In function ‘fh_jpeg_load’:
jpeg.c:65:12: warning: variable ‘py’ set but not used [-Wunused - but- set- variable]
   65 |     int px,py,c;
      |            ^~
jpeg.c: In function ‘fh_jpeg_getsize’:
jpeg.c:114:15: warning: variable ‘c’ set but not used [-Wunused -but -set -variable]
  114 |     int px,py,c;
      |               ^
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o gif.o gif.c
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o png.o png.c
In file included from /usr/local/include/pngconf.h:51,
                 from /usr/local/include/png.h:339,
                 from png.c:22:
png.c: In function ‘fh_png_load’:
png.c:72:23: error: invalid use of incomplete typedef ‘png_struct’ {aka ‘struct png_struct_def’}
   72 |     if (setjmp(png_ptr->jmpbuf))
      |                       ^~
png.c:108:10: warning: pointer targets in assignment from ‘unsigned char *’ to ‘char *’ differ in signedn         ess [-Wpointer-sign]
  108 |    fbptr = buffer;
      |          ^
png.c:114:26: warning: pointer targets in initialization of ‘unsigned char *’ from ‘char *’ differ in sig         nedness [-Wpointer-sign]
  114 |     unsigned char *trp = rp;
      |                          ^~
png.c:131:10: warning: pointer targets in assignment from ‘unsigned char *’ to ‘char *’ differ in signedn         ess [-Wpointer-sign]
  131 |    fbptr = buffer;
      |          ^
In file included from /usr/local/include/pngconf.h:51,
                 from /usr/local/include/png.h:339,
                 from png.c:22:
png.c: In function ‘fh_png_getsize’:
png.c:164:23: error: invalid use of incomplete typedef ‘png_struct’ {aka ‘struct png_struct_def’}
  164 |     if (setjmp(png_ptr->jmpbuf))
      |                       ^~
make: *** [<builtin>: png.o] Error 1


i tried that and i got some error with png and the i did the same to it like:
Quote
./configure --prefix=/usr/local --without-libungif --without-libpng

i got also an error:
Code: [Select]
make
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o png.o png.c
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o bmp.o bmp.c
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o fb_display.o fb_display.c
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o transforms.o transforms.c
In file included from transforms.c:21:
transforms.c: In function ‘simple_resize’:
transforms.c:27:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   27 |     assert  cr =  unsigned char*  malloc dx*dy*3
      |            ^~
transforms.c: In function ‘color_average_resize’:
transforms.c:65:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   65 |     assert cr=unsigned char* malloc dx*dy*3; p=cr;
      |            ^~
transforms.c: In function ‘rotate’:
transforms.c:93:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   93 |  assert n = unsigned char* malloc ox * oy * 3 ;
      |         ^
transforms.c: In function ‘alpha_rotate’:
transforms.c:143:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  143 |  assert n = unsigned char* malloc ox * oy ;
      |         ^
gcc   -o fbv main.o jpeg.o gif.o png.o bmp.o fb_display.o transforms.o -ljpeg
/usr/local/bin/ld: main.o: in function `show_image':
main.c:(.text+0x10c): undefined reference to `fh_png_id'
/usr/local/bin/ld: main.c:(.text+0x124): undefined reference to `fh_png_getsize'
/usr/local/bin/ld: main.c:(.text+0xba0): undefined reference to `fh_png_load'
collect2: error: ld returned 1 exit status
make: *** [Makefile:21: fbv] Error 1


any Ideas ?
Thank you
« Last Edit: July 27, 2021, 03:21:22 PM by Rabie »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #7 on: July 27, 2021, 05:42:45 PM »
Hi Rabie
If you have errors and need to start over, you should probably start with a clean slate:
Code: [Select]
make clean
./configure --prefix=/usr/local --without-libungif
make

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #8 on: July 28, 2021, 12:04:02 AM »
Your fbv version looks to be very old, the png and gif libs have changed since. Look at Debian/Ubuntu repos, they may have patches.
The only barriers that can stop you are the ones you create yourself.

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #9 on: July 28, 2021, 01:40:08 AM »
Your fbv version looks to be very old, the png and gif libs have changed since. Look at Debian/Ubuntu repos, they may have patches.

Hi curaga,

i think this is the latest version of fbv
i may be wrong but i think this is the homepage
http://s-tech.elsat.net.pl/fbv/


Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #10 on: July 28, 2021, 01:49:34 AM »
Hi Rabie
If you have errors and need to start over, you should probably start with a clean slate:
Code: [Select]
make clean
./configure --prefix=/usr/local --without-libungif
make

Hi Rich,

this did work, not perfectly but it should be enough

i did disabled both PNG and GIF:
Code: [Select]
./configure --prefix=/usr/local --without-libungif --without-libpng
Code: [Select]
make
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o main.o main.c
main.c: In function ‘show_image’:
main.c:431:4: warning: ‘i.do_free’ may be used uninitialized in this function [-Wmaybe - uninitialized]
  431 |  if(i.do_free)
      |    ^
main.c:434:3: warning: ‘i.alpha’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  434 |   free(i.alpha);
      |   ^~~~~~~~~~~~~
main.c:433:3: warning: ‘i.rgb’ may be used uninitialized in this function [-Wmaybe - uninitialized]
  433 |   free(i.rgb);
      |   ^~~~~~~~~~~
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o jpeg.o jpeg.c
jpeg.c: In function ‘fh_jpeg_load’:
jpeg.c:65:12: warning: variable ‘py’ set but not used [-Wunused- but- set- variable]
   65 |     int px,py,c;
      |            ^~
jpeg.c: In function ‘fh_jpeg_getsize’:
jpeg.c:114:15: warning: variable ‘c’ set but not used [-Wunused- but- set -variable]
  114 |     int px,py,c;
      |               ^
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o gif.o gif.c
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o png.o png.c
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o bmp.o bmp.c
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o fb_display.o fb_display.c
gcc  -O2 -Wall -D_GNU_SOURCE   -c -o transforms.o transforms.c
In file included from transforms.c:21:
transforms.c: In function ‘simple_resize’:
transforms.c:27:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   27 |     assert cr = unsigned char* malloc dx*dy*3;
      |            ^~
transforms.c: In function ‘color_average_resize’:
transforms.c:65:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   65 |     assert cr=unsigned char*  malloc dx*dy*3; p=cr;
      |            ^~
transforms.c: In function ‘rotate’:
transforms.c:93:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   93 |  assert n = unsigned char*  malloc ox * oy * 3 ;
      |         ^
transforms.c: In function ‘alpha_rotate’:
transforms.c:143:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  143 |  assert n =  unsigned char* malloc ox * oy;
      |         ^
gcc   -o fbv main.o jpeg.o gif.o png.o bmp.o fb_display.o transforms.o -ljpeg
Build DONE.
i got some warnings but jpg did work

i think jpeg will do the job for me

Thank you very much

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #11 on: July 28, 2021, 02:45:44 AM »
Hi Rich,

i started a new Topic to let fbv start at boot http://forum.tinycorelinux.net/index.php?topic=25171.msg160543#msg160543

you already helped me doing that on CorePure64 v10.x but now i need to do it on PiCore http://forum.tinycorelinux.net/index.php/topic,24622.15.html

Thx

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #12 on: July 28, 2021, 09:45:46 AM »
Hi curaga,

i think this is the latest version of fbv
i may be wrong but i think this is the homepage
http://s-tech.elsat.net.pl/fbv/
Look at the date on that page.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #13 on: July 28, 2021, 10:29:14 AM »
Hi Rabie
The second link you posted appears to be much more recent:
https://github.com/godspeed1989/fbv

It includes this note:
Quote
GIF support through libungif has been removed as that library is obsolete.

Looking through  main.c  I think this warning should be gone:
Code: [Select]
main.c:431:4: warning: ‘i.do_free’ may be used uninitialized in this function [-Wmaybe - uninitialized]
  431 |  if(i.do_free)

The  jpeg.c  warnings should be gone as well.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Missing fbv.tcz FrameBuffer on piCore
« Reply #14 on: July 28, 2021, 11:00:37 AM »
Hi Rabie
If this is just for a splash screen while booting, this may be of interest:
https://bootlin.com/blog/super-fast-linux-splashscreen/