2

我正在尝试交叉编译directfb并运行directfb示例

我已经下载了 directfb 源并交叉编译了相同的。我在运行 directfb 示例时遇到了问题。

我已经使用以下程序(创建为 .ko 文件)注册了字符设备(/dev/fb0)

static struct file_operations fops=
{
    .open=dev_open,  //To open device - file operation
};
int init_module(void)
{
    static dev_t dev_major;
    static struct cdev*dev_cdev;
    int ret=-EIO;
    /* register char-dev */
    dev_major=MKDEV(29,0);
    ret=register_chrdev_region(dev_major,1,"fb0");
    if (ret)
    {
        printk(KERN_ERR "fb0 : can't get chrdev %d\n",29);
        return ret;
    }
    /* allocate cdev */
    dev_cdev=cdev_alloc();
    dev_cdev->ops=&fops;
    /* cdev_init(&dev_data.cdev,&dev_file_ops); */
    ret=cdev_add(dev_cdev,dev_major,1);
    if (ret)
    {
        printk(KERN_ERR "fb0 : can't allocate cdev\n");
        return ret;
    }
    return 0;
}

之后我运行了以下命令,

# insmod directfb_ko.ko
# mknod /dev/fb0 c 29 0

然后我尝试运行 Directfb 示例。我收到以下错误

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.4.1 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2009  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2015-11-19 10:49) 
(!) DirectFB/FBDev/vt: FBIOGET_CON2FBMAP failed!
    --> Inappropriate ioctl for device
(!) DirectFB/FBDev/vt: FBIOPUT_CON2FBMAP failed!
    --> Inappropriate ioctl for device
(*) Direct/Thread: Started 'VT Switcher' (-1) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (-1) [DEFAULT OTHER/OTHER 0/0] <8388608>...
(!) DirectFB/FBDev: Could not get fixed screen information!
    --> Inappropriate ioctl for device
(!) DirectFB/Core: Could not initialize 'system_core' core!
    --> Initialization error!
(!) Tools/Screen: DirectFBCreate() failed!
    --> Initialization error!

有没有关于这个错误的想法。请帮我解决这个问题。

4

0 回答 0