1. prabirshrestha
  2. kx

Commits

prabirshrestha  committed 787f1db

make floppy.img

  • Participants
  • Parent commits 3d2e36e
  • Branches mk

Comments (0)

Files changed (1)

File boot/boot.mk

View file
 	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 $^ $@