2005-09-26 12:10:33

by Ahmad Reza Cheraghi

[permalink] [raw]
Subject: [PATCH](rules) Automatic Configuration of a Kernel

diff -uNr linux.org/scripts/kconfig/rules/arch.sh
linux-2.6.13.2/scripts/kconfig/rules/arch.sh
--- linux.org/scripts/kconfig/rules/arch.sh 1970-01-01
01:00:00.000000000 +0100
+++ linux-2.6.13.2/scripts/kconfig/rules/arch.sh
2005-09-24 11:57:15.000000000 +0200
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/
-e s/arm.*/arm/ -e s/sa110/arm/ | grep -sqE "$1"
+ then
+ echo "y\n"
+else
+ echo "n\n"
+fi
diff -uNr linux.org/scripts/kconfig/rules/cpugrep.sh
linux-2.6.13.2/scripts/kconfig/rules/cpugrep.sh
--- linux.org/scripts/kconfig/rules/cpugrep.sh
1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13.2/scripts/kconfig/rules/cpugrep.sh
2005-09-24 11:57:15.000000000 +0200
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if grep -sq "$1" /proc/cpuinfo
+ then
+ echo "y\n"
+
+ else
+ echo "n\n"
+
+fi
+
diff -uNr linux.org/scripts/kconfig/rules/hw_egrep.sh
linux-2.6.13.2/scripts/kconfig/rules/hw_egrep.sh
--- linux.org/scripts/kconfig/rules/hw_egrep.sh
1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13.2/scripts/kconfig/rules/hw_egrep.sh
2005-09-24 11:57:15.000000000 +0200
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if lspci | grep -sqE "$1"
+ then
+ echo "y\n"
+elif grep -sqE "$1" /var/log/dmesg
+ then
+ echo "y\n"
+else
+ echo "n\n"
+fi
diff -uNr linux.org/scripts/kconfig/rules/hw_grep.sh
linux-2.6.13.2/scripts/kconfig/rules/hw_grep.sh
--- linux.org/scripts/kconfig/rules/hw_grep.sh
1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13.2/scripts/kconfig/rules/hw_grep.sh
2005-09-24 11:57:15.000000000 +0200
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if lspci | grep -sq "$1"
+ then
+ echo "y\n"
+elif grep -sq "$1" /var/log/dmesg
+ then
+ echo "y\n"
+else
+ echo "n\n"
+fi





__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com