学习linux内核完全注释,需要下载源码,位于网站linux-0.12源码。
使用wget命令批量下载所有的源代码:
wget -x -r -l0 --no-parent http://www.oldlinux.org/Book-Lite/linux-0.12/
-x 表示强制建立目录;
-r 表示递归下载;最大递归深度 (inf 或 0 代表无限制,即全部下载)。
-l0 表示递归的等级,0表示递归到所有子目录;
--no-parent 表示不追溯至父目录,即不下载父目录中的文件;
另外:
-nd, --no-directories 不创建目录
-i, --input-file=文件 下载本地或外部 <文件> 中的 URL
下载完成后:
.
├── boot
│ ├── bootsect.S
│ ├── head.s
│ ├── index.html
│ └── setup.S
├── fs
│ ├── bitmap.c
│ ├── block_dev.c
│ ├── buffer.c
│ ├── char_dev.c
│ ├── exec.c
│ ├── fcntl.c
│ ├── file_dev.c
│ ├── file_table.c
│ ├── index.html
│ ├── inode.c
│ ├── ioctl.c
│ ├── Makefile
│ ├── namei.c
│ ├── open.c
│ ├── pipe.c
│ ├── read_write.c
│ ├── select.c
│ ├── stat.c
│ ├── super.c
│ └── truncate.c
├── include
│ ├── a.out.h
│ ├── asm
│ │ ├── index.html
│ │ ├── io.h
│ │ ├── memory.h
│ │ ├── segment.h
│ │ └── system.h
│ ├── const.h
│ ├── ctype.h
│ ├── errno.h
│ ├── fcntl.h
│ ├── index.html
│ ├── linux
│ │ ├── config.h
│ │ ├── fdreg.h
│ │ ├── fs.h
│ │ ├── hdreg.h
│ │ ├── head.h
│ │ ├── index.html
│ │ ├── kernel.h
│ │ ├── math_emu.h
│ │ ├── mm.h
│ │ ├── sched.h
│ │ ├── sys.h
│ │ └── tty.h
│ ├── signal.h
│ ├── stdarg.h
│ ├── stddef.h
│ ├── string.h
│ ├── sys
│ │ ├── index.html
│ │ ├── param.h
│ │ ├── resource.h
│ │ ├── stat.h
│ │ ├── time.h
│ │ ├── times.h
│ │ ├── types.h
│ │ ├── utsname.h
│ │ └── wait.h
│ ├── termios.h
│ ├── time.h
│ ├── unistd.h
│ └── utime.h
├── index.html
├── init
│ ├── index.html
│ ├── main.c
│ └── main.s
├── kernel
│ ├── asm.s
│ ├── blk_drv
│ │ ├── blk.h
│ │ ├── floppy.c
│ │ ├── hd.c
│ │ ├── index.html
│ │ ├── ll_rw_blk.c
│ │ ├── Makefile
│ │ └── ramdisk.c
│ ├── chr_drv
│ │ ├── console.c
│ │ ├── index.html
│ │ ├── keyboard.S
│ │ ├── Makefile
│ │ ├── pty.c
│ │ ├── rs_io.s
│ │ ├── serial.c
│ │ ├── tty_io.c
│ │ └── tty_ioctl.c
│ ├── exit.c
│ ├── fork.c
│ ├── index.html
│ ├── Makefile
│ ├── math
│ │ ├── add.c
│ │ ├── compare.c
│ │ ├── convert.c
│ │ ├── div.c
│ │ ├── ea.c
│ │ ├── error.c
│ │ ├── get_put.c
│ │ ├── index.html
│ │ ├── Makefile
│ │ ├── math_emulate.c
│ │ └── mul.c
│ ├── mktime.c
│ ├── panic.c
│ ├── printk.c
│ ├── sched.c
│ ├── signal.c
│ ├── sys.c
│ ├── sys_call.s
│ ├── traps.c
│ └── vsprintf.c
├── lib
│ ├── close.c
│ ├── ctype.c
│ ├── dup.c
│ ├── errno.c
│ ├── execve.c
│ ├── _exit.c
│ ├── index.html
│ ├── Makefile
│ ├── malloc.c
│ ├── open.c
│ ├── setsid.c
│ ├── string.c
│ ├── wait.c
│ └── write.c
├── Makefile
├── mm
│ ├── index.html
│ ├── Makefile
│ ├── memory.c
│ ├── page.s
│ └── swap.c
└── tools
├── build.c
└── index.html
14 directories, 131 files