1SubDir HAIKU_TOP src tests system boot loader ; 2 3UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; 4UsePrivateHeaders [ FDirName kernel util ] ; 5UsePrivateHeaders kernel shared storage system ; 6SubDirSysHdrs $(HAIKU_TOP) headers private kernel arch $(TARGET_KERNEL_ARCH_DIR) ; 7SubDirSysHdrs $(HAIKU_TOP) headers private system arch $(TARGET_ARCH) ; 8SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ; 9SubDirHdrs $(HAIKU_TOP) src system boot loader ; 10SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ; 11SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ; 12SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ; 13SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ; 14 15# we need to redefine certain calls in the boot loader so that 16# they will really be used instead of their POSIX counterparts 17# in libroot.so 18 19ObjectDefines 20 # boot loader 21 main.cpp 22 vfs.cpp 23 partitions.cpp 24 RootFileSystem.cpp 25 elf.cpp 26 menu.cpp 27 loader.cpp 28 kernel_args.cpp 29 load_driver_settings.cpp 30 pager.cpp 31 32 # other 33 platform_menu.cpp 34 driver_settings.cpp 35 36 # partitions 37 amiga_rdb.cpp 38 apple.cpp 39 40 gpt.cpp 41 Header.cpp 42 crc32.cpp 43 utility.cpp 44 45 intel.cpp 46 PartitionMap.cpp 47 PartitionMapParser.cpp 48 : 49 read_pos=boot_read_pos fstat=boot_fstat open=boot_open close=boot_close main=boot_main 50 ; 51 52{ 53 local defines = 54 _BOOT_MODE 55 BOOT_ARCH=\\\"$(TARGET_ARCH)\\\" 56 # the boot loader test application will try to load the BeOS kernel 57 # from a supported partition/file system 58 59 BOOT_SUPPORT_PARTITION_AMIGA 60 BOOT_SUPPORT_PARTITION_APPLE 61 BOOT_SUPPORT_PARTITION_EFI 62 BOOT_SUPPORT_PARTITION_INTEL 63 64 BOOT_SUPPORT_FILE_SYSTEM_BFS 65 BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS 66 BOOT_SUPPORT_FILE_SYSTEM_TARFS 67 ; 68 69 defines = [ FDefines $(defines) ] ; 70 71 if $(OS) = "LINUX" { 72 SubDirC++Flags $(defines) ; 73 } else { 74 #SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -fcheck-memory-usage -D_NO_INLINE_ASM ; 75 SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -D_NO_INLINE_ASM ; 76 } 77} 78 79SimpleTest BootLoaderTest : 80 # userland bindings 81 platform_start.cpp 82 platform_console.cpp 83 platform_debug.cpp 84 platform_devices.cpp 85 platform_heap.cpp 86 platform_menu.cpp 87 platform_misc.cpp 88 platform_mmu.cpp 89 Handle.cpp 90 91 # boot loader 92 main.cpp 93 vfs.cpp 94 partitions.cpp 95 RootFileSystem.cpp 96 elf.cpp 97 menu.cpp 98 loader.cpp 99 kernel_args.cpp 100 load_driver_settings.cpp 101 pager.cpp 102 103 # partitioning systems 104 amiga_rdb.cpp 105 apple.cpp 106 107 gpt.cpp 108 Header.cpp 109 crc32.cpp 110 utility.cpp 111 112 intel.cpp 113 PartitionMap.cpp 114 PartitionMapParser.cpp 115 116 # utility functions 117 list.cpp 118 driver_settings.cpp 119 ring_buffer.cpp 120 KMessage.cpp 121 122 : 123 boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a 124 kernelland_emu 125; 126 127# Tell Jam where to find the utility sources 128 129SEARCH on [ FGristFiles list.cpp ring_buffer.cpp ] 130 = [ FDirName $(HAIKU_TOP) src system kernel util ] ; 131 132SEARCH on [ FGristFiles KMessage.cpp ] 133 = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ; 134 135SEARCH on [ FGristFiles strlcat.c strlcpy.c ] 136 = [ FDirName $(HAIKU_TOP) src system libroot posix string ] ; 137 138SEARCH on [ FGristFiles driver_settings.cpp ] 139 = [ FDirName $(HAIKU_TOP) src system libroot os ] ; 140 141SEARCH on [ FGristFiles 142 main.cpp vfs.cpp partitions.cpp 143 heap.cpp RootFileSystem.cpp 144 elf.cpp menu.cpp loader.cpp 145 kernel_args.cpp load_driver_settings.cpp pager.cpp 146 ] = [ FDirName $(HAIKU_TOP) src system boot loader ] ; 147 148# partitioning system modules 149 150SEARCH on [ FGristFiles amiga_rdb.cpp ] 151 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ; 152 153SEARCH on [ FGristFiles apple.cpp ] 154 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ; 155 156SEARCH on [ FGristFiles gpt.cpp Header.cpp crc32.cpp utility.cpp ] 157 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ; 158 159SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ] 160 = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ; 161 162 163SubInclude HAIKU_TOP src tests system boot loader file_systems ; 164