Commits

prabirshrestha committed 641daa4

create empty floppy.img

Comments (0)

Files changed (1)

boot/src/arch/rules.x86.mk

 BOOT_OBJECTS+=$(BOOTSRCPATH)boot05.o
 BOOT_OBJECTS+=$(BOOTSRCPATH)boot.o
 BOOT_OBJECTS+=$(BOOTSRCPATH)boot1.bin
+BOOT_OBJECTS+=$(BOOTSRCPATH)floppy.img
 
 BOOT_C_OBJECTS+=$(BOOTSRCPATH)boot.o
 
-boot: $(BOOTSRCPATH)boot0.bin $(BOOTSRCPATH)boot1.bin
+boot: $(BOOTSRCPATH)boot0.bin $(BOOTSRCPATH)boot1.bin $(BOOTSRCPATH)floppy.img
 
 $(BOOTSRCPATH)boot0.bin: $(BOOTSRCPATH)boot0.out
 	$(OBJCOPY) -O binary -j .text $^ $@
 	$(CC) $(CCFLAGS) -c -o $@ $^
 
 $(BOOTSRCPATH)boot1.bin: $(BOOTSRCPATH)boot05.o $(BOOTSRCPATH)boot.o
-	$(LD) -T $(BOOTSRCPATH)boot0.ld -o $@ $^
+	$(LD) -T $(BOOTSRCPATH)boot0.ld -o $@ $^
+
+$(BOOTSRCPATH)floppy.img: $(BOOTSRCPATH)boot0.bin $(BOOTSRCPATH)boot1.bin
+	# create an empty image
+	dd if=/dev/zero of=$@ bs=512 count=1440
+	# mkdosfs -F 12 $@