Port directfb for arm

 I test below in my qemu-mini2440 virtual board.

 http://directfb.org/downloads/Core/DirectFB-1.7/DirectFB-1.7.2.tar.xz

To test first, I disable all picture libs and only open fbdev support, I used tslib, but never make it in dfb, this is just a test. I enabled debug to fix something unexpected. (In my test , I exported PREFIX=/_build)

CC=arm-linux-gcc | ./configure --host=arm-linux --prefix=$PREFIX -with-gfxdrivers=none --with-inputdrivers=tslib,keyboard --disable-jpeg  --enable-fbdev --disable-vnc --disable-x11 --disable-x11vdpau --disable-osx  --disable-sse --disable-pvr2d --disable-gif --disable-tiff --disable-pnm --disable-bmp --disable-webp --disable-mpeg2 --disable-png --disable-freetype --disable-drmkms --disable-devmem --disable-mesa --disable-video4linux --enable-debug

 

For my board, I have some issue with my linux kernel, so I changed to another version kernel, then goes ok, the fbdev driver is also very important.

 
  
/* The fbdev lib in directfb is located as systems/fbdev/fbdev.c */

/* The fbdev driver in kernel is located as drivers/video/fbdev/s3c2410fb.c */

 

If error:undefined reference to `clock_settime' reported, modify Makefile after configured,

# Makefile

OBJ+=-lrt

 

The $PREFIX  is very important, the only method is to copy all the installed files in $PREFIX to the same directory in root filesystem, e.g.

export PREFIX=/gfb-arm
confiture xxx
make -j4 & make install
cp /gfb-arm /path/to/rootfs/ -ra

ls /path/to/rootfs/
bin dev etc gfb-arm lib xxx

 If not put int the save directory as $PREFIX, then it'll show error "DirectFB/core/system: No system found!"

In filesystem, should be located the $HOME/.directfbrc as below, (my board's resolution is 240x320) , if want debug information put in "debug" in one line.

/.directfbrc
system=fbdev
fbdev=/dev/fb0
mode=240x320
depth=16
pixelformat=RGB16

# print info,warining,error,once
# quiet=info
 
# for send text output at remote with: "socat - udp4-listen:8088,fork"
#Send all messages via UDP to the specified host and port.
# if you have something to show more debug info, pls remove "##" in next line ## log
-udp=192.168.1.110:8088 # show debug message, use this together with configuration has --enable-debug ## debug

 If want view dfb output in another terminal or pc, open "log-udp", and type below in that terminal to listen the dfb message.

Type below in server terminal to receive directfb's udp logs
$ socat - udp4-listen:8088,fork

Below is my first test in the kernel v2.6 from qemu git, it has error when fbdev test mode (var.activate=2) in module_init(), 

/ # dfbinfo
(*) Direct/Thread: Started 'SigHandler' (951) [CRITICAL - OTHER/0] <8388608>...

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.7.2 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2012-2013  DirectFB integrated media GmbH
        (c) 2001-2013  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2015-01-02 15:07) [ DEBUG ]
(!) DirectFB/core/system: No system found!
(#) DirectFBError [DirectFBCreate() failed]: No implementation for this interface or content type has been found

 then I changed to kernel v3.17 from kernel.org, I used dfbinfo builded with dfb lib, it's located in /_build/bin

/ # dfbinfo
(*) Direct/Thread: Started 'SigHandler' (815) [CRITICAL - OTHER/0] <8388608>...

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.7.2 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2012-2013  DirectFB integrated media GmbH
        (c) 2001-2013  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2015-01-02 15:07) [ DEBUG ]
(!) gjy: dir buf'/_build/lib/directfb-1.7-2/systems
(!) gjy  -> allocated entry 0x196e6f8
(!) gjy  -> allocated entry 0x1973a70
(!) gjy-dynload:directory->path=systems, direct_config->module_dir=(null), MODULEDIR=/_build/lib/directfb-1.7-2
(!) gjy,dfb_system_lookup
(!) gjy,dfb_system_lookup,foreach dfb_core_systems.entries
(!) gjy,dfb_system_lookup,foreach dfb_core_systems.entries
(*) Direct/Memcpy: Using armasm_memcpy()
(*) Direct/Thread: Started 'Fusion Dispatch' (816) [MESSAGING - OTHER/0] <8388608>...
(*) Direct/Thread: Started 'VT Switcher' (819) [CRITICAL - OTHER/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (820) [DEFAULT - OTHER/0] <8388608>...
(*) DirectFB/FBDev: Found 's3c2410fb' (ID 0) with frame buffer at 0x33b40000, 150k (MMIO 0x00000000, 0k)
(!) gjy: dir buf'/_build/lib/directfb-1.7-2/inputdrivers
(!) gjy  -> ERROR opening directory: No such file or directory!
(!) gjy: dir buf'/_build/lib/directfb-1.7-2/gfxdrivers
(!) gjy  -> ERROR opening directory: No such file or directory!
(*) DirectFB/Graphics: Generic Software Rasterizer 0.7 (directfb.org)
(!) gjy: init_modes, bpp=16, xres=240,yres=320
(!) gjy: dir buf'/_build/lib/directfb-1.7-2/wm
(!) gjy  -> allocated entry 0x197a980
(!) gjy-dynload:directory->path=wm, direct_config->module_dir=(null), MODULEDIR=/_build/lib/directfb-1.7-2
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) Direct/Thread: Started 'Genefx' (821) [DEFAULT - OTHER/0] <8388608>...
(*) FBDev/Mode: Setting 240x320 RGB16
(*) FBDev/Mode: Switched to 240x320 (virtual 240x320) at 16 bit (RGB16), pitch 480


Screen (00) FBDev Primary Screen            (primary screen)
   Caps: VSYNC POWER_MANAGEMENT 

     Layer (00) FBDev Primary Layer             (primary layer)
        Type:    GRAPHICS 
        Caps:    SURFACE BRIGHTNESS CONTRAST SATURATION 


 (!!!)  *** UNIMPLEMENTED [fusion_dispatch] *** [fusion.c:3935]

 As my view, this maybe Okey, all things done for this test journal.

转载于:https://www.cnblogs.com/kozmers/p/4198553.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值