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