ich schreibe von einem daemon (tuxcald) aus auf den Framebuffer (laufende Uhrzeit) was auch ohne Probleme funktioniert. Wenn ich allerdings den daemon beende wird (meist) an der Sagem 1xI das Bild schwarz, auf anderen Boxen (Sagem 2xI, Nokia, Dreambox) soviel ich weiss nicht. Da ich keine Sagem mit 1xI habe ist das Testen auch relativ schwierig. Hat jemand eine Idee was ich falsch mache?
code beim Öffnen (gekürzt um das Beenden im Fehlerfall):
Code: Alles auswählen
	if ((fbdev = open("/dev/fb/0", O_RDWR))<0) ...
	if (ioctl(fbdev, FBIOGET_VSCREENINFO, &var_screeninfo)<0) ...
	if (ioctl(fbdev, FBIOGET_FSCREENINFO, &fix_screeninfo)<0)...
	if (!(lfb = (unsigned char*)mmap(0, fix_screeninfo.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fbdev, 0))) ...
	// init fontlibrary
	if ((error = FT_Init_FreeType(&library))) ...
	if ((error = FTC_Manager_New(library, 1, 2, 0, &MyFaceRequester, NULL, &manager))) ...
	if ((error = FTC_SBitCache_New(manager, &cache)))...
	if ((error = FTC_Manager_Lookup_Face(manager, FONT, &face))) ...
	use_kerning = FT_HAS_KERNING(face);
	desc.font.face_id = FONT;
#ifdef OLDFT
		desc.type = ftc_image_mono;
#else
		desc.flags = FT_LOAD_MONOCHROME;
#endif
	// init backbuffer
	if (!(lbb = malloc(var_screeninfo.xres*var_screeninfo.yres))) ...
	memset(lbb, 0, var_screeninfo.xres*var_screeninfo.yres);
...
    if(fix_screeninfo.visual==FB_VISUAL_PSEUDOCOLOR)
    {
      colormap=(struct fb_cmap*)malloc(sizeof(struct fb_cmap));
      colormap->red=(__u16*)malloc(sizeof(__u16)*(1<<bps));
      colormap->green=(__u16*)malloc(sizeof(__u16)*(1<<bps));
      colormap->blue=(__u16*)malloc(sizeof(__u16)*(1<<bps));
      colormap->transp=(__u16*)malloc(sizeof(__u16)*(1<<bps));
      colormap->start=0;
      colormap->len=1<<bps;
      if (ioctl(fbdev, FBIOGETCMAP, colormap))...
Code: Alles auswählen
		memset(lbb, 0, var_screeninfo.xres*var_screeninfo.yres);	
		memcpy(lfb, lbb, var_screeninfo.xres*var_screeninfo.yres);	
		FTC_Manager_Done(manager);
		FT_Done_FreeType(library);
		free(lbb);
		munmap(lfb, fix_screeninfo.smem_len);
		close(fbdev);
