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_ELF32 #How to deal with PPC970 ? 40 BOOT_SUPPORT_PARTITION_AMIGA 41 BOOT_SUPPORT_PARTITION_APPLE 42 43 BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS 44 ; 45 } 46 case "x86" : 47 { 48 DEFINES += 49 ALTERNATE_BOOT_ARCH=\\\"x86_64\\\" 50 BOOT_SUPPORT_ELF64 51 52 BOOT_SUPPORT_PARTITION_EFI 53 54 #BOOT_SUPPORT_FILE_SYSTEM_FAT 55 ; 56 if $(TARGET_BOOT_PLATFORM) = efi { 57 DEFINES += 58 _BOOT_PLATFORM_EFI 59 ; 60 } else { 61 DEFINES += 62 _BOOT_PLATFORM_BIOS 63 BOOT_SUPPORT_ELF32 64 ; 65 } 66 } 67 case "sparc" : 68 { 69 DEFINES += 70 BOOT_SUPPORT_ELF64 71 ; 72 } 73 case "riscv64" : 74 { 75 DEFINES += 76 BOOT_SUPPORT_ELF64 77 ; 78 if $(TARGET_BOOT_PLATFORM) = efi { 79 DEFINES += 80 _BOOT_PLATFORM_EFI 81 ; 82 } 83 } 84 case "m68k" : 85 { 86 DEFINES += BOOT_SUPPORT_ELF32 ; 87 } 88 case "arm" : 89 { 90 DEFINES += BOOT_SUPPORT_ELF32 ; 91 if $(TARGET_BOOT_PLATFORM) = efi { 92 DEFINES += 93 _BOOT_PLATFORM_EFI 94 ; 95 } 96 } 97 } 98 99 local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util 100 kernel_cpp.h ] ; 101 102 SubDirC++Flags -fno-rtti -include $(kernelC++Header) ; 103 } 104 105 106 BootStaticLibrary [ MultiBootGristFiles boot_loader ] : 107 PathBlocklist.cpp 108 elf.cpp 109 heap.cpp 110 kernel_args.cpp 111 load_driver_settings.cpp 112 loader.cpp 113 main.cpp 114 menu.cpp 115 package_support.cpp 116 pager.cpp 117 partitions.cpp 118 RootFileSystem.cpp 119 stdio.cpp 120 vfs.cpp 121 vm.cpp 122 123 # libroot 124 driver_settings.cpp 125 126 # utils 127 kernel_cpp.cpp 128 KMessage.cpp 129 list.cpp 130 ring_buffer.cpp 131 safemode_settings.cpp 132 StringHash.cpp 133 134 DataIO.cpp 135 Referenceable.cpp 136 ; 137 138 # The partition support is built in an extra static library 139 # so that only the ones that are used will be included. 140 141 BootStaticLibrary [ MultiBootGristFiles boot_partitions ] : 142 FileMapDisk.cpp 143 amiga_rdb.cpp 144 apple.cpp 145 146 gpt.cpp 147 Header.cpp 148 crc32.cpp 149 utility.cpp 150 151 intel.cpp 152 PartitionMap.cpp 153 PartitionMapParser.cpp 154 ; 155 156 # Tell Jam where to find the utility sources 157 SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ] 158 = [ FDirName $(HAIKU_TOP) src system kernel util ] ; 159 160 SEARCH on [ FGristFiles KMessage.cpp ] 161 = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ; 162 163 SEARCH on [ FGristFiles safemode_settings.cpp ] 164 = [ FDirName $(HAIKU_TOP) src system kernel debug ] ; 165 166 SEARCH on [ FGristFiles driver_settings.cpp ] 167 = [ FDirName $(HAIKU_TOP) src system libroot os ] ; 168 169 SEARCH on [ FGristFiles amiga_rdb.cpp ] 170 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ; 171 172 SEARCH on [ FGristFiles apple.cpp ] 173 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ; 174 175 SEARCH on [ FGristFiles gpt.cpp Header.cpp crc32.cpp utility.cpp ] 176 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ; 177 178 SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ] 179 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ; 180 181 SEARCH on [ FGristFiles stage2_crt0.S ] 182 = [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ] ; 183 184 SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ] 185 = [ FDirName $(HAIKU_TOP) src kits support ] ; 186 } 187} 188 189SubInclude HAIKU_TOP src system boot loader file_systems ; 190SubInclude HAIKU_TOP src system boot loader net ; 191