Ubuntu8.04下编译linux内核
今天看到师兄工位上有本Linux Kernel In a Nutshell,还是全英的影印版,所以就借过来看看,发现现在看英文的书渐渐适应了,还是比较容易的,书中开始介绍如何编译Linux内核,Linux内核大三的时候也学过编译过,但是当时编译比较简单,这次决定再重头到尾好好编译一下,首先下载linux kernel,再用secureCRT上传到Ubuntu 8.04中,接着开始编译。
1,tar -xzvf linux-2.6.***
2,cd linux-2.6.***
3,make menuconfig
执行这条命令时,出现了问题,后来上网查,查到了问题,答案如下:
hi.
It's your distribution. Ubuntu doesn't come with the gcc headers installed. You can't even compile the simplest c application.
All you have to do is to download the headers from the internet. The easisest way would be to use synaptic and to download
the build-essential package.
bye
http://forum.kernelnewbies.org/read.php?10,18,528
原来必须安装build-essential,安装好后,问题解决。
4,执行 make 命令,源代码进行编译
5,make modules_install install
6,
相关文档:
10.5.2 精通定时器设置
函数alarm设置的定时器只能精确到秒,而以下函数理论上可以精确到微妙:
#include <sys/select.h>
#include <sys/itimer.h>
int getitimer(int which, struct itimerval *value);
int setitimer(int which, const struct itimerval
*value, struct itimerval *ovalue ......
# If KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
obj-m := hello.o
# Otherwise we were called directly from the command
# line; invoke the kernel build system.
else
......
Linux下锁用户与解锁问题 [原创 2010-02-03 21:44:35]
字号:大 中 小
一:登录失败次回超过限制
1)锁用户的设定
/etc/pam.d/下包含各种认证程序或服务的配置文件。编辑这些可限制认证失败次数,当失败次数超过指定值时用户会被锁住。
在此,以run level为3的时候,多次登录登录失败即锁用户为例:
......
各section的位置分布看内核的链接脚本
D:\KIDE\target\kernel-version\cgel3.0\linux\include\asm-generic\vmlinux.lds.h
D:\KIDE\target\kernel-version\cgel3.0\linux\arch\powerpc\kernel\vmlinux.lds.S
Kernel镜像起始地址KERNELBASE = 0xc000 0000,这意味着内核代码和内核全局变量等的地址空间在3g-4g的地方,
而 ......