Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 2.19 KB

README.md

File metadata and controls

57 lines (41 loc) · 2.19 KB

autokernconf.sh - Kernel Automagical Configuration.

Copyright (C) 2000,2001,2007,2011 Giacomo Catenazzi [email protected]. This is free software, see GNU General Public License v2 for details.

About

This script tries to autoconfigure the Linux kernel, detecting the hardware (devices, ...) and software (protocols, filesystems, ...). It uses soft detections: no direct IO access to unknow devices, thus it is always safe to run this script and it never hangs, but it cannot detect all hardware (mainly some very old hardware).

Expect some false positives

Report errors, bugs, additions, wishes and comments [email protected].

Usage

# run on target system to generate a list of detected hardware (kdetect.list):
./kdetect.sh
# run to download lkddb and match found hardware with kernel CONFIG_ options
./autokernconf.sh

Then merge the generated config.auto into your minimal/current/default kernel config.

General Hints:

  • you don't need super user privileges.
  • you can run this script on a target machine without the need of the kernel sources.

Developing

There are a lots of redundance: because user maybe has not already installed the drivers (thus we use smart detection on PCI, USB,..) and not all file methods are usable ('lspci' not installed, '/proc' not mounted or 'dmesg' not usable). We want to check the drivers that system needs, not the drivers actually installed on actual system (in this case you should simply check the 'System.map').

Requirements

This is a simple bash shell script. It uses only the following external programs:

  • Required: bash[if,echo,test], grep/egrep, sed, uname, which, cp,mv,rm
  • Optional: dmesg, wget or curl (for auto fetch of db) It reads those files (all optional, but missing files reduces detection rate):
  • /proc/*
  • /var/log/dmesg
  • /etc/fstab
  • linux/drivers/pci/pci.ids