内核调试方法之串口输出

最近遇到了内核调试的一个问题,先列举一下几种调试方式: 1.kdump来调试,信息太多了,不好分析。 2.屏幕输出来调试,可能会导致屏幕显示不是很全的问题。 3.netconsole调试,如果bug出在网络模块上,可能会导致最后的panic信息无法通过网络发送出去。 综合上述原因,如果只是需要少量的调试信息可以使用串口来调试。 串口调试的配置也比较简单: (1)修改grub.conf(或者...

作者: 瀚海书香 发布时间: 01-05

实例解读网卡驱动

Tg3 Gbit NIC Driver Analysis 在此仅仅讨论网络设备驱动的一般写法,有关硬件部分的相关代码由于硬件规格不同,予以省略。有什么地方错误,或补充,欢迎大家提出。 1, 驱动模块的加载和卸载 如果网络设备(包括wireless)是PCI规范的,则先是向内核注册该PCI设备(pci_register_driver),然后由pci_driver数据结构中的probe函数指针所指向的侦测函数来初始化该PCI设备,并且...

作者: 空灵静世 发布时间: 01-04

chown详解

指令名称 : chown 使用权限 : root 使用方式 : chmod [-cfhvR] [--help] [--version] user[:group] file... 说明 : Linux/Unix 是多人多工作业系统,所有的档案皆有拥有者。利用 chown 可以将档案的拥有者加以改变。一般来说,这个指令只有是由系统管理者(root)所使用,一般使用者没有权限可以改变别人的档案拥有者,也没有权限可以自己的档案拥有者改设为别人。只有系统管...

作者: leolzbing521 发布时间: 01-04

miniGui 移植遇到的一个问题configure: error: C..

今天下午按照既定配置交叉编译miniGui 的时候遇到了一个问题: error: C compiler cannot create executables [root]@libminigui-1.6.10#./buildlib-uclinux-44b0x.sh checking build system type... i386-pc-linux-gnu checking host system type... arm-elf-linux-gnu checking target system type... arm-elf-linux-gnu checking for arm-elf-linux-gcc... arm-elf-gcc c...

作者: swet123 发布时间: 01-05

Ubuntu网卡驱动

编译&安装 需求 1、目标机的linux内核版本,该实例的内核版本是:2.6.28-11-server 2、在开发机安装与目标机一致的linux内核版本,如果内核版本一致可不比编译内核,直接安装所需的内核头文件,如下命令: $>sudo apt-get install linux-headers-2.6.28-11-server 3、在开发机上安装编译环境 $>sudo apt-get install build-essential 4、最新的网卡驱动程序,该实例使用Real...

作者: reesun 发布时间: 01-06

编译内核模块 .ko文件的注意事项 缺少:mmzone.h..

前两天新到手一个6410的板子,按照说明在上面跑了一下android和QT,都成了。今天想试试helloworld模块的装载发现了一些需要注意的问题。 出现的问题:编译的时候提示缺少头文件 mmzone.h ....bounds.h...等 include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONES" is not defined 原因:b...

作者: pauleric 发布时间: 01-06

arm汇编语言调用C函数之参数传递

arm汇编语言调用C函数之参数传递 于ARM体系来说,不同语言撰写的函数之间相互调用(mix calls)遵循的是 ATPCS(ARM-Thumb Procedure Call Standard),ATPCS主要是定义了函数呼叫时参数的传递规则以及如何从函数返回,关于ATPCS的详细内容可以查看ADS1.2 Online Books ——Developer Guide的2.1节。这篇文档要讲的是 汇编代码中对C函数调用时如何进行参数的传递以及如何从C函...

作者: ljjmissu 发布时间: 01-05

buffer I/O errors

Problem: Lots of buffer I/O errors appear in /var/log/messages and /var/log/dmesg, but the filesystems are still working fine. Solution: A server using a LUN, which is presented by a storage array through fabric channels, may show buffer I/O errors while the server is booting or commands such as fdisk and vgscan are being run. While these errors...

作者: xiawenzhao 发布时间: 01-04

c#父子窗体间的自定义事件(static)

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace ppop_client { public partial class MDI : Form { private int childFormNumber = 0; public MDI() { InitializeComponent(); } private void ShowNewForm(object sender, EventArgs e...

作者: cexoyq 发布时间: 01-05

CentOS 修改ls目录的颜色

修改ls目录的颜色 linux系统默认目录颜色是蓝色的,在黑背景下看不清楚,可以通过以下2种方法修改ls查看的颜色 方法一: 1、在~/.bash_profile文件中添加LS_COLORS export LS_COLORS='no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;35:*.cmd=01;35:*.exe=01;35:*.com=01;35:*.btm=01;35:*.bat=01;35:*.sh=...

作者: x-fish 发布时间: 01-05