文档详情

实验1 内核编译.ppt

发布:2017-10-29约1.97千字共5页下载文档
文本预览下载声明
实验1 内核编译 目的 了解内核结构 学会内核的配置、编译及安装 设备、工具 PC、Fedora、Linux-3 操作步骤 获取内核 将内核linux-3.tar.bz2 放在/home/ldd目录 解压内核 # cd /usr/src/ tar jxvf /home/ldd/linux-3.tar.bz2 实验1 内核编译 清除先前编译产生的目标文件 make clean 配置内核 make menuconfig 编译内核与模块(也可用make bzImage与make modules分别编译内核与模块) make 查看/usr/src/linux-3/arch/x86/boot/,增加了什么? 查看/usr/src/linux-3/,增加了什么? 实验1 内核编译 安装模块录 查看/lib/modules/,有哪些子目录? make modules_install 查看/lib/modules/,增加了什么子目录? 安装内核 查看/boot/,有哪些文件与目录? 打开/boot/grub/menu.lst,记下文件内容 make install 查看/boot/,增加了哪些文件? 打开/boot/grub/menu.lst,增加了什么内容? 实验1 内核编译 修改启动配置文件,将新内核设为默认启动项 vi /boot/grub/menu.lst 重启内核 Reboot 问题 命令make menuconfig 产生的配置文件.config放在什么地方? 命令make编译产生的内核映像放在什么地方? 命令make编译产生的模块放在什地方? 命令make modules_install做了什么事? 命令make install做了什么事? * * Directory Description Arch Architecture-specific source Block Block I/O layer crypto Crypto API Documentation Kernel source documentation drivers Device drivers firmware Device firmware needed to use certain drivers fs The VFS and the individual filesystems include Kernel headers init Kernel boot and initialization ipc Interprocess communication code kernel Core subsystems, such as the scheduler lib Helper routines mm Memory management subsystem and the VM net Networking subsystem samples Sample, demonstrative code scripts Scripts used to build the kernel security Linux Security Module sound Sound subsystem usr Early user-space code (called initramfs) tools Tools helpful for developing Linux virt Virtualization infrastructure 内核源码树 /usr/src/linux-3/arch/x86/boot/增加了:bzImage(2.6MB,压缩的内核映像)、vmlinux.bin /usr/src/linux-3/增加了: vmlinux(exe,96.8MB,未压缩的内核映像)、 System.map(1.1MB,内核符号表)、 vmlinux.o(119.5MB)、modules.order、modules.buitin、modules.symvers Make install 做三件事: 1、将/usr/src/linux-3/arch/x86/boot/bzImage 拷贝到/boot,并更名为vmlinux-3 2、将/usr/src/linux-3/System.map 拷贝到/boot,并更名为System.map-3 3、在文件/boot/grub/menu.lst中增加一项启动项 .config位于/usr/src/linux-3/,为隐藏文件 *
显示全部
相似文档