Made it possible to build the bootloader when targetting x86_64.

* x86_64 is using the existing *_ia32 boot platforms.
* Special flags are required when compiling the loader to get GCC to compile
  32-bit code. This adds a new set of rules for compiling boot code rather
  than using the kernel rules, which compile using the necessary flags.
* Some x86_64 private headers have been stubbed by #include'ing the x86
  versions. These will be replaced later.
This commit is contained in:
Alex Smith 2012-05-26 21:47:27 +01:00
parent d6e724d549
commit 65ad1ba320
48 changed files with 420 additions and 66 deletions

View File

@ -44,6 +44,7 @@ include [ FDirName $(HAIKU_BUILD_RULES_DIR) DocumentationRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) FileRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) HeadersRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) KernelRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) BootRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) ImageRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) CDRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) MainBuildRules ] ;

129
build/jam/BootRules Normal file
View File

@ -0,0 +1,129 @@
rule SetupBoot
{
# Usage SetupBoot <sources_or_objects> : <extra_cc_flags> : <include_private_headers> ;
#
# <sources_or_objects> - Ideally sources, otherwise HDRSEARCH can not be
# set for the sources and the sources some header
# dependencies might be missing.
local sources = [ FGristFiles $(1) ] ;
local objects = $(sources:S=$(SUFOBJ)) ;
# add private kernel headers
if $(3) != false {
SourceSysHdrs $(sources) : $(TARGET_PRIVATE_KERNEL_HEADERS) ;
}
local object ;
for object in $(objects) {
# add boot flags for the object
ObjectCcFlags $(object) : $(TARGET_BOOT_CCFLAGS) $(2) ;
ObjectC++Flags $(object) : $(TARGET_BOOT_C++FLAGS) $(2) ;
ObjectDefines $(object) : $(TARGET_KERNEL_DEFINES) ;
ASFLAGS on $(object) = $(TARGET_BOOT_CCFLAGS) ;
# override warning flags
TARGET_WARNING_CCFLAGS on $(object) = $(TARGET_KERNEL_WARNING_CCFLAGS) ;
TARGET_WARNING_C++FLAGS on $(object)
= $(TARGET_KERNEL_WARNING_C++FLAGS) ;
}
}
rule BootObjects
{
SetupBoot $(1) : $(2) ;
Objects $(1) ;
}
rule BootLd
{
# BootLd <name> : <objs> : <linkerscript> : <args> ;
LINK on $(1) = $(TARGET_LD) ;
LINKFLAGS on $(1) = $(4) ;
if $(3) { LINKFLAGS on $(1) += --script=$(3) ; }
# Remove any preset LINKLIBS, but link against libgcc.a. Linking against
# libsupc++ is opt-out.
local libs ;
if ! [ on $(1) return HAIKU_NO_LIBSUPC++ ] {
libs += $(TARGET_BOOT_LIBSUPC++) ;
}
LINKLIBS on $(1) = $(libs) $(TARGET_BOOT_LIBGCC) ;
# TODO: Do we really want to invoke SetupBoot here? The objects should
# have been compiled with BootObjects anyway, so we're doing that twice.
SetupBoot $(2) ;
# Show that we depend on the libraries we need
LocalClean clean : $(1) ;
LocalDepends all : $(1) ;
Depends $(1) : $(2) ;
MakeLocateDebug $(1) ;
on $(1) XRes $(1) : $(RESFILES) ;
if ! [ on $(1) return $(DONT_USE_BEOS_RULES) ] {
SetType $(1) ;
MimeSet $(1) ;
SetVersion $(1) ;
}
}
actions BootLd bind VERSION_SCRIPT
{
$(LINK) $(LINKFLAGS) -o "$(1)" "$(2)" $(LINKLIBS) \
--version-script=$(VERSION_SCRIPT)
}
rule BootMergeObject
{
# BootMergeObject <name> : <sources> : <extra CFLAGS> : <other objects> ;
# Compiles source files and merges the object files to an object file.
# <name>: Name of the object file to create. No grist will be added.
# <sources>: Sources to be compiled. Grist will be added.
# <extra CFLAGS>: Additional flags for compilation.
# <other objects>: Object files or static libraries to be merged. No grist
# will be added.
#
SetupBoot $(2) : $(3) ;
Objects $(2) ;
MergeObjectFromObjects $(1) : $(2:S=$(SUFOBJ)) : $(4) ;
LINKFLAGS on $(1) += $(TARGET_BOOT_LINKFLAGS) ;
}
rule BootStaticLibrary
{
# Usage BootStaticLibrary <name> : <sources> : <extra cc flags> ;
# This is designed to take a set of sources and libraries and create
# a file called lib<name>.a
SetupBoot $(2) : $(3) : false ;
Library $(1) : $(2) ;
}
rule BootStaticLibraryObjects
{
# Usage BootStaticLibrary <name> : <sources> ;
# This is designed to take a set of sources and libraries and create
# a file called <name>
# Show that we depend on the libraries we need
SetupBoot $(2) ;
LocalClean clean : $(1) ;
LocalDepends all : $(1) ;
Depends $(1) : $(2) ;
MakeLocateDebug $(1) ;
}
actions BootStaticLibraryObjects
{
# Force recreation of the archive to avoid build errors caused by
# stale dependencies after renaming or deleting object files.
$(RM) "$(1)"
$(HAIKU_AR) -r "$(1)" "$(2)" ;
}

View File

@ -159,10 +159,13 @@ if $(HAIKU_GCC_VERSION[1]) = 2 {
HAIKU_C++ ?= $(HAIKU_CC) ;
HAIKU_LINK = $(HAIKU_CC) ;
HAIKU_LINKFLAGS = $(HAIKU_GCC_BASE_FLAGS) ;
HAIKU_BOOT_LINKFLAGS = ;
HAIKU_HDRS = [ FStandardHeaders ] ;
HAIKU_KERNEL_CCFLAGS = $(HAIKU_CCFLAGS) $(HAIKU_GCC_BASE_FLAGS) ;
HAIKU_KERNEL_C++FLAGS = $(HAIKU_C++FLAGS) $(HAIKU_GCC_BASE_FLAGS) ;
HAIKU_BOOT_CCFLAGS = $(HAIKU_CCFLAGS) $(HAIKU_GCC_BASE_FLAGS) ;
HAIKU_BOOT_C++FLAGS = $(HAIKU_C++FLAGS) $(HAIKU_GCC_BASE_FLAGS) ;
HAIKU_CCFLAGS += $(HAIKU_GCC_BASE_FLAGS) -nostdinc ;
HAIKU_C++FLAGS += $(HAIKU_GCC_BASE_FLAGS) -nostdinc ;
HAIKU_DEFINES = __HAIKU__ ;
@ -249,7 +252,6 @@ switch $(HAIKU_CPU) {
}
case x86_64 :
{
HAIKU_DEFINES += __x86_64__ ;
HAIKU_BOOT_PLATFORM = bios_ia32 ;
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 2880 ; # in kB
# offset in floppy image (>= sizeof(haiku_loader))
@ -329,6 +331,8 @@ HAIKU_ASFLAGS = ;
HAIKU_KERNEL_CCFLAGS += -finline -fno-builtin ;
HAIKU_KERNEL_C++FLAGS += -finline -fno-builtin -fno-exceptions ;
HAIKU_KERNEL_DEFINES += _KERNEL_MODE ;
HAIKU_BOOT_CCFLAGS += -finline -fno-builtin ;
HAIKU_BOOT_C++FLAGS += -finline -fno-builtin -fno-exceptions ;
if $(HAIKU_GCC_VERSION[1]) >= 3 {
HAIKU_KERNEL_C++FLAGS += -fno-use-cxa-atexit ;
@ -340,6 +344,8 @@ if $(HAIKU_GCC_VERSION[1]) >= 4 {
if $(HAIKU_GCC_VERSION[2]) >= 3 {
HAIKU_KERNEL_CCFLAGS += -ffreestanding ;
HAIKU_KERNEL_C++FLAGS += -ffreestanding ;
HAIKU_BOOT_CCFLAGS += -ffreestanding ;
HAIKU_BOOT_C++FLAGS += -ffreestanding ;
}
}
@ -377,6 +383,15 @@ switch $(HAIKU_ARCH) {
}
case x86_64 :
{
# Kernel lives in the top 2GB of the address space, use kernel code model.
HAIKU_KERNEL_CCFLAGS += -mcmodel=kernel ;
HAIKU_KERNEL_C++FLAGS += -mcmodel=kernel ;
# Bootloader is 32-bit.
HAIKU_BOOT_LINKFLAGS += -m elf_i386_haiku ;
HAIKU_BOOT_CCFLAGS += -m32 ;
HAIKU_BOOT_C++FLAGS += -m32 ;
# Enable use of the gcc built-in atomic functions instead of atomic_*().
# The former are inlined and have thus less overhead.
HAIKU_DEFINES += B_USE_BUILTIN_ATOMIC_FUNCTIONS ;
@ -962,6 +977,7 @@ local buildVars =
KERNEL_CCFLAGS KERNEL_C++FLAGS
KERNEL_PIC_CCFLAGS KERNEL_PIC_LINKFLAGS
BOOT_CCFLAGS BOOT_C++FLAGS BOOT_LINKFLAGS
WARNING_CCFLAGS WARNING_C++FLAGS
KERNEL_WARNING_CCFLAGS KERNEL_WARNING_C++FLAGS
@ -998,6 +1014,9 @@ if $(TARGET_PLATFORM) = haiku {
TARGET_GCC_LIBGCC = $(HAIKU_GCC_LIBGCC) ;
TARGET_GCC_LIBGCC_OBJECTS = $(HAIKU_GCC_LIBGCC_OBJECTS) ;
TARGET_BOOT_LIBGCC = $(HAIKU_BOOT_LIBGCC) ;
TARGET_BOOT_LIBSUPC++ = $(HAIKU_BOOT_LIBSUPC++) ;
TARGET_BOOT_PLATFORM ?= $(HAIKU_BOOT_PLATFORM) ;
TARGET_BOOT_BOARD ?= $(HAIKU_BOOT_BOARD) ;
@ -1014,6 +1033,9 @@ if $(TARGET_PLATFORM) = haiku {
TARGET_GCC_LIBGCC = ;
TARGET_GCC_LIBGCC_OBJECTS = ;
TARGET_BOOT_LIBGCC = ;
TARGET_BOOT_LIBSUPC++ = ;
TARGET_BOOT_PLATFORM = ;
TARGET_BOOT_BOARD = ;

11
configure vendored
View File

@ -242,6 +242,14 @@ standard_gcc_settings()
fi
;;
esac
if [ "$targetArch" = "x86_64" ]; then
HAIKU_BOOT_LIBGCC=`$HAIKU_CC -m32 -print-libgcc-file-name`
HAIKU_BOOT_LIBSUPCXX=`$HAIKU_CC -m32 -print-file-name=libsupc++.a`
else
HAIKU_BOOT_LIBGCC=$HAIKU_GCC_LIBGCC
HAIKU_BOOT_LIBSUPCXX=$HAIKU_STATIC_LIBSUPCXX
fi
}
# set_default_value
@ -549,6 +557,9 @@ HAIKU_STATIC_LIBSUPC++ ?= ${HAIKU_STATIC_LIBSUPCXX} ;
HAIKU_SHARED_LIBSUPC++ ?= ${HAIKU_SHARED_LIBSUPCXX} ;
HAIKU_C++_HEADERS_DIR ?= ${HAIKU_CXX_HEADERS_DIR} ;
HAIKU_BOOT_LIBGCC ?= ${HAIKU_BOOT_LIBGCC} ;
HAIKU_BOOT_LIBSUPC++ ?= ${HAIKU_BOOT_LIBSUPCXX} ;
HAIKU_BUILD_ATTRIBUTES_DIR ?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ;
HAIKU_AR ?= ${HAIKU_AR} ;

View File

@ -7,7 +7,7 @@
#include <SupportDefs.h>
#include <apm_defs.h>
#include <arch/x86/apm_defs.h>
struct kernel_args;

View File

@ -0,0 +1,6 @@
#ifndef _KERNEL_ARCH_x86_64_CPU_H
#define _KERNEL_ARCH_x86_64_CPU_H
#include "../x86/arch_cpu.h"
#endif /* _KERNEL_ARCH_x86_64_CPU_H */

View File

@ -0,0 +1,6 @@
#ifndef _KERNEL_ARCH_x86_64_INT_H
#define _KERNEL_ARCH_x86_64_INT_H
#include "../x86/arch_int.h"
#endif /* _KERNEL_ARCH_x86_64_INT_H */

View File

@ -0,0 +1,6 @@
#ifndef _KERNEL_ARCH_x86_64_KERNEL_H
#define _KERNEL_ARCH_x86_64_KERNEL_H
#include "../x86/arch_kernel.h"
#endif /* _KERNEL_ARCH_x86_64_KERNEL_H */

View File

@ -0,0 +1,6 @@
#ifndef _KERNEL_ARCH_x86_64_KERNEL_ARGS_H
#define _KERNEL_ARCH_x86_64_KERNEL_ARGS_H
#include "../x86/arch_kernel_args.h"
#endif /* _KERNEL_ARCH_x86_64_KERNEL_ARGS_H */

View File

@ -0,0 +1,6 @@
#ifndef _KERNEL_ARCH_x86_64_SYSTEM_INFO_H
#define _KERNEL_ARCH_x86_64_SYSTEM_INFO_H
#include "../x86/arch_system_info.h"
#endif /* _KERNEL_ARCH_x86_64_SYSTEM_INFO_H */

View File

@ -0,0 +1,6 @@
#ifndef _KERNEL_ARCH_x86_64_THREAD_H
#define _KERNEL_ARCH_x86_64_THREAD_H
#include "../x86/arch_thread.h"
#endif /* _KERNEL_ARCH_x86_64_THREAD_H */

View File

@ -0,0 +1,6 @@
#ifndef _KERNEL_ARCH_x86_64_THREAD_TYPES_H
#define _KERNEL_ARCH_x86_64_THREAD_TYPES_H
#include "../x86/arch_thread_types.h"
#endif /* _KERNEL_ARCH_x86_64_THREAD_TYPES_H */

View File

@ -0,0 +1,6 @@
#ifndef _KERNEL_ARCH_x86_64_USER_DEBUGGER_H
#define _KERNEL_ARCH_x86_64_USER_DEBUGGER_H
#include "../x86/arch_user_debugger.h"
#endif /* _KERNEL_ARCH_x86_64_USER_DEBUGGER_H */

View File

@ -10,7 +10,7 @@
#endif
#include <apm.h>
#include <arch/x86/apm.h>
#include <bios_drive.h>

View File

@ -0,0 +1,15 @@
/*
* Copyright 2004, Alex Smith, alex@alex-smith.me.uk.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_x86_64_CONFIG_H
#define _KERNEL_ARCH_x86_64_CONFIG_H
#define FUNCTION_CALL_PARAMETER_ALIGNMENT_TYPE unsigned long
#define STACK_GROWS_DOWNWARDS
//#define ATOMIC_FUNCS_ARE_SYSCALLS
//#define ATOMIC64_FUNCS_ARE_SYSCALLS
#endif /* _KERNEL_ARCH_x86_64_CONFIG_H */

View File

@ -0,0 +1,6 @@
#ifndef _KERNEL_ARCH_x86_64_ELF_H
#define _KERNEL_ARCH_x86_64_ELF_H
#include "../x86/arch_elf.h"
#endif /* _KERNEL_ARCH_x86_64_ELF_H */

View File

@ -0,0 +1,17 @@
/*
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
#ifndef SYSTEM_ARCH_X86_64_ASM_DEFS_H
#define SYSTEM_ARCH_X86_64_ASM_DEFS_H
#define SYMBOL(name) .global name; name
#define SYMBOL_END(name) 1: .size name, 1b - name
#define STATIC_FUNCTION(name) .type name, @function; name
#define FUNCTION(name) .global name; .type name, @function; name
#define FUNCTION_END(name) 1: .size name, 1b - name
#endif /* SYSTEM_ARCH_X86_64_ASM_DEFS_H */

View File

@ -1,27 +1,37 @@
SubDir HAIKU_TOP src system boot ;
local librootFunctions =
abs.o
ctype.o
LocaleData.o
qsort.o
kernel_vsprintf.o
memcmp.o
memmove.o
strdup.o
strndup.o
strlen.o
strnlen.o
strcmp.o
strcasecmp.o
strncmp.o
strcat.o
strcpy.o
strlcat.o
strlcpy.o
strchr.o
strrchr.o
strtol.o
DEFINES += _BOOT_MODE ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot posix string ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot posix stdlib ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot posix locale ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) kernel lib ] ;
UsePrivateHeaders [ FDirName libroot locale ] ;
BootMergeObject boot_libroot.o :
abs.c
ctype.cpp
LocaleData.cpp
qsort.c
kernel_vsprintf.cpp
memcmp.c
memmove.c
strdup.c
strndup.cpp
strlen.cpp
strnlen.cpp
strcmp.c
strcasecmp.c
strncmp.c
strcat.c
strcpy.c
strlcat.c
strlcpy.c
strchr.c
strrchr.c
strtol.c
: -fno-pic
;
local extraLinkerArgs = ;
@ -31,7 +41,7 @@ if $(HAIKU_BOARD_LOADER_BASE) {
AddResources haiku_loader : boot_loader.rdef ;
KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) :
BootLd boot_loader_$(TARGET_BOOT_PLATFORM) :
boot_platform_$(TARGET_BOOT_PLATFORM).o
boot_arch_$(TARGET_ARCH).o
boot_loader.a
@ -47,9 +57,8 @@ KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) :
# needed by tarfs and video_splash.cpp
boot_zlib.a
# libroot functions needed by the stage2 boot loader (compiled for the
# kernel)
$(librootFunctions:G=src!system!kernel!lib)
# libroot functions needed by the stage2 boot loader
boot_libroot.o
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld
: -Bstatic $(extraLinkerArgs)

View File

@ -22,7 +22,7 @@ local kernelLibArchObjects =
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
;
KernelMergeObject boot_arch_$(TARGET_ARCH).o :
BootMergeObject boot_arch_$(TARGET_ARCH).o :
debug_uart_8250.cpp
arch_uart_8250.cpp
arch_uart_pl011.cpp

View File

@ -13,7 +13,7 @@ local kernelLibArchObjects =
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
;
KernelMergeObject boot_arch_$(TARGET_ARCH).o :
BootMergeObject boot_arch_$(TARGET_ARCH).o :
arch_elf.cpp
$(librootArchObjects)
: -fno-pic
@ -21,17 +21,17 @@ KernelMergeObject boot_arch_$(TARGET_ARCH).o :
$(kernelLibArchObjects)
;
KernelMergeObject boot_arch_$(TARGET_ARCH)_030.o :
BootMergeObject boot_arch_$(TARGET_ARCH)_030.o :
mmu_030.cpp
: -fno-pic -Wno-unused -m68030
;
KernelMergeObject boot_arch_$(TARGET_ARCH)_040.o :
BootMergeObject boot_arch_$(TARGET_ARCH)_040.o :
mmu_040.cpp
: -fno-pic -Wno-unused -m68040
;
KernelMergeObject boot_arch_$(TARGET_ARCH)_060.o :
BootMergeObject boot_arch_$(TARGET_ARCH)_060.o :
mmu_060.cpp
: -fno-pic -Wno-unused -m68060
;

View File

@ -8,7 +8,7 @@ local kernelLibArchObjects =
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
;
KernelMergeObject boot_arch_$(TARGET_ARCH).o :
BootMergeObject boot_arch_$(TARGET_ARCH).o :
arch_elf.cpp
: # additional flags
:

View File

@ -15,7 +15,7 @@ local kernelLibArchObjects =
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
;
KernelMergeObject boot_arch_$(TARGET_ARCH).o :
BootMergeObject boot_arch_$(TARGET_ARCH).o :
debug_uart_8250.cpp
arch_uart_8250.cpp
arch_elf.cpp

View File

@ -18,7 +18,7 @@ local kernelLibArchObjects =
<src!system!kernel!lib!arch!$(TARGET_ARCH)>byteorder.o
;
KernelMergeObject boot_arch_$(TARGET_ARCH).o :
BootMergeObject boot_arch_$(TARGET_ARCH).o :
$(kernelArchSources)
$(kernelLibArchSources)
: # additional flags

View File

@ -0,0 +1,30 @@
SubDir HAIKU_TOP src system boot arch x86_64 ;
DEFINES += _BOOT_MODE ;
local kernelArchSources =
arch_elf.cpp
cpuid.S
;
local kernelLibArchSources =
arch_string.S
;
local librootOsArchSources =
byteorder.S
;
BootMergeObject boot_arch_$(TARGET_ARCH).o :
$(kernelArchSources)
$(kernelLibArchSources)
$(librootOsArchSources)
: # additional flags
;
SEARCH on [ FGristFiles $(kernelArchSources) ]
= [ FDirName $(HAIKU_TOP) src system kernel arch x86 ] ;
SEARCH on [ FGristFiles $(kernelLibArchSources) ]
= [ FDirName $(HAIKU_TOP) src system kernel lib arch x86 ] ;
SEARCH on [ FGristFiles $(librootOsArchSources) ]
= [ FDirName $(HAIKU_TOP) src system libroot os arch x86 ] ;

View File

@ -50,7 +50,7 @@ UsePrivateHeaders shared storage ;
SubDirC++Flags $(defines) -fno-rtti ;
}
KernelStaticLibrary boot_loader :
BootStaticLibrary boot_loader :
elf.cpp
heap.cpp
kernel_args.cpp
@ -81,7 +81,7 @@ KernelStaticLibrary boot_loader :
# The partition support is built in an extra static library
# so that only the ones that are used will be included.
KernelStaticLibrary boot_partitions :
BootStaticLibrary boot_partitions :
FileMapDisk.cpp
amiga_rdb.cpp
apple.cpp

View File

@ -8,7 +8,7 @@ UsePrivateHeaders kernel storage ;
SubDirC++Flags -fno-rtti ;
KernelStaticLibrary boot_amiga_ffs :
BootStaticLibrary boot_amiga_ffs :
amiga_ffs.cpp
Volume.cpp
Directory.cpp

View File

@ -10,7 +10,7 @@ local defines = [ FDefines _BOOT_MODE ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags -fno-rtti $(defines) ;
KernelStaticLibrary boot_bfs :
BootStaticLibrary boot_bfs :
bfs.cpp
Directory.cpp
File.cpp

View File

@ -13,7 +13,7 @@ local defines = [ FDefines _BOOT_MODE ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags -fno-rtti $(defines) ;
KernelStaticLibrary boot_fatfs :
BootStaticLibrary boot_fatfs :
fatfs.cpp
Volume.cpp
CachedBlock.cpp

View File

@ -6,7 +6,7 @@ UsePrivateHeaders kernel storage ;
SubDirC++Flags -fno-rtti ;
KernelStaticLibrary boot_hfs_plus :
BootStaticLibrary boot_hfs_plus :
hfs_plus.cpp
: -fno-pic
;

View File

@ -14,7 +14,7 @@ SubDirC++Flags -fno-rtti $(defines) ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src libs zlib ] ;
KernelStaticLibrary boot_zlib :
BootStaticLibrary boot_zlib :
inflate.c
inffast.c
inftrees.c
@ -25,7 +25,7 @@ KernelStaticLibrary boot_zlib :
;
KernelStaticLibrary boot_tarfs :
BootStaticLibrary boot_tarfs :
tarfs.cpp
: -fno-pic
;

View File

@ -12,7 +12,7 @@ if $(TARGET_ARCH) = ppc {
iscsi = iSCSITarget.cpp ;
}
KernelStaticLibrary boot_net :
BootStaticLibrary boot_net :
ARP.cpp
ChainBuffer.cpp
Ethernet.cpp

View File

@ -19,13 +19,13 @@ UsePrivateHeaders [ FDirName storage ] ;
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
KernelMergeObject boot_platform_amiga_m68k_shell.o :
BootMergeObject boot_platform_amiga_m68k_shell.o :
shell.S
: -Wa,--pcrel
;
KernelMergeObject boot_platform_amiga_m68k_other.o :
BootMergeObject boot_platform_amiga_m68k_other.o :
# shell.S
start.cpp
rom_calls.cpp
@ -54,7 +54,7 @@ KernelMergeObject boot_platform_amiga_m68k_other.o :
;
KernelMergeObject boot_platform_amiga_m68k.o :
BootMergeObject boot_platform_amiga_m68k.o :
: :
boot_platform_amiga_m68k_shell.o
boot_platform_amiga_m68k_other.o

View File

@ -19,7 +19,7 @@ UsePrivateHeaders [ FDirName storage ] ;
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
KernelMergeObject boot_platform_atari_m68k_shell.o :
BootMergeObject boot_platform_atari_m68k_shell.o :
shell.S
: -Wa,--pcrel
;
@ -30,7 +30,7 @@ KernelMergeObject boot_platform_atari_m68k_shell.o :
# TODO: add 020+68851 support
KernelMergeObject boot_platform_atari_m68k_other.o :
BootMergeObject boot_platform_atari_m68k_other.o :
# shell.S
start.cpp
toscalls.cpp
@ -59,7 +59,7 @@ KernelMergeObject boot_platform_atari_m68k_other.o :
;
KernelMergeObject boot_platform_atari_m68k.o :
BootMergeObject boot_platform_atari_m68k.o :
: :
boot_platform_atari_m68k_shell.o
boot_platform_atari_m68k_other.o

View File

@ -17,7 +17,7 @@ UsePrivateHeaders [ FDirName storage ] ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
KernelMergeObject boot_platform_bios_ia32.o :
BootMergeObject boot_platform_bios_ia32.o :
shell.S
start.cpp
debug.cpp

View File

@ -17,7 +17,7 @@
#include <boot/platform/generic/text_console.h>
#include <arch_cpu.h>
#include <descriptors.h>
#include <arch/x86/descriptors.h>
#include "debug.h"
#include "keyboard.h"

View File

@ -6,7 +6,7 @@ UsePrivateHeaders [ FDirName graphics common ] ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
KernelMergeObject boot_platform_cfe.o :
BootMergeObject boot_platform_cfe.o :
console.cpp
debug.cpp
devices.cpp

View File

@ -7,7 +7,7 @@ UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_ARCH) ]
SubDirC++Flags -fno-rtti ;
KernelStaticLibrary boot_platform_cfe_ppc :
BootStaticLibrary boot_platform_cfe_ppc :
arch_mmu.cpp
arch_cpu_asm.S
arch_start_kernel.S

View File

@ -5,7 +5,7 @@ UsePrivateKernelHeaders ;
SubDirC++Flags -D_BOOT_MODE -fno-rtti ;
KernelStaticLibrary boot_platform_generic :
BootStaticLibrary boot_platform_generic :
text_menu.cpp
video_blit.cpp
video_splash.cpp

View File

@ -6,7 +6,7 @@ UsePrivateHeaders [ FDirName graphics common ] ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
KernelMergeObject boot_platform_openfirmware.o :
BootMergeObject boot_platform_openfirmware.o :
console.cpp
debug.cpp
devices.cpp

View File

@ -7,7 +7,7 @@ UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_ARCH) ]
SubDirC++Flags -fno-rtti ;
KernelStaticLibrary boot_platform_openfirmware_ppc :
BootStaticLibrary boot_platform_openfirmware_ppc :
arch_mmu.cpp
arch_cpu_asm.S
arch_start_kernel.S

View File

@ -45,7 +45,7 @@ local bios_ia32_edid_src =
;
KernelMergeObject boot_platform_pxe_ia32.o :
BootMergeObject boot_platform_pxe_ia32.o :
pxe_stage2.S
smp_trampoline.S
pxe_bios.S

View File

@ -19,7 +19,7 @@ UsePrivateHeaders [ FDirName kernel arch $(TARGET_ARCH) board $(TARGET_BOOT_BOAR
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
KernelMergeObject boot_platform_raspberrypi_arm.o :
BootMergeObject boot_platform_raspberrypi_arm.o :
entry.S
start.c
console.cpp

View File

@ -23,7 +23,7 @@ local genericPlatformSources =
# video_splash.cpp
;
KernelMergeObject boot_platform_routerboard_mipsel.o :
BootMergeObject boot_platform_routerboard_mipsel.o :
console.cpp
cpu.cpp
debug.c

View File

@ -29,7 +29,7 @@ local uImageFakeOS = "netbsd" ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
# First build the non arch dependent parts
KernelMergeObject boot_platform_u-boot_common.o :
BootMergeObject boot_platform_u-boot_common.o :
start.cpp
debug.cpp
console.cpp
@ -48,7 +48,7 @@ KernelMergeObject boot_platform_u-boot_common.o :
: boot_platform_generic.a
;
KernelMergeObject boot_platform_u-boot.o :
BootMergeObject boot_platform_u-boot.o :
: :
# must come first to have _start_* at correct locations
boot_platform_u-boot_$(TARGET_ARCH).o

View File

@ -8,7 +8,7 @@ UsePrivateHeaders [ FDirName kernel arch $(TARGET_ARCH) board $(TARGET_BOOT_BOAR
SubDirC++Flags -fno-rtti ;
KernelMergeObject boot_platform_u-boot_arm.o :
BootMergeObject boot_platform_u-boot_arm.o :
# must come first to have _start_* at correct locations
shell.S

View File

@ -8,7 +8,7 @@ UsePrivateHeaders [ FDirName kernel arch $(TARGET_ARCH) board $(TARGET_BOOT_BOAR
SubDirC++Flags -fno-rtti ;
KernelMergeObject boot_platform_u-boot_ppc.o :
BootMergeObject boot_platform_u-boot_ppc.o :
# must come first to have _start_* at correct locations
shell.S

View File

@ -0,0 +1,33 @@
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SECTIONS
{
. = 0x10000;
/* text/read-only data */
.text : { *(.text .gnu.linkonce.t.*) }
. = ALIGN(0x4);
__ctor_list = .;
.ctors : { *(.ctors) }
__ctor_end = .;
.rodata : { *(.rodata .rodata.*) }
/* writable data */
. = ALIGN(0x1000);
__data_start = .;
.data : { *(.data .gnu.linkonce.d.*) }
/* uninitialized data (in same segment as writable data) */
__bss_start = .;
.bss : { *(.bss) }
. = ALIGN(0x1000);
_end = . ;
/* Strip unnecessary stuff */
/DISCARD/ : { *(.comment .note .eh_frame .dtors .stab .stabstr .debug*) }
}

View File

@ -0,0 +1,33 @@
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SECTIONS
{
. = 0x10000;
/* text/read-only data */
.text : { *(.text .gnu.linkonce.t.*) }
. = ALIGN(0x4);
__ctor_list = .;
.ctors : { *(.ctors) }
__ctor_end = .;
.rodata : { *(.rodata .rodata.*) }
/* writable data */
. = ALIGN(0x1000);
__data_start = .;
.data : { *(.data .gnu.linkonce.d.*) }
/* uninitialized data (in same segment as writable data) */
__bss_start = .;
.bss : { *(.bss) }
. = ALIGN(0x1000);
_end = . ;
/* Strip unnecessary stuff */
/DISCARD/ : { *(.comment .note .eh_frame .dtors .stab .stabstr .debug*) }
}