底层-ldd3
google_lover
这个作者很懒,什么都没留下…
展开
-
Documentation/devices.txt
/*linux2.6.32.2/Documentation/devices.txt*/ LINUX ALLOCATED DEVICES (2.6+ version) Maintained by Alan Cox Last revise原创 2011-09-06 17:35:23 · 7257 阅读 · 0 评论 -
jit.c
http://code.google.com/p/ldd3/source/browse/trunk/misc-modules/jit.c?r=2/* * jit.c -- the just-in-time module * * Copyright (C) 2001,20原创 2011-09-15 19:48:37 · 942 阅读 · 0 评论 -
jiq.c
http://code.google.com/p/ldd3/source/browse/trunk/misc-modules/jiq.c?r=2/* * jiq.c -- the just-in-queue module * * Copyright (C) 2001 A原创 2011-09-15 19:49:28 · 1562 阅读 · 0 评论 -
scull-pipe.c
/* * pipe.c -- fifo driver for scull * * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet * Copyright (C) 2001 O'Reilly & Associ原创 2011-09-13 13:16:30 · 1229 阅读 · 0 评论 -
用户空间的驱动
转自 http://www.yuanma.org/data/2008/0428/article_3019.htm在做有关9200嵌入linux系统的一个项目时,由于需要对底层的操作,所以遇到了mmap这个系统调用。对于底层的开发,正常思维是linux的驱动开发。不过由于对li转载 2011-09-19 18:43:47 · 1110 阅读 · 0 评论 -
ch7-deferred work tasklets
#include #include #include #include #include #include #include #include #include #include #include #include #include /* * T原创 2011-09-15 19:47:55 · 739 阅读 · 0 评论 -
mapper.c 小工具
/* * mapper.c -- simple file that mmap()s a file region and prints it * * Copyright (C) 1998,2000,2001 Alessandro Rubini * * This pr原创 2011-09-26 19:34:40 · 918 阅读 · 0 评论 -
ch7-deferred work 定时器中断处理函数
定时器中断处理函数不属于任何一个进程,内核控制路径负责执行那片代码#include #include #include #include #include #include #include #include #include #include #include #include #include /* * The timer example follows原创 2011-09-15 17:08:38 · 1127 阅读 · 0 评论 -
fedora14 编译ldd3的源码
直接到example下的某个目录如scull下去make,会出现一堆错误说明一下,fedora14带内核源码的头文件(或者yum install kernel-devel安装这些头文件),没带源码,但是对于编译ldd3里的的例子,这些头文件就足够了并且Makefile已经指定了正确的内核目录#KERNELDIR ?= /lib/modules/$(shell uname -r)/bui原创 2011-09-10 09:30:38 · 1243 阅读 · 0 评论 -
驱动中mmap的实现之scullp
scullp.h/* -*- C -*- * scullp.h -- definitions for the scullp char module * * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet * Copyright (C) 2001 O'Reilly & Associates * * The source原创 2011-09-25 18:56:19 · 1969 阅读 · 0 评论 -
fedora14 环境下 编译成模块/
#include #include static int __init mini2440_hello_module_init(void){ printk("Hello, Mini2440 module is installed !\n"); return 0;}static void __exit mini2440_hello_module_cleanup(void)原创 2011-09-06 20:43:39 · 1028 阅读 · 0 评论 -
linux内核栈,内核同步,用户空间线程同步
在论坛上浏览到一个帖子,是说内核栈的问题的,一时却感到有点陌生了,下面总结一下http://topic.csdn.net/u/20121101/10/86479004-2f2c-491c-bc43-03cc0e087588.html?694191.内核栈原创 2012-11-01 05:20:34 · 1588 阅读 · 0 评论 -
内核Makefile Kocnfig .config
第一次执行Make menuconfig时,会读取指定ARCH目录(默认x86)的Kconfig文件的各项及其默认配置然后在菜单中显示出来----(还有sub Kocnfig)配置完成后会在源码根目录生成一个.config文件,记录刚才的配置下次再Make menucon原创 2011-09-11 10:34:39 · 1627 阅读 · 0 评论 -
register_chrdev,register_chrdev_region,alloc_chrdev_region---udev class bus driver device
3.4.2. The Older WayIf you dig through much driver code in the 2.6 kernel, you may notice that quite a few char drivers donot use the cdev interface that we have just described. What you are seein原创 2011-09-09 18:28:39 · 5959 阅读 · 0 评论 -
注册设备号例子
#include #include #include #include /* printk(), min() */#include /* kmalloc() */#include /* everything... */#include #include原创 2011-09-14 16:41:28 · 1053 阅读 · 0 评论 -
printk oops
test.c#include #include void test_func(){char *p=NULL;*p=3;}static int __init mini2440_hello_module_init(void) { printk(KER原创 2011-09-11 17:01:32 · 1203 阅读 · 0 评论 -
scull-scull.init , scripts as an alternative to scull_load and scull_unload
#!/bin/bash# Sample init script for the a driver module DEVICE="scull"SECTION="misc"# The list of filenames and minor numbers: $PREFIX原创 2011-09-13 13:23:06 · 864 阅读 · 0 评论 -
scull-scull.h
/* * scull.h -- definitions for the char module * * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet * Copyright (C) 2001 O'Reil原创 2011-09-13 13:17:45 · 857 阅读 · 0 评论 -
scull-scull_unload , scripts
#!/bin/shmodule="scull"device="scull"# invoke rmmod with all arguments we got/sbin/rmmod $module $* || exit 1# Remove stale nodesrm原创 2011-09-13 13:20:09 · 675 阅读 · 0 评论 -
scull-Makefile
# Comment/uncomment the following line to disable/enable debugging#DEBUG = y# Add your debugging flag (or not) to EXTRA_CFLAGSifeq ($(原创 2011-09-13 13:21:01 · 898 阅读 · 0 评论 -
scull-scull_load , scripts
#!/bin/sh# $Id: scull_load,v 1.4 2004/11/03 06:19:49 rubini Exp $module="scull"device="scull"mode="664"# Group: since distributions do原创 2011-09-13 13:19:28 · 889 阅读 · 0 评论 -
scull-main.c
/* * main.c -- the bare scull char module * * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet * Copyright (C) 2001 O'Reilly & A原创 2011-09-13 13:15:54 · 1079 阅读 · 0 评论 -
scull-access.c
/* * access.c -- the files with access control on open * * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet * Copyright (C) 2001原创 2011-09-13 13:17:00 · 995 阅读 · 1 评论 -
scull 加载
[root@localhost scull]# make DEBUG=ymake -C /lib/modules/2.6.35.6-45.fc14.i686/build M=/opt/examples/scull LDDINC=/opt/examples/scull/../in原创 2011-09-13 13:44:20 · 841 阅读 · 0 评论 -
irqs.h mini2440的中断号预定义文件IRQ(0)
/* arch/arm/mach-s3c2410/include/mach/irqs.h * * Copyright (c) 2003-2005 Simtec Electronics * Ben Dooks * * This program is free sof原创 2011-09-19 21:39:45 · 4240 阅读 · 0 评论