aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/arch/i386/Makefile.pcbios
blob: e38fbca0c85f59246ce38ad43b5862aa970578d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# -*- 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		+= xrom
MEDIA		+= pxe
MEDIA		+= kpxe
MEDIA		+= kkpxe
MEDIA		+= lkrn
MEDIA		+= dsk
MEDIA		+= nbi
MEDIA		+= hd
MEDIA		+= raw

# Padding rules
#
PAD_rom		= $(PADIMG) --blksize=512 --byte=0xff $@
PAD_hrom	= $(PAD_rom)
PAD_xrom	= $(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 $@