Introduction
|
This page explains in the details how to configure and compile the Linux kernel 2.4 for the Asus A7V8X motherboard. Of course the first thing to do is to download the kernel source directly on the web or through the appropriate package (e.g. for Debian users).
|
 |
Extracting the source (version 2.4.31) is done as usual with being the system admininistrator (root):
- # cd /usr/src
- # tar xjf linux-2.4.31.tar.bz2
- # ln -s linux-2.4.31 linux
Then there are several mandatory steps to follow:
Kernel patchs: i2c and lm_sensors
The kernel has been directly patched only for supporting the motherboard sensors. Two patches must be applied: the first one concerns the i2c bus, the second for the sensors themselves, in this order. You have first to build the patchs (!), then to apply them.
| i2c |
lm_sensors |
# cd /usr/src/modules
# tar xjf i2c-2.10.0.tar.bz2
# cd i2c-2.10.0
# mkpatch/mkpatch.pl . /usr/src/linux > i2c-patch
# cd ../../linux
# patch -p1 < ../modules/i2c-2.10.0/i2c-patch
|
# cd /usr/src/modules
# tar xjf lm_sensors-2.10.0.tar.bz2
# cd lm_sensors-2.10.0
# mkpatch/mkpatch.pl . /usr/src/linux > lm-patch
# cd ../../linux
# patch -p1 < ../modules/lm_sensors-2.10.0/lm-patch
|
You have then to select the appropriate modules for the i2c bus support and for the hardware sensors support.
Then, to install and configure lm_sensors program, look at the Temperature sensors section.
Kernel configuration
You can configure the kernel with a text interface thanks to the program Menuconfig like this:
- # cd /usr/src/linux
- # make menuconfig
Whatever the tool - text or graphic -, your configuration is saved in the .config file. Among all the parameters of the Linux kernel 2.4.31, here are the options selected directly (y) or as modules (m) - the other options are unselected (n):
| Code maturity level options |
|
CONFIG_EXPERIMENTAL=y
|
|
| Loadable module support |
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
|
|
| Processor type and features |
CONFIG_MK7=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_HAS_TSC=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_USE_3DNOW=y
CONFIG_X86_PGE=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_F00F_WORKS_OK=y
CONFIG_X86_MCE=y
CONFIG_NOHIGHMEM=y
CONFIG_MTRR=y
CONFIG_X86_UP_APIC=y
CONFIG_X86_UP_IOAPIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_TSC=y
|
The CONFIG_MK7 option gives the CPU type: AMD Athlon (K7).
The CONFIG_MTRR option is mandatory for enabling AGP bus.
|
| General setup |
CONFIG_NET=y
CONFIG_PCI=y
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_ISA=y
CONFIG_PCI_NAMES=y
CONFIG_HOTPLUG=y
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_PM=y
CONFIG_APM=y
|
|
| Parallel port support |
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_PC_CML1=m
|
|
| Plug and Play configuration |
CONFIG_PNP=y
CONFIG_ISAPNP=y
|
Pierre mailed me the problem he had with the Linux kernel and its A7V8X motherboard for using the floppy drive on IRQ 6. The solution he found is to deactivate Plug&Play support in the BIOS.
|
| Block devices |
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=m
|
|
| Networking options |
CONFIG_PACKET=y
CONFIG_NETFILTER=y
CONFIG_FILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
|
The CONFIG_FILTER is required to configure your IP address using DHCP in your network.
The CONFIG_NETFILTER option is necessary to use a firewall.
|
| IP: Netfilter Configuration |
CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_FTP=y
CONFIG_IP_NF_IRC=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_LIMIT=y
CONFIG_IP_NF_MATCH_MAC=y
CONFIG_IP_NF_MATCH_PKTTYPE=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_NAT_IRC=y
CONFIG_IP_NF_NAT_FTP=y
CONFIG_IP_NF_TARGET_LOG=y
|
CONFIG_IP_NF_IPTABLES provides the packet filtering and the full NAT (masquerading, port forwarding, etc). |
| ATA/IDE/MFM/RLL support |
|
CONFIG_IDE=y
|
|
| IDE, ATA and ATAPI Block devices |
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_IDEDISK_STROKE=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDESCSI=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_VIA82CXXX=y
CONFIG_IDEDMA_AUTO=y
|
The option CONFIG_IDEDISK_STROKE fixes an error when computing the size of one of my Maxtor 5T030H3 harddisk (29311 MB). It was detected as a 2 GB harddisk.
The option CONFIG_BLK_DEV_VIA82CXXX brings the UDMA support for the NVIA chipset and exists only since the Linux kernel version 2.4.20 (see Hard disks parameters).
|
| SCSI support |
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SD_EXTRA_DEVS=40
CONFIG_BLK_DEV_SR=y
CONFIG_SR_EXTRA_DEVS=2
CONFIG_CHR_DEV_SG=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
|
SCSI and SCSI disk options are necessary for using the USB mass storages; then the USB mass storage option can be selected in the USB section.
|
| Network device support |
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
CONFIG_NET_ETHERNET=y
CONFIG_NET_PCI=y
CONFIG_B44=y
CONFIG_PPP=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=y
|
The ethernet controller is a Broadcom chip (found by lspci): 00:09.0 Ethernet controller: BROADCOM Corporation: Unknown device 4401 (rev 01).
|
| Input core support |
CONFIG_INPUT=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_EVDEV=m
CONFIG_INPUT_UINPUT=m
|
|
| Character devices |
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=m
|
|
| I2C support |
CONFIG_I2C=m
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_MAINBOARD=y
CONFIG_I2C_VIAPRO=m
CONFIG_I2C_CHARDEV=m
CONFIG_I2C_PROC=m
|
I2C viapro bus support comes from a patch provided by the lm_sensors project.
|
| Hardware sensors support |
CONFIG_SENSORS=y
CONFIG_SENSORS_ASB100=m
|
Same comment as previous row. The lm_sensors configuration is described in the temperature sensors section.
|
| Mice |
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
|
Mouse plugged on the PS2 port.
|
| AGP and Direct Rendering Management |
CONFIG_AGP=y
CONFIG_AGP_VIA=y
CONFIG_DRM=y
CONFIG_DRM_NEW=y
|
The AGP chipset is the Via KT400, following the name of the motherboard.
The SCSI CD-ROM support (CONFIG_BLK_DEV_SR) is activated for using a CD/DVD writer.
|
| File systems |
CONFIG_AUTOFS4_FS=y
CONFIG_EXT3_FS=y
CONFIG_JBD=y
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=m
CONFIG_UMSDOS_FS=m
CONFIG_VFAT_FS=y
CONFIG_RAMFS=y
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
CONFIG_EXT2_FS=y
CONFIG_UDF_FS=y
|
The VFAT file system is required for long filenames support on floppy or Windows partitions.
Then supporting MSDOS file system becomes useless (but keep it as a module).
|
| Network File Systems |
CONFIG_NFS_FS=y
CONFIG_NFSD=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_ZISOFS_FS=y
|
|
| Partition Types |
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
|
|
| Native Language Support |
CONFIG_NLS_DEFAULT="iso8859-15"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_15=y
CONFIG_NLS_UTF8=y
|
|
| Console drivers |
CONFIG_VGA_CONSOLE=y
CONFIG_VIDEO_SELECT=y
|
|
| Sound |
|
CONFIG_SOUND=y
|
ALSA project manages the soundcard (on the motherboard) with the module snd-via82xx.
|
| USB support |
CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_BANDWIDTH=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_UHCI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_PRINTER=y
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
CONFIG_USB_SCANNER=m
|
USB storage support can be selected once SCSI support has been activated.
|
| Library routines |
CONFIG_CRC32=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
|
|
Compile and install the kernel
| Step |
Command |
| Compiling |
# make dep; make |
| Modules compiling |
# make modules |
| lilo kernel installation |
# make zlilo or
# make bzlilo |
| Modules installation |
# make modules_install |
Compile external modules
Independantly from the motherboard, the AGP GeForce4 video card I have requires to install the Nvidia driver, whom source code is available for the kernel and Xfree: see /etc/modutils/nvidia file for module options. Then check that the Nvidia driver works fine with the program glxinfo and the state files of /proc/driver/nvidia directory.
The ALSA project brings the support of the Realtek ALC650 chipset that is integrated within the motherboard. Don't forget to compile and install also the libasound2 library provided by alsa-lib and the tools from alsa-utils, mainly alsamixer
With the GNU/Linux Debian distribution, the loading options of modules related to the ALSA driver are set in the /etc/modutils/alsa file: option dxs_support=4 is mandatory for full duplex support and sound quality - no VRA (variable bitrate). Run update-modules after creating or modifying it.
| Nvidia driver |
ALSA driver |
# cd /usr/src
# ./NVIDIA-Linux-x86-1.0-9626-pkg0.run --extract-only
# cd NVIDIA-Linux-x86-1.0-9626-pkg0/
# ./nvidia-installer
|
# cd /usr/src/modules
# tar xjf alsa-driver-1.0.12.tar.bz2
# cd alsa-driver-1.0.12
# ./configure --with-cards=via82xx --with-sequencer=yes
# make install
# ./snddevices
|
Temperature sensors
After applying the kernel patchs, you have to install the associated programs and mainly sensors (in /usr/local/bin):
- # cd /usr/src/modules/lm_sensors-2.10.0
- # ./prog/mkdev/mkdev.sh
- # make install
Among the sensors found by sensors_detect, the good module to use is asb100 (surprising: mentioned nowhere); you only have then to load it with the usual trick and to test it:
- # modprobe asb100
- # sensors
asb100-i2c-0-2d
Adapter: SMBus Via Pro adapter at e800
...
Warning: the A7V8X motherboard has an ASB100 chip, which is similar to W83781D; the asb100 driver is present in lm_sensors only since 2.8.5 version. With the previous 2.8.x versions, w83781d must be used. To resume:
| lm_sensors version |
A7V8X support |
| < 2.8.0 |
Non |
| 2.8.0 to 2.8.4 |
w83781d module |
| 2.8.5 and more |
asb100 module |
Results and remarks
The best way to show how my Linux kernel configuration works is to provide the kernel boot messages: you get these with the dmesg command.
Copyright (c) 2003 - 2006 Valéry BEAUD
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.
|