@@ -26,7 +26,7 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
2626# RAMDISK := -DRAMDISK=512
2727
2828targets := vmlinux.bin setup.bin setup.elf zImage bzImage
29- subdir- := compressed
29+ subdir- := compressed
3030
3131setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
3232setup-y += header.o main.o mca.o memory.o pm.o pmjump.o
@@ -43,9 +43,17 @@ setup-y += video-vesa.o
4343setup-y += video-bios.o
4444
4545targets += $(setup-y )
46- hostprogs-y := tools/build
46+ hostprogs-y := mkcpustr tools/build
4747
48- HOSTCFLAGS_build.o := $(LINUXINCLUDE )
48+ HOST_EXTRACFLAGS += $(LINUXINCLUDE )
49+
50+ $(obj ) /cpu.o : $(obj ) /cpustr.h
51+
52+ quiet_cmd_cpustr = CPUSTR $@
53+ cmd_cpustr = $(obj ) /mkcpustr > $@
54+ targets += cpustr.h
55+ $(obj ) /cpustr.h : $(obj ) /mkcpustr FORCE
56+ $(call if_changed,cpustr)
4957
5058# ---------------------------------------------------------------------------
5159
@@ -80,6 +88,7 @@ $(obj)/zImage $(obj)/bzImage: $(obj)/setup.bin \
8088 $(call if_changed,image)
8189 @echo ' Kernel: $@ is ready' ' (#' ` cat .version` ' )'
8290
91+ OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note -R .comment -S
8392$(obj ) /vmlinux.bin : $(obj ) /compressed/vmlinux FORCE
8493 $(call if_changed,objcopy)
8594
@@ -90,15 +99,14 @@ $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
9099 $(call if_changed,ld)
91100
92101OBJCOPYFLAGS_setup.bin := -O binary
93-
94102$(obj ) /setup.bin : $(obj ) /setup.elf FORCE
95103 $(call if_changed,objcopy)
96104
97105$(obj ) /compressed/vmlinux : FORCE
98106 $(Q )$(MAKE ) $(build ) =$(obj ) /compressed IMAGE_OFFSET=$(IMAGE_OFFSET ) $@
99107
100108# Set this if you want to pass append arguments to the zdisk/fdimage/isoimage kernel
101- FDARGS =
109+ FDARGS =
102110# Set this if you want an initrd included with the zdisk/fdimage/isoimage kernel
103111FDINITRD =
104112
0 commit comments