Fix build for non-EFI architectures.

Change-Id: Ic2c8a9a64e63f4b844e964eb1066291d2edda7b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2343
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Adrien Destugues 2020-03-13 19:28:22 +01:00 committed by waddlesplash
parent 228006ea74
commit 768f6b3bc4
2 changed files with 41 additions and 23 deletions

View File

@ -41,16 +41,25 @@ BuildMBR $(baseMBR) : $(mbrSource) ;
MakeLocate $(baseMBR) : $(HAIKU_OUTPUT_DIR) ;
MakeLocate $(HAIKU_ANYBOOT) : $(HAIKU_ANYBOOT_DIR) ;
if $(HAIKU_ANYBOOT_LEGACY) = 1 {
BuildAnybootImage $(HAIKU_ANYBOOT) : $(baseMBR) : $(HAIKU_CD_BOOT_IMAGE)
: $(HAIKU_IMAGE_NAME) ;
} else {
local efiLoader = haiku_loader.efi ;
local efiPartition = esp.image ;
MakeLocate $(efiPartition) ;
BuildEfiSystemPartition $(efiPartition) : $(efiLoader) ;
BuildAnybootImageEfi $(HAIKU_ANYBOOT) : $(baseMBR) : $(efiPartition) : $(HAIKU_CD_BOOT_IMAGE)
: $(HAIKU_IMAGE_NAME) ;
# Currently the Anyboot image is available only for EFI+BIOS or BIOS-only
# systems. It is not needed for other systems, where usually you can boot
# the same way from an USB or CD drive, instead of needing completely
# different layouts.
for platform in [ MultiBootSubDirSetup ] {
on $(platform) {
if $(TARGET_BOOT_PLATFORM) = efi {
local efiLoader = haiku_loader.efi ;
local efiPartition = esp.image ;
MakeLocate $(efiPartition) ;
BuildEfiSystemPartition $(efiPartition) : $(efiLoader) ;
BuildAnybootImageEfi $(HAIKU_ANYBOOT) : $(baseMBR)
: $(efiPartition) : $(HAIKU_CD_BOOT_IMAGE)
: $(HAIKU_IMAGE_NAME) ;
} else if $(HAIKU_ANYBOOT_LEGACY) = 1 {
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?)

View File

@ -13,6 +13,7 @@ NotFile $(HAIKU_CD_BOOT_IMAGE_CONTAINER_NAME) ;
# common extra files to put on the boot iso
local extras = README.html ;
SEARCH on $(extras) = [ FDirName $(HAIKU_TOP) data boot_cd ] ;
if $(TARGET_ARCH) = ppc {
local elfloader = boot_loader_openfirmware ;
@ -24,23 +25,31 @@ if $(TARGET_ARCH) = ppc {
# HFS creator and application type mapping for mkisofs
local hfsmaps = hfs.map ;
SEARCH on $(chrpscript) $(hfsmaps) $(extras) = [ FDirName $(HAIKU_TOP) data boot_cd ] ;
SEARCH on $(chrpscript) $(hfsmaps) $(extras)
= [ FDirName $(HAIKU_TOP) data boot_cd ] ;
BuildCDBootPPCImage $(HAIKU_CD_BOOT_IMAGE) : $(hfsmaps) : $(elfloader) : $(coffloader) : $(chrpscript) : $(extras) ;
} else if $(HAIKU_ANYBOOT_LEGACY) = 1 {
BuildCDBootImage $(HAIKU_CD_BOOT_IMAGE) : $(HAIKU_BOOT_FLOPPY) : : $(extras) ;
SEARCH on $(extras) = [ FDirName $(HAIKU_TOP) data boot_cd ] ;
BuildCDBootPPCImage $(HAIKU_CD_BOOT_IMAGE) : $(hfsmaps)
: $(elfloader) : $(coffloader) : $(chrpscript) : $(extras) ;
} else {
local efiLoader = haiku_loader.efi ;
local efiPartition = esp.image ;
MakeLocate $(efiPartition) : $(HAIKU_OUTPUT_DIR) ;
BuildEfiSystemPartition $(efiPartition) : $(efiLoader) ;
# For other platforms, we have to check which bootloader is used. There
# can be multiple ones, making this a bit confusing.
for platform in [ MultiBootSubDirSetup ] {
on $(platform) {
if $(TARGET_BOOT_PLATFORM) = efi {
local efiLoader = haiku_loader.efi ;
local efiPartition = esp.image ;
MakeLocate $(efiPartition) : $(HAIKU_OUTPUT_DIR) ;
BuildEfiSystemPartition $(efiPartition) : $(efiLoader) ;
BuildCDBootImage $(HAIKU_CD_BOOT_IMAGE) : $(HAIKU_BOOT_FLOPPY)
: $(efiPartition) : $(extras) ;
BuildCDBootImage $(HAIKU_CD_BOOT_IMAGE) : $(HAIKU_BOOT_FLOPPY)
: $(efiPartition) : $(extras) ;
SEARCH on $(extras) = [ FDirName $(HAIKU_TOP) data boot_cd ] ;
} else if $(HAIKU_ANYBOOT_LEGACY) = 1 {
BuildCDBootImage $(HAIKU_CD_BOOT_IMAGE) : $(HAIKU_BOOT_FLOPPY) :
: $(extras) ;
}
}
}
}
NotFile haiku-boot-cd ;