We add a syslinux floppy disk type using parts of the genliso script. This floppy image cat be dd'ed to a physical floppy or used in instances where a virtual floppy with an mountable DOS filesystem is useful. We also modify the genliso script to only generate .liso images rather than creating images depending on how it is called. Signed-off-by: Michael Brown <mcb30@etherboot.org>
74 lines
1.6 KiB
Makefile
74 lines
1.6 KiB
Makefile
# -*- makefile -*- : Force emacs to use Makefile mode
|
|
|
|
# The i386 linker script
|
|
#
|
|
LDSCRIPT = arch/i386/scripts/i386.lds
|
|
|
|
# Stop ld from complaining about our customised linker script
|
|
#
|
|
LDFLAGS += -N --no-check-sections
|
|
|
|
# Media types.
|
|
#
|
|
MEDIA += rom
|
|
MEDIA += pxe
|
|
MEDIA += kpxe
|
|
MEDIA += kkpxe
|
|
MEDIA += elf
|
|
MEDIA += elfd
|
|
MEDIA += lmelf
|
|
MEDIA += lmelfd
|
|
MEDIA += lkrn
|
|
MEDIA += bImage
|
|
MEDIA += dsk
|
|
MEDIA += nbi
|
|
MEDIA += hd
|
|
MEDIA += raw
|
|
MEDIA += com
|
|
MEDIA += exe
|
|
|
|
# Padding rules
|
|
#
|
|
PAD_rom = $(PADIMG) --blksize=512 --byte=0xff $@
|
|
PAD_dsk = $(PADIMG) --blksize=512 $@
|
|
PAD_hd = $(PADIMG) --blksize=512 $@
|
|
|
|
# rule to make a non-emulation ISO boot image
|
|
NON_AUTO_MEDIA += iso
|
|
%iso: %lkrn util/geniso
|
|
$(QM)$(ECHO) " [GENISO] $@"
|
|
$(Q)ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
|
|
|
|
# rule to make a floppy emulation ISO boot image
|
|
NON_AUTO_MEDIA += liso
|
|
%liso: %lkrn util/genliso
|
|
$(QM)$(ECHO) " [GENLISO] $@"
|
|
$(Q)bash util/genliso $@ $<
|
|
|
|
# rule to make a syslinux floppy image (mountable, bootable)
|
|
NON_AUTO_MEDIA += sdsk
|
|
%sdsk: %lkrn util/gensdsk
|
|
$(QM)$(ECHO) " [GENSDSK] $@"
|
|
$(Q)bash util/gensdsk $@ $<
|
|
|
|
# Special target for building Master Boot Record binary
|
|
$(BIN)/mbr.bin : $(BIN)/mbr.o
|
|
$(QM)$(ECHO) " [OBJCOPY] $@"
|
|
$(Q)$(OBJCOPY) -O binary $< $@
|
|
|
|
# rule to make a USB disk image
|
|
$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
|
|
$(QM)$(ECHO) " [OBJCOPY] $@"
|
|
$(Q)$(OBJCOPY) -O binary $< $@
|
|
|
|
NON_AUTO_MEDIA += usb
|
|
%usb: $(BIN)/usbdisk.bin %hd
|
|
$(QM)$(ECHO) " [FINISH] $@"
|
|
$(Q)cat $^ > $@
|
|
|
|
# Padded floppy image (e.g. for iLO)
|
|
NON_AUTO_MEDIA += pdsk
|
|
%pdsk : %dsk
|
|
$(Q)cp $< $@
|
|
$(Q)$(PADIMG) --blksize=1474560 $@
|