linux内核学习笔记(1)
时间:2006-08-22 来源:适兕
该学习下Linux的精髓了!当然也是为了考试作充分的准备。
两本书《内核设计与实现》《linux设备驱动程序》的阅读。
那么首先是自己先下载内核源代码,看帮助。
it is just begain!next i will do more......
[lee@lee linux-2.6.17.9]$ make help
Cleaning targets:
clean - remove most generated files but keep the config
mrproper - remove all generated files + config + various backup files
Configuration targets:
config - Update current config utilising a line-oriented program
menuconfig - Update current config utilising a menu based program
xconfig - Update current config utilising a QT based front-end
gconfig - Update current config utilising a GTK based front-end
oldconfig - Update current config utilising a provided .config as base
randconfig - New config with random answer to all options
defconfig - New config with default answer to all options
allmodconfig - New config selecting modules when possible
allyesconfig - New config where all options are accepted with yes
allnoconfig - New config where all options are answered with no
Other generic targets:
all - Build all targets marked with [*]
* vmlinux - Build the bare kernel
* modules - Build all modules
modules_install - Install all modules to INSTALL_MOD_PATH (default: /)
dir/ - Build all files in dir and below
dir/file.[ois] - Build specified target only
dir/file.ko - Build module including final link
rpm - Build a kernel as an RPM package
tags/TAGS - Generate tags file for editors
cscope - Generate cscope index
kernelrelease - Output the release version string
kernelversion - Output the version stored in Makefile
Static analysers
checkstack - Generate a list of stack hogs
namespacecheck - Name space analysis on compiled kernel
Kernel packaging:
rpm-pkg - Build the kernel as an RPM package
binrpm-pkg - Build an rpm package containing the compiled kernel
and modules
deb-pkg - Build the kernel as an deb package
tar-pkg - Build the kernel as an uncompressed tarball
targz-pkg - Build the kernel as a gzip compressed tarball
tarbz2-pkg - Build the kernel as a bzip2 compressed tarball
Documentation targets:
Linux kernel internal documentation in different formats:
xmldocs (XML DocBook), psdocs (Postscript), pdfdocs (PDF)
htmldocs (HTML), mandocs (man pages, use installmandocs to install)
Architecture specific targets (i386):
* bzImage - Compressed kernel image (arch/i386/boot/bzImage)
install - Install kernel using
(your) ~/bin/installkernel or
(distribution) /sbin/installkernel or
install to $(INSTALL_PATH) and run lilo
bzdisk - Create a boot floppy in /dev/fd0
fdimage - Create a boot floppy image
isoimage - Create a boot CD-ROM image
make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build
make O=dir [targets] Locate all output files in "dir", including .config
make C=1 [targets] Check all c source with $CHECK (sparse)
make C=2 [targets] Force check of all c source with $CHECK (sparse)
Execute "make" or "make all" to build all targets marked with [*]
For further info see the ./README file
[lee@lee linux-2.6.17.9]$ make gconfig
sed < scripts/kconfig/lkc_proto.h > scripts/kconfig/lkc_defs.h 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
HOSTCC scripts/kconfig/gconf.o
In file included from /usr/include/gtk-2.0/gtk/gtkactiongroup.h:34,
from /usr/include/gtk-2.0/gtk/gtk.h:38,
from scripts/kconfig/gconf.c:17:
/usr/include/gtk-2.0/gtk/gtkitemfactory.h:50: 警告:函式宣告不是一個原型
scripts/kconfig/images.c:6: 警告:「xpm_load」 定義後未使用
scripts/kconfig/images.c:36: 警告:「xpm_save」 定義後未使用
scripts/kconfig/images.c:66: 警告:「xpm_back」 定義後未使用
scripts/kconfig/images.c:175: 警告:「xpm_symbol_no」 定義後未使用
scripts/kconfig/images.c:192: 警告:「xpm_symbol_mod」 定義後未使用
scripts/kconfig/images.c:209: 警告:「xpm_symbol_yes」 定義後未使用
scripts/kconfig/images.c:226: 警告:「xpm_choice_no」 定義後未使用
scripts/kconfig/images.c:243: 警告:「xpm_choice_yes」 定義後未使用
scripts/kconfig/images.c:277: 警告:「xpm_menu_inv」 定義後未使用
scripts/kconfig/images.c:294: 警告:「xpm_menuback」 定義後未使用
scripts/kconfig/gconf.c:977: 警告:「renderer_toggled」 定義後未使用
HOSTCC scripts/kconfig/kconfig_load.o
HOSTLD scripts/kconfig/gconf
scripts/kconfig/gconf arch/i386/Kconfig
#
# using defaults found in .config
#
先从man开始,放在blog里方便阅读,绝没有哗众取宠之意。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
今天是8月24日,自己还是没有耐心去阅读代码,也许是自己根本就看不懂那是些什么东西! /kernel/sched.c文件,说的是进程调度算法的,可是我静不下心来,我究竟要干些什么?为什么目的这么明确却又走不下去了呢?和迷惘的时候相比,我似乎更差劲了!
|
相关阅读 更多 +