diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-11-12 14:54:30 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-11-12 15:02:20 -0500 |
commit | daa93fab824f2b8c35bd11670c7fab2f32b2de5f (patch) | |
tree | 73e22e7faa28dd1ec034653918b8dd1922530c3d | |
parent | d746d647f31bd3664f4a23985b78654129ffc1db (diff) |
x86: enable "make ARCH=x86"
After unification of the Kconfig files and
introducing K64BIT support in kconfig
it required only trivial changes to enable
"make ARCH=x86".
With this patch you can build for x86_64 in several ways:
1) make ARCH=x86_64
2) make ARCH=x86 K64BIT=y
3) make ARCH=x86 menuconfig
=> select 64-bit
Likewise for i386 with the addition that
i386 is default is you say ARCH=x86.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | arch/x86/Kconfig | 18 | ||||
-rw-r--r-- | arch/x86/Kconfig.i386 | 18 | ||||
-rw-r--r-- | arch/x86/Kconfig.x86_64 | 20 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 7 |
5 files changed, 19 insertions, 48 deletions
@@ -200,9 +200,11 @@ SRCARCH := $(ARCH) | |||
200 | # Additional ARCH settings for x86 | 200 | # Additional ARCH settings for x86 |
201 | ifeq ($(ARCH),i386) | 201 | ifeq ($(ARCH),i386) |
202 | SRCARCH := x86 | 202 | SRCARCH := x86 |
203 | K64BIT := n | ||
203 | endif | 204 | endif |
204 | ifeq ($(ARCH),x86_64) | 205 | ifeq ($(ARCH),x86_64) |
205 | SRCARCH := x86 | 206 | SRCARCH := x86 |
207 | K64BIT := y | ||
206 | endif | 208 | endif |
207 | 209 | ||
208 | KCONFIG_CONFIG ?= .config | 210 | KCONFIG_CONFIG ?= .config |
@@ -339,7 +341,7 @@ KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) | |||
339 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 341 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
340 | 342 | ||
341 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION | 343 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION |
342 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC | 344 | export ARCH SRCARCH K64BIT CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC |
343 | export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE | 345 | export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE |
344 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 346 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
345 | 347 | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 34517bf14ba4..1eb59971af5d 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1,13 +1,25 @@ | |||
1 | # x86 configuration | 1 | # x86 configuration |
2 | mainmenu "Linux Kernel Configuration for x86" | ||
3 | |||
4 | # Select 32 or 64 bit | ||
5 | config 64BIT | ||
6 | bool "64-bit kernel" | ||
7 | default n | ||
8 | help | ||
9 | Say yes to build a 64-bit kernel - formerly known as x86_64 | ||
10 | Say no to build a 32-bit kernel - formerly known as i386 | ||
11 | |||
12 | config X86_32 | ||
13 | def_bool !64BIT | ||
14 | |||
15 | config X86_64 | ||
16 | def_bool 64BIT | ||
2 | 17 | ||
3 | ### Arch settings | 18 | ### Arch settings |
4 | config X86 | 19 | config X86 |
5 | bool | 20 | bool |
6 | default y | 21 | default y |
7 | 22 | ||
8 | config 64BIT | ||
9 | def_bool X86_64 | ||
10 | |||
11 | config GENERIC_TIME | 23 | config GENERIC_TIME |
12 | bool | 24 | bool |
13 | default y | 25 | default y |
diff --git a/arch/x86/Kconfig.i386 b/arch/x86/Kconfig.i386 deleted file mode 100644 index 7b8dc2604d57..000000000000 --- a/arch/x86/Kconfig.i386 +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | # | ||
2 | # For a description of the syntax of this configuration file, | ||
3 | # see Documentation/kbuild/kconfig-language.txt. | ||
4 | # | ||
5 | |||
6 | mainmenu "Linux Kernel Configuration" | ||
7 | |||
8 | config X86_32 | ||
9 | bool | ||
10 | default y | ||
11 | help | ||
12 | This is Linux's home port. Linux was originally native to the Intel | ||
13 | 386, and runs on all the later x86 processors including the Intel | ||
14 | 486, 586, Pentiums, and various instruction-set-compatible chips by | ||
15 | AMD, Cyrix, and others. | ||
16 | |||
17 | |||
18 | source "arch/x86/Kconfig" | ||
diff --git a/arch/x86/Kconfig.x86_64 b/arch/x86/Kconfig.x86_64 deleted file mode 100644 index b262aaec67cc..000000000000 --- a/arch/x86/Kconfig.x86_64 +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | # | ||
2 | # For a description of the syntax of this configuration file, | ||
3 | # see Documentation/kbuild/kconfig-language.txt. | ||
4 | # | ||
5 | # Note: ISA is disabled and will hopefully never be enabled. | ||
6 | # If you managed to buy an ISA x86-64 box you'll have to fix all the | ||
7 | # ISA drivers you need yourself. | ||
8 | # | ||
9 | |||
10 | mainmenu "Linux Kernel Configuration" | ||
11 | |||
12 | config X86_64 | ||
13 | bool | ||
14 | default y | ||
15 | help | ||
16 | Port to the x86-64 architecture. x86-64 is a 64-bit extension to the | ||
17 | classical 32-bit x86 architecture. For details see | ||
18 | <http://www.x86-64.org/>. | ||
19 | |||
20 | source "arch/x86/Kconfig" | ||
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 59594126e8b6..1ad6f7fc490a 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -4,12 +4,7 @@ | |||
4 | 4 | ||
5 | PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config | 5 | PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config |
6 | 6 | ||
7 | # If a arch/$(SRCARCH)/Kconfig.$(ARCH) file exist use it | 7 | Kconfig := arch/$(SRCARCH)/Kconfig |
8 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/Kconfig.$(ARCH)),) | ||
9 | Kconfig := arch/$(SRCARCH)/Kconfig.$(ARCH) | ||
10 | else | ||
11 | Kconfig := arch/$(SRCARCH)/Kconfig | ||
12 | endif | ||
13 | 8 | ||
14 | xconfig: $(obj)/qconf | 9 | xconfig: $(obj)/qconf |
15 | $< $(Kconfig) | 10 | $< $(Kconfig) |