162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci# Unified Makefile for i386 and x86_64
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci# select defconfig based on actual architecture
562306a36Sopenharmony_ciifeq ($(ARCH),x86)
662306a36Sopenharmony_ci  ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)
762306a36Sopenharmony_ci        KBUILD_DEFCONFIG := i386_defconfig
862306a36Sopenharmony_ci  else
962306a36Sopenharmony_ci        KBUILD_DEFCONFIG := x86_64_defconfig
1062306a36Sopenharmony_ci  endif
1162306a36Sopenharmony_cielse
1262306a36Sopenharmony_ci        KBUILD_DEFCONFIG := $(ARCH)_defconfig
1362306a36Sopenharmony_ciendif
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciifdef CONFIG_CC_IS_GCC
1662306a36Sopenharmony_ciRETPOLINE_CFLAGS	:= $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
1762306a36Sopenharmony_ciRETPOLINE_VDSO_CFLAGS	:= $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register)
1862306a36Sopenharmony_ciendif
1962306a36Sopenharmony_ciifdef CONFIG_CC_IS_CLANG
2062306a36Sopenharmony_ciRETPOLINE_CFLAGS	:= -mretpoline-external-thunk
2162306a36Sopenharmony_ciRETPOLINE_VDSO_CFLAGS	:= -mretpoline
2262306a36Sopenharmony_ciendif
2362306a36Sopenharmony_ciRETPOLINE_CFLAGS	+= $(call cc-option,-mindirect-branch-cs-prefix)
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciifdef CONFIG_RETHUNK
2662306a36Sopenharmony_ciRETHUNK_CFLAGS		:= -mfunction-return=thunk-extern
2762306a36Sopenharmony_ciRETPOLINE_CFLAGS	+= $(RETHUNK_CFLAGS)
2862306a36Sopenharmony_ciendif
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ciexport RETHUNK_CFLAGS
3162306a36Sopenharmony_ciexport RETPOLINE_CFLAGS
3262306a36Sopenharmony_ciexport RETPOLINE_VDSO_CFLAGS
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci# For gcc stack alignment is specified with -mpreferred-stack-boundary,
3562306a36Sopenharmony_ci# clang has the option -mstack-alignment for that purpose.
3662306a36Sopenharmony_ciifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
3762306a36Sopenharmony_ci      cc_stack_align4 := -mpreferred-stack-boundary=2
3862306a36Sopenharmony_ci      cc_stack_align8 := -mpreferred-stack-boundary=3
3962306a36Sopenharmony_cielse ifneq ($(call cc-option, -mstack-alignment=16),)
4062306a36Sopenharmony_ci      cc_stack_align4 := -mstack-alignment=4
4162306a36Sopenharmony_ci      cc_stack_align8 := -mstack-alignment=8
4262306a36Sopenharmony_ciendif
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci# How to compile the 16-bit code.  Note we always compile for -march=i386;
4562306a36Sopenharmony_ci# that way we can complain to the user if the CPU is insufficient.
4662306a36Sopenharmony_ciREALMODE_CFLAGS	:= -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
4762306a36Sopenharmony_ci		   -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
4862306a36Sopenharmony_ci		   -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
4962306a36Sopenharmony_ci		   -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciREALMODE_CFLAGS += -ffreestanding
5262306a36Sopenharmony_ciREALMODE_CFLAGS += -fno-stack-protector
5362306a36Sopenharmony_ciREALMODE_CFLAGS += -Wno-address-of-packed-member
5462306a36Sopenharmony_ciREALMODE_CFLAGS += $(cc_stack_align4)
5562306a36Sopenharmony_ciREALMODE_CFLAGS += $(CLANG_FLAGS)
5662306a36Sopenharmony_ciexport REALMODE_CFLAGS
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci# BITS is used as extension for files which are available in a 32 bit
5962306a36Sopenharmony_ci# and a 64 bit version to simplify shared Makefiles.
6062306a36Sopenharmony_ci# e.g.: obj-y += foo_$(BITS).o
6162306a36Sopenharmony_ciexport BITS
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci#
6462306a36Sopenharmony_ci# Prevent GCC from generating any FP code by mistake.
6562306a36Sopenharmony_ci#
6662306a36Sopenharmony_ci# This must happen before we try the -mpreferred-stack-boundary, see:
6762306a36Sopenharmony_ci#
6862306a36Sopenharmony_ci#    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
6962306a36Sopenharmony_ci#
7062306a36Sopenharmony_ciKBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx
7162306a36Sopenharmony_ciKBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ciifeq ($(CONFIG_X86_KERNEL_IBT),y)
7462306a36Sopenharmony_ci#
7562306a36Sopenharmony_ci# Kernel IBT has S_CET.NOTRACK_EN=0, as such the compilers must not generate
7662306a36Sopenharmony_ci# NOTRACK prefixes. Current generation compilers unconditionally employ NOTRACK
7762306a36Sopenharmony_ci# for jump-tables, as such, disable jump-tables for now.
7862306a36Sopenharmony_ci#
7962306a36Sopenharmony_ci# (jump-tables are implicitly disabled by RETPOLINE)
8062306a36Sopenharmony_ci#
8162306a36Sopenharmony_ci#   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816
8262306a36Sopenharmony_ci#
8362306a36Sopenharmony_ciKBUILD_CFLAGS += $(call cc-option,-fcf-protection=branch -fno-jump-tables)
8462306a36Sopenharmony_cielse
8562306a36Sopenharmony_ciKBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
8662306a36Sopenharmony_ciendif
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ciifeq ($(CONFIG_X86_32),y)
8962306a36Sopenharmony_ci        BITS := 32
9062306a36Sopenharmony_ci        UTS_MACHINE := i386
9162306a36Sopenharmony_ci        CHECKFLAGS += -D__i386__
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci        KBUILD_AFLAGS += -m32
9462306a36Sopenharmony_ci        KBUILD_CFLAGS += -m32
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ci        KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci        # Never want PIC in a 32-bit kernel, prevent breakage with GCC built
9962306a36Sopenharmony_ci        # with nonstandard options
10062306a36Sopenharmony_ci        KBUILD_CFLAGS += -fno-pic
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci        # Align the stack to the register width instead of using the default
10362306a36Sopenharmony_ci        # alignment of 16 bytes. This reduces stack usage and the number of
10462306a36Sopenharmony_ci        # alignment instructions.
10562306a36Sopenharmony_ci        KBUILD_CFLAGS += $(cc_stack_align4)
10662306a36Sopenharmony_ci
10762306a36Sopenharmony_ci        # CPU-specific tuning. Anything which can be shared with UML should go here.
10862306a36Sopenharmony_ci        include $(srctree)/arch/x86/Makefile_32.cpu
10962306a36Sopenharmony_ci        KBUILD_CFLAGS += $(cflags-y)
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ci        # temporary until string.h is fixed
11262306a36Sopenharmony_ci        KBUILD_CFLAGS += -ffreestanding
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci	ifeq ($(CONFIG_STACKPROTECTOR),y)
11562306a36Sopenharmony_ci		ifeq ($(CONFIG_SMP),y)
11662306a36Sopenharmony_ci			KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
11762306a36Sopenharmony_ci		else
11862306a36Sopenharmony_ci			KBUILD_CFLAGS += -mstack-protector-guard=global
11962306a36Sopenharmony_ci		endif
12062306a36Sopenharmony_ci	endif
12162306a36Sopenharmony_cielse
12262306a36Sopenharmony_ci        BITS := 64
12362306a36Sopenharmony_ci        UTS_MACHINE := x86_64
12462306a36Sopenharmony_ci        CHECKFLAGS += -D__x86_64__
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci        KBUILD_AFLAGS += -m64
12762306a36Sopenharmony_ci        KBUILD_CFLAGS += -m64
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci        # Align jump targets to 1 byte, not the default 16 bytes:
13062306a36Sopenharmony_ci        KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1)
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ci        # Pack loops tightly as well:
13362306a36Sopenharmony_ci        KBUILD_CFLAGS += $(call cc-option,-falign-loops=1)
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ci        # Don't autogenerate traditional x87 instructions
13662306a36Sopenharmony_ci        KBUILD_CFLAGS += -mno-80387
13762306a36Sopenharmony_ci        KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci        # By default gcc and clang use a stack alignment of 16 bytes for x86.
14062306a36Sopenharmony_ci        # However the standard kernel entry on x86-64 leaves the stack on an
14162306a36Sopenharmony_ci        # 8-byte boundary. If the compiler isn't informed about the actual
14262306a36Sopenharmony_ci        # alignment it will generate extra alignment instructions for the
14362306a36Sopenharmony_ci        # default alignment which keep the stack *mis*aligned.
14462306a36Sopenharmony_ci        # Furthermore an alignment to the register width reduces stack usage
14562306a36Sopenharmony_ci        # and the number of alignment instructions.
14662306a36Sopenharmony_ci        KBUILD_CFLAGS += $(cc_stack_align8)
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ci	# Use -mskip-rax-setup if supported.
14962306a36Sopenharmony_ci	KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ci        # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
15262306a36Sopenharmony_ci        cflags-$(CONFIG_MK8)		+= -march=k8
15362306a36Sopenharmony_ci        cflags-$(CONFIG_MPSC)		+= -march=nocona
15462306a36Sopenharmony_ci        cflags-$(CONFIG_MCORE2)		+= -march=core2
15562306a36Sopenharmony_ci        cflags-$(CONFIG_MATOM)		+= -march=atom
15662306a36Sopenharmony_ci        cflags-$(CONFIG_GENERIC_CPU)	+= -mtune=generic
15762306a36Sopenharmony_ci        KBUILD_CFLAGS += $(cflags-y)
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci        rustflags-$(CONFIG_MK8)		+= -Ctarget-cpu=k8
16062306a36Sopenharmony_ci        rustflags-$(CONFIG_MPSC)	+= -Ctarget-cpu=nocona
16162306a36Sopenharmony_ci        rustflags-$(CONFIG_MCORE2)	+= -Ctarget-cpu=core2
16262306a36Sopenharmony_ci        rustflags-$(CONFIG_MATOM)	+= -Ctarget-cpu=atom
16362306a36Sopenharmony_ci        rustflags-$(CONFIG_GENERIC_CPU)	+= -Ztune-cpu=generic
16462306a36Sopenharmony_ci        KBUILD_RUSTFLAGS += $(rustflags-y)
16562306a36Sopenharmony_ci
16662306a36Sopenharmony_ci        KBUILD_CFLAGS += -mno-red-zone
16762306a36Sopenharmony_ci        KBUILD_CFLAGS += -mcmodel=kernel
16862306a36Sopenharmony_ci        KBUILD_RUSTFLAGS += -Cno-redzone=y
16962306a36Sopenharmony_ci        KBUILD_RUSTFLAGS += -Ccode-model=kernel
17062306a36Sopenharmony_ciendif
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ci#
17362306a36Sopenharmony_ci# If the function graph tracer is used with mcount instead of fentry,
17462306a36Sopenharmony_ci# '-maccumulate-outgoing-args' is needed to prevent a GCC bug
17562306a36Sopenharmony_ci# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109)
17662306a36Sopenharmony_ci#
17762306a36Sopenharmony_ciifdef CONFIG_FUNCTION_GRAPH_TRACER
17862306a36Sopenharmony_ci  ifndef CONFIG_HAVE_FENTRY
17962306a36Sopenharmony_ci	ACCUMULATE_OUTGOING_ARGS := 1
18062306a36Sopenharmony_ci  endif
18162306a36Sopenharmony_ciendif
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ciifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
18462306a36Sopenharmony_ci	# This compiler flag is not supported by Clang:
18562306a36Sopenharmony_ci	KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
18662306a36Sopenharmony_ciendif
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ci# Workaround for a gcc prelease that unfortunately was shipped in a suse release
18962306a36Sopenharmony_ciKBUILD_CFLAGS += -Wno-sign-compare
19062306a36Sopenharmony_ci#
19162306a36Sopenharmony_ciKBUILD_CFLAGS += -fno-asynchronous-unwind-tables
19262306a36Sopenharmony_ci
19362306a36Sopenharmony_ci# Avoid indirect branches in kernel to deal with Spectre
19462306a36Sopenharmony_ciifdef CONFIG_RETPOLINE
19562306a36Sopenharmony_ci  KBUILD_CFLAGS += $(RETPOLINE_CFLAGS)
19662306a36Sopenharmony_ci  # Additionally, avoid generating expensive indirect jumps which
19762306a36Sopenharmony_ci  # are subject to retpolines for small number of switch cases.
19862306a36Sopenharmony_ci  # clang turns off jump table generation by default when under
19962306a36Sopenharmony_ci  # retpoline builds, however, gcc does not for x86. This has
20062306a36Sopenharmony_ci  # only been fixed starting from gcc stable version 8.4.0 and
20162306a36Sopenharmony_ci  # onwards, but not for older ones. See gcc bug #86952.
20262306a36Sopenharmony_ci  ifndef CONFIG_CC_IS_CLANG
20362306a36Sopenharmony_ci    KBUILD_CFLAGS += -fno-jump-tables
20462306a36Sopenharmony_ci  endif
20562306a36Sopenharmony_ciendif
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ciifdef CONFIG_SLS
20862306a36Sopenharmony_ci  KBUILD_CFLAGS += -mharden-sls=all
20962306a36Sopenharmony_ciendif
21062306a36Sopenharmony_ci
21162306a36Sopenharmony_ciifdef CONFIG_CALL_PADDING
21262306a36Sopenharmony_ciPADDING_CFLAGS := -fpatchable-function-entry=$(CONFIG_FUNCTION_PADDING_BYTES),$(CONFIG_FUNCTION_PADDING_BYTES)
21362306a36Sopenharmony_ciKBUILD_CFLAGS += $(PADDING_CFLAGS)
21462306a36Sopenharmony_ciexport PADDING_CFLAGS
21562306a36Sopenharmony_ciendif
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_ciKBUILD_LDFLAGS += -m elf_$(UTS_MACHINE)
21862306a36Sopenharmony_ci
21962306a36Sopenharmony_ciifdef CONFIG_LTO_CLANG
22062306a36Sopenharmony_ciifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 130000),y)
22162306a36Sopenharmony_ciKBUILD_LDFLAGS	+= -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8)
22262306a36Sopenharmony_ciendif
22362306a36Sopenharmony_ciendif
22462306a36Sopenharmony_ci
22562306a36Sopenharmony_ciifdef CONFIG_X86_NEED_RELOCS
22662306a36Sopenharmony_ciLDFLAGS_vmlinux := --emit-relocs --discard-none
22762306a36Sopenharmony_cielse
22862306a36Sopenharmony_ciLDFLAGS_vmlinux :=
22962306a36Sopenharmony_ciendif
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ci#
23262306a36Sopenharmony_ci# The 64-bit kernel must be aligned to 2MB.  Pass -z max-page-size=0x200000 to
23362306a36Sopenharmony_ci# the linker to force 2MB page size regardless of the default page size used
23462306a36Sopenharmony_ci# by the linker.
23562306a36Sopenharmony_ci#
23662306a36Sopenharmony_ciifdef CONFIG_X86_64
23762306a36Sopenharmony_ciLDFLAGS_vmlinux += -z max-page-size=0x200000
23862306a36Sopenharmony_ciendif
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ci
24162306a36Sopenharmony_ciarchscripts: scripts_basic
24262306a36Sopenharmony_ci	$(Q)$(MAKE) $(build)=arch/x86/tools relocs
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci###
24562306a36Sopenharmony_ci# Syscall table generation
24662306a36Sopenharmony_ci
24762306a36Sopenharmony_ciarchheaders:
24862306a36Sopenharmony_ci	$(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all
24962306a36Sopenharmony_ci
25062306a36Sopenharmony_ci###
25162306a36Sopenharmony_ci# Kernel objects
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_cilibs-y  += arch/x86/lib/
25462306a36Sopenharmony_ci
25562306a36Sopenharmony_ci# drivers-y are linked after core-y
25662306a36Sopenharmony_cidrivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
25762306a36Sopenharmony_cidrivers-$(CONFIG_PCI)            += arch/x86/pci/
25862306a36Sopenharmony_ci
25962306a36Sopenharmony_ci# suspend and hibernation support
26062306a36Sopenharmony_cidrivers-$(CONFIG_PM) += arch/x86/power/
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_cidrivers-$(CONFIG_FB_CORE) += arch/x86/video/
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci####
26562306a36Sopenharmony_ci# boot loader support. Several targets are kept for legacy purposes
26662306a36Sopenharmony_ci
26762306a36Sopenharmony_ciboot := arch/x86/boot
26862306a36Sopenharmony_ci
26962306a36Sopenharmony_ciBOOT_TARGETS = bzdisk fdimage fdimage144 fdimage288 hdimage isoimage
27062306a36Sopenharmony_ci
27162306a36Sopenharmony_ciPHONY += bzImage $(BOOT_TARGETS)
27262306a36Sopenharmony_ci
27362306a36Sopenharmony_ci# Default kernel to build
27462306a36Sopenharmony_ciall: bzImage
27562306a36Sopenharmony_ci
27662306a36Sopenharmony_ci# KBUILD_IMAGE specify target image being built
27762306a36Sopenharmony_ciKBUILD_IMAGE := $(boot)/bzImage
27862306a36Sopenharmony_ci
27962306a36Sopenharmony_cibzImage: vmlinux
28062306a36Sopenharmony_ciifeq ($(CONFIG_X86_DECODER_SELFTEST),y)
28162306a36Sopenharmony_ci	$(Q)$(MAKE) $(build)=arch/x86/tools posttest
28262306a36Sopenharmony_ciendif
28362306a36Sopenharmony_ci	$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
28462306a36Sopenharmony_ci	$(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot
28562306a36Sopenharmony_ci	$(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@
28662306a36Sopenharmony_ci
28762306a36Sopenharmony_ci$(BOOT_TARGETS): vmlinux
28862306a36Sopenharmony_ci	$(Q)$(MAKE) $(build)=$(boot) $@
28962306a36Sopenharmony_ci
29062306a36Sopenharmony_ciPHONY += install
29162306a36Sopenharmony_ciinstall:
29262306a36Sopenharmony_ci	$(call cmd,install)
29362306a36Sopenharmony_ci
29462306a36Sopenharmony_ciPHONY += vdso_install
29562306a36Sopenharmony_civdso_install:
29662306a36Sopenharmony_ci	$(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_ciarchprepare: checkbin
29962306a36Sopenharmony_cicheckbin:
30062306a36Sopenharmony_ciifdef CONFIG_RETPOLINE
30162306a36Sopenharmony_ciifeq ($(RETPOLINE_CFLAGS),)
30262306a36Sopenharmony_ci	@echo "You are building kernel with non-retpoline compiler." >&2
30362306a36Sopenharmony_ci	@echo "Please update your compiler." >&2
30462306a36Sopenharmony_ci	@false
30562306a36Sopenharmony_ciendif
30662306a36Sopenharmony_ciendif
30762306a36Sopenharmony_ci
30862306a36Sopenharmony_ciifdef CONFIG_UNWINDER_ORC
30962306a36Sopenharmony_ciorc_hash_h := arch/$(SRCARCH)/include/generated/asm/orc_hash.h
31062306a36Sopenharmony_ciorc_hash_sh := $(srctree)/scripts/orc_hash.sh
31162306a36Sopenharmony_citargets += $(orc_hash_h)
31262306a36Sopenharmony_ciquiet_cmd_orc_hash = GEN     $@
31362306a36Sopenharmony_ci      cmd_orc_hash = mkdir -p $(dir $@); \
31462306a36Sopenharmony_ci		     $(CONFIG_SHELL) $(orc_hash_sh) < $< > $@
31562306a36Sopenharmony_ci$(orc_hash_h): $(srctree)/arch/x86/include/asm/orc_types.h $(orc_hash_sh) FORCE
31662306a36Sopenharmony_ci	$(call if_changed,orc_hash)
31762306a36Sopenharmony_ciarchprepare: $(orc_hash_h)
31862306a36Sopenharmony_ciendif
31962306a36Sopenharmony_ci
32062306a36Sopenharmony_ciarchclean:
32162306a36Sopenharmony_ci	$(Q)rm -rf $(objtree)/arch/i386
32262306a36Sopenharmony_ci	$(Q)rm -rf $(objtree)/arch/x86_64
32362306a36Sopenharmony_ci
32462306a36Sopenharmony_cidefine archhelp
32562306a36Sopenharmony_ci  echo  '* bzImage		- Compressed kernel image (arch/x86/boot/bzImage)'
32662306a36Sopenharmony_ci  echo  '  install		- Install kernel using (your) ~/bin/$(INSTALLKERNEL) or'
32762306a36Sopenharmony_ci  echo  '			  (distribution) /sbin/$(INSTALLKERNEL) or install to '
32862306a36Sopenharmony_ci  echo  '			  $$(INSTALL_PATH) and run lilo'
32962306a36Sopenharmony_ci  echo  ''
33062306a36Sopenharmony_ci  echo  '  fdimage		- Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
33162306a36Sopenharmony_ci  echo  '  fdimage144		- Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
33262306a36Sopenharmony_ci  echo  '  fdimage288		- Create 2.8MB boot floppy image (arch/x86/boot/fdimage)'
33362306a36Sopenharmony_ci  echo  '  hdimage		- Create a BIOS/EFI hard disk image (arch/x86/boot/hdimage)'
33462306a36Sopenharmony_ci  echo  '  isoimage		- Create a boot CD-ROM image (arch/x86/boot/image.iso)'
33562306a36Sopenharmony_ci  echo  '			  bzdisk/fdimage*/hdimage/isoimage also accept:'
33662306a36Sopenharmony_ci  echo  '			  FDARGS="..."  arguments for the booted kernel'
33762306a36Sopenharmony_ci  echo  '			  FDINITRD=file initrd for the booted kernel'
33862306a36Sopenharmony_ci
33962306a36Sopenharmony_ciendef
340