177b1fd22SAxel DörflerSubDir HAIKU_TOP src tests system boot loader ; 277b1fd22SAxel Dörfler 377b1fd22SAxel DörflerUsePrivateHeaders [ FDirName kernel ] ; 477b1fd22SAxel DörflerUsePrivateHeaders [ FDirName kernel disk_device_manager ] ; 577b1fd22SAxel DörflerUsePrivateHeaders [ FDirName storage ] ; 677b1fd22SAxel DörflerUsePrivateHeaders [ FDirName shared ] ; 7268403d4SAxel DörflerSubDirSysHdrs $(HAIKU_TOP) headers private kernel arch $(TARGET_ARCH) ; 8268403d4SAxel DörflerSubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ; 977b1fd22SAxel DörflerSubDirHdrs $(HAIKU_TOP) src system boot loader ; 10268403d4SAxel DörflerSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ; 11268403d4SAxel DörflerSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ; 12eef8417eSAxel DörflerSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ; 13268403d4SAxel DörflerSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ; 1477b1fd22SAxel Dörfler 1577b1fd22SAxel Dörfler# we need to redefine certain calls in the boot loader so that 1677b1fd22SAxel Dörfler# they will really be used instead of their POSIX counterparts 1777b1fd22SAxel Dörfler# in libroot.so 1877b1fd22SAxel Dörfler 1977b1fd22SAxel DörflerObjectDefines 2077b1fd22SAxel Dörfler # boot loader 2177b1fd22SAxel Dörfler main.cpp 2277b1fd22SAxel Dörfler vfs.cpp 2377b1fd22SAxel Dörfler partitions.cpp 2477b1fd22SAxel Dörfler RootFileSystem.cpp 2577b1fd22SAxel Dörfler elf.cpp 2677b1fd22SAxel Dörfler menu.cpp 2777b1fd22SAxel Dörfler loader.cpp 2877b1fd22SAxel Dörfler kernel_args.cpp 2977b1fd22SAxel Dörfler load_driver_settings.cpp 3077b1fd22SAxel Dörfler 3177b1fd22SAxel Dörfler # other 3277b1fd22SAxel Dörfler platform_menu.cpp 3377b1fd22SAxel Dörfler driver_settings.c 3477b1fd22SAxel Dörfler 3577b1fd22SAxel Dörfler # partitions 3677b1fd22SAxel Dörfler amiga_rdb.cpp 3777b1fd22SAxel Dörfler apple.cpp 38eef8417eSAxel Dörfler efi_gpt.cpp 3977b1fd22SAxel Dörfler intel.cpp 4077b1fd22SAxel Dörfler PartitionMap.cpp 4177b1fd22SAxel Dörfler PartitionMapParser.cpp 4277b1fd22SAxel Dörfler : 4377b1fd22SAxel Dörfler read_pos=boot_read_pos fstat=boot_fstat open=boot_open close=boot_close main=boot_main 4477b1fd22SAxel Dörfler ; 4577b1fd22SAxel Dörfler 4677b1fd22SAxel Dörfler{ 4777b1fd22SAxel Dörfler local defines = 4877b1fd22SAxel Dörfler _BOOT_MODE 4977b1fd22SAxel Dörfler BOOT_ARCH=\\\"$(TARGET_ARCH)\\\" 5077b1fd22SAxel Dörfler # the boot loader test application will try to load the BeOS kernel 5177b1fd22SAxel Dörfler # from a supported partition/file system 5277b1fd22SAxel Dörfler 5377b1fd22SAxel Dörfler BOOT_SUPPORT_PARTITION_AMIGA 5477b1fd22SAxel Dörfler BOOT_SUPPORT_PARTITION_APPLE 55*5cb688f8SAxel Dörfler BOOT_SUPPORT_PARTITION_EFI 5677b1fd22SAxel Dörfler BOOT_SUPPORT_PARTITION_INTEL 5777b1fd22SAxel Dörfler 5877b1fd22SAxel Dörfler BOOT_SUPPORT_FILE_SYSTEM_BFS 5977b1fd22SAxel Dörfler BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS 6077b1fd22SAxel Dörfler BOOT_SUPPORT_FILE_SYSTEM_TARFS 6177b1fd22SAxel Dörfler ; 6277b1fd22SAxel Dörfler 6377b1fd22SAxel Dörfler defines = [ FDefines $(defines) ] ; 6477b1fd22SAxel Dörfler 6577b1fd22SAxel Dörfler if $(OS) = "LINUX" { 6677b1fd22SAxel Dörfler } else { 6777b1fd22SAxel Dörfler #SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -fcheck-memory-usage -D_NO_INLINE_ASM ; 6877b1fd22SAxel Dörfler SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -D_NO_INLINE_ASM ; 6977b1fd22SAxel Dörfler } 7077b1fd22SAxel Dörfler} 7177b1fd22SAxel Dörfler 7277b1fd22SAxel DörflerSimpleTest BootLoaderTest : 7377b1fd22SAxel Dörfler # userland bindings 7477b1fd22SAxel Dörfler platform_start.cpp 7577b1fd22SAxel Dörfler platform_debug.cpp 7677b1fd22SAxel Dörfler platform_devices.cpp 7777b1fd22SAxel Dörfler platform_heap.cpp 7877b1fd22SAxel Dörfler platform_menu.cpp 7977b1fd22SAxel Dörfler platform_misc.cpp 8077b1fd22SAxel Dörfler platform_mmu.cpp 8177b1fd22SAxel Dörfler Handle.cpp 8277b1fd22SAxel Dörfler 8377b1fd22SAxel Dörfler # boot loader 8477b1fd22SAxel Dörfler main.cpp 8577b1fd22SAxel Dörfler vfs.cpp 8677b1fd22SAxel Dörfler partitions.cpp 8777b1fd22SAxel Dörfler RootFileSystem.cpp 8877b1fd22SAxel Dörfler elf.cpp 8977b1fd22SAxel Dörfler menu.cpp 9077b1fd22SAxel Dörfler loader.cpp 9177b1fd22SAxel Dörfler kernel_args.cpp 9277b1fd22SAxel Dörfler load_driver_settings.cpp 9377b1fd22SAxel Dörfler 9477b1fd22SAxel Dörfler # partitioning systems 9577b1fd22SAxel Dörfler amiga_rdb.cpp 9677b1fd22SAxel Dörfler apple.cpp 97eef8417eSAxel Dörfler efi_gpt.cpp 9877b1fd22SAxel Dörfler intel.cpp 9977b1fd22SAxel Dörfler PartitionMap.cpp 10077b1fd22SAxel Dörfler PartitionMapParser.cpp 10177b1fd22SAxel Dörfler 10277b1fd22SAxel Dörfler # utility functions - Dano has a strlcpy() function in libroot.so, while R5 has not 10377b1fd22SAxel Dörfler list.c 10477b1fd22SAxel Dörfler strlcat.c 10577b1fd22SAxel Dörfler strlcpy.c 10677b1fd22SAxel Dörfler driver_settings.c 10777b1fd22SAxel Dörfler 10877b1fd22SAxel Dörfler : boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a 10977b1fd22SAxel Dörfler ; 11077b1fd22SAxel Dörfler 11177b1fd22SAxel Dörfler# Tell Jam where to find the utility sources 11277b1fd22SAxel Dörfler 11377b1fd22SAxel DörflerSEARCH on [ FGristFiles list.c ] 11477b1fd22SAxel Dörfler = [ FDirName $(HAIKU_TOP) src system kernel util ] ; 11577b1fd22SAxel Dörfler 11677b1fd22SAxel DörflerSEARCH on [ FGristFiles strlcat.c strlcpy.c ] 11777b1fd22SAxel Dörfler = [ FDirName $(HAIKU_TOP) src system libroot posix string ] ; 11877b1fd22SAxel Dörfler 11977b1fd22SAxel DörflerSEARCH on [ FGristFiles driver_settings.c ] 12077b1fd22SAxel Dörfler = [ FDirName $(HAIKU_TOP) src system libroot os ] ; 12177b1fd22SAxel Dörfler 12277b1fd22SAxel DörflerSEARCH on [ FGristFiles 12377b1fd22SAxel Dörfler main.cpp vfs.cpp partitions.cpp 12477b1fd22SAxel Dörfler heap.cpp RootFileSystem.cpp 12577b1fd22SAxel Dörfler elf.cpp menu.cpp loader.cpp 12677b1fd22SAxel Dörfler kernel_args.cpp load_driver_settings.cpp 12777b1fd22SAxel Dörfler ] = [ FDirName $(HAIKU_TOP) src system boot loader ] ; 12877b1fd22SAxel Dörfler 12977b1fd22SAxel Dörfler# partitioning system modules 13077b1fd22SAxel Dörfler 13177b1fd22SAxel DörflerSEARCH on [ FGristFiles amiga_rdb.cpp ] 13277b1fd22SAxel Dörfler = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ; 13377b1fd22SAxel Dörfler 13477b1fd22SAxel DörflerSEARCH on [ FGristFiles apple.cpp ] 13577b1fd22SAxel Dörfler = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ; 13677b1fd22SAxel Dörfler 137eef8417eSAxel DörflerSEARCH on [ FGristFiles efi_gpt.cpp ] 138eef8417eSAxel Dörfler = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ] ; 139eef8417eSAxel Dörfler 14077b1fd22SAxel DörflerSEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ] 14177b1fd22SAxel Dörfler = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ; 14277b1fd22SAxel Dörfler 14377b1fd22SAxel Dörfler 14477b1fd22SAxel DörflerSubInclude HAIKU_TOP src tests system boot loader file_systems ; 145