我正在尝试交叉编译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!
对此错误有任何疑问。请帮我解决这个问题。