]>
Commit | Line | Data |
---|---|---|
b1c0d031 | 1 | |
5a7bd333 GH |
2 | vgabios_variants := stdvga cirrus vmware qxl isavga |
3 | vgabios_targets := $(subst -isavga,,$(patsubst %,vgabios-%.bin,$(vgabios_variants))) | |
2397edd7 | 4 | pxerom_variants := e1000 eepro100 ne2k_pci pcnet rtl8139 virtio |
46ef7f33 | 5 | pxerom_targets := 8086100e 80861209 10500940 10222000 10ec8139 1af41000 |
2397edd7 | 6 | |
2f3f430d GH |
7 | pxe-rom-e1000 efi-rom-e1000 : VID := 8086 |
8 | pxe-rom-e1000 efi-rom-e1000 : DID := 100e | |
9 | pxe-rom-eepro100 efi-rom-eepro100 : VID := 8086 | |
10 | pxe-rom-eepro100 efi-rom-eepro100 : DID := 1209 | |
11 | pxe-rom-ne2k_pci efi-rom-ne2k_pci : VID := 1050 | |
12 | pxe-rom-ne2k_pci efi-rom-ne2k_pci : DID := 0940 | |
13 | pxe-rom-pcnet efi-rom-pcnet : VID := 1022 | |
14 | pxe-rom-pcnet efi-rom-pcnet : DID := 2000 | |
15 | pxe-rom-rtl8139 efi-rom-rtl8139 : VID := 10ec | |
16 | pxe-rom-rtl8139 efi-rom-rtl8139 : DID := 8139 | |
17 | pxe-rom-virtio efi-rom-virtio : VID := 1af4 | |
18 | pxe-rom-virtio efi-rom-virtio : DID := 1000 | |
19 | ||
20 | # | |
21 | # EfiRom utility is shipped with edk2 / tianocore, in BaseTools/ | |
22 | # | |
23 | # We need that to combine multiple images (legacy bios, | |
24 | # efi ia32, efi x64) into a single rom binary. | |
25 | # | |
26 | # We try to find it in the path. You can also pass the location on | |
27 | # the command line, i.e. "make EFIROM=/path/to/EfiRom efirom" | |
28 | # | |
29 | EFIROM ?= $(shell which EfiRom 2>/dev/null) | |
b4566776 | 30 | |
b1c0d031 GH |
31 | default: |
32 | @echo "nothing is build by default" | |
33 | @echo "available build targets:" | |
34 | @echo " bios -- update bios.bin (seabios)" | |
b4566776 GH |
35 | @echo " seavgabios -- update vgabios binaries (seabios)" |
36 | @echo " lgplvgabios -- update vgabios binaries (lgpl)" | |
2397edd7 | 37 | @echo " pxerom -- update nic roms (bios only)" |
2f3f430d GH |
38 | @echo " efirom -- update nic roms (bios+efi, this needs" |
39 | @echo " the EfiRom utility from edk2 / tianocore)" | |
b1c0d031 GH |
40 | |
41 | bios: config.seabios | |
42 | sh configure-seabios.sh $< | |
43 | make -C seabios out/bios.bin | |
44 | cp seabios/out/bios.bin ../pc-bios/bios.bin | |
7527bd85 | 45 | cp seabios/out/*dsdt.aml ../pc-bios/ |
b4566776 GH |
46 | |
47 | seavgabios: $(patsubst %,seavgabios-%,$(vgabios_variants)) | |
48 | ||
49 | seavgabios-%: config.vga.% | |
50 | sh configure-seabios.sh $< | |
51 | make -C seabios out/vgabios.bin | |
52 | cp seabios/out/vgabios.bin ../pc-bios/vgabios-$*.bin | |
53 | ||
1ede4dd0 | 54 | |
b4566776 GH |
55 | lgplvgabios: $(patsubst %,lgplvgabios-%,$(vgabios_variants)) |
56 | ||
5a7bd333 GH |
57 | lgplvgabios-isavga: build-lgplvgabios |
58 | cp vgabios/VGABIOS-lgpl-latest.bin ../pc-bios/vgabios.bin | |
1ede4dd0 | 59 | lgplvgabios-%: build-lgplvgabios |
b4566776 | 60 | cp vgabios/VGABIOS-lgpl-latest.$*.bin ../pc-bios/vgabios-$*.bin |
2397edd7 | 61 | |
1ede4dd0 GH |
62 | build-lgplvgabios: |
63 | $(MAKE) $(MAKEFLAGS) -C vgabios $(vgabios_targets) | |
64 | ||
65 | ||
2397edd7 GH |
66 | pxerom: $(patsubst %,pxe-rom-%,$(pxerom_variants)) |
67 | ||
46ef7f33 | 68 | pxe-rom-%: build-pxe-roms |
2397edd7 | 69 | cp ipxe/src/bin/$(VID)$(DID).rom ../pc-bios/pxe-$*.rom |
2f3f430d GH |
70 | |
71 | efirom: $(patsubst %,efi-rom-%,$(pxerom_variants)) | |
72 | ||
46ef7f33 | 73 | efi-rom-%: build-pxe-roms build-efi-roms |
2f3f430d GH |
74 | $(EFIROM) -f "0x$(VID)" -i "0x$(DID)" -l 0x02 \ |
75 | -b ipxe/src/bin/$(VID)$(DID).rom \ | |
76 | -ec ipxe/src/bin-i386-efi/$(VID)$(DID).efidrv \ | |
77 | -ec ipxe/src/bin-x86_64-efi/$(VID)$(DID).efidrv \ | |
78 | -o ../pc-bios/efi-$*.rom | |
95ca557d | 79 | |
46ef7f33 GH |
80 | build-pxe-roms: ipxe/src/config/local/general.h |
81 | $(MAKE) $(MAKEFLAGS) -C ipxe/src GITVERSION="" \ | |
82 | $(patsubst %,bin/%.rom,$(pxerom_targets)) | |
83 | ||
84 | build-efi-roms: build-pxe-roms ipxe/src/config/local/general.h | |
85 | $(MAKE) $(MAKEFLAGS) -C ipxe/src GITVERSION="" \ | |
86 | $(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \ | |
87 | $(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets)) | |
88 | ||
95ca557d GH |
89 | ipxe/src/config/local/%: config.ipxe.% |
90 | cp $< $@ | |
68875817 GH |
91 | |
92 | ||
93 | clean: | |
94 | rm -rf seabios/.config seabios/out | |
95 | $(MAKE) $(MAKEFLAGS) -C vgabios clean | |
96 | rm -f vgabios/VGABIOS-lgpl-latest* | |
97 | $(MAKE) $(MAKEFLAGS) -C ipxe/src veryclean |