1SubDir HAIKU_TOP src system boot loader ; 2 3SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ; 4SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ; 5SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ; 6SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ; 7UsePrivateKernelHeaders ; 8UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; 9UsePrivateHeaders [ FDirName kernel util ] ; 10UsePrivateHeaders shared storage ; 11 12local defines = $(DEFINES) ; 13 14local platform ; 15for platform in [ MultiBootSubDirSetup ] { 16 on $(platform) { 17 { 18 DEFINES = $(defines) ; 19 20 DEFINES += 21 _BOOT_MODE 22 BOOT_ARCH=\\\"$(TARGET_KERNEL_ARCH)\\\" 23 KMESSAGE_CONTAINER_ONLY 24 25 BOOT_SUPPORT_PARTITION_INTEL 26 27 BOOT_SUPPORT_FILE_SYSTEM_BFS 28 BOOT_SUPPORT_FILE_SYSTEM_TARFS 29 #BOOT_SUPPORT_FILE_MAP_DISK 30 BOOT_SUPPORT_FILE_SYSTEM_FAT 31 ; 32 33 # Add architecture specific partition/file system modules 34 35 switch $(TARGET_KERNEL_ARCH) { 36 case "ppc" : 37 { 38 DEFINES += 39 BOOT_SUPPORT_PARTITION_AMIGA 40 BOOT_SUPPORT_PARTITION_APPLE 41 42 BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS 43 ; 44 } 45 case "x86" : 46 { 47 DEFINES += 48 ALTERNATE_BOOT_ARCH=\\\"x86_64\\\" 49 BOOT_SUPPORT_ELF64 50 51 BOOT_SUPPORT_PARTITION_EFI 52 53 #BOOT_SUPPORT_FILE_SYSTEM_FAT 54 ; 55 if $(TARGET_BOOT_PLATFORM) = efi { 56 DEFINES += 57 _BOOT_PLATFORM_EFI 58 ; 59 } else { 60 DEFINES += BOOT_SUPPORT_ELF32 ; 61 } 62 } 63 case "sparc" : 64 { 65 DEFINES += 66 BOOT_SUPPORT_ELF64 67 ; 68 } 69 case "risc-v" : 70 { 71 DEFINES += 72 BOOT_SUPPORT_ELF64 73 ; 74 } 75 case "m68k" : 76 { 77 DEFINES += BOOT_SUPPORT_ELF32 ; 78 } 79 case "arm" : 80 { 81 DEFINES += BOOT_SUPPORT_ELF32 ; 82 if $(TARGET_BOOT_PLATFORM) = efi { 83 DEFINES += 84 _BOOT_PLATFORM_EFI 85 ; 86 } 87 } 88 } 89 90 local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util 91 kernel_cpp.h ] ; 92 93 SubDirC++Flags -fno-rtti -include $(kernelC++Header) ; 94 } 95 96 97 BootStaticLibrary [ MultiBootGristFiles boot_loader ] : 98 PathBlacklist.cpp 99 elf.cpp 100 heap.cpp 101 kernel_args.cpp 102 load_driver_settings.cpp 103 loader.cpp 104 main.cpp 105 menu.cpp 106 package_support.cpp 107 pager.cpp 108 partitions.cpp 109 RootFileSystem.cpp 110 stdio.cpp 111 vfs.cpp 112 vm.cpp 113 114 # libroot 115 driver_settings.cpp 116 117 # utils 118 kernel_cpp.cpp 119 KMessage.cpp 120 list.cpp 121 ring_buffer.cpp 122 safemode_settings.cpp 123 StringHash.cpp 124 125 DataIO.cpp 126 Referenceable.cpp 127 ; 128 129 # The partition support is built in an extra static library 130 # so that only the ones that are used will be included. 131 132 BootStaticLibrary [ MultiBootGristFiles boot_partitions ] : 133 FileMapDisk.cpp 134 amiga_rdb.cpp 135 apple.cpp 136 137 efi_gpt.cpp 138 Header.cpp 139 crc32.cpp 140 utility.cpp 141 142 intel.cpp 143 PartitionMap.cpp 144 PartitionMapParser.cpp 145 ; 146 147 # Tell Jam where to find the utility sources 148 SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ] 149 = [ FDirName $(HAIKU_TOP) src system kernel util ] ; 150 151 SEARCH on [ FGristFiles KMessage.cpp ] 152 = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ; 153 154 SEARCH on [ FGristFiles safemode_settings.cpp ] 155 = [ FDirName $(HAIKU_TOP) src system kernel debug ] ; 156 157 SEARCH on [ FGristFiles driver_settings.cpp ] 158 = [ FDirName $(HAIKU_TOP) src system libroot os ] ; 159 160 SEARCH on [ FGristFiles amiga_rdb.cpp ] 161 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ; 162 163 SEARCH on [ FGristFiles apple.cpp ] 164 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ; 165 166 SEARCH on [ FGristFiles efi_gpt.cpp Header.cpp crc32.cpp utility.cpp ] 167 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ; 168 169 SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ] 170 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ; 171 172 SEARCH on [ FGristFiles stage2_crt0.S ] 173 = [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ] ; 174 175 SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ] 176 = [ FDirName $(HAIKU_TOP) src kits support ] ; 177 } 178} 179 180SubInclude HAIKU_TOP src system boot loader file_systems ; 181SubInclude HAIKU_TOP src system boot loader net ; 182