xref: /haiku/src/tests/system/boot/loader/Jamfile (revision f6166140a197ba64ff01f84e57ff74a58ea2428d)
177b1fd22SAxel DörflerSubDir HAIKU_TOP src tests system boot loader ;
277b1fd22SAxel Dörfler
377b1fd22SAxel DörflerUsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
4d6e44a2aSAxel DörflerUsePrivateHeaders [ FDirName kernel util ] ;
5d6e44a2aSAxel DörflerUsePrivateHeaders kernel shared storage system ;
6*c4eec9f1SAugustin CavalierSubDirSysHdrs $(HAIKU_TOP) headers private kernel arch $(TARGET_KERNEL_ARCH_DIR) ;
7d6e44a2aSAxel DörflerSubDirSysHdrs $(HAIKU_TOP) headers private system 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 ;
1261ba1259SAxel DörflerSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ;
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
30d6e44a2aSAxel Dörfler	pager.cpp
3177b1fd22SAxel Dörfler
3277b1fd22SAxel Dörfler	# other
3377b1fd22SAxel Dörfler	platform_menu.cpp
34ae7af41eSMatt Madia	driver_settings.cpp
3577b1fd22SAxel Dörfler
3677b1fd22SAxel Dörfler	# partitions
3777b1fd22SAxel Dörfler	amiga_rdb.cpp
3877b1fd22SAxel Dörfler	apple.cpp
39ab313893SAxel Dörfler
40ed7204faSAlexander von Gluck IV	gpt.cpp
41ab313893SAxel Dörfler	Header.cpp
42ab313893SAxel Dörfler	crc32.cpp
43ab313893SAxel Dörfler	utility.cpp
44ab313893SAxel Dörfler
4577b1fd22SAxel Dörfler	intel.cpp
4677b1fd22SAxel Dörfler	PartitionMap.cpp
4777b1fd22SAxel Dörfler	PartitionMapParser.cpp
4877b1fd22SAxel Dörfler	:
4977b1fd22SAxel Dörfler	read_pos=boot_read_pos fstat=boot_fstat open=boot_open close=boot_close main=boot_main
5077b1fd22SAxel Dörfler	;
5177b1fd22SAxel Dörfler
5277b1fd22SAxel Dörfler{
5377b1fd22SAxel Dörfler	local defines =
5477b1fd22SAxel Dörfler		BOOT_ARCH=\\\"$(TARGET_ARCH)\\\"
5577b1fd22SAxel Dörfler			# the boot loader test application will try to load the BeOS kernel
5677b1fd22SAxel Dörfler			# from a supported partition/file system
5777b1fd22SAxel Dörfler
5877b1fd22SAxel Dörfler		BOOT_SUPPORT_PARTITION_AMIGA
5977b1fd22SAxel Dörfler		BOOT_SUPPORT_PARTITION_APPLE
605cb688f8SAxel Dörfler		BOOT_SUPPORT_PARTITION_EFI
6177b1fd22SAxel Dörfler		BOOT_SUPPORT_PARTITION_INTEL
6277b1fd22SAxel Dörfler
6377b1fd22SAxel Dörfler		BOOT_SUPPORT_FILE_SYSTEM_BFS
6477b1fd22SAxel Dörfler		BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
6577b1fd22SAxel Dörfler		BOOT_SUPPORT_FILE_SYSTEM_TARFS
6677b1fd22SAxel Dörfler		;
6777b1fd22SAxel Dörfler
6877b1fd22SAxel Dörfler	defines = [ FDefines $(defines) ] ;
6977b1fd22SAxel Dörfler
7077b1fd22SAxel Dörfler	if $(OS) = "LINUX" {
71ab313893SAxel Dörfler		SubDirC++Flags $(defines) ;
7277b1fd22SAxel Dörfler	} else {
7377b1fd22SAxel Dörfler		#SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -fcheck-memory-usage -D_NO_INLINE_ASM ;
7477b1fd22SAxel Dörfler		SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -D_NO_INLINE_ASM ;
7577b1fd22SAxel Dörfler	}
7677b1fd22SAxel Dörfler}
7777b1fd22SAxel Dörfler
7877b1fd22SAxel DörflerSimpleTest BootLoaderTest :
7977b1fd22SAxel Dörfler	# userland bindings
8077b1fd22SAxel Dörfler	platform_start.cpp
81d6e44a2aSAxel Dörfler	platform_console.cpp
8277b1fd22SAxel Dörfler	platform_debug.cpp
8377b1fd22SAxel Dörfler	platform_devices.cpp
8477b1fd22SAxel Dörfler	platform_heap.cpp
8577b1fd22SAxel Dörfler	platform_menu.cpp
8677b1fd22SAxel Dörfler	platform_misc.cpp
8777b1fd22SAxel Dörfler	platform_mmu.cpp
8877b1fd22SAxel Dörfler	Handle.cpp
8977b1fd22SAxel Dörfler
9077b1fd22SAxel Dörfler	# boot loader
9177b1fd22SAxel Dörfler	main.cpp
9277b1fd22SAxel Dörfler	vfs.cpp
9377b1fd22SAxel Dörfler	partitions.cpp
9477b1fd22SAxel Dörfler	RootFileSystem.cpp
9577b1fd22SAxel Dörfler	elf.cpp
9677b1fd22SAxel Dörfler	menu.cpp
9777b1fd22SAxel Dörfler	loader.cpp
9877b1fd22SAxel Dörfler	kernel_args.cpp
9977b1fd22SAxel Dörfler	load_driver_settings.cpp
100d6e44a2aSAxel Dörfler	pager.cpp
10177b1fd22SAxel Dörfler
10277b1fd22SAxel Dörfler	# partitioning systems
10377b1fd22SAxel Dörfler	amiga_rdb.cpp
10477b1fd22SAxel Dörfler	apple.cpp
105ab313893SAxel Dörfler
106ed7204faSAlexander von Gluck IV	gpt.cpp
107ab313893SAxel Dörfler	Header.cpp
108ab313893SAxel Dörfler	crc32.cpp
109ab313893SAxel Dörfler	utility.cpp
110ab313893SAxel Dörfler
11177b1fd22SAxel Dörfler	intel.cpp
11277b1fd22SAxel Dörfler	PartitionMap.cpp
11377b1fd22SAxel Dörfler	PartitionMapParser.cpp
11477b1fd22SAxel Dörfler
115d6e44a2aSAxel Dörfler	# utility functions
116ae7af41eSMatt Madia	list.cpp
117ae7af41eSMatt Madia	driver_settings.cpp
118d6e44a2aSAxel Dörfler	ring_buffer.cpp
11973ad280aSAxel Dörfler	KMessage.cpp
12077b1fd22SAxel Dörfler
121d6e44a2aSAxel Dörfler	:
122d6e44a2aSAxel Dörfler	boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a
123d6e44a2aSAxel Dörfler	kernelland_emu
12477b1fd22SAxel Dörfler;
12577b1fd22SAxel Dörfler
12677b1fd22SAxel Dörfler# Tell Jam where to find the utility sources
12777b1fd22SAxel Dörfler
128d6e44a2aSAxel DörflerSEARCH on [ FGristFiles list.cpp ring_buffer.cpp ]
12977b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
13077b1fd22SAxel Dörfler
13173ad280aSAxel DörflerSEARCH on [ FGristFiles KMessage.cpp ]
13273ad280aSAxel Dörfler    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
13373ad280aSAxel Dörfler
13477b1fd22SAxel DörflerSEARCH on [ FGristFiles strlcat.c strlcpy.c ]
13577b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;
13677b1fd22SAxel Dörfler
137ae7af41eSMatt MadiaSEARCH on [ FGristFiles driver_settings.cpp ]
13877b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
13977b1fd22SAxel Dörfler
14077b1fd22SAxel DörflerSEARCH on [ FGristFiles
14177b1fd22SAxel Dörfler		main.cpp vfs.cpp partitions.cpp
14277b1fd22SAxel Dörfler		heap.cpp RootFileSystem.cpp
14377b1fd22SAxel Dörfler		elf.cpp menu.cpp loader.cpp
144d6e44a2aSAxel Dörfler		kernel_args.cpp load_driver_settings.cpp pager.cpp
14577b1fd22SAxel Dörfler	] = [ FDirName $(HAIKU_TOP) src system boot loader ] ;
14677b1fd22SAxel Dörfler
14777b1fd22SAxel Dörfler# partitioning system modules
14877b1fd22SAxel Dörfler
14977b1fd22SAxel DörflerSEARCH on [ FGristFiles amiga_rdb.cpp ]
15077b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
15177b1fd22SAxel Dörfler
15277b1fd22SAxel DörflerSEARCH on [ FGristFiles apple.cpp ]
15377b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
15477b1fd22SAxel Dörfler
155ed7204faSAlexander von Gluck IVSEARCH on [ FGristFiles gpt.cpp Header.cpp crc32.cpp utility.cpp ]
15661ba1259SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
157eef8417eSAxel Dörfler
15877b1fd22SAxel DörflerSEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
15977b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
16077b1fd22SAxel Dörfler
16177b1fd22SAxel Dörfler
16277b1fd22SAxel DörflerSubInclude HAIKU_TOP src tests system boot loader file_systems ;
163