CCACHE_COMPILERCHECK += $(shell gcc -dumpspecs 2>/dev/null | md5sum | cut -d ' ' -f1)
# We support EFI on x86_64
-ifeq "$(MACHINE)" "x86_64"
+ifeq "$(BUILD_ARCH)" "x86_64"
EFI = 1
endif
THISAPP = cdrom
TARGET = $(DIR_INFO)/$(THISAPP)
-ifeq "$(MACHINE_TYPE)" "arm"
+ifeq "$(BUILD_PLATFORM)" "arm"
TAR_OPTIONS =
else
TAR_OPTIONS = --lzma
THISAPP = flash-image
TARGET = $(DIR_INFO)/$(THISAPP)
-ifeq "$(MACHINE)" "x86_64"
- EFI = 1
-endif
-
-ifeq "$(MACHINE)" "i586"
- EFI = 1
-endif
-
DEVICE = $(shell losetup -f)
PART_BOOT = /dev/mapper/$(patsubst /dev/%,%,$(DEVICE))p1
ifeq "$(EFI)" "1"
S_BOOT := $(shell echo $$(( 262144 - $(S_OFFSET) )))
S_ROOT := 2477600
-ifeq "$(MACHINE)" "x86_64"
+ifeq "$(BUILD_ARCH)" "x86_64"
EFI_ARCH = x64
endif
-ifeq "$(MACHINE)" "i586"
+ifeq "$(BUILD_ARCH)" "i586"
EFI_ARCH = ia32
endif
cd $(DIR_APP) && tar axf $(DIR_DL)/ipxe-$(PXE_VER).tar.gz
cd $(DIR_APP) && rm -rfv ipxe && ln -s ipxe-$(PXE_VER) ipxe
cd $(DIR_APP) && make bin/ipxe.lkrn
-ifeq "$(MACHINE)" "x86_64"
+ifeq "$(BUILD_ARCH)" "x86_64"
cd $(DIR_APP) && make bin-x86_64-efi/ipxe.efi
endif
# Installation
-mkdir -pv /usr/share/ipfire-netboot
cd $(DIR_APP) && install -m 644 bin/ipxe.lkrn /usr/share/ipfire-netboot
-ifeq "$(MACHINE)" "x86_64"
+ifeq "$(BUILD_ARCH)" "x86_64"
cd $(DIR_APP) && install -m 644 bin-x86_64-efi/ipxe.efi \
/usr/share/ipfire-netboot
endif
# Build
cd $(DIR_APP) && make bios $(MAKETUNING)
-ifeq "$(MACHINE)" "x86_64"
+ifeq "$(BUILD_ARCH)" "x86_64"
cd $(DIR_APP) && make efi64 $(MAKETUNING)
endif
# Install
cd $(DIR_APP) && make bios install
-ifeq "$(MACHINE)" "x86_64"
+ifeq "$(BUILD_ARCH)" "x86_64"
cd $(DIR_APP) && make efi64 install
endif