Merge branch 'linux-4.7' of git://github.com/skeggsb/linux into drm-fixes
[deliverable/linux.git] / arch / x86 / realmode / rm / Makefile
CommitLineData
b3266bd6
JS
1#
2# arch/x86/realmode/Makefile
3#
4# This file is subject to the terms and conditions of the GNU General Public
5# License. See the file "COPYING" in the main directory of this archive
6# for more details.
7#
8#
c0dd6716
JP
9KASAN_SANITIZE := n
10OBJECT_FILES_NON_STANDARD := y
b3266bd6 11
5c9a8750
DV
12# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
13KCOV_INSTRUMENT := n
14
0f6f11eb 15always := realmode.bin realmode.relocs
c4845474
JS
16
17wakeup-objs := wakeup_asm.o wakemain.o video-mode.o
18wakeup-objs += copy.o bioscall.o regs.o
19# The link order of the video-*.o modules can matter. In particular,
20# video-vga.o *must* be listed first, followed by video-vesa.o.
21# Hardware-specific drivers should follow in the order they should be
22# probed, and video-bios.o should typically be last.
23wakeup-objs += video-vga.o
24wakeup-objs += video-vesa.o
25wakeup-objs += video-bios.o
b3266bd6 26
0f6f11eb
PA
27realmode-y += header.o
28realmode-y += trampoline_$(BITS).o
29realmode-y += stack.o
65051397 30realmode-y += reboot.o
0f6f11eb
PA
31realmode-$(CONFIG_ACPI_SLEEP) += $(wakeup-objs)
32
b3266bd6
JS
33targets += $(realmode-y)
34
35REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))
36
37sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p'
38
39quiet_cmd_pasyms = PASYMS $@
40 cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \
41 sed $(sed-pasyms) | sort | uniq > $@
42
0f6f11eb 43targets += pasyms.h
b3266bd6
JS
44$(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
45 $(call if_changed,pasyms)
46
0f6f11eb 47targets += realmode.lds
b3266bd6
JS
48$(obj)/realmode.lds: $(obj)/pasyms.h
49
50LDFLAGS_realmode.elf := --emit-relocs -T
51CPPFLAGS_realmode.lds += -P -C -I$(obj)
52
0f6f11eb 53targets += realmode.elf
b3266bd6
JS
54$(obj)/realmode.elf: $(obj)/realmode.lds $(REALMODE_OBJS) FORCE
55 $(call if_changed,ld)
56
57OBJCOPYFLAGS_realmode.bin := -O binary
58
0f6f11eb 59targets += realmode.bin
a9358bc3 60$(obj)/realmode.bin: $(obj)/realmode.elf $(obj)/realmode.relocs FORCE
b3266bd6
JS
61 $(call if_changed,objcopy)
62
63quiet_cmd_relocs = RELOCS $@
f2604c14 64 cmd_relocs = arch/x86/tools/relocs --realmode $< > $@
0f6f11eb
PA
65
66targets += realmode.relocs
b3266bd6
JS
67$(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
68 $(call if_changed,relocs)
69
70# ---------------------------------------------------------------------------
71
1c678da3
DW
72KBUILD_CFLAGS := $(LINUXINCLUDE) $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \
73 -I$(srctree)/arch/x86/boot
b3266bd6
JS
74KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
75GCOV_PROFILE := n
c6d30853 76UBSAN_SANITIZE := n
This page took 0.265741 seconds and 5 git commands to generate.