1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 274b469f2SSam Ravnborg# Unified Makefile for i386 and x86_64 374b469f2SSam Ravnborg 42266cfd5SSam Ravnborg# select defconfig based on actual architecture 5d746d647SSam Ravnborgifeq ($(ARCH),x86) 6f9bb7f6aSArnd Bergmann ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386) 7d746d647SSam Ravnborg KBUILD_DEFCONFIG := i386_defconfig 8f9bb7f6aSArnd Bergmann else 9f9bb7f6aSArnd Bergmann KBUILD_DEFCONFIG := x86_64_defconfig 10ffee0de4SDavid Woodhouse endif 11d746d647SSam Ravnborgelse 122266cfd5SSam Ravnborg KBUILD_DEFCONFIG := $(ARCH)_defconfig 13d746d647SSam Ravnborgendif 142266cfd5SSam Ravnborg 15b2f825bfSPeter Zijlstraifdef CONFIG_CC_IS_GCC 16b2f825bfSPeter ZijlstraRETPOLINE_CFLAGS := $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register) 17b2f825bfSPeter ZijlstraRETPOLINE_VDSO_CFLAGS := $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register) 18b2f825bfSPeter Zijlstraendif 19b2f825bfSPeter Zijlstraifdef CONFIG_CC_IS_CLANG 20b2f825bfSPeter ZijlstraRETPOLINE_CFLAGS := -mretpoline-external-thunk 21b2f825bfSPeter ZijlstraRETPOLINE_VDSO_CFLAGS := -mretpoline 22b2f825bfSPeter Zijlstraendif 2327b5de62SNathan ChancellorRETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix) 24f43b9876SPeter Zijlstra 25f43b9876SPeter Zijlstraifdef CONFIG_RETHUNK 26f43b9876SPeter ZijlstraRETHUNK_CFLAGS := -mfunction-return=thunk-extern 27f43b9876SPeter ZijlstraRETPOLINE_CFLAGS += $(RETHUNK_CFLAGS) 28f43b9876SPeter Zijlstraendif 29f43b9876SPeter Zijlstra 30efc72a66SJosh Poimboeufexport RETHUNK_CFLAGS 31b2f825bfSPeter Zijlstraexport RETPOLINE_CFLAGS 32b2f825bfSPeter Zijlstraexport RETPOLINE_VDSO_CFLAGS 33b2f825bfSPeter Zijlstra 34d77698dfSMatthias Kaehlcke# For gcc stack alignment is specified with -mpreferred-stack-boundary, 35d77698dfSMatthias Kaehlcke# clang has the option -mstack-alignment for that purpose. 36d77698dfSMatthias Kaehlckeifneq ($(call cc-option, -mpreferred-stack-boundary=4),) 378f918697SMatthias Kaehlcke cc_stack_align4 := -mpreferred-stack-boundary=2 388f918697SMatthias Kaehlcke cc_stack_align8 := -mpreferred-stack-boundary=3 398f918697SMatthias Kaehlckeelse ifneq ($(call cc-option, -mstack-alignment=16),) 408f918697SMatthias Kaehlcke cc_stack_align4 := -mstack-alignment=4 418f918697SMatthias Kaehlcke cc_stack_align8 := -mstack-alignment=8 42d77698dfSMatthias Kaehlckeendif 43d77698dfSMatthias Kaehlcke 441c678da3SDavid Woodhouse# How to compile the 16-bit code. Note we always compile for -march=i386; 451c678da3SDavid Woodhouse# that way we can complain to the user if the CPU is insufficient. 46156ff4a5SPeter ZijlstraREALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \ 471c678da3SDavid Woodhouse -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \ 481c678da3SDavid Woodhouse -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ 499fcb51c1SArnd Bergmann -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none) 50032a2c4fSMatthias Kaehlcke 51685969e0SMasahiro YamadaREALMODE_CFLAGS += -ffreestanding 52893ab004SMasahiro YamadaREALMODE_CFLAGS += -fno-stack-protector 53989ceac7SNick DesaulniersREALMODE_CFLAGS += -Wno-address-of-packed-member 54989ceac7SNick DesaulniersREALMODE_CFLAGS += $(cc_stack_align4) 558abe7fc2SJohn MillikinREALMODE_CFLAGS += $(CLANG_FLAGS) 561c678da3SDavid Woodhouseexport REALMODE_CFLAGS 571c678da3SDavid Woodhouse 580a6ef376SSam Ravnborg# BITS is used as extension for files which are available in a 32 bit 590a6ef376SSam Ravnborg# and a 64 bit version to simplify shared Makefiles. 600a6ef376SSam Ravnborg# e.g.: obj-y += foo_$(BITS).o 610a6ef376SSam Ravnborgexport BITS 6274b469f2SSam Ravnborg 63b2c51106SAndy Lutomirski# 64b2c51106SAndy Lutomirski# Prevent GCC from generating any FP code by mistake. 65b2c51106SAndy Lutomirski# 66b2c51106SAndy Lutomirski# This must happen before we try the -mpreferred-stack-boundary, see: 67b2c51106SAndy Lutomirski# 68b2c51106SAndy Lutomirski# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 69b2c51106SAndy Lutomirski# 70989ceac7SNick DesaulniersKBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx 7109498135SMiguel OjedaKBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 72b2c51106SAndy Lutomirski 73156ff4a5SPeter Zijlstraifeq ($(CONFIG_X86_KERNEL_IBT),y) 74156ff4a5SPeter Zijlstra# 75156ff4a5SPeter Zijlstra# Kernel IBT has S_CET.NOTRACK_EN=0, as such the compilers must not generate 76156ff4a5SPeter Zijlstra# NOTRACK prefixes. Current generation compilers unconditionally employ NOTRACK 77156ff4a5SPeter Zijlstra# for jump-tables, as such, disable jump-tables for now. 78156ff4a5SPeter Zijlstra# 79156ff4a5SPeter Zijlstra# (jump-tables are implicitly disabled by RETPOLINE) 80156ff4a5SPeter Zijlstra# 81156ff4a5SPeter Zijlstra# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816 82156ff4a5SPeter Zijlstra# 83156ff4a5SPeter ZijlstraKBUILD_CFLAGS += $(call cc-option,-fcf-protection=branch -fno-jump-tables) 84156ff4a5SPeter Zijlstraelse 85256b92afSBorislav PetkovKBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) 86156ff4a5SPeter Zijlstraendif 87256b92afSBorislav Petkov 88d746d647SSam Ravnborgifeq ($(CONFIG_X86_32),y) 890a6ef376SSam Ravnborg BITS := 32 908c6531f7SAndreas Herrmann UTS_MACHINE := i386 914ba7e5cdSSam Ravnborg CHECKFLAGS += -D__i386__ 920a6ef376SSam Ravnborg 93989ceac7SNick Desaulniers KBUILD_AFLAGS += -m32 94989ceac7SNick Desaulniers KBUILD_CFLAGS += -m32 950a6ef376SSam Ravnborg 960a6ef376SSam Ravnborg KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return 970a6ef376SSam Ravnborg 98484d90eeSAndrew Boie # Never want PIC in a 32-bit kernel, prevent breakage with GCC built 99484d90eeSAndrew Boie # with nonstandard options 100484d90eeSAndrew Boie KBUILD_CFLAGS += -fno-pic 101484d90eeSAndrew Boie 102d77698dfSMatthias Kaehlcke # Align the stack to the register width instead of using the default 103d77698dfSMatthias Kaehlcke # alignment of 16 bytes. This reduces stack usage and the number of 104d77698dfSMatthias Kaehlcke # alignment instructions. 105989ceac7SNick Desaulniers KBUILD_CFLAGS += $(cc_stack_align4) 1060a6ef376SSam Ravnborg 1070a6ef376SSam Ravnborg # CPU-specific tuning. Anything which can be shared with UML should go here. 108d8285639SMasahiro Yamada include $(srctree)/arch/x86/Makefile_32.cpu 1090a6ef376SSam Ravnborg KBUILD_CFLAGS += $(cflags-y) 1100a6ef376SSam Ravnborg 1110a6ef376SSam Ravnborg # temporary until string.h is fixed 1120a6ef376SSam Ravnborg KBUILD_CFLAGS += -ffreestanding 1133fb0fdb3SAndy Lutomirski 1143fb0fdb3SAndy Lutomirski ifeq ($(CONFIG_STACKPROTECTOR),y) 1153fb0fdb3SAndy Lutomirski ifeq ($(CONFIG_SMP),y) 116*9d0f1e74SArd Biesheuvel KBUILD_CFLAGS += -mstack-protector-guard-reg=fs \ 117*9d0f1e74SArd Biesheuvel -mstack-protector-guard-symbol=__ref_stack_chk_guard 1183fb0fdb3SAndy Lutomirski else 1193fb0fdb3SAndy Lutomirski KBUILD_CFLAGS += -mstack-protector-guard=global 1203fb0fdb3SAndy Lutomirski endif 1213fb0fdb3SAndy Lutomirski endif 1220a6ef376SSam Ravnborgelse 1230a6ef376SSam Ravnborg BITS := 64 1240a6ef376SSam Ravnborg UTS_MACHINE := x86_64 1251f2f01b1SLuc Van Oostenryck CHECKFLAGS += -D__x86_64__ 1260a6ef376SSam Ravnborg 1270a6ef376SSam Ravnborg KBUILD_AFLAGS += -m64 1280a6ef376SSam Ravnborg KBUILD_CFLAGS += -m64 1290a6ef376SSam Ravnborg 130be6cb027SIngo Molnar # Align jump targets to 1 byte, not the default 16 bytes: 1312c4fd1acSMatthias Kaehlcke KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1) 132be6cb027SIngo Molnar 13352648e83SIngo Molnar # Pack loops tightly as well: 1342c4fd1acSMatthias Kaehlcke KBUILD_CFLAGS += $(call cc-option,-falign-loops=1) 13552648e83SIngo Molnar 1365c630089SRasmus Villemoes # Don't autogenerate traditional x87 instructions 137989ceac7SNick Desaulniers KBUILD_CFLAGS += -mno-80387 1388f2dd677SBehan Webster KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387) 1395551a34eSH. Peter Anvin 140d77698dfSMatthias Kaehlcke # By default gcc and clang use a stack alignment of 16 bytes for x86. 141d77698dfSMatthias Kaehlcke # However the standard kernel entry on x86-64 leaves the stack on an 142d77698dfSMatthias Kaehlcke # 8-byte boundary. If the compiler isn't informed about the actual 143d77698dfSMatthias Kaehlcke # alignment it will generate extra alignment instructions for the 144d77698dfSMatthias Kaehlcke # default alignment which keep the stack *mis*aligned. 145d77698dfSMatthias Kaehlcke # Furthermore an alignment to the register width reduces stack usage 146d77698dfSMatthias Kaehlcke # and the number of alignment instructions. 147989ceac7SNick Desaulniers KBUILD_CFLAGS += $(cc_stack_align8) 148d9b0cde9SH.J. Lu 149d9ee948dSH.J. Lu # Use -mskip-rax-setup if supported. 150d9ee948dSH.J. Lu KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup) 151d9ee948dSH.J. Lu 1520a6ef376SSam Ravnborg # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) 153989ceac7SNick Desaulniers cflags-$(CONFIG_MK8) += -march=k8 154989ceac7SNick Desaulniers cflags-$(CONFIG_MPSC) += -march=nocona 155989ceac7SNick Desaulniers cflags-$(CONFIG_MCORE2) += -march=core2 156989ceac7SNick Desaulniers cflags-$(CONFIG_MATOM) += -march=atom 157989ceac7SNick Desaulniers cflags-$(CONFIG_GENERIC_CPU) += -mtune=generic 1580a6ef376SSam Ravnborg KBUILD_CFLAGS += $(cflags-y) 1590a6ef376SSam Ravnborg 16009498135SMiguel Ojeda rustflags-$(CONFIG_MK8) += -Ctarget-cpu=k8 16109498135SMiguel Ojeda rustflags-$(CONFIG_MPSC) += -Ctarget-cpu=nocona 16209498135SMiguel Ojeda rustflags-$(CONFIG_MCORE2) += -Ctarget-cpu=core2 16309498135SMiguel Ojeda rustflags-$(CONFIG_MATOM) += -Ctarget-cpu=atom 16409498135SMiguel Ojeda rustflags-$(CONFIG_GENERIC_CPU) += -Ztune-cpu=generic 16509498135SMiguel Ojeda KBUILD_RUSTFLAGS += $(rustflags-y) 16609498135SMiguel Ojeda 1670a6ef376SSam Ravnborg KBUILD_CFLAGS += -mno-red-zone 1680a6ef376SSam Ravnborg KBUILD_CFLAGS += -mcmodel=kernel 16909498135SMiguel Ojeda KBUILD_RUSTFLAGS += -Cno-redzone=y 17009498135SMiguel Ojeda KBUILD_RUSTFLAGS += -Ccode-model=kernel 1715d707e9cSTejun Heoendif 1720a6ef376SSam Ravnborg 1733f135e57SJosh Poimboeuf# 1743f135e57SJosh Poimboeuf# If the function graph tracer is used with mcount instead of fentry, 1753f135e57SJosh Poimboeuf# '-maccumulate-outgoing-args' is needed to prevent a GCC bug 1763f135e57SJosh Poimboeuf# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109) 1773f135e57SJosh Poimboeuf# 1783f135e57SJosh Poimboeufifdef CONFIG_FUNCTION_GRAPH_TRACER 1793f135e57SJosh Poimboeuf ifndef CONFIG_HAVE_FENTRY 1803f135e57SJosh Poimboeuf ACCUMULATE_OUTGOING_ARGS := 1 1813f135e57SJosh Poimboeuf endif 1823f135e57SJosh Poimboeufendif 1833f135e57SJosh Poimboeuf 1843f135e57SJosh Poimboeufifeq ($(ACCUMULATE_OUTGOING_ARGS), 1) 1854a1bec46SNick Desaulniers # This compiler flag is not supported by Clang: 1864a1bec46SNick Desaulniers KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,) 1873f135e57SJosh Poimboeufendif 1883f135e57SJosh Poimboeuf 18925dfeeb7SSam Ravnborg# Workaround for a gcc prelease that unfortunately was shipped in a suse release 19025dfeeb7SSam RavnborgKBUILD_CFLAGS += -Wno-sign-compare 19125dfeeb7SSam Ravnborg# 19225dfeeb7SSam RavnborgKBUILD_CFLAGS += -fno-asynchronous-unwind-tables 1930a6ef376SSam Ravnborg 19476b04384SDavid Woodhouse# Avoid indirect branches in kernel to deal with Spectre 19576b04384SDavid Woodhouseifdef CONFIG_RETPOLINE 1964cd24de3SZhenzhong Duan KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) 197ce02ef06SDaniel Borkmann # Additionally, avoid generating expensive indirect jumps which 198ce02ef06SDaniel Borkmann # are subject to retpolines for small number of switch cases. 199ce02ef06SDaniel Borkmann # clang turns off jump table generation by default when under 200a9d57ef1SDaniel Borkmann # retpoline builds, however, gcc does not for x86. This has 201a9d57ef1SDaniel Borkmann # only been fixed starting from gcc stable version 8.4.0 and 202a9d57ef1SDaniel Borkmann # onwards, but not for older ones. See gcc bug #86952. 203a9d57ef1SDaniel Borkmann ifndef CONFIG_CC_IS_CLANG 204989ceac7SNick Desaulniers KBUILD_CFLAGS += -fno-jump-tables 205a9d57ef1SDaniel Borkmann endif 20676b04384SDavid Woodhouseendif 20776b04384SDavid Woodhouse 208e463a09aSPeter Zijlstraifdef CONFIG_SLS 209e463a09aSPeter Zijlstra KBUILD_CFLAGS += -mharden-sls=all 210e463a09aSPeter Zijlstraendif 211e463a09aSPeter Zijlstra 212931ab636SPeter Zijlstraifdef CONFIG_CALL_PADDING 213bea75b33SThomas GleixnerPADDING_CFLAGS := -fpatchable-function-entry=$(CONFIG_FUNCTION_PADDING_BYTES),$(CONFIG_FUNCTION_PADDING_BYTES) 214bea75b33SThomas GleixnerKBUILD_CFLAGS += $(PADDING_CFLAGS) 215bea75b33SThomas Gleixnerexport PADDING_CFLAGS 216bea75b33SThomas Gleixnerendif 217bea75b33SThomas Gleixner 2180024430eSNathan ChancellorKBUILD_LDFLAGS += -m elf_$(UTS_MACHINE) 2190024430eSNathan Chancellor 2200024430eSNathan Chancellorifdef CONFIG_LTO_CLANG 221fccb3d3eSMasahiro Yamadaifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 130000),y) 2222398ce80STor VicKBUILD_LDFLAGS += -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8) 2232398ce80STor Vicendif 2240024430eSNathan Chancellorendif 225587af649SArvind Sankar 226587af649SArvind Sankarifdef CONFIG_X86_NEED_RELOCS 227587af649SArvind SankarLDFLAGS_vmlinux := --emit-relocs --discard-none 228587af649SArvind Sankarelse 229587af649SArvind SankarLDFLAGS_vmlinux := 230587af649SArvind Sankarendif 231587af649SArvind Sankar 232587af649SArvind Sankar# 233587af649SArvind Sankar# The 64-bit kernel must be aligned to 2MB. Pass -z max-page-size=0x200000 to 234587af649SArvind Sankar# the linker to force 2MB page size regardless of the default page size used 235587af649SArvind Sankar# by the linker. 236587af649SArvind Sankar# 237587af649SArvind Sankarifdef CONFIG_X86_64 238587af649SArvind SankarLDFLAGS_vmlinux += -z max-page-size=0x200000 239587af649SArvind Sankarendif 240587af649SArvind Sankar 24183109d5dSKees Cook 2423ce9e53eSMichal Marekarchscripts: scripts_basic 2436520fe55SH. Peter Anvin $(Q)$(MAKE) $(build)=arch/x86/tools relocs 2446520fe55SH. Peter Anvin 2450a6ef376SSam Ravnborg### 246303395acSH. Peter Anvin# Syscall table generation 247303395acSH. Peter Anvin 248303395acSH. Peter Anvinarchheaders: 2491f57d5d8SIngo Molnar $(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all 250303395acSH. Peter Anvin 251303395acSH. Peter Anvin### 2520a6ef376SSam Ravnborg# Kernel objects 2530a6ef376SSam Ravnborg 2540a6ef376SSam Ravnborglibs-y += arch/x86/lib/ 2550a6ef376SSam Ravnborg 2560a6ef376SSam Ravnborg# drivers-y are linked after core-y 2570a6ef376SSam Ravnborgdrivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/ 2580a6ef376SSam Ravnborgdrivers-$(CONFIG_PCI) += arch/x86/pci/ 2590a6ef376SSam Ravnborg 260cf7700feSRafael J. Wysocki# suspend and hibernation support 2610a6ef376SSam Ravnborgdrivers-$(CONFIG_PM) += arch/x86/power/ 262cf7700feSRafael J. Wysocki 26355bffc81SJavier Martinez Canillasdrivers-$(CONFIG_FB_CORE) += arch/x86/video/ 2640a6ef376SSam Ravnborg 2650a6ef376SSam Ravnborg#### 2660a6ef376SSam Ravnborg# boot loader support. Several targets are kept for legacy purposes 2670a6ef376SSam Ravnborg 2680a6ef376SSam Ravnborgboot := arch/x86/boot 2690a6ef376SSam Ravnborg 270f279b49fSH. Peter Anvin (Intel)BOOT_TARGETS = bzdisk fdimage fdimage144 fdimage288 hdimage isoimage 271f9c5107cSH. Peter Anvin 272f9c5107cSH. Peter AnvinPHONY += bzImage $(BOOT_TARGETS) 2730a6ef376SSam Ravnborg 2740a6ef376SSam Ravnborg# Default kernel to build 2750a6ef376SSam Ravnborgall: bzImage 2760a6ef376SSam Ravnborg 2770a6ef376SSam Ravnborg# KBUILD_IMAGE specify target image being built 2780a6ef376SSam RavnborgKBUILD_IMAGE := $(boot)/bzImage 2790a6ef376SSam Ravnborg 280f9c5107cSH. Peter AnvinbzImage: vmlinux 281ca0e9badSMasami Hiramatsuifeq ($(CONFIG_X86_DECODER_SELFTEST),y) 282ca0e9badSMasami Hiramatsu $(Q)$(MAKE) $(build)=arch/x86/tools posttest 283ca0e9badSMasami Hiramatsuendif 2840a6ef376SSam Ravnborg $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) 2850a6ef376SSam Ravnborg $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot 28641b3eae6SJan Beulich $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@ 2870a6ef376SSam Ravnborg 288f9c5107cSH. Peter Anvin$(BOOT_TARGETS): vmlinux 289f9c5107cSH. Peter Anvin $(Q)$(MAKE) $(build)=$(boot) $@ 2900a6ef376SSam Ravnborg 2916d61b8e6SMasahiro YamadaPHONY += install 2926d61b8e6SMasahiro Yamadainstall: 293f774f5bbSMasahiro Yamada $(call cmd,install) 2941648e4f8SH. Peter Anvin 295adacfc6dSMasahiro Yamadavdso-install-$(CONFIG_X86_64) += arch/x86/entry/vdso/vdso64.so.dbg 296adacfc6dSMasahiro Yamadavdso-install-$(CONFIG_X86_X32_ABI) += arch/x86/entry/vdso/vdsox32.so.dbg 297adacfc6dSMasahiro Yamadavdso-install-$(CONFIG_X86_32) += arch/x86/entry/vdso/vdso32.so.dbg 298adacfc6dSMasahiro Yamadavdso-install-$(CONFIG_IA32_EMULATION) += arch/x86/entry/vdso/vdso32.so.dbg 2990a6ef376SSam Ravnborg 300829fe4aaSBen Hutchingsarchprepare: checkbin 301829fe4aaSBen Hutchingscheckbin: 30225896d07SMasahiro Yamadaifdef CONFIG_RETPOLINE 30325896d07SMasahiro Yamadaifeq ($(RETPOLINE_CFLAGS),) 30425896d07SMasahiro Yamada @echo "You are building kernel with non-retpoline compiler." >&2 30525896d07SMasahiro Yamada @echo "Please update your compiler." >&2 30625896d07SMasahiro Yamada @false 30725896d07SMasahiro Yamadaendif 30825896d07SMasahiro Yamadaendif 309829fe4aaSBen Hutchings 310b9f174c8SOmar Sandovalifdef CONFIG_UNWINDER_ORC 311b9f174c8SOmar Sandovalorc_hash_h := arch/$(SRCARCH)/include/generated/asm/orc_hash.h 312b9f174c8SOmar Sandovalorc_hash_sh := $(srctree)/scripts/orc_hash.sh 313b9f174c8SOmar Sandovaltargets += $(orc_hash_h) 314b9f174c8SOmar Sandovalquiet_cmd_orc_hash = GEN $@ 315b9f174c8SOmar Sandoval cmd_orc_hash = mkdir -p $(dir $@); \ 316b9f174c8SOmar Sandoval $(CONFIG_SHELL) $(orc_hash_sh) < $< > $@ 317b9f174c8SOmar Sandoval$(orc_hash_h): $(srctree)/arch/x86/include/asm/orc_types.h $(orc_hash_sh) FORCE 318b9f174c8SOmar Sandoval $(call if_changed,orc_hash) 319b9f174c8SOmar Sandovalarchprepare: $(orc_hash_h) 320b9f174c8SOmar Sandovalendif 321b9f174c8SOmar Sandoval 3220a6ef376SSam Ravnborgarchclean: 3230a6ef376SSam Ravnborg $(Q)rm -rf $(objtree)/arch/i386 3240a6ef376SSam Ravnborg $(Q)rm -rf $(objtree)/arch/x86_64 3250a6ef376SSam Ravnborg 3260a6ef376SSam Ravnborgdefine archhelp 3270a6ef376SSam Ravnborg echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' 328ac5d0887SBorislav Petkov echo ' install - Install kernel using (your) ~/bin/$(INSTALLKERNEL) or' 329ac5d0887SBorislav Petkov echo ' (distribution) /sbin/$(INSTALLKERNEL) or install to ' 330ac5d0887SBorislav Petkov echo ' $$(INSTALL_PATH) and run lilo' 331ac5d0887SBorislav Petkov echo '' 33237f30e21SAndi Kleen echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 33337f30e21SAndi Kleen echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 33437f30e21SAndi Kleen echo ' fdimage288 - Create 2.8MB boot floppy image (arch/x86/boot/fdimage)' 335f279b49fSH. Peter Anvin (Intel) echo ' hdimage - Create a BIOS/EFI hard disk image (arch/x86/boot/hdimage)' 33637f30e21SAndi Kleen echo ' isoimage - Create a boot CD-ROM image (arch/x86/boot/image.iso)' 337f279b49fSH. Peter Anvin (Intel) echo ' bzdisk/fdimage*/hdimage/isoimage also accept:' 33837f30e21SAndi Kleen echo ' FDARGS="..." arguments for the booted kernel' 33937f30e21SAndi Kleen echo ' FDINITRD=file initrd for the booted kernel' 340fbaf0aa8SBorislav Petkov 3410a6ef376SSam Ravnborgendef 342