aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/realmode/rm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-05-09 17:53:01 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2012-05-09 17:53:01 -0400
commit0f6f11eb00830fa691c16084048f53d83c5c3a5d (patch)
tree19535a71004aa09347bdb693d84e34e0badf59da /arch/x86/realmode/rm
parentc5403aed044e23f8d1ecdf05d0ff120314186527 (diff)
x86, realmode: Make sure all generated files are listed in targets
Kbuild expects all generated files to be listed in the targets variable. If it isn't, weird things happen. Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/1336595106-21135-1-git-send-email-jarkko.sakkinen@intel.com
Diffstat (limited to 'arch/x86/realmode/rm')
-rw-r--r--arch/x86/realmode/rm/Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile
index 1c1d3d3bbee4..5b84a2d30888 100644
--- a/arch/x86/realmode/rm/Makefile
+++ b/arch/x86/realmode/rm/Makefile
@@ -7,13 +7,7 @@
7# 7#
8# 8#
9 9
10always := realmode.bin 10always := realmode.bin realmode.relocs
11
12realmode-y += header.o
13realmode-y += trampoline_$(BITS).o
14realmode-y += stack.o
15realmode-$(CONFIG_X86_32) += reboot_32.o
16realmode-$(CONFIG_ACPI_SLEEP) += $(wakeup-objs)
17 11
18wakeup-objs := wakeup_asm.o wakemain.o video-mode.o 12wakeup-objs := wakeup_asm.o wakemain.o video-mode.o
19wakeup-objs += copy.o bioscall.o regs.o 13wakeup-objs += copy.o bioscall.o regs.o
@@ -25,6 +19,12 @@ wakeup-objs += video-vga.o
25wakeup-objs += video-vesa.o 19wakeup-objs += video-vesa.o
26wakeup-objs += video-bios.o 20wakeup-objs += video-bios.o
27 21
22realmode-y += header.o
23realmode-y += trampoline_$(BITS).o
24realmode-y += stack.o
25realmode-$(CONFIG_X86_32) += reboot_32.o
26realmode-$(CONFIG_ACPI_SLEEP) += $(wakeup-objs)
27
28targets += $(realmode-y) 28targets += $(realmode-y)
29 29
30REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y)) 30REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))
@@ -35,24 +35,30 @@ quiet_cmd_pasyms = PASYMS $@
35 cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \ 35 cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \
36 sed $(sed-pasyms) | sort | uniq > $@ 36 sed $(sed-pasyms) | sort | uniq > $@
37 37
38targets += pasyms.h
38$(obj)/pasyms.h: $(REALMODE_OBJS) FORCE 39$(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
39 $(call if_changed,pasyms) 40 $(call if_changed,pasyms)
40 41
42targets += realmode.lds
41$(obj)/realmode.lds: $(obj)/pasyms.h 43$(obj)/realmode.lds: $(obj)/pasyms.h
42 44
43LDFLAGS_realmode.elf := --emit-relocs -T 45LDFLAGS_realmode.elf := --emit-relocs -T
44CPPFLAGS_realmode.lds += -P -C -I$(obj) 46CPPFLAGS_realmode.lds += -P -C -I$(obj)
45 47
48targets += realmode.elf
46$(obj)/realmode.elf: $(obj)/realmode.lds $(REALMODE_OBJS) FORCE 49$(obj)/realmode.elf: $(obj)/realmode.lds $(REALMODE_OBJS) FORCE
47 $(call if_changed,ld) 50 $(call if_changed,ld)
48 51
49OBJCOPYFLAGS_realmode.bin := -O binary 52OBJCOPYFLAGS_realmode.bin := -O binary
50 53
54targets += realmode.bin
51$(obj)/realmode.bin: $(obj)/realmode.elf $(obj)/realmode.relocs 55$(obj)/realmode.bin: $(obj)/realmode.elf $(obj)/realmode.relocs
52 $(call if_changed,objcopy) 56 $(call if_changed,objcopy)
53 57
54quiet_cmd_relocs = RELOCS $@ 58quiet_cmd_relocs = RELOCS $@
55 cmd_relocs = arch/x86/tools/relocs --realmode $< > $@ 59 cmd_relocs = arch/x86/tools/relocs --realmode $< > $@
60
61targets += realmode.relocs
56$(obj)/realmode.relocs: $(obj)/realmode.elf FORCE 62$(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
57 $(call if_changed,relocs) 63 $(call if_changed,relocs)
58 64