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 locked_pool 70 scsi_periph 71 ; 72AddFilesToNetBootArchive system add-ons kernel partitioning_systems : 73 intel 74 session 75 ; 76AddFilesToNetBootArchive system add-ons kernel interrupt_controllers : 77 openpic@ppc 78 ; 79 80if $(TARGET_ARCH) = x86 { 81 AddFilesToNetBootArchive system add-ons kernel cpu 82 : 83 generic_x86 84 ; 85} 86 87# drivers 88AddNewDriversToNetBootArchive disk scsi : 89 scsi_cd 90 scsi_disk 91 ; 92AddDriversToNetBootArchive disk virtual : 93# nbd 94 ; 95AddDriversToNetBootArchive disk virtual : 96 remote_disk 97 ; 98AddDriversToNetBootArchive net 99 : $(SYSTEM_ADD_ONS_DRIVERS_NET) ; 100 101# kernel 102AddFilesToNetBootArchive system 103 : <revisioned>kernel_$(TARGET_ARCH) ; 104 105# scripts and data files 106 107local driverSettingsFiles = <driver-settings>kernel ; 108SEARCH on $(driverSettingsFiles) 109 = [ FDirName $(HAIKU_TOP) data settings kernel drivers ] ; 110AddFilesToNetBootArchive home config settings kernel drivers 111 : $(driverSettingsFiles) ; 112 113# add-ons 114AddFilesToNetBootArchive system add-ons kernel network : 115 stack 116 ; 117AddFilesToNetBootArchive system add-ons kernel network devices 118 : $(SYSTEM_NETWORK_DEVICES) ; 119AddFilesToNetBootArchive 120 system add-ons kernel network datalink_protocols 121 : $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ; 122AddFilesToNetBootArchive system add-ons kernel network ppp 123 : $(SYSTEM_NETWORK_PPP) ; 124AddFilesToNetBootArchive 125 system add-ons kernel network protocols 126 : $(SYSTEM_NETWORK_PROTOCOLS) ; 127 128# boot module links 129AddBootModuleSymlinksToNetBootArchive 130 $(SYSTEM_ADD_ONS_BUS_MANAGERS) 131 ahci 132 generic_ide_pci 133 ide_isa@x86 134 silicon_image_3112 135 $(SYSTEM_ADD_ONS_FILE_SYSTEMS) 136 ata_adapter 137 locked_pool 138 scsi_periph 139 intel 140 session 141 openpic@ppc 142 generic_x86@x86 143# nbd 144 remote_disk 145 $(SYSTEM_ADD_ONS_DRIVERS_NET) 146 stack 147 $(SYSTEM_NETWORK_DEVICES) 148 $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) 149 $(SYSTEM_NETWORK_PPP) 150 $(SYSTEM_NETWORK_PROTOCOLS) 151; 152 153 154#pragma mark - Build The Archive 155 156# archive target 157HAIKU_NET_BOOT_ARCHIVE = haiku-netboot.tgz ; 158MakeLocate $(HAIKU_NET_BOOT_ARCHIVE) : $(HAIKU_OUTPUT_DIR) ; 159 160# the pseudo target all archive contents is attached to 161NotFile $(HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME) ; 162 163# prepare the script that initializes the shell variables 164local initVarsScript = <NetBootArchive>haiku-netboot-init-vars ; 165local script = $(initVarsScript) ; 166MakeLocate $(script) : $(HAIKU_OUTPUT_DIR) ; 167Always $(script) ; 168 169AddVariableToScript $(script) : tmpDir : $(HAIKU_TMP_DIR) ; 170AddVariableToScript $(script) : addBuildCompatibilityLibDir 171 : "export $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)" ; 172AddTargetVariableToScript $(script) : <build>copyattr ; 173 174# create the other scripts 175local makeDirsScript = <NetBootArchive>haiku-netboot-make-dirs ; 176local copyFilesScript = <NetBootArchive>haiku-netboot-copy-files ; 177MakeLocate $(makeDirsScript) $(copyFilesScript) : $(HAIKU_OUTPUT_DIR) ; 178 179CreateNetBootArchiveMakeDirectoriesScript $(makeDirsScript) ; 180CreateNetBootArchiveCopyFilesScript $(copyFilesScript) ; 181 182# build the archive 183 184BuildNetBootArchive $(HAIKU_NET_BOOT_ARCHIVE) : 185 $(initVarsScript) 186 $(makeDirsScript) 187 $(copyFilesScript) 188; 189 190# remove the scripts we have generated 191RmTemps $(HAIKU_NET_BOOT_ARCHIVE) : 192 $(initVarsScript) 193 $(makeDirsScript) 194 $(copyFilesScript) 195; 196 197NotFile haiku-netboot-archive ; 198Depends haiku-netboot-archive : $(HAIKU_NET_BOOT_ARCHIVE) ; 199