5736f5eb32
gPXE currently takes advantage of the feature of PCI3.0 that allows option ROMs to relocate the bulk of their code to high memory and so take up only a small amount of space in the option ROM area. Currently, the relocation can only take place if the BIOS's implementation of PMM can be made to return blocks aligned to an even megabyte, because of the A20 gate. AMI BIOSes, in particular, will not return allocations that gPXE can use. Ameliorate the situation somewhat by adding a prefix, .hrom, that works identically to .rom except in the case that PMM allocation fails. Where .rom would give up and place itself entirely in option ROM space, .hrom moves to a block (assumed free) at HIGHMEM_LOADPOINT = 4MB. This allows for the use of larger gPXE ROMs than would otherwise be possible. Because there is no way to check that the area at HIGHMEM_LOADPOINT is really free, other devices using that memory during the boot process will cause failure for gPXE, the other device, or both. In practice such conflicts will likely not occur, but this prefix should still be considered EXPERIMENTAL. Signed-off-by: Marty Connor <mdc@etherboot.org>
76 lines
1.6 KiB
Makefile
76 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 += hrom
|
|
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_hrom = $(PAD_rom)
|
|
PAD_dsk = $(PADIMG) --blksize=512 $@
|
|
PAD_hd = $(PADIMG) --blksize=32768 $@
|
|
|
|
# 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 $@
|