ITeye博客

linux driver

共 7 篇文章

UBI FAQ and HOWTO

from: http://www.linux-mtd.infradead.org/faq/ubi.html UBI FAQ and HOWTO Table of contents How do I enable UBI? How do I attach an MTD device? How do I create/delete UBI volumes? How do I run JFFS2 on top of an UBI volume? Can I run ext2 on top of UBI? Do I have to format my empty flash before runni…

2013-03-27 11:54 · linux driver

U-BOOT env 太长如何设置

分成两部分设置: setenv bootargs 'xxxxxx' setenv bootargs $bootargs yyyyyyyy

2013-02-27 14:41 · linux driver

loop设备

loop 设备介绍 在类 UNIX 系统里,loop 设备是一种伪设备(pseudo-device),或者也可以说是仿真设备。它能使我们像块设备一样访问一个文件。 在使用之前,一个 loop 设备必须要和一个文件进行连接。这种结合方式给用户提供了一个替代块特殊文件的接口。因此,如果这个文件包含有一个完整的文件系统,那么这个文件就可以像一个磁盘设备一样被 mount 起来。 上面说的文件格式,我们经常见到的是 CD 或 DVD 的 ISO 光盘镜像文件或者是软盘(硬盘)的 *.img 镜像文件。通过这种 loop mount (回环mount)的方式,这些镜像文件就可以被 mount 到当前文…

2012-12-24 17:39 · linux driver

网络相关驱动点滴

proto_register: rc = proto_register(&proto, 1); 把proto加到一个prot_list中,proto_list是一个全局的静态链表,inet域支持的所有协议全部在这个链表中,但这个链表在协议栈中并没有太大用途,它只是用于在/proc/net/protocols文件中输出当前系统所支持的所有协议。 这个函数是在 linux/net/core/sock.c 中定义的,除了可以将这个协议添加到活动协议列表中之外,如果需要,该函数还可以选择分配一到多个 slab 缓存. sock_register函数将某项协议注册到协议族数组net_families[…

2012-12-20 18:26 · linux driver

platform device <==> platform driver

platform_driver_register(struct platform_driver *drv)注册后如何找到驱动匹配的设备: do_basic_setup()->driver_init()->platform_bus_init()->...初始化platform bus(虚拟总线) 设备向内核注册的时候platform_device_register()->platform_device_add()->...内核把设备挂在虚拟的platform bus下 驱动注册的时候platform_driver_register()->driver_register()->bus_add_d…

2012-12-14 15:21 · linux driver

install kernel module failed issue

运行"insmod abc.ko"报错如下: abc: version magic '3.0.43 preempt mod_unload ' should be '3.0.43-913-ga691c40-dirty preempt mod_unload ' insmod: cannot insert abc.ko': invalid module format 别人编的正常的module如下: modinfo /tmp/abc.ko filename: /tmp/abc.ko version: 0.3 license: GPL description: My driver author: M…

2012-12-12 14:30 · linux driver

ldd3中的lddbus修改

ldd3的example是基于2.6.10内核写的,在新的2.6.3x上编译不过。下面是我做的修改: 1.Makefile: 把CFLAGS替换成EXTRA_CFLAGS. 2.新建一个空的config.h: 得到内核版本:uname -r 2.6.38-12-generic cd /lib/modules/2.6.38-12-generic/build/include/linux touch config.h 或者在config.h中增加以下内容: #ifndef _LINUX_CONFIG_H #define _LINUX_CONFIG_H /* This file is no long…

2012-10-19 17:11 · linux driver