Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / arch / x86 / realmode / rm / Makefile
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 #
9 KASAN_SANITIZE := n
10
11 always := realmode.bin realmode.relocs
12
13 wakeup-objs     := wakeup_asm.o wakemain.o video-mode.o
14 wakeup-objs     += copy.o bioscall.o regs.o
15 # The link order of the video-*.o modules can matter.  In particular,
16 # video-vga.o *must* be listed first, followed by video-vesa.o.
17 # Hardware-specific drivers should follow in the order they should be
18 # probed, and video-bios.o should typically be last.
19 wakeup-objs     += video-vga.o
20 wakeup-objs     += video-vesa.o
21 wakeup-objs     += video-bios.o
22
23 realmode-y                      += header.o
24 realmode-y                      += trampoline_$(BITS).o
25 realmode-y                      += stack.o
26 realmode-y                      += reboot.o
27 realmode-$(CONFIG_ACPI_SLEEP)   += $(wakeup-objs)
28
29 targets += $(realmode-y)
30
31 REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))
32
33 sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p'
34
35 quiet_cmd_pasyms = PASYMS  $@
36       cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \
37                    sed $(sed-pasyms) | sort | uniq > $@
38
39 targets += pasyms.h
40 $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
41         $(call if_changed,pasyms)
42
43 targets += realmode.lds
44 $(obj)/realmode.lds: $(obj)/pasyms.h
45
46 LDFLAGS_realmode.elf := --emit-relocs -T
47 CPPFLAGS_realmode.lds += -P -C -I$(obj)
48
49 targets += realmode.elf
50 $(obj)/realmode.elf: $(obj)/realmode.lds $(REALMODE_OBJS) FORCE
51         $(call if_changed,ld)
52
53 OBJCOPYFLAGS_realmode.bin := -O binary
54
55 targets += realmode.bin
56 $(obj)/realmode.bin: $(obj)/realmode.elf $(obj)/realmode.relocs FORCE
57         $(call if_changed,objcopy)
58         @:
59
60 quiet_cmd_relocs = RELOCS  $@
61       cmd_relocs = arch/x86/tools/relocs --realmode $< > $@
62
63 targets += realmode.relocs
64 $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
65         $(call if_changed,relocs)
66
67 # ---------------------------------------------------------------------------
68
69 KBUILD_CFLAGS   := $(LINUXINCLUDE) $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \
70                    -I$(srctree)/arch/x86/boot
71 KBUILD_AFLAGS   := $(KBUILD_CFLAGS) -D__ASSEMBLY__
72 GCOV_PROFILE := n