summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-11-27 23:17:00 +0000
committerru <ru@FreeBSD.org>2005-11-27 23:17:00 +0000
commit9fa3a162bcf8544009ef55b3e84fb3e19396c953 (patch)
treea8f69b1f507a116aae9c4e4acdd1eb1f1271bb93
parent0b4ce8e3e1cb11709c2122272d006774ad389a59 (diff)
downloadFreeBSD-src-9fa3a162bcf8544009ef55b3e84fb3e19396c953.zip
FreeBSD-src-9fa3a162bcf8544009ef55b3e84fb3e19396c953.tar.gz
- Allow duplicate "machine" directives with the same arguments.
- Move existing "machine" directives to DEFAULTS.
-rw-r--r--sys/alpha/conf/DEFAULTS3
-rw-r--r--sys/alpha/conf/GENERIC1
-rw-r--r--sys/alpha/conf/NOTES6
-rw-r--r--sys/amd64/conf/DEFAULTS3
-rw-r--r--sys/amd64/conf/GENERIC1
-rw-r--r--sys/amd64/conf/NOTES6
-rw-r--r--sys/i386/conf/DEFAULTS3
-rw-r--r--sys/i386/conf/GENERIC1
-rw-r--r--sys/i386/conf/NOTES7
-rw-r--r--sys/i386/conf/XBOX1
-rw-r--r--sys/ia64/conf/DEFAULTS3
-rw-r--r--sys/ia64/conf/GENERIC1
-rw-r--r--sys/ia64/conf/NOTES6
-rw-r--r--sys/ia64/conf/SKI1
-rw-r--r--sys/pc98/conf/DEFAULTS3
-rw-r--r--sys/pc98/conf/GENERIC1
-rw-r--r--sys/pc98/conf/NOTES6
-rw-r--r--sys/powerpc/conf/DEFAULTS3
-rw-r--r--sys/powerpc/conf/GENERIC1
-rw-r--r--sys/sparc64/conf/DEFAULTS3
-rw-r--r--sys/sparc64/conf/GENERIC1
-rw-r--r--sys/sparc64/conf/NOTES6
-rw-r--r--usr.sbin/config/config.y5
23 files changed, 10 insertions, 62 deletions
diff --git a/sys/alpha/conf/DEFAULTS b/sys/alpha/conf/DEFAULTS
index c1243a3..d1b622b 100644
--- a/sys/alpha/conf/DEFAULTS
+++ b/sys/alpha/conf/DEFAULTS
@@ -3,8 +3,7 @@
#
# $FreeBSD$
-# Not yet, this would break all existing configs
-#machine alpha
+machine alpha
# Pseudo devices.
device mem # Memory and kernel memory devices
diff --git a/sys/alpha/conf/GENERIC b/sys/alpha/conf/GENERIC
index cab4e45..35a1e88 100644
--- a/sys/alpha/conf/GENERIC
+++ b/sys/alpha/conf/GENERIC
@@ -20,7 +20,6 @@
#
# $FreeBSD$
-machine alpha
cpu EV4
cpu EV5
ident GENERIC
diff --git a/sys/alpha/conf/NOTES b/sys/alpha/conf/NOTES
index 82d5ee2..7b4f25b 100644
--- a/sys/alpha/conf/NOTES
+++ b/sys/alpha/conf/NOTES
@@ -3,12 +3,6 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
-# This directive is mandatory. It defines the architecture to be
-# configured for. In this case, this kernel is for a machine using
-# Alpha processors.
-#
-machine alpha
-
#####################################################################
# CPU OPTIONS
diff --git a/sys/amd64/conf/DEFAULTS b/sys/amd64/conf/DEFAULTS
index 1464388..3321e97 100644
--- a/sys/amd64/conf/DEFAULTS
+++ b/sys/amd64/conf/DEFAULTS
@@ -3,8 +3,7 @@
#
# $FreeBSD$
-# Not yet, this would break all existing configs
-#machine amd64
+machine amd64
# Bus support.
device isa
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
index 7ba46da..af3c8a5 100644
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -18,7 +18,6 @@
#
# $FreeBSD$
-machine amd64
cpu HAMMER
ident GENERIC
diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES
index 8f1566d..bfcd130 100644
--- a/sys/amd64/conf/NOTES
+++ b/sys/amd64/conf/NOTES
@@ -8,12 +8,6 @@
#
#
-# This directive is mandatory; it defines the architecture to be
-# configured for; in this case, the AMD64 family based machines.
-#
-machine amd64
-
-#
# We want LINT to cover profiling as well.
profile 2
diff --git a/sys/i386/conf/DEFAULTS b/sys/i386/conf/DEFAULTS
index dff4e86..775233b 100644
--- a/sys/i386/conf/DEFAULTS
+++ b/sys/i386/conf/DEFAULTS
@@ -3,8 +3,7 @@
#
# $FreeBSD$
-# Not yet, this would break all existing configs
-#machine i386
+machine i386
# Bus support.
device isa
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC
index d9be28d..2e5f546 100644
--- a/sys/i386/conf/GENERIC
+++ b/sys/i386/conf/GENERIC
@@ -18,7 +18,6 @@
#
# $FreeBSD$
-machine i386
cpu I486_CPU
cpu I586_CPU
cpu I686_CPU
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index c2a9b2b..b34e4b6 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -8,13 +8,6 @@
#
#
-# This directive is mandatory; it defines the architecture to be
-# configured for; in this case, the 386 family based IBM-PC and
-# compatibles.
-#
-machine i386
-
-#
# We want LINT to cover profiling as well.
profile 2
diff --git a/sys/i386/conf/XBOX b/sys/i386/conf/XBOX
index e6f7bfb..eb72d67 100644
--- a/sys/i386/conf/XBOX
+++ b/sys/i386/conf/XBOX
@@ -2,7 +2,6 @@
# XBOX -- kernel for an XBOX
#
# $FreeBSD$
-machine i386
cpu I686_CPU # Celeron
ident XBOX
diff --git a/sys/ia64/conf/DEFAULTS b/sys/ia64/conf/DEFAULTS
index 0250c0c..e4fe155 100644
--- a/sys/ia64/conf/DEFAULTS
+++ b/sys/ia64/conf/DEFAULTS
@@ -3,8 +3,7 @@
#
# $FreeBSD$
-# Not yet, this would break all existing configs
-#machine ia64
+machine ia64
# Bus support.
device acpi # ACPI support
diff --git a/sys/ia64/conf/GENERIC b/sys/ia64/conf/GENERIC
index 2e457ab..0c77673 100644
--- a/sys/ia64/conf/GENERIC
+++ b/sys/ia64/conf/GENERIC
@@ -20,7 +20,6 @@
#
# $FreeBSD$
-machine ia64
cpu ITANIUM
ident GENERIC
diff --git a/sys/ia64/conf/NOTES b/sys/ia64/conf/NOTES
index 289f576..64f34e6 100644
--- a/sys/ia64/conf/NOTES
+++ b/sys/ia64/conf/NOTES
@@ -3,12 +3,6 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
-# directive: machine
-# This directive is mandatory. It defines the architecture to be configured
-# for. It can only be ia64 at this time.
-#
-machine ia64
-
# directive: cpu
# You must specify at least one CPU (the one you intend to run on). Deleting
# the support for CPUs you don't need to use may make parts of the system run
diff --git a/sys/ia64/conf/SKI b/sys/ia64/conf/SKI
index 53bc681..0ca9a71 100644
--- a/sys/ia64/conf/SKI
+++ b/sys/ia64/conf/SKI
@@ -19,7 +19,6 @@
#
# $FreeBSD$
-machine ia64
cpu ITANIUM
ident SKI
diff --git a/sys/pc98/conf/DEFAULTS b/sys/pc98/conf/DEFAULTS
index ba55008..d04a633 100644
--- a/sys/pc98/conf/DEFAULTS
+++ b/sys/pc98/conf/DEFAULTS
@@ -3,8 +3,7 @@
#
# $FreeBSD$
-# Not yet, this would break all existing configs
-#machine pc98 i386
+machine pc98 i386
options PC98
# Bus support.
diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC
index ffdc052..ce46dea 100644
--- a/sys/pc98/conf/GENERIC
+++ b/sys/pc98/conf/GENERIC
@@ -18,7 +18,6 @@
#
# $FreeBSD$
-machine pc98 i386
cpu I486_CPU
cpu I586_CPU
cpu I686_CPU
diff --git a/sys/pc98/conf/NOTES b/sys/pc98/conf/NOTES
index 01e6c54..720d7f8 100644
--- a/sys/pc98/conf/NOTES
+++ b/sys/pc98/conf/NOTES
@@ -7,12 +7,6 @@
# $FreeBSD$
#
-#
-# This directive is mandatory; it defines the architecture to be
-# configured for; in this case, the 386 family based PC-98 and
-# compatibles.
-#
-machine pc98 i386
options PC98
#
diff --git a/sys/powerpc/conf/DEFAULTS b/sys/powerpc/conf/DEFAULTS
index bd4ddb8..4534868 100644
--- a/sys/powerpc/conf/DEFAULTS
+++ b/sys/powerpc/conf/DEFAULTS
@@ -3,8 +3,7 @@
#
# $FreeBSD$
-# Not yet, this would break all existing configs
-#machine powerpc
+machine powerpc
# Pseudo devices.
device mem # Memory and kernel memory devices
diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC
index 3dfd5db..b0c4213 100644
--- a/sys/powerpc/conf/GENERIC
+++ b/sys/powerpc/conf/GENERIC
@@ -18,7 +18,6 @@
#
# $FreeBSD$
-machine powerpc
cpu OEA
ident GENERIC
diff --git a/sys/sparc64/conf/DEFAULTS b/sys/sparc64/conf/DEFAULTS
index 087ee1d..b24aca4 100644
--- a/sys/sparc64/conf/DEFAULTS
+++ b/sys/sparc64/conf/DEFAULTS
@@ -3,8 +3,7 @@
#
# $FreeBSD$
-# Not yet, this would break all existing configs
-#machine sparc64
+machine sparc64
# Pseudo devices.
device mem # Memory and kernel memory devices
diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC
index 84968dd..deb4cd3 100644
--- a/sys/sparc64/conf/GENERIC
+++ b/sys/sparc64/conf/GENERIC
@@ -20,7 +20,6 @@
#
# $FreeBSD$
-machine sparc64
cpu SUN4U
ident GENERIC
diff --git a/sys/sparc64/conf/NOTES b/sys/sparc64/conf/NOTES
index 2bd086b..f914934 100644
--- a/sys/sparc64/conf/NOTES
+++ b/sys/sparc64/conf/NOTES
@@ -3,12 +3,6 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
-# This directive is mandatory. It defines the architecture to be
-# configured for. In this case, this kernel is for a machine using
-# UltraSparc processors.
-#
-machine sparc64
-
#####################################################################
# CPU OPTIONS
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y
index e8c53d5..168f4f8 100644
--- a/usr.sbin/config/config.y
+++ b/usr.sbin/config/config.y
@@ -136,7 +136,7 @@ Spec:
Config_spec:
ARCH Save_id
= {
- if (machinename != NULL)
+ if (machinename != NULL && !eq($2, machinename))
errx(1, "%s:%d: only one machine directive is allowed",
yyfile, yyline);
machinename = $2;
@@ -144,7 +144,8 @@ Config_spec:
} |
ARCH Save_id Save_id
= {
- if (machinename != NULL)
+ if (machinename != NULL &&
+ !(eq($2, machinename) && eq($3, machinearch)))
errx(1, "%s:%d: only one machine directive is allowed",
yyfile, yyline);
machinename = $2;
OpenPOWER on IntegriCloud