Index: Makefile
===================================================================
--- Makefile	(revision c4e8ed9d860723e9a528a63a1c23c93516a1e0ba)
+++ Makefile	(revision 849ba5cb5ef4a54b549d2ea7b31a150dc6822678)
@@ -122,7 +122,7 @@
 GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES)))
 
-.PHONY: all clean config depend
+.PHONY: all clean config depend boot
 
-all: kernel.bin
+all: kernel.bin boot
 
 -include Makefile.depend
@@ -130,5 +130,6 @@
 clean:
 	find generic/src/ arch/$(ARCH)/src/ genarch/src/ -name '*.o' -exec rm \{\} \;
-	-rm -f kernel.bin kernel.map kernel.map.pre kernel.objdump src/debug/real_map.bin Makefile.depend generic/include/arch generic/include/genarch
+	-rm -f kernel.bin kernel.map kernel.map.pre kernel.objdump generic/src/debug/real_map.bin Makefile.depend generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld
+	$(MAKE) -C arch/$(ARCH)/boot clean
 
 config:
@@ -154,4 +155,7 @@
 	$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o -o $@ -Map kernel.map
 
+boot: kernel.bin
+	$(MAKE) -C arch/$(ARCH)/boot build KERNEL_SIZE="`cat kernel.bin | wc -c`"
+
 %.o: %.S
 	$(CC) $(ASFLAGS) $(CFLAGS) -c $< -o $@
Index: arch/ia32/boot/Makefile
===================================================================
--- arch/ia32/boot/Makefile	(revision c4e8ed9d860723e9a528a63a1c23c93516a1e0ba)
+++ arch/ia32/boot/Makefile	(revision 849ba5cb5ef4a54b549d2ea7b31a150dc6822678)
@@ -1,9 +1,7 @@
-.PHONY: nothing build clean
-
-nothing:
+.PHONY: build clean
 
 build: boot.bin
 	dd if=boot.bin of=../../../image.bin bs=512 conv=sync
-	-cat ../../../kernel.bin >>../../../image.bin
+	-cat ../../../kernel.bin >> ../../../image.bin
 	dd if=/dev/zero of=../../../image.bin bs=1 seek=1474559 count=1
 
@@ -12,8 +10,8 @@
 
 boot.o: boot.S
-	gcc -E -DKERNEL_SIZE=$(KERNEL_SIZE) boot.S >boot.s
+	gcc -E -DKERNEL_SIZE=$(KERNEL_SIZE) boot.S > boot.s
 	as boot.s -o $@
 	rm boot.s
 
 clean:
-	-rm *.o *.bin
+	-rm -f boot.o boot.bin ../../../image.bin
