"mcopy" command says "Disk full" when copying kernel.elf
Posted: Fri Jul 02, 2021 11:20 am
Hello! I've encountered a problem that stumps me. When creating a disk image for x86-64 UEFI, the "mcopy" command keeps saying "Disk full" whenever I try to copy the kernel.elf to its root directory. This only happened a few hours ago and it was working fine for the last few days. It started happening after I used -mcmodel=kernel, but I don't know if that is what is causing it. The ELF file is only 2 MB, and the disk is 48MB, so there shouldn't be a problem of lack of space.
Below are the commands I'm running to make the disk:
I reiterate, this only started happening after I cross compiled my gcc and ld for x86_64 and used -mcmodel=kernel. Any ideas on how to fix this?
Below are the commands I'm running to make the disk:
Code: Select all
dd if=/dev/zero of=$(BUILDDIR)/$(OSNAME).img bs=512 count=93750
mformat -i $(BUILDDIR)/$(OSNAME).img -f 1440 ::
mmd -i $(BUILDDIR)/$(OSNAME).img ::/EFI
mmd -i $(BUILDDIR)/$(OSNAME).img ::/EFI/BOOT
mcopy -i $(BUILDDIR)/$(OSNAME).img $(BOOTEFI) ::/EFI/BOOT
mcopy -i $(BUILDDIR)/$(OSNAME).img startup.nsh ::
mcopy -i $(BUILDDIR)/$(OSNAME).img $(BUILDDIR)/kernel.elf ::