diff options
Diffstat (limited to 'arch/x86/boot/Makefile')
-rw-r--r-- | arch/x86/boot/Makefile | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 6633b6e7505a..619d297aa2ba 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -86,19 +86,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE | |||
86 | 86 | ||
87 | SETUP_OBJS = $(addprefix $(obj)/,$(setup-y)) | 87 | SETUP_OBJS = $(addprefix $(obj)/,$(setup-y)) |
88 | 88 | ||
89 | sed-offsets := -e 's/^00*/0/' \ | 89 | sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p' |
90 | -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p' | ||
91 | 90 | ||
92 | quiet_cmd_offsets = OFFSETS $@ | 91 | quiet_cmd_voffset = VOFFSET $@ |
93 | cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@ | 92 | cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@ |
94 | 93 | ||
95 | $(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE | 94 | targets += voffset.h |
96 | $(call if_changed,offsets) | 95 | $(obj)/voffset.h: vmlinux FORCE |
96 | $(call if_changed,voffset) | ||
97 | |||
98 | sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(startup_32\|input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p' | ||
99 | |||
100 | quiet_cmd_zoffset = ZOFFSET $@ | ||
101 | cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@ | ||
102 | |||
103 | targets += zoffset.h | ||
104 | $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE | ||
105 | $(call if_changed,zoffset) | ||
97 | 106 | ||
98 | targets += offsets.h | ||
99 | 107 | ||
100 | AFLAGS_header.o += -I$(obj) | 108 | AFLAGS_header.o += -I$(obj) |
101 | $(obj)/header.o: $(obj)/offsets.h | 109 | $(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h |
102 | 110 | ||
103 | LDFLAGS_setup.elf := -T | 111 | LDFLAGS_setup.elf := -T |
104 | $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE | 112 | $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE |