Qemu compatible kernel configuration

来源:互联网 发布:全球网络制式 编辑:程序博客网 时间:2024/05/29 20:01

http://www.gnuwakes.org/documentation/0.1/html/ch12s07.html


First, create the allno.config file. This file will be used to compile a Qemu compatible kernel.

cat << EOF > allno.config# allno.configCONFIG_BINFMT_ELF=yCONFIG_IDE=yCONFIG_BLK_DEV_IDE=yCONFIG_HAVE_IDE=yCONFIG_BLK_DEV_IDEDISK=yCONFIG_IDE_GENERIC=yCONFIG_VIDEO_SELECT=yCONFIG_EXT3_FS=yCONFIG_MPENTIUMII=yCONFIG_SYSVIPC=yCONFIG_TMPFS=yCONFIG_IOSCHED_DEADLINE=yCONFIG_NET=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_PACKET=yCONFIG_NETDEVICES=yCONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=yCONFIG_IP_MULTICAST=yCONFIG_IP_MROUTE=yCONFIG_BLK_DEV_INITRD=yCONFIG_INOTIFY=yCONFIG_INOTIFY_USER=yCONFIG_ISO9660_FS=yCONFIG_JOLIET=yCONFIG_UDF_FS=yCONFIG_UDF_NLS=yCONFIG_BLK_DEV_IDECD=yCONFIG_CC_OPTIMIZE_FOR_SIZE=yEOF          

Then compile the kernel.

make mrpropermake allnoconfigmake           

Explanation:

        "make config"      Plain text interface.        "make menuconfig"  Text based color menus, radiolists & dialogs.        "make xconfig"     X windows (Qt) based configuration tool.        "make gconfig"     X windows (Gtk) based configuration tool.        "make oldconfig"   Default all questions based on the contents of                           your existing ./.config file and asking about                           new config symbols.        "make silentoldconfig"                           Like above, but avoids cluttering the screen                           with questions already answered.        "make defconfig"   Create a ./.config file by using the default                           symbol values from arch/$ARCH/defconfig.        "make allyesconfig"                           Create a ./.config file by setting symbol                           values to 'y' as much as possible.        "make allmodconfig"                           Create a ./.config file by setting symbol                           values to 'm' as much as possible.        "make allnoconfig" Create a ./.config file by setting symbol                           values to 'n' as much as possible.        "make randconfig"  Create a ./.config file by setting symbol                           values to random values.   The allyesconfig/allmodconfig/allnoconfig/randconfig variants can   also use the environment variable KCONFIG_ALLCONFIG to specify a   filename that contains config options that the user requires to be   set to a specific value.  If KCONFIG_ALLCONFIG=filename is not used,   "make *config" checks for a file named "all{yes/mod/no/random}.config"   for symbol values that are to be forced.  If this file is not found,   it checks for a file named "all.config" to contain forced values.          

In our case, the make allnoconfig variants will check for the fileallno.config for symbol values that are to be forced (if the environment variableKCONFIG_ALLCONFIG is not used).

kernel allno.config with sda disk support:

######################################### Executable file formats / Emulations ########################################## Kernel support for ELF binariesCONFIG_BINFMT_ELF=y################# File systems ################## Ext3 journalling file system supportCONFIG_EXT3_FS=y# /proc file system supportCONFIG_PROC_FS=y# Virtual memory file system support (former shm fs)CONFIG_TMPFS=y# Inotify file change notification supportCONFIG_INOTIFY=y# Inotify support for userspaceCONFIG_INOTIFY_USER=y# ISO 9660 CDROM file system supportCONFIG_ISO9660_FS=y################################ Processor type and features ################################# Pentium-II/Celeron(pre-Coppermine)CONFIG_MPENTIUMII=y# Paravirtualized guest supportCONFIG_PARAVIRT_GUEST=y# KVM Guest supportCONFIG_KVM_GUEST=y# KVM paravirtualized clockCONFIG_KVM_CLOCK=y################## General setup ################### Prompt for development and/or incomplete code/driversCONFIG_EXPERIMENTAL=y# System V IPCCONFIG_SYSVIPC=y# Initial RAM filesystem and RAM disk (initramfs/initrd) supportCONFIG_BLK_DEV_INITRD=y# Optimize for sizeCONFIG_CC_OPTIMIZE_FOR_SIZE=y# Kernel .config supportCONFIG_IKCONFIG=y# Enable access to .config through /proc/config.gzCONFIG_IKCONFIG_PROC=y########################### Enable the block layer ############################ Enable the block layerCONFIG_BLOCK=y# Deadline I/O schedulerCONFIG_IOSCHED_DEADLINE=y####################### Networking support ######################## Networking supportCONFIG_NET=y# Packet socket#CONFIG_PACKET=y# Unix domain socketsCONFIG_UNIX=y# TCP/IP networkingCONFIG_INET=y########################### Bus options (PCI etc.) ############################ PCI supportCONFIG_PCI=y################### Device Drivers #################### Block devicesCONFIG_BLK_DEV=y# Virtio block driver (EXPERIMENTAL)CONFIG_VIRTIO_BLK=y# Network device supportCONFIG_NETDEVICES=y# Ethernet (10 or 100Mbit)CONFIG_NET_ETHERNET=y# EISA, VLB, PCI and on board controllersCONFIG_NET_PCI=y# RealTek RTL-8139 C+ PCI Fast Ethernet Adapter supportCONFIG_8139CP=y# PCI NE2000 and clones support (This driver also works for RealTek RTL-8029)CONFIG_NE2K_PCI=y# Virtio network driver (EXPERIMENTAL)CONFIG_VIRTIO_NET=y# Serial ATA (prod) and Parallel ATA (experimental)CONFIG_ATA=y# ATA SFF support (SFF is the legacy IDE interface)CONFIG_ATA_SFF=y# Intel PATA MPIIX supportCONFIG_ATA_PIIX=y# SCSI device supportCONFIG_SCSI=y# SCSI disk supportCONFIG_BLK_DEV_SD=y# SCSI CDROM supportCONFIG_BLK_DEV_SR=y# Multiple devices driver support (RAID and LVM)CONFIG_MD=y# Device mapper supportCONFIG_BLK_DEV_DM=y################### Virtualization #################### VirtualizationCONFIG_VIRTUALIZATION=y# PCI driver for virtio devices (EXPERIMENTAL)CONFIG_VIRTIO_PCI=y

With modules support:

# Enable loadable module supportCONFIG_MODULES=y# Module unloadingCONFIG_MODULE_UNLOAD=y######################################### Executable file formats / Emulations ########################################## Kernel support for ELF binariesCONFIG_BINFMT_ELF=y################# File systems ################## Ext3 journalling file system supportCONFIG_EXT3_FS=m# /proc file system supportCONFIG_PROC_FS=y# Virtual memory file system support (former shm fs)CONFIG_TMPFS=y# Inotify file change notification supportCONFIG_INOTIFY=y# Inotify support for userspaceCONFIG_INOTIFY_USER=y# ISO 9660 CDROM file system supportCONFIG_ISO9660_FS=m################################ Processor type and features ################################# Pentium-II/Celeron(pre-Coppermine)CONFIG_MPENTIUMII=y# Paravirtualized guest supportCONFIG_PARAVIRT_GUEST=y# KVM Guest supportCONFIG_KVM_GUEST=y# KVM paravirtualized clockCONFIG_KVM_CLOCK=y################## General setup ################### Prompt for development and/or incomplete code/driversCONFIG_EXPERIMENTAL=y# System V IPCCONFIG_SYSVIPC=y# Initial RAM filesystem and RAM disk (initramfs/initrd) supportCONFIG_BLK_DEV_INITRD=y# Optimize for sizeCONFIG_CC_OPTIMIZE_FOR_SIZE=y# Kernel .config supportCONFIG_IKCONFIG=y# Enable access to .config through /proc/config.gzCONFIG_IKCONFIG_PROC=y########################### Enable the block layer ############################ Enable the block layerCONFIG_BLOCK=y# Deadline I/O schedulerCONFIG_IOSCHED_DEADLINE=y####################### Networking support ######################## Networking supportCONFIG_NET=y# Packet socket#CONFIG_PACKET=y# Unix domain socketsCONFIG_UNIX=m# TCP/IP networkingCONFIG_INET=y########################### Bus options (PCI etc.) ############################ PCI supportCONFIG_PCI=y################### Device Drivers #################### Block devicesCONFIG_BLK_DEV=y# Virtio block driver (EXPERIMENTAL)CONFIG_VIRTIO_BLK=m# Network device supportCONFIG_NETDEVICES=y# Ethernet (10 or 100Mbit)CONFIG_NET_ETHERNET=y# EISA, VLB, PCI and on board controllersCONFIG_NET_PCI=y# RealTek RTL-8139 C+ PCI Fast Ethernet Adapter supportCONFIG_8139CP=m# PCI NE2000 and clones support (This driver also works for RealTek RTL-8029)CONFIG_NE2K_PCI=m# Virtio network driver (EXPERIMENTAL)CONFIG_VIRTIO_NET=m# Serial ATA (prod) and Parallel ATA (experimental)CONFIG_ATA=m# ATA SFF support (SFF is the legacy IDE interface)CONFIG_ATA_SFF=y# Intel PATA MPIIX supportCONFIG_ATA_PIIX=m# SCSI device supportCONFIG_SCSI=m# SCSI disk supportCONFIG_BLK_DEV_SD=m# SCSI CDROM supportCONFIG_BLK_DEV_SR=m# Multiple devices driver support (RAID and LVM)CONFIG_MD=y# Device mapper supportCONFIG_BLK_DEV_DM=m################### Virtualization #################### VirtualizationCONFIG_VIRTUALIZATION=y# PCI driver for virtio devices (EXPERIMENTAL)CONFIG_VIRTIO_PCI=m
原创粉丝点击