自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 资源 (6)
  • 收藏
  • 关注

原创 unknown symbol class_create

This is really a joke.  http://forums.fedoraforum.org/showthread.php?t=97742 Solution is: MODULE_LICENSE("GPL");

2009-08-31 14:15:00 2938 1

原创 Char Device Driver Example for Kernel 2.6

现在还有疑问,1.怎么知道注册了device后,在/dev目录下显示的是哪个文件名?在class_device_create中生成该文件。 仍有待研究。  注册字符设备的过程1. alloc_chrdev_region 动态分配设备号2. cdev_init  初始化cdev,将fops注册3. cdev_add  将这个字符设备注册到kernel这样c

2009-08-31 13:39:00 1482

原创 Major and Minor Numbers 及 注册和撤销

Char devices are accessedthrough names in the filesystem. Those names arecalled special files or device files or simply nodes of thefilesystem tree; they are conventionally l

2009-08-31 11:30:00 1525

转载 Objective-C

Objective-C语言是一种面向对象的一种动态编程语言,基于ANSI C,其面向对象的语法和思想主要来源于Small-talk。GCC便直接支持Objective-C。该语言在Mac上有着广泛应用。有兴趣的朋友可以参考下面的链接:  一个不错的Tutorial:http://www.otierney.net/objective-c.html一本Online Book,比较全

2009-08-29 18:52:00 586

原创 三种 bottom half的实现方式 softirqs, tasklets, work queue 及之间的比较

The following mechanisms are available in the kernel to defer work to a bottom half: softirqs, tasklets, and work queues.  Softirqs are the basic bottom half mechanism and have strong lock

2009-08-29 15:40:00 2153

原创 Tasklet Example

 5  tasklet的简单用法    下面是tasklet的一个简单应用, 以模块的形成加载。#include linux/module.h>#include

2009-08-24 17:14:00 2283

转载 驱动程序使用tasklet机制

驱动程序在初始化时,通过函数task_init建立一个tasklet,然后调用函数tasklet_schedule将这个tasklet放在tasklet_vec链表的头部,并唤醒后台线程ksoftirqd。当后台线程ksoftirqd运行调用__do_softirq时,会执行在中断向量表softirq_vec里中断号TASKLET_SOFTIRQ对应的tasklet_action函数,

2009-08-24 16:59:00 1589

原创 编译kernel时,将编译的具体内容显示出来的方法

在编译kernel 或者 kernel module的时候,默认的输出到stdout的形式是一段简短的提示 如:      CC [M]   xxx.o    LD  [M]   xxx.o等 但这样看不到具体由哪些东西编译在一起的。   其实这个可以再 scripts/Kbuild.include 文件中修改,能让输出显示更多的信息。 虽然格式丑了点

2009-08-21 16:27:00 1695

原创 Process Context and Interrupt Context

The kernel accomplishes useful work using a combination of process contexts and interrupt contexts.  Kernel code that services system calls issued by user applications runs on behalf of th

2009-08-21 11:09:00 1736

原创 2.5.59+ kernel makefile documentation

http://lwn.net/Articles/21835/?format=printable  Linux Kernel MakefilesThis document describes the Linux kernel Makefiles.=== Table of Contents === 1 Overview === 2 W

2009-08-21 11:04:00 1145

原创 自动变量 目标文件 的后缀变换

在kenerl的makefile中 有这么一句话  Makefile.build  line 233 @{echo $(@: .o=.ko)}; echo $@;   这句话的意思是 将 目标文件 的后缀变换成 .ko   我做了一个实验  $cat makefile CC = gcca.out : main.c        @se

2009-08-21 10:05:00 836

原创 How the Kernel compile .c files for Kernel Module

在scripts目录下有 Makefile.build文件 中间有 %.o: %.c FORCE 这个规则是 用来编译 .c文件的 主要是这句 $(call if_changed_rule, cc_o_c) if_changed_rule在 Kbuild.include中# Usage: $(call if_changed

2009-08-20 16:32:00 1196

原创 Bash 中将 stderr 和 stdout 重定向到一个file

例如有一个bash的文件  $cat shell.sh #!/bin/bashecho "gggg"rm kkdhktecho "end" $ ./shell.sh > time 2>&1$cat time ggggrm: cannot remove `kkdhkt: No such file or directoryend 这

2009-08-20 13:56:00 2791

原创 Wlan Web

DD-WRT is a linux based alternative OpenSource firmware suitable for a great variety of WLAN routers and embedded systemhttp://www.dd-wrt.com/dd-wrtv3/dd-wrt/about.html

2009-08-20 09:54:00 1096

原创 Name Convension -- Grub脚本中使用的命名规则

(fd0)First of all, GRUB requires that the device name be enclosed with ‘(’ and ‘)’. The‘fd’ part means that it is a floppy disk. The number ‘0’ is the drive number, which iscounted from zero. This exp

2009-08-19 14:47:00 963

原创 How to apply the Kernel patch & How to generate a Kernel patch

How to apply the kernel patch Code View:bash> cd /usr/srcbash> wget www.kernel.org/pub/linux/kernel/people/akpm/patches/X.Y/X.Y.Z/X.Y.Zmm2/X.Y.Z-mm2.bz2Apply the patch:bash> cd /us

2009-08-18 21:30:00 1224

原创 c中调用c++函数

http://www.research.att.com/~bs/bs_faq2.html#callCpp 将 C++ 函数声明为``extern "C"(在你的 C++ 代码里做这个声明),然后调用它(在你的 C 或者 C++ 代码里调用)。例如:// C++ code:extern "C" void f(int); void f(int i){     //

2009-08-18 16:07:00 713

原创 802.11n 的新增的特性

quote fromhttp://en.wikipedia.org/wiki/IEEE_802.11n IEEE 802.11n builds on previous 802.11 standards by  1. adding multiple-input multiple-output (MIMO) and 2. 40 MHz operation to the phys

2009-08-17 13:31:00 725

原创 Protocol Handlers

函数 netif_receive_skb 收到了二层的frame后, 根据 skb->protocol 域 来判断是什么样的三层packet.  ETH_P_IP   调用  ip_rcvETH_P_ARP 调用 arp_rcv等

2009-08-12 09:52:00 629

原创 Packet transmission between driver and kernel

 Just got an idea that dev_queue_xmit will call the net_device->hard_start_xmit    defined in the driver to send out the packet.

2009-08-12 09:50:00 776

原创 Packet reception between driver and kernel

1. in function net_device->open, request_irq is used to allocate    an interrupt line and register the interrupt handler   2. netif_rx or netif_rx_schedule is called in the interrupt handler    whic

2009-08-12 09:44:00 686

原创 Hash Table used for net_device chain

struct hlist_head {        struct hlist_node *first;};struct hlist_node {        struct hlist_node *next, **pprev;};一个是以名字为索引的哈希表,一个是以index为索引的哈希表 #define NETDEV_HASHBITS 8static struct hlis

2009-08-09 19:42:00 1056

原创 MIB browser

SNMP Infra Tool2.0  and  MIB Browser 

2009-08-07 09:30:00 999

原创 Kernel Terminology

   SMP            symmetric multiprocessing 多处理器

2009-08-04 14:02:00 622

原创 Cross compile the kernel module

实验了一下如何cross compile一把 kernel module。 挺简单的。 只要改动Makefile就可以了。  # If KERNELRELEASE is defined, weve been invoked from the# kernel build system and can use its language.CROSS_COMPILE = /opt/t

2009-08-03 14:28:00 1759

intel ia32 programming guide

intel ia32 programming guide. for the reference for others.

2013-07-18

debug.hacks

debug.hacks 深入调试的技术和工具

2013-06-06

slide on dma

描述了硬件层面dma controller的位置。 以及dma与系统其他部件交互的详细过程。

2012-07-18

DOS6.0 image

This is the floppy boot disk of MSDOS6.0

2008-11-27

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除