diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2012-05-09 17:53:01 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-05-09 17:53:01 -0400 |
commit | 0f6f11eb00830fa691c16084048f53d83c5c3a5d (patch) | |
tree | 19535a71004aa09347bdb693d84e34e0badf59da /arch/x86/realmode/rm | |
parent | c5403aed044e23f8d1ecdf05d0ff120314186527 (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/Makefile | 20 |
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 | ||
10 | always := realmode.bin | 10 | always := realmode.bin realmode.relocs |
11 | |||
12 | realmode-y += header.o | ||
13 | realmode-y += trampoline_$(BITS).o | ||
14 | realmode-y += stack.o | ||
15 | realmode-$(CONFIG_X86_32) += reboot_32.o | ||
16 | realmode-$(CONFIG_ACPI_SLEEP) += $(wakeup-objs) | ||
17 | 11 | ||
18 | wakeup-objs := wakeup_asm.o wakemain.o video-mode.o | 12 | wakeup-objs := wakeup_asm.o wakemain.o video-mode.o |
19 | wakeup-objs += copy.o bioscall.o regs.o | 13 | wakeup-objs += copy.o bioscall.o regs.o |
@@ -25,6 +19,12 @@ wakeup-objs += video-vga.o | |||
25 | wakeup-objs += video-vesa.o | 19 | wakeup-objs += video-vesa.o |
26 | wakeup-objs += video-bios.o | 20 | wakeup-objs += video-bios.o |
27 | 21 | ||
22 | realmode-y += header.o | ||
23 | realmode-y += trampoline_$(BITS).o | ||
24 | realmode-y += stack.o | ||
25 | realmode-$(CONFIG_X86_32) += reboot_32.o | ||
26 | realmode-$(CONFIG_ACPI_SLEEP) += $(wakeup-objs) | ||
27 | |||
28 | targets += $(realmode-y) | 28 | targets += $(realmode-y) |
29 | 29 | ||
30 | REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y)) | 30 | REALMODE_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 | ||
38 | targets += 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 | ||
42 | targets += realmode.lds | ||
41 | $(obj)/realmode.lds: $(obj)/pasyms.h | 43 | $(obj)/realmode.lds: $(obj)/pasyms.h |
42 | 44 | ||
43 | LDFLAGS_realmode.elf := --emit-relocs -T | 45 | LDFLAGS_realmode.elf := --emit-relocs -T |
44 | CPPFLAGS_realmode.lds += -P -C -I$(obj) | 46 | CPPFLAGS_realmode.lds += -P -C -I$(obj) |
45 | 47 | ||
48 | targets += 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 | ||
49 | OBJCOPYFLAGS_realmode.bin := -O binary | 52 | OBJCOPYFLAGS_realmode.bin := -O binary |
50 | 53 | ||
54 | targets += 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 | ||
54 | quiet_cmd_relocs = RELOCS $@ | 58 | quiet_cmd_relocs = RELOCS $@ |
55 | cmd_relocs = arch/x86/tools/relocs --realmode $< > $@ | 59 | cmd_relocs = arch/x86/tools/relocs --realmode $< > $@ |
60 | |||
61 | targets += 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 | ||