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