xref: /linux/arch/x86/Makefile (revision 032a2c4f65a2f81c93e161a11197ba19bc14a909)
174b469f2SSam Ravnborg# Unified Makefile for i386 and x86_64
274b469f2SSam Ravnborg
32266cfd5SSam Ravnborg# select defconfig based on actual architecture
4d746d647SSam Ravnborgifeq ($(ARCH),x86)
5ffee0de4SDavid Woodhouse  ifeq ($(shell uname -m),x86_64)
6ffee0de4SDavid Woodhouse        KBUILD_DEFCONFIG := x86_64_defconfig
7ffee0de4SDavid Woodhouse  else
8d746d647SSam Ravnborg        KBUILD_DEFCONFIG := i386_defconfig
9ffee0de4SDavid Woodhouse  endif
10d746d647SSam Ravnborgelse
112266cfd5SSam Ravnborg        KBUILD_DEFCONFIG := $(ARCH)_defconfig
12d746d647SSam Ravnborgendif
132266cfd5SSam Ravnborg
141c678da3SDavid Woodhouse# How to compile the 16-bit code.  Note we always compile for -march=i386;
151c678da3SDavid Woodhouse# that way we can complain to the user if the CPU is insufficient.
16de3accdaSDavid Woodhouse#
17de3accdaSDavid Woodhouse# The -m16 option is supported by GCC >= 4.9 and clang >= 3.5. For
18a9cfcceeSH. Peter Anvin# older versions of GCC, include an *assembly* header to make sure that
19a9cfcceeSH. Peter Anvin# gcc doesn't play any games behind our back.
20a9cfcceeSH. Peter AnvinCODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
21de3accdaSDavid WoodhouseM16_CFLAGS	 := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
22de3accdaSDavid Woodhouse
23de3accdaSDavid WoodhouseREALMODE_CFLAGS	:= $(M16_CFLAGS) -g -Os -D__KERNEL__ \
24de3accdaSDavid Woodhouse		   -DDISABLE_BRANCH_PROFILING \
251c678da3SDavid Woodhouse		   -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
261c678da3SDavid Woodhouse		   -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
27*032a2c4fSMatthias Kaehlcke		   -mno-mmx -mno-sse
28*032a2c4fSMatthias Kaehlcke
29*032a2c4fSMatthias KaehlckeREALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding)
30*032a2c4fSMatthias KaehlckeREALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector)
31*032a2c4fSMatthias KaehlckeREALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -mpreferred-stack-boundary=2)
321c678da3SDavid Woodhouseexport REALMODE_CFLAGS
331c678da3SDavid Woodhouse
340a6ef376SSam Ravnborg# BITS is used as extension for files which are available in a 32 bit
350a6ef376SSam Ravnborg# and a 64 bit version to simplify shared Makefiles.
360a6ef376SSam Ravnborg# e.g.: obj-y += foo_$(BITS).o
370a6ef376SSam Ravnborgexport BITS
3874b469f2SSam Ravnborg
39a0215061SKees Cookifdef CONFIG_X86_NEED_RELOCS
40a0215061SKees Cook        LDFLAGS_vmlinux := --emit-relocs
41a0215061SKees Cookendif
42a0215061SKees Cook
43b2c51106SAndy Lutomirski#
44b2c51106SAndy Lutomirski# Prevent GCC from generating any FP code by mistake.
45b2c51106SAndy Lutomirski#
46b2c51106SAndy Lutomirski# This must happen before we try the -mpreferred-stack-boundary, see:
47b2c51106SAndy Lutomirski#
48b2c51106SAndy Lutomirski#    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
49b2c51106SAndy Lutomirski#
50b2c51106SAndy LutomirskiKBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
51b2c51106SAndy LutomirskiKBUILD_CFLAGS += $(call cc-option,-mno-avx,)
52b2c51106SAndy Lutomirski
53d746d647SSam Ravnborgifeq ($(CONFIG_X86_32),y)
540a6ef376SSam Ravnborg        BITS := 32
558c6531f7SAndreas Herrmann        UTS_MACHINE := i386
564ba7e5cdSSam Ravnborg        CHECKFLAGS += -D__i386__
570a6ef376SSam Ravnborg
584ba7e5cdSSam Ravnborg        biarch := $(call cc-option,-m32)
594ba7e5cdSSam Ravnborg        KBUILD_AFLAGS += $(biarch)
604ba7e5cdSSam Ravnborg        KBUILD_CFLAGS += $(biarch)
610a6ef376SSam Ravnborg
620a6ef376SSam Ravnborg        KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
630a6ef376SSam Ravnborg
64484d90eeSAndrew Boie        # Never want PIC in a 32-bit kernel, prevent breakage with GCC built
65484d90eeSAndrew Boie        # with nonstandard options
66484d90eeSAndrew Boie        KBUILD_CFLAGS += -fno-pic
67484d90eeSAndrew Boie
680a6ef376SSam Ravnborg        # prevent gcc from keeping the stack 16 byte aligned
690a6ef376SSam Ravnborg        KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
700a6ef376SSam Ravnborg
710a6ef376SSam Ravnborg        # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
720a6ef376SSam Ravnborg        # a lot more stack due to the lack of sharing of stacklots:
73c7bd0414SFrans Pop        KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0400, \
74c7bd0414SFrans Pop				$(call cc-option,-fno-unit-at-a-time))
750a6ef376SSam Ravnborg
760a6ef376SSam Ravnborg        # CPU-specific tuning. Anything which can be shared with UML should go here.
77a436bb7bSMasahiro Yamada        include arch/x86/Makefile_32.cpu
780a6ef376SSam Ravnborg        KBUILD_CFLAGS += $(cflags-y)
790a6ef376SSam Ravnborg
800a6ef376SSam Ravnborg        # temporary until string.h is fixed
810a6ef376SSam Ravnborg        KBUILD_CFLAGS += -ffreestanding
820a6ef376SSam Ravnborgelse
830a6ef376SSam Ravnborg        BITS := 64
840a6ef376SSam Ravnborg        UTS_MACHINE := x86_64
850a6ef376SSam Ravnborg        CHECKFLAGS += -D__x86_64__ -m64
860a6ef376SSam Ravnborg
8714262d67SGeorge Spelvin        biarch := -m64
880a6ef376SSam Ravnborg        KBUILD_AFLAGS += -m64
890a6ef376SSam Ravnborg        KBUILD_CFLAGS += -m64
900a6ef376SSam Ravnborg
91be6cb027SIngo Molnar        # Align jump targets to 1 byte, not the default 16 bytes:
922c4fd1acSMatthias Kaehlcke        KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1)
93be6cb027SIngo Molnar
9452648e83SIngo Molnar        # Pack loops tightly as well:
952c4fd1acSMatthias Kaehlcke        KBUILD_CFLAGS += $(call cc-option,-falign-loops=1)
9652648e83SIngo Molnar
975c630089SRasmus Villemoes        # Don't autogenerate traditional x87 instructions
988f2dd677SBehan Webster        KBUILD_CFLAGS += $(call cc-option,-mno-80387)
998f2dd677SBehan Webster        KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
1005551a34eSH. Peter Anvin
101d9b0cde9SH.J. Lu	# Use -mpreferred-stack-boundary=3 if supported.
1025551a34eSH. Peter Anvin	KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3)
103d9b0cde9SH.J. Lu
104d9ee948dSH.J. Lu	# Use -mskip-rax-setup if supported.
105d9ee948dSH.J. Lu	KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
106d9ee948dSH.J. Lu
1070a6ef376SSam Ravnborg        # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
1080a6ef376SSam Ravnborg        cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
1090a6ef376SSam Ravnborg        cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
1100a6ef376SSam Ravnborg
1110a6ef376SSam Ravnborg        cflags-$(CONFIG_MCORE2) += \
1120a6ef376SSam Ravnborg                $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
113366d19e1STobias Doerffel	cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
114366d19e1STobias Doerffel		$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
1150a6ef376SSam Ravnborg        cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
1160a6ef376SSam Ravnborg        KBUILD_CFLAGS += $(cflags-y)
1170a6ef376SSam Ravnborg
1180a6ef376SSam Ravnborg        KBUILD_CFLAGS += -mno-red-zone
1190a6ef376SSam Ravnborg        KBUILD_CFLAGS += -mcmodel=kernel
1200a6ef376SSam Ravnborg
1210a6ef376SSam Ravnborg        # -funit-at-a-time shrinks the kernel .text considerably
1220a6ef376SSam Ravnborg        # unfortunately it makes reading oopses harder.
1230a6ef376SSam Ravnborg        KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
1245d707e9cSTejun Heoendif
1250a6ef376SSam Ravnborg
1260bf62763SH. Peter Anvinifdef CONFIG_X86_X32
1270bf62763SH. Peter Anvin	x32_ld_ok := $(call try-run,\
1280bf62763SH. Peter Anvin			/bin/echo -e '1: .quad 1b' | \
1290bf62763SH. Peter Anvin			$(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" - && \
1300bf62763SH. Peter Anvin			$(OBJCOPY) -O elf32-x86-64 "$$TMP" "$$TMPO" && \
1310bf62763SH. Peter Anvin			$(LD) -m elf32_x86_64 "$$TMPO" -o "$$TMP",y,n)
1320bf62763SH. Peter Anvin        ifeq ($(x32_ld_ok),y)
1330bf62763SH. Peter Anvin                CONFIG_X86_X32_ABI := y
1340bf62763SH. Peter Anvin                KBUILD_AFLAGS += -DCONFIG_X86_X32_ABI
1350bf62763SH. Peter Anvin                KBUILD_CFLAGS += -DCONFIG_X86_X32_ABI
1360bf62763SH. Peter Anvin        else
1370bf62763SH. Peter Anvin                $(warning CONFIG_X86_X32 enabled but no binutils support)
1380bf62763SH. Peter Anvin        endif
1390bf62763SH. Peter Anvinendif
1400bf62763SH. Peter Anvinexport CONFIG_X86_X32_ABI
1410bf62763SH. Peter Anvin
142dfec072eSVegard Nossum# Don't unroll struct assignments with kmemcheck enabled
143dfec072eSVegard Nossumifeq ($(CONFIG_KMEMCHECK),y)
144dfec072eSVegard Nossum	KBUILD_CFLAGS += $(call cc-option,-fno-builtin-memcpy)
145dfec072eSVegard Nossumendif
146dfec072eSVegard Nossum
1473f135e57SJosh Poimboeuf#
1483f135e57SJosh Poimboeuf# If the function graph tracer is used with mcount instead of fentry,
1493f135e57SJosh Poimboeuf# '-maccumulate-outgoing-args' is needed to prevent a GCC bug
1503f135e57SJosh Poimboeuf# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109)
1513f135e57SJosh Poimboeuf#
1523f135e57SJosh Poimboeufifdef CONFIG_FUNCTION_GRAPH_TRACER
1533f135e57SJosh Poimboeuf  ifndef CONFIG_HAVE_FENTRY
1543f135e57SJosh Poimboeuf	ACCUMULATE_OUTGOING_ARGS := 1
1553f135e57SJosh Poimboeuf  else
1563f135e57SJosh Poimboeuf    ifeq ($(call cc-option-yn, -mfentry), n)
1573f135e57SJosh Poimboeuf	ACCUMULATE_OUTGOING_ARGS := 1
158a5859c6dSJosh Poimboeuf
159a5859c6dSJosh Poimboeuf	# GCC ignores '-maccumulate-outgoing-args' when used with '-Os'.
160a5859c6dSJosh Poimboeuf	# If '-Os' is enabled, disable it and print a warning.
161a5859c6dSJosh Poimboeuf        ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
162a5859c6dSJosh Poimboeuf          undefine CONFIG_CC_OPTIMIZE_FOR_SIZE
163a5859c6dSJosh Poimboeuf	  $(warning Disabling CONFIG_CC_OPTIMIZE_FOR_SIZE.  Your compiler does not have -mfentry so you cannot optimize for size with CONFIG_FUNCTION_GRAPH_TRACER.)
164a5859c6dSJosh Poimboeuf        endif
165a5859c6dSJosh Poimboeuf
1663f135e57SJosh Poimboeuf    endif
1673f135e57SJosh Poimboeuf  endif
1683f135e57SJosh Poimboeufendif
1693f135e57SJosh Poimboeuf
1703f135e57SJosh Poimboeuf#
1713f135e57SJosh Poimboeuf# Jump labels need '-maccumulate-outgoing-args' for gcc < 4.5.2 to prevent a
1723f135e57SJosh Poimboeuf# GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46226).  There's no way
1733f135e57SJosh Poimboeuf# to test for this bug at compile-time because the test case needs to execute,
1743f135e57SJosh Poimboeuf# which is a no-go for cross compilers.  So check the GCC version instead.
1753f135e57SJosh Poimboeuf#
1763f135e57SJosh Poimboeufifdef CONFIG_JUMP_LABEL
1773f135e57SJosh Poimboeuf  ifneq ($(ACCUMULATE_OUTGOING_ARGS), 1)
1783f135e57SJosh Poimboeuf	ACCUMULATE_OUTGOING_ARGS = $(call cc-if-fullversion, -lt, 040502, 1)
1793f135e57SJosh Poimboeuf  endif
1803f135e57SJosh Poimboeufendif
1813f135e57SJosh Poimboeuf
1823f135e57SJosh Poimboeufifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
1834a1bec46SNick Desaulniers	# This compiler flag is not supported by Clang:
1844a1bec46SNick Desaulniers	KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
1853f135e57SJosh Poimboeufendif
1863f135e57SJosh Poimboeuf
1870a6ef376SSam Ravnborg# Stackpointer is addressed different for 32 bit and 64 bit x86
1880a6ef376SSam Ravnborgsp-$(CONFIG_X86_32) := esp
1890a6ef376SSam Ravnborgsp-$(CONFIG_X86_64) := rsp
1900a6ef376SSam Ravnborg
1917b956f03SAndy Lutomirski# do binutils support CFI?
1927b956f03SAndy Lutomirskicfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_endproc,-DCONFIG_AS_CFI=1)
1937b956f03SAndy Lutomirski# is .cfi_signal_frame supported too?
1947b956f03SAndy Lutomirskicfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1)
1957b956f03SAndy Lutomirskicfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1)
1967b956f03SAndy Lutomirski
197d7acb92fSH. Peter Anvin# does binutils support specific instructions?
198d7acb92fSH. Peter Anvinasinstr := $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=1)
19975aaf4c3SJan Beulichasinstr += $(call as-instr,pshufb %xmm0$(comma)%xmm0,-DCONFIG_AS_SSSE3=1)
20006325190SJan Beulichasinstr += $(call as-instr,crc32l %eax$(comma)%eax,-DCONFIG_AS_CRC32=1)
201ea4d26aeSJim Kukunasavx_instr := $(call as-instr,vxorps %ymm0$(comma)%ymm1$(comma)%ymm2,-DCONFIG_AS_AVX=1)
2027056741fSJim Kukunasavx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1)
203e0a491c1SGayatri Kammelaavx512_instr :=$(call as-instr,vpmovm2b %k1$(comma)%zmm5,-DCONFIG_AS_AVX512=1)
204e38b6b7fStimsha1_ni_instr :=$(call as-instr,sha1msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA1_NI=1)
205e38b6b7fStimsha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA256_NI=1)
206d7acb92fSH. Peter Anvin
207e0a491c1SGayatri KammelaKBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr)
208e0a491c1SGayatri KammelaKBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr)
2090a6ef376SSam Ravnborg
2100a6ef376SSam RavnborgLDFLAGS := -m elf_$(UTS_MACHINE)
21125dfeeb7SSam Ravnborg
21225dfeeb7SSam Ravnborg# Speed up the build
2130a6ef376SSam RavnborgKBUILD_CFLAGS += -pipe
21425dfeeb7SSam Ravnborg# Workaround for a gcc prelease that unfortunately was shipped in a suse release
21525dfeeb7SSam RavnborgKBUILD_CFLAGS += -Wno-sign-compare
21625dfeeb7SSam Ravnborg#
21725dfeeb7SSam RavnborgKBUILD_CFLAGS += -fno-asynchronous-unwind-tables
2180a6ef376SSam Ravnborg
2190a6ef376SSam RavnborgKBUILD_CFLAGS += $(mflags-y)
2200a6ef376SSam RavnborgKBUILD_AFLAGS += $(mflags-y)
2210a6ef376SSam Ravnborg
2223ce9e53eSMichal Marekarchscripts: scripts_basic
2236520fe55SH. Peter Anvin	$(Q)$(MAKE) $(build)=arch/x86/tools relocs
2246520fe55SH. Peter Anvin
2250a6ef376SSam Ravnborg###
226303395acSH. Peter Anvin# Syscall table generation
227303395acSH. Peter Anvin
228303395acSH. Peter Anvinarchheaders:
2291f57d5d8SIngo Molnar	$(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all
230303395acSH. Peter Anvin
2318fc5b4d4SVivek Goyalarchprepare:
23274ca317cSVivek Goyalifeq ($(CONFIG_KEXEC_FILE),y)
2338fc5b4d4SVivek Goyal	$(Q)$(MAKE) $(build)=arch/x86/purgatory arch/x86/purgatory/kexec-purgatory.c
2348fc5b4d4SVivek Goyalendif
2358fc5b4d4SVivek Goyal
236303395acSH. Peter Anvin###
2370a6ef376SSam Ravnborg# Kernel objects
2380a6ef376SSam Ravnborg
2390a6ef376SSam Ravnborghead-y := arch/x86/kernel/head_$(BITS).o
240700efc1bSEric W. Biedermanhead-y += arch/x86/kernel/head$(BITS).o
241f2d85299SLuis R. Rodriguezhead-y += arch/x86/kernel/ebda.o
2428d152e7aSLuis R. Rodriguezhead-y += arch/x86/kernel/platform-quirks.o
2430a6ef376SSam Ravnborg
2440a6ef376SSam Ravnborglibs-y  += arch/x86/lib/
2450a6ef376SSam Ravnborg
246d1f0ae5eSSam Ravnborg# See arch/x86/Kbuild for content of core part of the kernel
247d1f0ae5eSSam Ravnborgcore-y += arch/x86/
2480a6ef376SSam Ravnborg
2490a6ef376SSam Ravnborg# drivers-y are linked after core-y
2500a6ef376SSam Ravnborgdrivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
2510a6ef376SSam Ravnborgdrivers-$(CONFIG_PCI)            += arch/x86/pci/
2520a6ef376SSam Ravnborg
2530a6ef376SSam Ravnborg# must be linked after kernel/
2540a6ef376SSam Ravnborgdrivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/
2550a6ef376SSam Ravnborg
256cf7700feSRafael J. Wysocki# suspend and hibernation support
2570a6ef376SSam Ravnborgdrivers-$(CONFIG_PM) += arch/x86/power/
258cf7700feSRafael J. Wysocki
2590a6ef376SSam Ravnborgdrivers-$(CONFIG_FB) += arch/x86/video/
2600a6ef376SSam Ravnborg
2616c36dfe9SBorislav Petkovdrivers-$(CONFIG_RAS) += arch/x86/ras/
2626c36dfe9SBorislav Petkov
2630a6ef376SSam Ravnborg####
2640a6ef376SSam Ravnborg# boot loader support. Several targets are kept for legacy purposes
2650a6ef376SSam Ravnborg
2660a6ef376SSam Ravnborgboot := arch/x86/boot
2670a6ef376SSam Ravnborg
2681648e4f8SH. Peter AnvinBOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage
269f9c5107cSH. Peter Anvin
270f9c5107cSH. Peter AnvinPHONY += bzImage $(BOOT_TARGETS)
2710a6ef376SSam Ravnborg
2720a6ef376SSam Ravnborg# Default kernel to build
2730a6ef376SSam Ravnborgall: bzImage
2740a6ef376SSam Ravnborg
2750a6ef376SSam Ravnborg# KBUILD_IMAGE specify target image being built
2760a6ef376SSam RavnborgKBUILD_IMAGE := $(boot)/bzImage
2770a6ef376SSam Ravnborg
278f9c5107cSH. Peter AnvinbzImage: vmlinux
279ca0e9badSMasami Hiramatsuifeq ($(CONFIG_X86_DECODER_SELFTEST),y)
280ca0e9badSMasami Hiramatsu	$(Q)$(MAKE) $(build)=arch/x86/tools posttest
281ca0e9badSMasami Hiramatsuendif
2820a6ef376SSam Ravnborg	$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
2830a6ef376SSam Ravnborg	$(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot
28441b3eae6SJan Beulich	$(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@
2850a6ef376SSam Ravnborg
286f9c5107cSH. Peter Anvin$(BOOT_TARGETS): vmlinux
287f9c5107cSH. Peter Anvin	$(Q)$(MAKE) $(build)=$(boot) $@
2880a6ef376SSam Ravnborg
2891648e4f8SH. Peter AnvinPHONY += install
2901648e4f8SH. Peter Anvininstall:
2911648e4f8SH. Peter Anvin	$(Q)$(MAKE) $(build)=$(boot) $@
2921648e4f8SH. Peter Anvin
2930a6ef376SSam RavnborgPHONY += vdso_install
2940a6ef376SSam Ravnborgvdso_install:
295d603c8e1SIngo Molnar	$(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
2960a6ef376SSam Ravnborg
2970a6ef376SSam Ravnborgarchclean:
2980a6ef376SSam Ravnborg	$(Q)rm -rf $(objtree)/arch/i386
2990a6ef376SSam Ravnborg	$(Q)rm -rf $(objtree)/arch/x86_64
3000a6ef376SSam Ravnborg	$(Q)$(MAKE) $(clean)=$(boot)
301b2d668daSJarkko Sakkinen	$(Q)$(MAKE) $(clean)=arch/x86/tools
302b0108f9eSMichael Welling	$(Q)$(MAKE) $(clean)=arch/x86/purgatory
3030a6ef376SSam Ravnborg
3040a6ef376SSam Ravnborgdefine archhelp
3050a6ef376SSam Ravnborg  echo  '* bzImage      - Compressed kernel image (arch/x86/boot/bzImage)'
3060a6ef376SSam Ravnborg  echo  '  install      - Install kernel using'
307caa27b66SSam Ravnborg  echo  '                  (your) ~/bin/$(INSTALLKERNEL) or'
308caa27b66SSam Ravnborg  echo  '                  (distribution) /sbin/$(INSTALLKERNEL) or'
3090a6ef376SSam Ravnborg  echo  '                  install to $$(INSTALL_PATH) and run lilo'
31037f30e21SAndi Kleen  echo  '  fdimage      - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
31137f30e21SAndi Kleen  echo  '  fdimage144   - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
31237f30e21SAndi Kleen  echo  '  fdimage288   - Create 2.8MB boot floppy image (arch/x86/boot/fdimage)'
31337f30e21SAndi Kleen  echo  '  isoimage     - Create a boot CD-ROM image (arch/x86/boot/image.iso)'
31437f30e21SAndi Kleen  echo  '                  bzdisk/fdimage*/isoimage also accept:'
31537f30e21SAndi Kleen  echo  '                  FDARGS="..."  arguments for the booted kernel'
31637f30e21SAndi Kleen  echo  '                  FDINITRD=file initrd for the booted kernel'
3170a6ef376SSam Ravnborgendef
318