1SubDir HAIKU_TOP src system boot ; 2 3local librootFunctions = 4 abs.o 5 ctype.o 6 LocaleData.o 7 qsort.o 8 kernel_vsprintf.o 9 memcmp.o 10 memmove.o 11 strdup.o 12 strndup.o 13 strlen.o 14 strnlen.o 15 strcmp.o 16 strcasecmp.o 17 strncmp.o 18 strcat.o 19 strcpy.o 20 strlcat.o 21 strlcpy.o 22 strchr.o 23 strrchr.o 24 strtol.o 25; 26 27local extraLinkerArgs = ; 28if $(HAIKU_BOARD_LOADER_BASE) { 29 extraLinkerArgs += --defsym BOARD_LOADER_BASE=$(HAIKU_BOARD_LOADER_BASE) ; 30} 31 32AddResources haiku_loader : boot_loader.rdef ; 33 34KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) : 35 boot_platform_$(TARGET_BOOT_PLATFORM).o 36 boot_arch_$(TARGET_ARCH).o 37 boot_loader.a 38 boot_net.a 39 boot_partitions.a 40 41 # file systems 42 boot_bfs.a 43 boot_amiga_ffs.a 44 boot_tarfs.a 45 boot_fatfs.a 46 47 # needed by tarfs and video_splash.cpp 48 boot_zlib.a 49 50 # libroot functions needed by the stage2 boot loader (compiled for the 51 # kernel) 52 $(librootFunctions:G=src!system!kernel!lib) 53 54 : $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld 55 : -Bstatic $(extraLinkerArgs) 56; 57 58rule BuildCoffLoader { 59 local coffLoader = $(1) ; 60 local bootLoader = $(2) ; 61 # XXX: eventually switch on arch 62 COFF_FORMAT on $(coffLoader) = xcoff-powermac ; 63 HACK_COFF on $(coffLoader) = <build>hack-coff ; 64 65 Depends $(coffLoader) : <build>hack-coff ; 66 Depends $(coffLoader) : $(bootLoader) ; 67 MakeLocateDebug $(coffLoader) ; 68} 69 70actions BuildCoffLoader bind HACK_COFF { 71 rm -f $(1) 72 $(TARGET_OBJCOPY) -O $(COFF_FORMAT) $(2) $(1) 73 #$(CP) $(2) $(1) 74 $(HACK_COFF) $(1) 75} 76 77BuildCoffLoader boot_loader_$(TARGET_BOOT_PLATFORM)_coff : boot_loader_$(TARGET_BOOT_PLATFORM) ; 78 79rule BuildBiosLoader { 80 local haikuLoader = $(1) ; 81 local bootLoader = $(2) ; 82 83 Depends $(haikuLoader) : $(bootLoader) ; 84 MakeLocateDebug $(haikuLoader) ; 85 86 on $(1) ResAttr $(1) : $(RESFILES) : false ; 87 if ! [ on $(1) return $(DONT_USE_BEOS_RULES) ] { 88 SetType $(1) ; 89 MimeSet $(1) ; 90 } 91} 92 93actions BuildBiosLoader { 94 rm -f $(1) 95 $(TARGET_OBJCOPY) -O binary $(2) $(1) 96} 97 98BuildBiosLoader haiku_loader : boot_loader_$(TARGET_BOOT_PLATFORM) ; 99 100# different target for PXE, to be build with TARGET_BOOT_PLATFORM=pxe_ia32 jam pxehaiku-loader 101BuildBiosLoader pxehaiku-loader : boot_loader_$(TARGET_BOOT_PLATFORM) ; 102 103SubInclude HAIKU_TOP src system boot arch $(TARGET_ARCH) ; 104SubInclude HAIKU_TOP src system boot loader ; 105SubInclude HAIKU_TOP src system boot platform ; 106