Linux入门之定制Linux系统---Kernel+Busybox


定制Linux系统

Linux入门之定制Linux系统---Kernel+Busybox

简单回顾下系统启动的相关内容

Linux入门之定制Linux系统---Kernel+Busybox

编译过程:编译内核、busybox

为系统上的新硬盘建立分区,这里根据需要先建立一个大小为200M的主分区作为新建系统的boot分区和一个512M的分区作为目标系统(即正在构建的新系统,后面将沿用此名称)的根分区;200M的分区格式化后将其挂载至/mnt/boot目录下;512M的分区格式化后将挂载至/mnt/sysroot目录;两个分区的文件系统均为ext4。

此处还可以添加第三个分区用于swap,大小为256MB或其它你喜欢的空间额度。记得使用mkswap将其创建为swap分区。

一、编译Linux内核

1.获取内核源码,解压至/usr/src

# tar xflinux-3.13.6.tar.xz -C /usr/src/

2.创建软链接

[root@station75 src]#ln -sv  linux-3.13.6/ linux

3.生成配置文件

[root@station75linux]# make allnoconfig

4.配置

[root@station75linux]# make menuconfig

主要的配置选项

64位系统支持

[*] 64-bit kernel

设置版本信息

General setup --->() Local version - append to kernel release

 

选择cpu类型

Processor type and features --->Processor family (Generic-x86-64) --->(X) Core 2/newer Xeon

支持多核心

Processor type and features --->[*] Symmetric multi-processing support

支持动态模块加载

[*] Enable loadable module support --->

PCI总线支持(cpu需要总线与其他模块沟通)

Bus options (PCI etc.) --->[*] PCI support

scsi硬盘驱动

lspci查看硬盘类型)

Device Drivers ---> SCSI device support ---> <*> SCSI device supportà<*> SCSI disk support

另:Device Drivers ---> [*] Fusion MPT device support ---> <*> Fusion MPT ScsiHost drivers for SPI

<*> Fusion MPT misc device (ioctl) driver

文件系统

File systems ---> <*> The Extended 4 (ext4) filesystem

支持ELF(可执行文件)

Executable file formats / Emulations à [*] Kernel support for ELF binaries

<*> Kernel support for scripts starting with #!

I/O驱动

Device Drivers ---> Input device support ---> [*] Keyboards --->

[*] Mice --->

支持USB驱动Device Drivers ---> [*] USB support ---> <*> Support for Host-side USB à <*> EHCI HCD (USB 2.0) support

<*> UHCI HCD (most Intel and VIA) support

<*> OHCI HCD (USB 1.1) support

实时时钟

Device Drivers ---> [*] Real Time Clock --->

devtmfs

Device Drivers ---> Generic Driver Options --> [*] Maintain a devtmpfs filesystem to mount at /dev

网卡

协议[*] Networking support ---> Networking options ---> [*] TCP/IP networking

<*> Unix domain sockets

驱动Device Drivers ---> [*] Network device support ---> [*] Ethernet driver support (NEW) ---> <*> Intel(R) PRO/1000 Gigabit Ethernet support/ <*> Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support

  • 1
  • 2
  • 3
  • 下一页

相关内容