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 "risc-v" : 74 { 75 DEFINES += 76 BOOT_SUPPORT_ELF64 77 ; 78 } 79 case "m68k" : 80 { 81 DEFINES += BOOT_SUPPORT_ELF32 ; 82 } 83 case "arm" : 84 { 85 DEFINES += BOOT_SUPPORT_ELF32 ; 86 if $(TARGET_BOOT_PLATFORM) = efi { 87 DEFINES += 88 _BOOT_PLATFORM_EFI 89 ; 90 } 91 } 92 } 93 94 local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util 95 kernel_cpp.h ] ; 96 97 SubDirC++Flags -fno-rtti -include $(kernelC++Header) ; 98 } 99 100 101 BootStaticLibrary [ MultiBootGristFiles boot_loader ] : 102 PathBlacklist.cpp 103 elf.cpp 104 heap.cpp 105 kernel_args.cpp 106 load_driver_settings.cpp 107 loader.cpp 108 main.cpp 109 menu.cpp 110 package_support.cpp 111 pager.cpp 112 partitions.cpp 113 RootFileSystem.cpp 114 stdio.cpp 115 vfs.cpp 116 vm.cpp 117 118 # libroot 119 driver_settings.cpp 120 121 # utils 122 kernel_cpp.cpp 123 KMessage.cpp 124 list.cpp 125 ring_buffer.cpp 126 safemode_settings.cpp 127 StringHash.cpp 128 129 DataIO.cpp 130 Referenceable.cpp 131 ; 132 133 # The partition support is built in an extra static library 134 # so that only the ones that are used will be included. 135 136 BootStaticLibrary [ MultiBootGristFiles boot_partitions ] : 137 FileMapDisk.cpp 138 amiga_rdb.cpp 139 apple.cpp 140 141 gpt.cpp 142 Header.cpp 143 crc32.cpp 144 utility.cpp 145 146 intel.cpp 147 PartitionMap.cpp 148 PartitionMapParser.cpp 149 ; 150 151 # Tell Jam where to find the utility sources 152 SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ] 153 = [ FDirName $(HAIKU_TOP) src system kernel util ] ; 154 155 SEARCH on [ FGristFiles KMessage.cpp ] 156 = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ; 157 158 SEARCH on [ FGristFiles safemode_settings.cpp ] 159 = [ FDirName $(HAIKU_TOP) src system kernel debug ] ; 160 161 SEARCH on [ FGristFiles driver_settings.cpp ] 162 = [ FDirName $(HAIKU_TOP) src system libroot os ] ; 163 164 SEARCH on [ FGristFiles amiga_rdb.cpp ] 165 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ; 166 167 SEARCH on [ FGristFiles apple.cpp ] 168 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ; 169 170 SEARCH on [ FGristFiles gpt.cpp Header.cpp crc32.cpp utility.cpp ] 171 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ; 172 173 SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ] 174 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ; 175 176 SEARCH on [ FGristFiles stage2_crt0.S ] 177 = [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ] ; 178 179 SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ] 180 = [ FDirName $(HAIKU_TOP) src kits support ] ; 181 } 182} 183 184SubInclude HAIKU_TOP src system boot loader file_systems ; 185SubInclude HAIKU_TOP src system boot loader net ; 186