xref: /haiku/build/jam/images/CDBootImage (revision 4c8e85b316c35a9161f5a1c50ad70bc91c83a76f)
1# This file defines what ends up in the CD boot image and it executes the
2# rules building the image.
3
4#HAIKU_BOOT_FLOPPY = haiku-boot-floppy.image ;
5#MakeLocate $(HAIKU_BOOT_FLOPPY) : $(HAIKU_OUTPUT_DIR) ;
6
7# CD image target
8HAIKU_CD_BOOT_IMAGE = haiku-boot-cd.iso ;
9MakeLocate $(HAIKU_CD_BOOT_IMAGE) : $(HAIKU_OUTPUT_DIR) ;
10
11# the pseudo target all archive contents is attached to
12NotFile $(HAIKU_CD_BOOT_IMAGE_CONTAINER_NAME) ;
13
14# common extra files to put on the boot iso
15local extras = README.html ;
16SEARCH on $(extras) = [ FDirName $(HAIKU_TOP) data boot extras ] ;
17
18if $(TARGET_ARCH) = ppc {
19	local elfloader = boot_loader_openfirmware ;
20	local coffloader = haiku_loader.openfirmware ;
21
22	# OpenFirmware / Mac boot support files:
23	# CHRP script
24	local chrpscript = ofboot.chrp ;
25	# HFS creator and application type mapping for mkisofs
26	local hfsmaps = hfs.map ;
27
28	BuildCDBootPPCImage $(HAIKU_CD_BOOT_IMAGE) : $(hfsmaps)
29		: $(elfloader) : $(coffloader) : $(chrpscript) : $(extras) ;
30} else {
31	# For other platforms, we have to check which bootloader is used. There
32	# can be multiple ones, making this a bit confusing.
33	for platform in [ MultiBootSubDirSetup ] {
34		on $(platform) {
35			if $(TARGET_BOOT_PLATFORM) = efi {
36				local efiLoader = haiku_loader.efi ;
37				local efiPartition = esp.image ;
38				MakeLocate $(efiPartition) : $(HAIKU_OUTPUT_DIR) ;
39				BuildEfiSystemPartition $(efiPartition) : $(efiLoader) ;
40
41				BuildCDBootImage $(HAIKU_CD_BOOT_IMAGE) : $(HAIKU_BOOT_FLOPPY)
42					: $(efiPartition) : $(extras) ;
43
44			} else if $(HAIKU_ANYBOOT_LEGACY) = 1 {
45				BuildCDBootImage $(HAIKU_CD_BOOT_IMAGE) : $(HAIKU_BOOT_FLOPPY) :
46					: $(extras) ;
47			}
48		}
49	}
50}
51
52NotFile haiku-boot-cd ;
53Depends haiku-boot-cd : $(HAIKU_CD_BOOT_IMAGE) ;
54