Commits

prabirshrestha committed 787f1db

make floppy.img

Comments (0)

Files changed (1)

 	rm $(BOOTSRCPATH)*.o $(BOOTSRCPATH)*.elf $(BOOTSRCPATH)*.bin $(BOOTSRCPATH)*.img
 
 $(BOOTSRCPATH)boot.img: $(BOOTSRCPATH)boot0.bin
+	# create an empty floppy image
+	dd if=/dev/zero of=$@ bs=512 count=1440
+
+	# copy mbr (boot0.bin)
+	dd if=$(BOOTSRCPATH)boot0.bin of=$@ bs=512 seek=0 conv=notrunc
 
 $(BOOTSRCPATH)boot0.bin: $(BOOTSRCPATH)boot0.elf
 	$(OBJCOPY) -O binary -j .text $^ $@