xref: /haiku/src/tests/system/boot/loader/Jamfile (revision c4eec9f1e83039370316bce40ff4e0ce37e135c3)
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_MODE
5577b1fd22SAxel Dörfler		BOOT_ARCH=\\\"$(TARGET_ARCH)\\\"
5677b1fd22SAxel Dörfler			# the boot loader test application will try to load the BeOS kernel
5777b1fd22SAxel Dörfler			# from a supported partition/file system
5877b1fd22SAxel Dörfler
5977b1fd22SAxel Dörfler		BOOT_SUPPORT_PARTITION_AMIGA
6077b1fd22SAxel Dörfler		BOOT_SUPPORT_PARTITION_APPLE
615cb688f8SAxel Dörfler		BOOT_SUPPORT_PARTITION_EFI
6277b1fd22SAxel Dörfler		BOOT_SUPPORT_PARTITION_INTEL
6377b1fd22SAxel Dörfler
6477b1fd22SAxel Dörfler		BOOT_SUPPORT_FILE_SYSTEM_BFS
6577b1fd22SAxel Dörfler		BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
6677b1fd22SAxel Dörfler		BOOT_SUPPORT_FILE_SYSTEM_TARFS
6777b1fd22SAxel Dörfler		;
6877b1fd22SAxel Dörfler
6977b1fd22SAxel Dörfler	defines = [ FDefines $(defines) ] ;
7077b1fd22SAxel Dörfler
7177b1fd22SAxel Dörfler	if $(OS) = "LINUX" {
72ab313893SAxel Dörfler		SubDirC++Flags $(defines) ;
7377b1fd22SAxel Dörfler	} else {
7477b1fd22SAxel Dörfler		#SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -fcheck-memory-usage -D_NO_INLINE_ASM ;
7577b1fd22SAxel Dörfler		SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -D_NO_INLINE_ASM ;
7677b1fd22SAxel Dörfler	}
7777b1fd22SAxel Dörfler}
7877b1fd22SAxel Dörfler
7977b1fd22SAxel DörflerSimpleTest BootLoaderTest :
8077b1fd22SAxel Dörfler	# userland bindings
8177b1fd22SAxel Dörfler	platform_start.cpp
82d6e44a2aSAxel Dörfler	platform_console.cpp
8377b1fd22SAxel Dörfler	platform_debug.cpp
8477b1fd22SAxel Dörfler	platform_devices.cpp
8577b1fd22SAxel Dörfler	platform_heap.cpp
8677b1fd22SAxel Dörfler	platform_menu.cpp
8777b1fd22SAxel Dörfler	platform_misc.cpp
8877b1fd22SAxel Dörfler	platform_mmu.cpp
8977b1fd22SAxel Dörfler	Handle.cpp
9077b1fd22SAxel Dörfler
9177b1fd22SAxel Dörfler	# boot loader
9277b1fd22SAxel Dörfler	main.cpp
9377b1fd22SAxel Dörfler	vfs.cpp
9477b1fd22SAxel Dörfler	partitions.cpp
9577b1fd22SAxel Dörfler	RootFileSystem.cpp
9677b1fd22SAxel Dörfler	elf.cpp
9777b1fd22SAxel Dörfler	menu.cpp
9877b1fd22SAxel Dörfler	loader.cpp
9977b1fd22SAxel Dörfler	kernel_args.cpp
10077b1fd22SAxel Dörfler	load_driver_settings.cpp
101d6e44a2aSAxel Dörfler	pager.cpp
10277b1fd22SAxel Dörfler
10377b1fd22SAxel Dörfler	# partitioning systems
10477b1fd22SAxel Dörfler	amiga_rdb.cpp
10577b1fd22SAxel Dörfler	apple.cpp
106ab313893SAxel Dörfler
107ed7204faSAlexander von Gluck IV	gpt.cpp
108ab313893SAxel Dörfler	Header.cpp
109ab313893SAxel Dörfler	crc32.cpp
110ab313893SAxel Dörfler	utility.cpp
111ab313893SAxel Dörfler
11277b1fd22SAxel Dörfler	intel.cpp
11377b1fd22SAxel Dörfler	PartitionMap.cpp
11477b1fd22SAxel Dörfler	PartitionMapParser.cpp
11577b1fd22SAxel Dörfler
116d6e44a2aSAxel Dörfler	# utility functions
117ae7af41eSMatt Madia	list.cpp
118ae7af41eSMatt Madia	driver_settings.cpp
119d6e44a2aSAxel Dörfler	ring_buffer.cpp
12073ad280aSAxel Dörfler	KMessage.cpp
12177b1fd22SAxel Dörfler
122d6e44a2aSAxel Dörfler	:
123d6e44a2aSAxel Dörfler	boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a
124d6e44a2aSAxel Dörfler	kernelland_emu
12577b1fd22SAxel Dörfler;
12677b1fd22SAxel Dörfler
12777b1fd22SAxel Dörfler# Tell Jam where to find the utility sources
12877b1fd22SAxel Dörfler
129d6e44a2aSAxel DörflerSEARCH on [ FGristFiles list.cpp ring_buffer.cpp ]
13077b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
13177b1fd22SAxel Dörfler
13273ad280aSAxel DörflerSEARCH on [ FGristFiles KMessage.cpp ]
13373ad280aSAxel Dörfler    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
13473ad280aSAxel Dörfler
13577b1fd22SAxel DörflerSEARCH on [ FGristFiles strlcat.c strlcpy.c ]
13677b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;
13777b1fd22SAxel Dörfler
138ae7af41eSMatt MadiaSEARCH on [ FGristFiles driver_settings.cpp ]
13977b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
14077b1fd22SAxel Dörfler
14177b1fd22SAxel DörflerSEARCH on [ FGristFiles
14277b1fd22SAxel Dörfler		main.cpp vfs.cpp partitions.cpp
14377b1fd22SAxel Dörfler		heap.cpp RootFileSystem.cpp
14477b1fd22SAxel Dörfler		elf.cpp menu.cpp loader.cpp
145d6e44a2aSAxel Dörfler		kernel_args.cpp load_driver_settings.cpp pager.cpp
14677b1fd22SAxel Dörfler	] = [ FDirName $(HAIKU_TOP) src system boot loader ] ;
14777b1fd22SAxel Dörfler
14877b1fd22SAxel Dörfler# partitioning system modules
14977b1fd22SAxel Dörfler
15077b1fd22SAxel DörflerSEARCH on [ FGristFiles amiga_rdb.cpp ]
15177b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
15277b1fd22SAxel Dörfler
15377b1fd22SAxel DörflerSEARCH on [ FGristFiles apple.cpp ]
15477b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
15577b1fd22SAxel Dörfler
156ed7204faSAlexander von Gluck IVSEARCH on [ FGristFiles gpt.cpp Header.cpp crc32.cpp utility.cpp ]
15761ba1259SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
158eef8417eSAxel Dörfler
15977b1fd22SAxel DörflerSEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
16077b1fd22SAxel Dörfler	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
16177b1fd22SAxel Dörfler
16277b1fd22SAxel Dörfler
16377b1fd22SAxel DörflerSubInclude HAIKU_TOP src tests system boot loader file_systems ;
164