自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 网上的一个block device driver for 2.6.31的例子,我改了一下可以在2.3.36上用

<br />这个是网上的一个例子,很不错<br />http://blog.superpat.com/2010/05/04/a-simple-block-driver-for-linux-kernel-2-6-31/<br /> <br />/*<br /> * A sample, extra-simple block driver. Updated for kernel 2.6.31.<br /> *<br /> * (C) 2003 Eklektix, Inc.<br /> * (C)

2010-12-31 11:03:00 2653

原创 通过/proc/partitions 查看分区信息

<br />文件/proc/partitions 可以查看分区信息。<br />$cat /proc/partitions <br />major minor  #blocks  name<br /><br />   8     0  488386584 sda<br />   8    16  488386584 sdb<br />   8    32  488386584 sdc<br />   8    48  488386584 sdd<br /><br /> <br /> <b

2010-12-30 11:37:00 27461 3

原创 block device driver from ldd3

放到2.6.36上编译不过了,做了适当的改动。/* * Sample disk driver, from the beginning. *///#include #include #include #include #include #include     /* printk() */#include         /* kmalloc() */#include         /* everything... */#include     /* error

2010-12-23 16:06:00 1433

原创 kernel的链表api

/* * ===================================================================================== * *       Filename:  list.c * *    Description:   * *        Version:  1.0 *        Created:

2010-12-13 14:47:00 956

原创 数据结构对齐, #pragma pack 和 __attribute__((packed))

<br />gcc中定义了两个修改数据结构对齐方式的语句<br />1. #pragma pack()<br />2. __attribute__((packed))<br /> <br />#include <stdio.h><br />#include <stdlib.h><br />#include <string.h><br /><br />// calculate the offset of t in S<br />#define offsetof(S,t)     (size_t

2010-12-13 13:39:00 4197

转载 C的0长数组

<br />http://hi.baidu.com/bmrs/blog/item/83561e00605c13db267fb555.html<br /> <br />#include <stdio.h><br />#include <stdlib.h><br />#include <string.h><br /><br />char buf[128];<br />struct Test{<br />    int len;<br />    char content[0];<br /

2010-12-13 11:55:00 1228

原创 通过/proc/ioports开查看端口的使用(/proc/iomem)

$cat /proc/ioports 0000-0cf7 : PCI Bus 0000:00  0000-001f : dma1  0020-0021 : pic1  0040-0043 : timer0  0050-0053 : timer1  0060-0060 : keyboard  0064-0064 : keyboard  0070-0071 : rtc0

2010-12-12 21:14:00 7751 2

原创 使用 .gitignore来忽略某些文件

具体使用请看 man gitignore一般某个项目dev过程中都会产生一些中间文件,这些文件是我们不想要追踪的。git中可以使用.gitignore文件来忽略这些文件。在需要的目录下面 添加 .gitignore文件文件中每一行表示需要忽略的文件的正则表达式。$cat .gitignore #ignore .metadata.metadata.gitignore当前的目录情况$ls -altotal 24drwxr-xr-x  4 root root 4096 2010-12-11 1

2010-12-11 12:50:00 66098 3

原创 /proc/interrupts 和 /proc/stat 查看中断的情况

<br />在/proc文件系统下,又两个文件提供了中断的信息。<br /> <br />/proc/interrupts文件中列出当前系统使用的中断的情况,所以某个中断处理没有安装,是不会显示的。哪怕之前安装过,被卸载了。 <br />从左到右分别是, <br />irq的序号, 在各自cpu上发生中断的次数,可编程中断控制器,设备名称(request_irq的dev_name字段)<br />$cat /proc/interrupts <br />           CPU0       CP

2010-12-09 10:06:00 36225

原创 some OSGi materials

<br />OSGi实战 资料下载<br />http://ajava.org/book/other/688.html<br /> <br />国外的一个例子   没跑起来<br />http://www.vogella.de/articles/OSGi/article.html#osgi_installation

2010-12-08 10:39:00 1087

原创 Panic 的例子

~# Unhandled kernel unalignedaccess[#1]:                                                                                         Cpu0

2010-12-07 09:49:00 2531

原创 2.6.36 Workqueue API usage

<br />在新版的linux中,workqueue的api做了一定的修改。<br />下面是个简单的例子,是基于ldd3的 jiq.c代码。<br /> <br />其中网上另一个人给的一个用法是,将jiq_print_wq的输入参数作为一个全局的变量,而不是通过container_of来算出来的。<br />我觉得这样写代码比较清楚点。<br /> <br />//#include <linux/config.h><br />#include <linux/module.h><br />#inc

2010-12-02 11:07:00 984

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关注的人

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