david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/Makefile

230 lines
7.0 KiB
Makefile
Raw Permalink Normal View History

###############################################################################
#
# Initialise various variables
#
CLEANUP :=
CFLAGS :=
ASFLAGS :=
LDFLAGS :=
HOST_CFLAGS :=
MAKEDEPS := Makefile
CROSS_COMPILE ?= $(CROSS)
###############################################################################
#
# Locations of tools
#
HOST_CC := gcc
RM := rm -f
TOUCH := touch
MKDIR := mkdir
CP := cp
ECHO := echo
PRINTF := printf
PERL := perl
TRUE := true
CC := $(CROSS_COMPILE)gcc
CPP := $(CC) -E
AS := $(CROSS_COMPILE)as
LD := $(CROSS_COMPILE)ld
SIZE := $(CROSS_COMPILE)size
AR := $(CROSS_COMPILE)ar
RANLIB := $(CROSS_COMPILE)ranlib
OBJCOPY := $(CROSS_COMPILE)objcopy
NM := $(CROSS_COMPILE)nm
OBJDUMP := $(CROSS_COMPILE)objdump
OPENSSL := openssl
CSPLIT := csplit
PARSEROM := ./util/parserom.pl
FIXROM := ./util/fixrom.pl
SYMCHECK := ./util/symcheck.pl
SORTOBJDUMP := ./util/sortobjdump.pl
PADIMG := ./util/padimg.pl
LICENCE := ./util/licence.pl
NRV2B := ./util/nrv2b
ZBIN := ./util/zbin
ELF2EFI32 := ./util/elf2efi32
ELF2EFI64 := ./util/elf2efi64
EFIROM := ./util/efirom
EFIFATBIN := ./util/efifatbin
ICCFIX := ./util/iccfix
EINFO := ./util/einfo
GENKEYMAP := ./util/genkeymap.pl
DOXYGEN := doxygen
LCAB := lcab
QEMUIMG := qemu-img
###############################################################################
#
# SRCDIRS lists all directories containing source files.
#
SRCDIRS :=
SRCDIRS += libgcc
SRCDIRS += core
SRCDIRS += net net/tcp net/udp net/infiniband
2007-01-11 15:43:15 +01:00
SRCDIRS += image
SRCDIRS += drivers/bus
SRCDIRS += drivers/net
2007-11-18 17:12:54 +01:00
SRCDIRS += drivers/net/e1000
SRCDIRS += drivers/net/e1000e
SRCDIRS += drivers/net/igb
SRCDIRS += drivers/net/igbvf
SRCDIRS += drivers/net/phantom
SRCDIRS += drivers/net/vxge
SRCDIRS += drivers/net/efi
SRCDIRS += drivers/net/tg3
SRCDIRS += drivers/net/sfc
SRCDIRS += drivers/block
SRCDIRS += drivers/nvs
SRCDIRS += drivers/bitbash
SRCDIRS += drivers/infiniband
SRCDIRS += drivers/infiniband/mlx_utils_flexboot/src
SRCDIRS += drivers/infiniband/mlx_utils/src/public
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_reg_access
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_nvconfig
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_vmac
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_blink_leds
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_link_speed
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_mtu
SRCDIRS += drivers/infiniband/mlx_nodnic/src
SRCDIRS += drivers/usb
SRCDIRS += interface/pxe interface/efi interface/smbios
SRCDIRS += interface/bofm
SRCDIRS += interface/xen
SRCDIRS += interface/hyperv
2006-06-01 13:05:36 +02:00
SRCDIRS += tests
SRCDIRS += crypto crypto/mishmash
SRCDIRS += hci hci/commands hci/tui
SRCDIRS += hci/mucurses hci/mucurses/widgets
SRCDIRS += hci/keymap
SRCDIRS += usr
SRCDIRS += config
# These directories contain code that is not eligible for UEFI Secure
# Boot signing.
#
SRCDIRS_INSEC += net/oncrpc
SRCDIRS_INSEC += net/80211
SRCDIRS_INSEC += drivers/net/rtl818x
SRCDIRS_INSEC += drivers/net/ath
SRCDIRS_INSEC += drivers/net/ath/ath5k
SRCDIRS_INSEC += drivers/net/ath/ath9k
# NON_AUTO_SRCS lists files that are excluded from the normal
# automatic build system.
#
NON_AUTO_SRCS :=
NON_AUTO_SRCS += core/version.c
NON_AUTO_SRCS += drivers/net/prism2.c
# INCDIRS lists the include path
#
INCDIRS :=
INCDIRS += include .
###############################################################################
#
# Default build target: build the most common targets and print out a
# helpfully suggestive message
#
ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \
bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \
bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \
bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom
all : $(ALL)
@$(ECHO) '==========================================================='
@$(ECHO)
@$(ECHO) 'To create a bootable floppy, type'
@$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
@$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
@$(ECHO) 'data already on the disk.'
@$(ECHO)
@$(ECHO) 'To create a bootable USB key, type'
@$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
@$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
@$(ECHO) 'disk on your system. This will erase any data already on'
@$(ECHO) 'the USB key.'
@$(ECHO)
@$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
@$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
@$(ECHO)
@$(ECHO) 'These images contain drivers for all supported cards. You'
@$(ECHO) 'can build more customised images, and ROM images, using'
@$(ECHO) ' make bin/<rom-name>.<output-format>'
@$(ECHO)
@$(ECHO) '==========================================================='
###############################################################################
#
# Comprehensive build target: build a selection of cross-platform
# targets to expose potential build errors that show up only on
# certain platforms
#
everything :
$(Q)$(MAKE) --no-print-directory $(ALL) \
bin/3c509.rom bin/intel.rom bin/intel.mrom \
[librm] Add support for running in 64-bit long mode Add support for running the BIOS version of iPXE in 64-bit long mode. A 64-bit BIOS version of iPXE can be built using e.g. make bin-x86_64-pcbios/ipxe.usb make bin-x86_64-pcbios/8086100e.mrom The 64-bit BIOS version should appear to function identically to the normal 32-bit BIOS version. The physical memory layout is unaltered: iPXE is still relocated to the top of the available 32-bit address space. The code is linked to a virtual address of 0xffffffffeb000000 (in the negative 2GB as required by -mcmodel=kernel), with 4kB pages created to cover the whole of .textdata. 2MB pages are created to cover the whole of the 32-bit address space. The 32-bit portions of the code run with VIRTUAL_CS and VIRTUAL_DS configured such that truncating a 64-bit virtual address gives a 32-bit virtual address pointing to the same physical location. The stack pointer remains as a physical address when running in long mode (although the .stack section is accessible via the negative 2GB virtual address); this is done in order to simplify the handling of interrupts occurring while executing a portion of 32-bit code with flat physical addressing via PHYS_CODE(). Interrupts may be enabled in either 64-bit long mode, 32-bit protected mode with virtual addresses, 32-bit protected mode with physical addresses, or 16-bit real mode. Interrupts occurring in any mode other than real mode will be reflected down to real mode and handled by whichever ISR is hooked into the BIOS interrupt vector table. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-02-18 03:44:19 +01:00
bin-x86_64-pcbios/8086100e.mrom bin-x86_64-pcbios/intel.rom \
bin-x86_64-pcbios/ipxe.usb bin-x86_64-pcbios/ipxe.pxe \
bin-x86_64-pcbios/undionly.kpxe \
bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
bin-i386-efi/ipxe.efirom \
bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
bin-x86_64-efi/ipxe.efirom \
bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux \
bin-i386-linux/tests.linux bin-x86_64-linux/tests.linux
###############################################################################
#
# VMware build target: all ROMs used with VMware
#
vmware : bin/8086100f.mrom bin/808610d3.mrom bin/10222000.rom bin/15ad07b0.rom
@$(ECHO) '==========================================================='
@$(ECHO)
@$(ECHO) 'Available ROMs:'
@$(ECHO) ' bin/8086100f.mrom -- intel/e1000'
@$(ECHO) ' bin/808610d3.mrom -- intel/e1000e'
@$(ECHO) ' bin/10222000.rom -- vlance/pcnet32'
@$(ECHO) ' bin/15ad07b0.rom -- vmxnet3'
@$(ECHO)
@$(ECHO) 'For more information, see http://ipxe.org/howto/vmware'
@$(ECHO)
@$(ECHO) '==========================================================='
###############################################################################
#
# Build targets that do nothing but might be tried by users
#
configure :
@$(ECHO) "No configuration needed."
install :
@$(ECHO) "No installation required."
2005-04-17 15:25:43 +02:00
###############################################################################
2005-04-17 15:25:43 +02:00
#
# Version number calculations
#
VERSION_MAJOR = 1
VERSION_MINOR = 0
VERSION_PATCH = 0
EXTRAVERSION = +
MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
ifneq ($(wildcard ../.git),)
GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
VERSION += ($(GITVERSION))
endif
version :
@$(ECHO) "$(VERSION)"
###############################################################################
#
# Drag in the bulk of the build system
#
MAKEDEPS += Makefile.housekeeping
include Makefile.housekeeping