发布时间:2013-07-13 13:03:12
闲来无事,追踪了下linux内核中对nand的坏块管理代码。大致记录一下。内核中对nand的坏块管理是在nand的驱动中实现的,一般情况下,我们在实现nand控制器的驱动时不用考虑坏块的管理,这些机制已经在nand驱动的通用框架中实现了,我们要做的就是在nand驱动的框架上对接上nand控制器私有的操作与参数就可以了,例如读.........【阅读全文】
发布时间: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.........【阅读全文】
发布时间: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.........【阅读全文】
发布时间:2013-07-08 11:52:01
该文 讲述了 windows访问 linux,的一种方式,及linux访问windows的几种方式。ubuntu下用samba实现windows与linux文件共享首先要安装sambasudo apt-get install sambasudo apt-get install smbfs1.windows 访问 ubuntu下面我.........【阅读全文】
发布时间: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.........【阅读全文】
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 ,这两个函数不一样吗,自我感觉有点多次一举,,,不太明白