Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2871992
  • 博文数量: 674
  • 博客积分: 17881
  • 博客等级: 上将
  • 技术积分: 4849
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-17 10:15
文章分类

全部博文(674)

文章存档

2013年(34)

2012年(146)

2011年(197)

2010年(297)

发布时间:2013-07-12 19:56:39

Unless you have been using your Android phone just for calls, SMS, browsing and basic apps, you should know that Android uses several partitions to organize files and folders on the device. Each of these partitions has a distinct role in the functionality of the device, but not many Android use.........【阅读全文】

阅读(2810) | 评论(0) | 转发(0)

发布时间:2013-07-12 19:00:39

Several people have already figured out the details on their own, but I have gotten requests to do a more comprehensive tutorial on how the boot and recovery images are structured, and how you can edit them.Contents [hide]1 Backg.........【阅读全文】

阅读(3004) | 评论(0) | 转发(0)

发布时间:2013-07-02 18:23:31

据说Android以后新版本只支持64bit版本开发,所以搭建一个Ubuntu 11.10 64bit系统的Android开发环境为将来的Android 4.0 及更高版本 开发打好基础。一、准备工作1.1 硬件PC 一台(支持64bit),内存最好4G,硬盘最好1T,CPU最好4核心,显卡无所谓,光驱一个。1.2. 软件1.2.1 Ubuntu 11.10 64bit.........【阅读全文】

阅读(1314) | 评论(0) | 转发(0)

发布时间:2013-01-26 14:46:37

1. init进程2. zygote进程2.1 AndroidRuntime2.2 ZygoteInit3. system_server进程3.1 init1阶段3.2 init2阶段接着Linux启动部分 http://blog.csdn.net/qianjin0703/article/details/68811071. init进程系统在内核空间初始化进程,内存,文件系统,驱动模块之后,调用in.........【阅读全文】

阅读(2674) | 评论(0) | 转发(1)

发布时间:2012-12-27 16:02:17

FastBoot协议版本0.4====================================        fastboot协议是一种通过USB连接与bootloaders通讯的机制。    它被设计的非常容易实现,能够用于多种设备和运行Linux、Windows或者OSX的主机。基本需求(Basic Requirements)    * 两个端点,一个输入端,一个输出端。   * 对于全速(full-speed)USB,最大包尺寸必须是64个字节;  &......【阅读全文】

阅读(1156) | 评论(0) | 转发(0)
给主人留下些什么吧!~~

chen_chuang2012-10-11 16:33

高手,有本书上写cdev初始化和注册是这样写的

static void VirtualDisk_setup_cdev(struct VirtualDisk *dev, int minor)
{
        int err;
        devno = MDDEV(VirtualDisk_major, minor);
        cdev_init(&dev->cdev, &VirtualDisk_fops);
        dev->cdev.owner = THIS_MOUDULE;
        dev->cdev.ops = &VirtualDisk_fops;
        err = cdev_add(&dev->cdev, debno, 1);
        if (err)
                printk(KERN_NOTICE "Error in cdev_add()\n");
}

而cdev_init里
void cdev_init(struct cdev *cdev, const struct file_operations *fops)
{
        memset(cdev, 0, sizeof *cdev);
        INIT_LIST_HEAD(&cdev->list);
        kobject_init(&cdev->kobj, &ktype_cdev_default);
        cdev->ops = fops;
}
已经有cdev->ops = fops了
那上面的代码cdev_init之后又有dev->cdev.ops ,这两个函数不一样吗,自我感觉有点多次一举,,,不太明白

回复  |  举报
留言热议
请登录后留言。

登录 注册