Ticket #6309: haiku_loader_bios.x86_64.patch
File haiku_loader_bios.x86_64.patch, 10.8 KB (added by , 14 years ago) |
---|
-
build/jam/KernelRules
18 18 local object ; 19 19 for object in $(objects) { 20 20 # add kernel flags for the object 21 ObjectCcFlags $(object) : $(TARGET_KERNEL_CCFLAGS) $(2) ; 22 ObjectC++Flags $(object) : $(TARGET_KERNEL_C++FLAGS) $(2) ; 23 ObjectDefines $(object) : $(TARGET_KERNEL_DEFINES) ; 21 if $(DEFINES) = _BOOT_MODE { 22 ObjectCcFlags $(object) : $(TARGET_KERNEL_CCFLAGS) $(TARGET_BOOT_CCFLAGS) $(2) ; 23 ObjectC++Flags $(object) : $(TARGET_KERNEL_C++FLAGS) $(TARGET_BOOT_C++FLAGS) $(2) ; 24 ObjectDefines $(object) : $(TARGET_KERNEL_DEFINES) ; 25 } 26 else 27 { 28 ObjectCcFlags $(object) : $(TARGET_KERNEL_CCFLAGS) $(2) ; 29 ObjectC++Flags $(object) : $(TARGET_KERNEL_C++FLAGS) $(2) ; 30 ObjectDefines $(object) : $(TARGET_KERNEL_DEFINES) ; 31 } 24 32 25 33 # override warning flags 26 34 TARGET_WARNING_CCFLAGS on $(object) = $(TARGET_KERNEL_WARNING_CCFLAGS) ; … … 44 52 LINKFLAGS on $(1) = $(4) ; 45 53 if $(3) { LINKFLAGS on $(1) += --script=$(3) ; } 46 54 55 if $(DEFINES) = _BOOT_MODE { 56 LINKFLAGS on $(1) += $(TARGET_BOOT_LINKFLAGS) ; 57 } 58 47 59 # Remove any preset LINKLIBS, but link against libgcc.a 48 LINKLIBS on $(1) = $(TARGET_STATIC_LIBSUPC++) $(TARGET_GCC_LIBGCC) ; 60 # MAJOR TODO: In configure and buildsetup add code to setup a TARGET_BOOT_GCC_LIBGCC varible 61 if $(DEFINES) = _BOOT_MODE && $(HAIKU_ARCH) = x86_64 { 62 LINKLIBS on $(1) = generated/cross-tools/x86_64-pc-haiku/lib/legacy/libsupc++.a generated/cross-tools/lib/gcc/x86_64-pc-haiku/4.4.4/legacy/libgcc.a ; 63 } 64 else 65 { 66 LINKLIBS on $(1) = $(TARGET_STATIC_LIBSUPC++) $(TARGET_GCC_LIBGCC) ; 67 } 49 68 50 69 # TODO: Do we really want to invoke SetupKernel here? The objects should 51 70 # have been compiled with KernelObjects anyway, so we're doing that twice. -
build/jam/MainBuildRules
363 363 } else { 364 364 LINK on $(1) = $(TARGET_LD) ; 365 365 LINKFLAGS on $(target) = $(TARGET_LDFLAGS) ; 366 if $(DEFINES) = _BOOT_MODE { 367 LINKFLAGS on $(1) += $(TARGET_BOOT_LINKFLAGS) ; 368 } 366 369 } 367 370 } 368 371 -
build/jam/OverriddenJamRules
178 178 local includesSeparator ; 179 179 local localIncludesOption ; 180 180 local systemIncludesOption ; 181 182 if $(DEFINES) = _BOOT_MODE { 183 flags = $(TARGET_BOOT_CCFLAGS) ; 184 } 185 181 186 if [ on $(1) return $(PLATFORM) ] = host { 182 flags = [ on $(1) return $(HOST_ASFLAGS) $(ASFLAGS) ] ;187 flags += [ on $(1) return $(HOST_ASFLAGS) $(ASFLAGS) ] ; 183 188 184 189 CC on $(1) = $(HOST_CC) ; 185 190 … … 188 193 systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ; 189 194 190 195 } else { 191 flags = [ on $(1) return $(TARGET_ASFLAGS) $(ASFLAGS) ] ;196 flags += [ on $(1) return $(TARGET_ASFLAGS) $(ASFLAGS) ] ; 192 197 193 198 CC on $(1) = $(TARGET_CC) ; 194 199 -
src/system/boot/platform/bios_x86_64/Jamfile
1 SubDir HAIKU_TOP src system boot platform bios_x86_64 ; 2 3 DEFINES += _BOOT_MODE ; 4 5 SubDirHdrs $(SUBDIR) $(DOTDOT) bios_ia32 ; 6 SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform $(TARGET_BOOT_PLATFORM) ; 7 8 UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; 9 UsePrivateHeaders [ FDirName graphics common ] ; 10 UsePrivateHeaders [ FDirName graphics vesa ] ; 11 UsePrivateHeaders [ FDirName storage ] ; 12 13 { 14 local defines = _BOOT_MODE ; 15 16 defines = [ FDefines $(defines) ] ; 17 SubDirCcFlags $(defines) -Wall -Wno-multichar $(HAIKU_BOOT_CCFLAGS) ; 18 SubDirC++Flags $(defines) -Wall -Wno-multichar -fno-rtti $(HAIKU_BOOT_C++FLAGS) ; 19 } 20 21 SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ; 22 23 local genericPlatformSources = 24 text_menu.cpp 25 video_blit.cpp 26 video_splash.cpp 27 video_rle.cpp 28 ; 29 30 local bios_ia32_src = 31 shell.S 32 start.cpp 33 debug.cpp 34 bios.S 35 console.cpp 36 serial.cpp 37 devices.cpp 38 keyboard.cpp 39 menu.cpp 40 mmu.cpp 41 multiboot.cpp 42 cpu.cpp 43 acpi.cpp 44 smp.cpp 45 smp_trampoline.S 46 support.S 47 video.cpp 48 apm.cpp 49 hpet.cpp 50 ; 51 52 local bios_ia32_edid_src = 53 decode_edid.c 54 dump_edid.c 55 ; 56 57 KernelMergeObject boot_platform_bios_x86_64.o : 58 $(bios_ia32_src) 59 $(bios_ia32_edid_src) 60 $(genericPlatformSources) 61 : -fno-pic 62 ; 63 64 SEARCH on [ FGristFiles $(bios_ia32_src) ] 65 = [ FDirName $(SUBDIR) $(DOTDOT) bios_ia32 ] ; 66 67 SEARCH on [ FGristFiles $(bios_ia32_edid_src) ] 68 = [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ; 69 70 SEARCH on [ FGristFiles $(genericPlatformSources) ] 71 = [ FDirName $(HAIKU_TOP) src system boot platform generic ] ; 72 73 # We also need the bios_ia32 stage1.bin for building bin/makebootable 74 SEARCH on stage1.bin 75 = [ FDirName $(SUBDIR) $(DOTDOT) bios_ia32 ] ; -
src/system/boot/loader/file_systems/tarfs/Jamfile
1 1 SubDir HAIKU_TOP src system boot loader file_systems tarfs ; 2 2 3 DEFINES += _BOOT_MODE ; 4 3 5 UseHeaders [ FDirName $(HAIKU_TOP) headers libs zlib ] ; 4 6 5 7 UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ; -
src/system/boot/loader/file_systems/hfs_plus/Jamfile
1 1 SubDir HAIKU_TOP src system boot loader file_systems hfs_plus ; 2 2 3 DEFINES += _BOOT_MODE ; 4 3 5 UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ; 4 6 UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; 5 7 UsePrivateHeaders kernel storage ; 6 8 9 local defines = [ FDefines _BOOT_MODE ] ; 7 10 SubDirC++Flags -fno-rtti ; 8 11 9 12 KernelStaticLibrary boot_hfs_plus : -
src/system/boot/loader/file_systems/bfs/Jamfile
1 1 SubDir HAIKU_TOP src system boot loader file_systems bfs ; 2 2 3 DEFINES += _BOOT_MODE ; 4 3 5 UsePrivateKernelHeaders ; 4 6 UsePrivateHeaders shared storage ; 5 7 -
src/system/boot/loader/file_systems/fat/Jamfile
1 1 SubDir HAIKU_TOP src system boot loader file_systems fat ; 2 2 3 DEFINES += _BOOT_MODE ; 4 3 5 #UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ; 4 6 #UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; 5 7 #UsePrivateHeaders [ FDirName storage ] ; -
src/system/boot/loader/file_systems/amiga_ffs/Jamfile
6 6 7 7 #SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems amiga_ffs ; 8 8 9 DEFINES += _BOOT_MODE ; 10 9 11 SubDirC++Flags -fno-rtti ; 10 12 11 13 KernelStaticLibrary boot_amiga_ffs : -
src/system/boot/loader/Jamfile
1 1 SubDir HAIKU_TOP src system boot loader ; 2 2 3 DEFINES += _BOOT_MODE ; 4 3 5 SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ; 4 6 SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ; 5 7 SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ; … … 43 45 #BOOT_SUPPORT_FILE_SYSTEM_FAT 44 46 ; 45 47 } 48 case "x86_64" : 49 { 50 defines += 51 BOOT_SUPPORT_PARTITION_EFI 52 53 #BOOT_SUPPORT_FILE_SYSTEM_FAT 54 ; 55 } 46 56 } 47 57 48 58 defines = [ FDefines $(defines) ] ; -
src/system/boot/Jamfile
1 1 SubDir HAIKU_TOP src system boot ; 2 2 3 local librootFunctions = 4 abs.o 5 ctype.o 6 qsort.o 7 kernel_vsprintf.o 8 memcmp.o 9 memmove.o 10 strdup.o 11 strlen.o 12 strnlen.o 13 strcmp.o 14 strcasecmp.o 15 strncmp.o 16 strcat.o 17 strcpy.o 18 strlcat.o 19 strlcpy.o 20 strchr.o 21 strrchr.o 22 strtol.o 3 DEFINES += _BOOT_MODE ; 4 5 SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot posix string ] ; 6 SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot posix stdlib ] ; 7 SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot posix locale ] ; 8 SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) kernel lib ] ; 9 10 KernelMergeObject boot_librootFunctions.o : 11 abs.c 12 ctype.c 13 qsort.c 14 kernel_vsprintf.cpp 15 memcmp.c 16 memmove.c 17 strdup.c 18 strlen.c 19 strnlen.c 20 strcmp.c 21 strcasecmp.c 22 strncmp.c 23 strcat.c 24 strcpy.c 25 strlcat.c 26 strlcpy.c 27 strchr.c 28 strrchr.c 29 strtol.c 30 : -fno-pic 23 31 ; 24 32 25 33 local extraLinkerArgs = ; … … 47 55 48 56 # libroot functions needed by the stage2 boot loader (compiled for the 49 57 # kernel) 50 $(librootFunctions:G=src!system!kernel!lib)58 boot_librootFunctions.o 51 59 52 60 : $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld 53 61 : -Bstatic $(extraLinkerArgs) 54 62 ; 55 63 64 65 56 66 rule BuildCoffLoader { 57 67 local coffLoader = $(1) ; 58 68 local bootLoader = $(2) ; -
src/system/boot/arch/x86_64/Jamfile
1 SubDir HAIKU_TOP src system boot arch x86_64 ; 2 3 DEFINES += _BOOT_MODE ; 4 5 local kernelArchSources = 6 arch_elf.cpp 7 cpuid.S 8 ; 9 10 local kernelLibArchSources = 11 arch_string.S 12 ; 13 14 local librootosArchObjects = 15 byteorder.S 16 ; 17 18 KernelMergeObject boot_arch_$(TARGET_ARCH).o : 19 $(kernelArchSourcesCPP) 20 $(kernelArchSources) 21 $(kernelLibArchSources) 22 $(librootosArchObjects) 23 : # additional flags 24 ; 25 26 SEARCH on [ FGristFiles $(kernelArchSources) ] 27 = [ FDirName $(HAIKU_TOP) src system kernel arch x86 ] ; 28 SEARCH on [ FGristFiles $(kernelLibArchSources) ] 29 = [ FDirName $(HAIKU_TOP) src system kernel lib arch x86 ] ; 30 SEARCH on [ FGristFiles $(librootosArchObjects) ] 31 = [ FDirName $(HAIKU_TOP) src system libroot os arch x86 ] ; 32