2f0ca6974e
* Enables us to add an optional EFI filesystem to the anyboot image. * All existing anyboot behaviour is preserved. * We still need to figure out how to build bios and EFI loaders at the same time on x86. * The tiny "fake ISO" still needs el-torito alt-boot for the EFI loader to work when burned to a CD. This makes the EFI loader work when written to a hard disk / flash drive.
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
# Set anyboot file name and directory defaults.
|
|
HAIKU_ANYBOOT_NAME ?= $(HAIKU_DEFAULT_ANYBOOT_NAME) ;
|
|
HAIKU_ANYBOOT_DIR ?= $(HAIKU_DEFAULT_ANYBOOT_DIR) ;
|
|
HAIKU_ANYBOOT = $(HAIKU_ANYBOOT_NAME) ;
|
|
HAIKU_ANYBOOT_LABEL ?= $(HAIKU_DEFAULT_ANYBOOT_LABEL) ;
|
|
|
|
rule BuildAnybootImage anybootImage : mbrPart : isoPart : imageFile {
|
|
local anyboot = <build>anyboot ;
|
|
|
|
Depends $(anybootImage) : $(anyboot) ;
|
|
Depends $(anybootImage) : $(isoPart) ;
|
|
Depends $(anybootImage) : $(mbrPart) ;
|
|
Depends $(anybootImage) : $(imageFile) ;
|
|
|
|
BuildAnybootImage1 $(anybootImage) : $(anyboot) $(mbrPart) $(isoPart) $(imageFile) ;
|
|
}
|
|
|
|
actions BuildAnybootImage1 {
|
|
$(2[1]) -b $(2[2]) $(2[3]) $(2[4]) $(1)
|
|
}
|
|
|
|
local baseMBR = base_mbr.bin ;
|
|
local mbrSource = [ FDirName $(HAIKU_TOP) src bin writembr mbr.S ] ;
|
|
BuildMBR $(baseMBR) : $(mbrSource) ;
|
|
MakeLocate $(baseMBR) : $(HAIKU_OUTPUT_DIR) ;
|
|
MakeLocate $(HAIKU_ANYBOOT) : $(HAIKU_ANYBOOT_DIR) ;
|
|
BuildAnybootImage $(HAIKU_ANYBOOT) : $(baseMBR) : $(HAIKU_CD_BOOT_IMAGE)
|
|
: $(HAIKU_IMAGE_NAME) ;
|
|
|
|
# TODO: this one seems to cause the build to fail each other run (caching?)
|
|
#RmTemps $(HAIKU_ANYBOOT) : $(baseMBR) ;
|
|
RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_CD_BOOT_IMAGE) ;
|
|
RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_IMAGE_NAME) ;
|
|
RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_BOOT_FLOPPY) ;
|
|
|
|
NotFile haiku-anyboot-image ;
|
|
Depends haiku-anyboot-image : $(HAIKU_ANYBOOT) ;
|