diff options
Diffstat (limited to 'arch/x86/boot/Makefile')
-rw-r--r-- | arch/x86/boot/Makefile | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 6633b6e7505a..8d16ada25048 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -26,9 +26,10 @@ targets := vmlinux.bin setup.bin setup.elf bzImage | |||
26 | targets += fdimage fdimage144 fdimage288 image.iso mtools.conf | 26 | targets += fdimage fdimage144 fdimage288 image.iso mtools.conf |
27 | subdir- := compressed | 27 | subdir- := compressed |
28 | 28 | ||
29 | setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o | 29 | setup-y += a20.o bioscall.o cmdline.o copy.o cpu.o cpucheck.o edd.o |
30 | setup-y += header.o main.o mca.o memory.o pm.o pmjump.o | 30 | setup-y += header.o main.o mca.o memory.o pm.o pmjump.o |
31 | setup-y += printf.o string.o tty.o video.o video-mode.o version.o | 31 | setup-y += printf.o regs.o string.o tty.o video.o video-mode.o |
32 | setup-y += version.o | ||
32 | setup-$(CONFIG_X86_APM_BOOT) += apm.o | 33 | setup-$(CONFIG_X86_APM_BOOT) += apm.o |
33 | 34 | ||
34 | # The link order of the video-*.o modules can matter. In particular, | 35 | # The link order of the video-*.o modules can matter. In particular, |
@@ -86,19 +87,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE | |||
86 | 87 | ||
87 | SETUP_OBJS = $(addprefix $(obj)/,$(setup-y)) | 88 | SETUP_OBJS = $(addprefix $(obj)/,$(setup-y)) |
88 | 89 | ||
89 | sed-offsets := -e 's/^00*/0/' \ | 90 | 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 | 91 | ||
92 | quiet_cmd_offsets = OFFSETS $@ | 92 | quiet_cmd_voffset = VOFFSET $@ |
93 | cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@ | 93 | cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@ |
94 | 94 | ||
95 | $(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE | 95 | targets += voffset.h |
96 | $(call if_changed,offsets) | 96 | $(obj)/voffset.h: vmlinux FORCE |
97 | $(call if_changed,voffset) | ||
98 | |||
99 | sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(startup_32\|input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p' | ||
100 | |||
101 | quiet_cmd_zoffset = ZOFFSET $@ | ||
102 | cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@ | ||
103 | |||
104 | targets += zoffset.h | ||
105 | $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE | ||
106 | $(call if_changed,zoffset) | ||
97 | 107 | ||
98 | targets += offsets.h | ||
99 | 108 | ||
100 | AFLAGS_header.o += -I$(obj) | 109 | AFLAGS_header.o += -I$(obj) |
101 | $(obj)/header.o: $(obj)/offsets.h | 110 | $(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h |
102 | 111 | ||
103 | LDFLAGS_setup.elf := -T | 112 | LDFLAGS_setup.elf := -T |
104 | $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE | 113 | $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE |