1 # This file defines what ends up in the floppy boot image and it executes the
2 # rules building the image.
5 #HACK: remove when old ide code is removed!
15 local BOOT_ADD_ONS_NET ;
19 $(SYSTEM_ADD_ONS_DRIVERS_NET)
21 $(SYSTEM_NETWORK_DEVICES)
22 $(SYSTEM_NETWORK_DATALINK_PROTOCOLS)
24 $(SYSTEM_NETWORK_PROTOCOLS)
28 SYSTEM_ADD_ONS_BUS_MANAGERS = [ FFilterByBuildFeatures
29 acpi@x86,x86_64 ata@ata config_manager dpc pci
30 isa@x86,x86_64 scsi $(USB_ONLY)usb fdt@arm
32 SYSTEM_ADD_ONS_FILE_SYSTEMS =
33 attribute_overlay bfs iso9660 packagefs write_overlay
37 AddFilesToFloppyBootArchive system add-ons kernel bus_managers
38 : $(SYSTEM_ADD_ONS_BUS_MANAGERS) ;
40 AddFilesToFloppyBootArchive system add-ons kernel busses ata
41 : generic_ide_pci ide_isa@x86 silicon_image_3112 legacy_sata
44 AddFilesToFloppyBootArchive system add-ons kernel busses scsi
46 AddFilesToFloppyBootArchive system add-ons kernel console : vga_text ;
47 AddFilesToFloppyBootArchive system add-ons kernel file_systems
48 : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
49 AddFilesToFloppyBootArchive system add-ons kernel generic
50 : ata_adapter@ata locked_pool scsi_periph ;
51 AddFilesToFloppyBootArchive system add-ons kernel partitioning_systems
53 AddFilesToFloppyBootArchive system add-ons kernel interrupt_controllers
57 AddFilesToFloppyBootArchive system add-ons kernel busses usb
58 : <usb>uhci <usb>ohci <usb>ehci ;
61 if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
62 AddFilesToFloppyBootArchive system add-ons kernel cpu : generic_x86 ;
66 AddNewDriversToFloppyBootArchive disk scsi : scsi_cd scsi_disk ;
67 AddNewDriversToFloppyBootArchive disk : norflash@arm ;
69 AddDriversToFloppyBootArchive disk usb : usb_disk ;
72 AddDriversToFloppyBootArchive disk virtual : remote_disk ;
73 AddDriversToFloppyBootArchive net : $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
77 AddFilesToFloppyBootArchive system
78 : <revisioned>kernel_$(TARGET_ARCH) ;
80 # scripts and data files
82 local driverSettingsFiles = <driver-settings>kernel ;
83 SEARCH on $(driverSettingsFiles)
84 = [ FDirName $(HAIKU_TOP) data settings kernel drivers ] ;
85 AddFilesToFloppyBootArchive home config settings kernel drivers
86 : $(driverSettingsFiles) ;
90 AddFilesToFloppyBootArchive system add-ons kernel network
92 AddFilesToFloppyBootArchive
93 system add-ons kernel network devices
94 : $(SYSTEM_NETWORK_DEVICES) ;
95 AddFilesToFloppyBootArchive
96 system add-ons kernel network datalink_protocols
97 : $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
98 AddFilesToFloppyBootArchive
99 system add-ons kernel network ppp
100 : $(SYSTEM_NETWORK_PPP) ;
101 AddFilesToFloppyBootArchive
102 system add-ons kernel network protocols
103 : $(SYSTEM_NETWORK_PROTOCOLS) ;
107 AddBootModuleSymlinksToFloppyBootArchive [ FFilterByBuildFeatures
108 $(SYSTEM_ADD_ONS_BUS_MANAGERS)
110 ata_adapter@ata locked_pool scsi_periph
112 ahci generic_ide_pci ide_isa@x86 silicon_image_3112 legacy_sata
114 $(USB_ONLY)<usb>uhci $(USB_ONLY)<usb>ohci $(USB_ONLY)<usb>ehci
115 scsi_cd scsi_disk $(USB_ONLY)usb_disk norflash@arm
117 $(SYSTEM_ADD_ONS_FILE_SYSTEMS)
122 #pragma mark - Build The Archive
125 HAIKU_FLOPPY_BOOT_ARCHIVE = haiku-floppyboot.tgz ;
126 MakeLocate $(HAIKU_FLOPPY_BOOT_ARCHIVE) : $(HAIKU_OUTPUT_DIR) ;
128 # the pseudo target all archive contents is attached to
129 NotFile $(HAIKU_BOOT_FLOPPY_CONTAINER_NAME) ;
131 # prepare the script that initializes the shell variables
132 local initVarsScript = <FloppyBootArchive>haiku-floppyboot-init-vars ;
133 local script = $(initVarsScript) ;
134 MakeLocate $(script) : $(HAIKU_OUTPUT_DIR) ;
137 AddVariableToScript $(script) : tmpDir : $(HAIKU_TMP_DIR) ;
138 AddVariableToScript $(script) : addBuildCompatibilityLibDir
139 : $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ;
140 AddTargetVariableToScript $(script) : <build>copyattr ;
142 # create the other scripts
143 local makeDirsScript = <FloppyBootArchive>haiku-floppyboot-make-dirs ;
144 local copyFilesScript = <FloppyBootArchive>haiku-floppyboot-copy-files ;
145 MakeLocate $(makeDirsScript) $(copyFilesScript) : $(HAIKU_OUTPUT_DIR) ;
147 CreateFloppyBootArchiveMakeDirectoriesScript $(makeDirsScript) ;
148 CreateFloppyBootArchiveCopyFilesScript $(copyFilesScript) ;
152 BuildFloppyBootArchive $(HAIKU_FLOPPY_BOOT_ARCHIVE) :
158 # remove the scripts we have generated
159 RmTemps $(HAIKU_FLOPPY_BOOT_ARCHIVE) :
165 NotFile haiku-floppyboot-archive ;
166 Depends haiku-floppyboot-archive : $(HAIKU_FLOPPY_BOOT_ARCHIVE) ;
168 # floppy image target
169 HAIKU_BOOT_FLOPPY = haiku-boot-floppy.image ;
170 MakeLocate $(HAIKU_BOOT_FLOPPY) : $(HAIKU_OUTPUT_DIR) ;
172 BuildFloppyBootImage $(HAIKU_BOOT_FLOPPY) : haiku_loader
173 : $(HAIKU_FLOPPY_BOOT_ARCHIVE) ;
176 RmTemps $(HAIKU_BOOT_FLOPPY) : $(HAIKU_FLOPPY_BOOT_ARCHIVE) ;
178 NotFile haiku-boot-floppy ;
179 Depends haiku-boot-floppy : $(HAIKU_BOOT_FLOPPY) ;