xref: /haiku/build/jam/images/NetBootArchive (revision 344ded80d400028c8f561b4b876257b94c12db4a)
1# This file defines what ends up in the network boot archive and it executes the
2# rules building the archive.
3
4
5SYSTEM_NETWORK_DEVICES = ethernet loopback ;
6SYSTEM_NETWORK_DATALINK_PROTOCOLS = ethernet_frame <module>arp loopback_frame ;
7SYSTEM_NETWORK_PROTOCOLS = ipv4 tcp udp icmp unix ;
8
9SYSTEM_ADD_ONS_DRIVERS_NET = [ FFilterByBuildFeatures
10	x86 @{
11		3com
12		atheros813x
13		atheros81xx
14		broadcom440x
15		broadcom570x
16		ipro1000
17		rtl8139
18		via_rhine
19		ipro100
20		nforce
21		marvell_yukon
22		sis900
23		syskonnect
24		attansic_l2
25	}@ # x86
26
27	rtl81xx
28	etherpci
29	pegasus
30	usb_ecm
31	wb840
32] ;
33SYSTEM_ADD_ONS_BUS_MANAGERS = [ FFilterByBuildFeatures
34	pci
35	isa@x86
36	ata
37	scsi
38	agp_gart
39	dpc
40	acpi
41] ;
42SYSTEM_ADD_ONS_FILE_SYSTEMS =
43	bfs
44	packagefs
45	;
46
47
48# modules
49AddFilesToNetBootArchive system add-ons kernel bus_managers
50	: $(SYSTEM_ADD_ONS_BUS_MANAGERS) ;
51AddFilesToNetBootArchive system add-ons kernel busses agp_gart :
52	<agp_gart>intel@x86
53	;
54AddFilesToNetBootArchive system add-ons kernel busses ide :
55	generic_ide_pci
56	ide_isa@x86
57	silicon_image_3112
58	;
59AddFilesToNetBootArchive system add-ons kernel busses scsi :
60	ahci
61	;
62AddFilesToNetBootArchive system add-ons kernel console :
63	vga_text
64	;
65AddFilesToNetBootArchive system add-ons kernel file_systems
66	: $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
67AddFilesToNetBootArchive system add-ons kernel generic :
68	ata_adapter
69	scsi_periph
70	;
71AddFilesToNetBootArchive system add-ons kernel partitioning_systems :
72	intel
73	session
74	;
75AddFilesToNetBootArchive system add-ons kernel interrupt_controllers :
76	openpic@ppc
77	;
78
79if $(TARGET_ARCH) = x86 {
80	AddFilesToNetBootArchive system add-ons kernel cpu
81		:
82		generic_x86
83		;
84}
85
86# drivers
87AddNewDriversToNetBootArchive disk scsi :
88	scsi_cd
89	scsi_disk
90	;
91AddDriversToNetBootArchive disk virtual :
92#	nbd
93	;
94AddDriversToNetBootArchive disk virtual :
95	remote_disk
96	;
97AddDriversToNetBootArchive net
98	: $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
99
100# kernel
101AddFilesToNetBootArchive system
102	: <revisioned>kernel_$(TARGET_ARCH) ;
103
104# scripts and data files
105
106local driverSettingsFiles = <driver-settings>kernel ;
107SEARCH on $(driverSettingsFiles)
108	= [ FDirName $(HAIKU_TOP) data settings kernel drivers ] ;
109AddFilesToNetBootArchive home config settings kernel drivers
110	: $(driverSettingsFiles) ;
111
112# add-ons
113AddFilesToNetBootArchive system add-ons kernel network :
114	stack
115	;
116AddFilesToNetBootArchive system add-ons kernel network devices
117	: $(SYSTEM_NETWORK_DEVICES) ;
118AddFilesToNetBootArchive
119	system add-ons kernel network datalink_protocols
120	: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
121AddFilesToNetBootArchive system add-ons kernel network ppp
122	: $(SYSTEM_NETWORK_PPP) ;
123AddFilesToNetBootArchive
124	system add-ons kernel network protocols
125	: $(SYSTEM_NETWORK_PROTOCOLS) ;
126
127# boot module links
128AddBootModuleSymlinksToNetBootArchive
129	$(SYSTEM_ADD_ONS_BUS_MANAGERS)
130	ahci
131	generic_ide_pci
132	ide_isa@x86
133	silicon_image_3112
134	$(SYSTEM_ADD_ONS_FILE_SYSTEMS)
135	ata_adapter
136	scsi_periph
137	intel
138	session
139	openpic@ppc
140	generic_x86@x86
141#	nbd
142	remote_disk
143	$(SYSTEM_ADD_ONS_DRIVERS_NET)
144	stack
145	$(SYSTEM_NETWORK_DEVICES)
146	$(SYSTEM_NETWORK_DATALINK_PROTOCOLS)
147	$(SYSTEM_NETWORK_PPP)
148	$(SYSTEM_NETWORK_PROTOCOLS)
149;
150
151
152#pragma mark - Build The Archive
153
154# archive target
155HAIKU_NET_BOOT_ARCHIVE = haiku-netboot.tgz ;
156MakeLocate $(HAIKU_NET_BOOT_ARCHIVE) : $(HAIKU_OUTPUT_DIR) ;
157
158# the pseudo target all archive contents is attached to
159NotFile $(HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME) ;
160
161# prepare the script that initializes the shell variables
162local initVarsScript = <NetBootArchive>haiku-netboot-init-vars ;
163local script = $(initVarsScript) ;
164MakeLocate $(script) : $(HAIKU_OUTPUT_DIR) ;
165Always $(script) ;
166
167AddVariableToScript $(script) : tmpDir : $(HAIKU_TMP_DIR) ;
168AddVariableToScript $(script) : addBuildCompatibilityLibDir
169	: "export $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)" ;
170AddTargetVariableToScript $(script) : <build>copyattr ;
171
172# create the other scripts
173local makeDirsScript = <NetBootArchive>haiku-netboot-make-dirs ;
174local copyFilesScript = <NetBootArchive>haiku-netboot-copy-files ;
175MakeLocate $(makeDirsScript) $(copyFilesScript) : $(HAIKU_OUTPUT_DIR) ;
176
177CreateNetBootArchiveMakeDirectoriesScript $(makeDirsScript) ;
178CreateNetBootArchiveCopyFilesScript $(copyFilesScript) ;
179
180# build the archive
181
182BuildNetBootArchive $(HAIKU_NET_BOOT_ARCHIVE) :
183	$(initVarsScript)
184	$(makeDirsScript)
185	$(copyFilesScript)
186;
187
188# remove the scripts we have generated
189RmTemps $(HAIKU_NET_BOOT_ARCHIVE) :
190	$(initVarsScript)
191	$(makeDirsScript)
192	$(copyFilesScript)
193;
194
195NotFile haiku-netboot-archive ;
196Depends haiku-netboot-archive : $(HAIKU_NET_BOOT_ARCHIVE) ;
197