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:
@@ -44,6 +44,7 @@ include [ FDirName $(HAIKU_BUILD_RULES_DIR) DocumentationRules ] ;
|
|||||||
include [ FDirName $(HAIKU_BUILD_RULES_DIR) FileRules ] ;
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) FileRules ] ;
|
||||||
include [ FDirName $(HAIKU_BUILD_RULES_DIR) HeadersRules ] ;
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) HeadersRules ] ;
|
||||||
include [ FDirName $(HAIKU_BUILD_RULES_DIR) KernelRules ] ;
|
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) ImageRules ] ;
|
||||||
include [ FDirName $(HAIKU_BUILD_RULES_DIR) CDRules ] ;
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) CDRules ] ;
|
||||||
include [ FDirName $(HAIKU_BUILD_RULES_DIR) MainBuildRules ] ;
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) MainBuildRules ] ;
|
||||||
|
|||||||
@@ -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)" ;
|
||||||
|
}
|
||||||
+23
-1
@@ -159,10 +159,13 @@ if $(HAIKU_GCC_VERSION[1]) = 2 {
|
|||||||
HAIKU_C++ ?= $(HAIKU_CC) ;
|
HAIKU_C++ ?= $(HAIKU_CC) ;
|
||||||
HAIKU_LINK = $(HAIKU_CC) ;
|
HAIKU_LINK = $(HAIKU_CC) ;
|
||||||
HAIKU_LINKFLAGS = $(HAIKU_GCC_BASE_FLAGS) ;
|
HAIKU_LINKFLAGS = $(HAIKU_GCC_BASE_FLAGS) ;
|
||||||
|
HAIKU_BOOT_LINKFLAGS = ;
|
||||||
|
|
||||||
HAIKU_HDRS = [ FStandardHeaders ] ;
|
HAIKU_HDRS = [ FStandardHeaders ] ;
|
||||||
HAIKU_KERNEL_CCFLAGS = $(HAIKU_CCFLAGS) $(HAIKU_GCC_BASE_FLAGS) ;
|
HAIKU_KERNEL_CCFLAGS = $(HAIKU_CCFLAGS) $(HAIKU_GCC_BASE_FLAGS) ;
|
||||||
HAIKU_KERNEL_C++FLAGS = $(HAIKU_C++FLAGS) $(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_CCFLAGS += $(HAIKU_GCC_BASE_FLAGS) -nostdinc ;
|
||||||
HAIKU_C++FLAGS += $(HAIKU_GCC_BASE_FLAGS) -nostdinc ;
|
HAIKU_C++FLAGS += $(HAIKU_GCC_BASE_FLAGS) -nostdinc ;
|
||||||
HAIKU_DEFINES = __HAIKU__ ;
|
HAIKU_DEFINES = __HAIKU__ ;
|
||||||
@@ -249,7 +252,6 @@ switch $(HAIKU_CPU) {
|
|||||||
}
|
}
|
||||||
case x86_64 :
|
case x86_64 :
|
||||||
{
|
{
|
||||||
HAIKU_DEFINES += __x86_64__ ;
|
|
||||||
HAIKU_BOOT_PLATFORM = bios_ia32 ;
|
HAIKU_BOOT_PLATFORM = bios_ia32 ;
|
||||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 2880 ; # in kB
|
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 2880 ; # in kB
|
||||||
# offset in floppy image (>= sizeof(haiku_loader))
|
# offset in floppy image (>= sizeof(haiku_loader))
|
||||||
@@ -329,6 +331,8 @@ HAIKU_ASFLAGS = ;
|
|||||||
HAIKU_KERNEL_CCFLAGS += -finline -fno-builtin ;
|
HAIKU_KERNEL_CCFLAGS += -finline -fno-builtin ;
|
||||||
HAIKU_KERNEL_C++FLAGS += -finline -fno-builtin -fno-exceptions ;
|
HAIKU_KERNEL_C++FLAGS += -finline -fno-builtin -fno-exceptions ;
|
||||||
HAIKU_KERNEL_DEFINES += _KERNEL_MODE ;
|
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 {
|
if $(HAIKU_GCC_VERSION[1]) >= 3 {
|
||||||
HAIKU_KERNEL_C++FLAGS += -fno-use-cxa-atexit ;
|
HAIKU_KERNEL_C++FLAGS += -fno-use-cxa-atexit ;
|
||||||
@@ -340,6 +344,8 @@ if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
|||||||
if $(HAIKU_GCC_VERSION[2]) >= 3 {
|
if $(HAIKU_GCC_VERSION[2]) >= 3 {
|
||||||
HAIKU_KERNEL_CCFLAGS += -ffreestanding ;
|
HAIKU_KERNEL_CCFLAGS += -ffreestanding ;
|
||||||
HAIKU_KERNEL_C++FLAGS += -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 :
|
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_*().
|
# Enable use of the gcc built-in atomic functions instead of atomic_*().
|
||||||
# The former are inlined and have thus less overhead.
|
# The former are inlined and have thus less overhead.
|
||||||
HAIKU_DEFINES += B_USE_BUILTIN_ATOMIC_FUNCTIONS ;
|
HAIKU_DEFINES += B_USE_BUILTIN_ATOMIC_FUNCTIONS ;
|
||||||
@@ -962,6 +977,7 @@ local buildVars =
|
|||||||
|
|
||||||
KERNEL_CCFLAGS KERNEL_C++FLAGS
|
KERNEL_CCFLAGS KERNEL_C++FLAGS
|
||||||
KERNEL_PIC_CCFLAGS KERNEL_PIC_LINKFLAGS
|
KERNEL_PIC_CCFLAGS KERNEL_PIC_LINKFLAGS
|
||||||
|
BOOT_CCFLAGS BOOT_C++FLAGS BOOT_LINKFLAGS
|
||||||
WARNING_CCFLAGS WARNING_C++FLAGS
|
WARNING_CCFLAGS WARNING_C++FLAGS
|
||||||
|
|
||||||
KERNEL_WARNING_CCFLAGS KERNEL_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 = $(HAIKU_GCC_LIBGCC) ;
|
||||||
TARGET_GCC_LIBGCC_OBJECTS = $(HAIKU_GCC_LIBGCC_OBJECTS) ;
|
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_PLATFORM ?= $(HAIKU_BOOT_PLATFORM) ;
|
||||||
TARGET_BOOT_BOARD ?= $(HAIKU_BOOT_BOARD) ;
|
TARGET_BOOT_BOARD ?= $(HAIKU_BOOT_BOARD) ;
|
||||||
|
|
||||||
@@ -1014,6 +1033,9 @@ if $(TARGET_PLATFORM) = haiku {
|
|||||||
TARGET_GCC_LIBGCC = ;
|
TARGET_GCC_LIBGCC = ;
|
||||||
TARGET_GCC_LIBGCC_OBJECTS = ;
|
TARGET_GCC_LIBGCC_OBJECTS = ;
|
||||||
|
|
||||||
|
TARGET_BOOT_LIBGCC = ;
|
||||||
|
TARGET_BOOT_LIBSUPC++ = ;
|
||||||
|
|
||||||
TARGET_BOOT_PLATFORM = ;
|
TARGET_BOOT_PLATFORM = ;
|
||||||
TARGET_BOOT_BOARD = ;
|
TARGET_BOOT_BOARD = ;
|
||||||
|
|
||||||
|
|||||||
@@ -242,6 +242,14 @@ standard_gcc_settings()
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
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
|
# set_default_value
|
||||||
@@ -549,6 +557,9 @@ HAIKU_STATIC_LIBSUPC++ ?= ${HAIKU_STATIC_LIBSUPCXX} ;
|
|||||||
HAIKU_SHARED_LIBSUPC++ ?= ${HAIKU_SHARED_LIBSUPCXX} ;
|
HAIKU_SHARED_LIBSUPC++ ?= ${HAIKU_SHARED_LIBSUPCXX} ;
|
||||||
HAIKU_C++_HEADERS_DIR ?= ${HAIKU_CXX_HEADERS_DIR} ;
|
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_BUILD_ATTRIBUTES_DIR ?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ;
|
||||||
|
|
||||||
HAIKU_AR ?= ${HAIKU_AR} ;
|
HAIKU_AR ?= ${HAIKU_AR} ;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
#include <apm_defs.h>
|
#include <arch/x86/apm_defs.h>
|
||||||
|
|
||||||
|
|
||||||
struct kernel_args;
|
struct kernel_args;
|
||||||
|
|||||||
@@ -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 */
|
||||||
@@ -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 */
|
||||||
@@ -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 */
|
||||||
@@ -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 */
|
||||||
@@ -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 */
|
||||||
@@ -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 */
|
||||||
@@ -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 */
|
||||||
@@ -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 */
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <apm.h>
|
#include <arch/x86/apm.h>
|
||||||
#include <bios_drive.h>
|
#include <bios_drive.h>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2004, Alex Smith, [email protected].
|
||||||
|
* 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 */
|
||||||
@@ -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 */
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2008, Ingo Weinhold, [email protected].
|
||||||
|
* 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 */
|
||||||
|
|
||||||
+35
-26
@@ -1,27 +1,37 @@
|
|||||||
SubDir HAIKU_TOP src system boot ;
|
SubDir HAIKU_TOP src system boot ;
|
||||||
|
|
||||||
local librootFunctions =
|
DEFINES += _BOOT_MODE ;
|
||||||
abs.o
|
|
||||||
ctype.o
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot posix string ] ;
|
||||||
LocaleData.o
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot posix stdlib ] ;
|
||||||
qsort.o
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot posix locale ] ;
|
||||||
kernel_vsprintf.o
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) kernel lib ] ;
|
||||||
memcmp.o
|
|
||||||
memmove.o
|
UsePrivateHeaders [ FDirName libroot locale ] ;
|
||||||
strdup.o
|
|
||||||
strndup.o
|
BootMergeObject boot_libroot.o :
|
||||||
strlen.o
|
abs.c
|
||||||
strnlen.o
|
ctype.cpp
|
||||||
strcmp.o
|
LocaleData.cpp
|
||||||
strcasecmp.o
|
qsort.c
|
||||||
strncmp.o
|
kernel_vsprintf.cpp
|
||||||
strcat.o
|
memcmp.c
|
||||||
strcpy.o
|
memmove.c
|
||||||
strlcat.o
|
strdup.c
|
||||||
strlcpy.o
|
strndup.cpp
|
||||||
strchr.o
|
strlen.cpp
|
||||||
strrchr.o
|
strnlen.cpp
|
||||||
strtol.o
|
strcmp.c
|
||||||
|
strcasecmp.c
|
||||||
|
strncmp.c
|
||||||
|
strcat.c
|
||||||
|
strcpy.c
|
||||||
|
strlcat.c
|
||||||
|
strlcpy.c
|
||||||
|
strchr.c
|
||||||
|
strrchr.c
|
||||||
|
strtol.c
|
||||||
|
: -fno-pic
|
||||||
;
|
;
|
||||||
|
|
||||||
local extraLinkerArgs = ;
|
local extraLinkerArgs = ;
|
||||||
@@ -31,7 +41,7 @@ if $(HAIKU_BOARD_LOADER_BASE) {
|
|||||||
|
|
||||||
AddResources haiku_loader : boot_loader.rdef ;
|
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_platform_$(TARGET_BOOT_PLATFORM).o
|
||||||
boot_arch_$(TARGET_ARCH).o
|
boot_arch_$(TARGET_ARCH).o
|
||||||
boot_loader.a
|
boot_loader.a
|
||||||
@@ -47,9 +57,8 @@ KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) :
|
|||||||
# needed by tarfs and video_splash.cpp
|
# needed by tarfs and video_splash.cpp
|
||||||
boot_zlib.a
|
boot_zlib.a
|
||||||
|
|
||||||
# libroot functions needed by the stage2 boot loader (compiled for the
|
# libroot functions needed by the stage2 boot loader
|
||||||
# kernel)
|
boot_libroot.o
|
||||||
$(librootFunctions:G=src!system!kernel!lib)
|
|
||||||
|
|
||||||
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld
|
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld
|
||||||
: -Bstatic $(extraLinkerArgs)
|
: -Bstatic $(extraLinkerArgs)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ local kernelLibArchObjects =
|
|||||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
|
<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
|
debug_uart_8250.cpp
|
||||||
arch_uart_8250.cpp
|
arch_uart_8250.cpp
|
||||||
arch_uart_pl011.cpp
|
arch_uart_pl011.cpp
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ local kernelLibArchObjects =
|
|||||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
|
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
|
||||||
;
|
;
|
||||||
|
|
||||||
KernelMergeObject boot_arch_$(TARGET_ARCH).o :
|
BootMergeObject boot_arch_$(TARGET_ARCH).o :
|
||||||
arch_elf.cpp
|
arch_elf.cpp
|
||||||
$(librootArchObjects)
|
$(librootArchObjects)
|
||||||
: -fno-pic
|
: -fno-pic
|
||||||
@@ -21,17 +21,17 @@ KernelMergeObject boot_arch_$(TARGET_ARCH).o :
|
|||||||
$(kernelLibArchObjects)
|
$(kernelLibArchObjects)
|
||||||
;
|
;
|
||||||
|
|
||||||
KernelMergeObject boot_arch_$(TARGET_ARCH)_030.o :
|
BootMergeObject boot_arch_$(TARGET_ARCH)_030.o :
|
||||||
mmu_030.cpp
|
mmu_030.cpp
|
||||||
: -fno-pic -Wno-unused -m68030
|
: -fno-pic -Wno-unused -m68030
|
||||||
;
|
;
|
||||||
|
|
||||||
KernelMergeObject boot_arch_$(TARGET_ARCH)_040.o :
|
BootMergeObject boot_arch_$(TARGET_ARCH)_040.o :
|
||||||
mmu_040.cpp
|
mmu_040.cpp
|
||||||
: -fno-pic -Wno-unused -m68040
|
: -fno-pic -Wno-unused -m68040
|
||||||
;
|
;
|
||||||
|
|
||||||
KernelMergeObject boot_arch_$(TARGET_ARCH)_060.o :
|
BootMergeObject boot_arch_$(TARGET_ARCH)_060.o :
|
||||||
mmu_060.cpp
|
mmu_060.cpp
|
||||||
: -fno-pic -Wno-unused -m68060
|
: -fno-pic -Wno-unused -m68060
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ local kernelLibArchObjects =
|
|||||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
|
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
|
||||||
;
|
;
|
||||||
|
|
||||||
KernelMergeObject boot_arch_$(TARGET_ARCH).o :
|
BootMergeObject boot_arch_$(TARGET_ARCH).o :
|
||||||
arch_elf.cpp
|
arch_elf.cpp
|
||||||
: # additional flags
|
: # additional flags
|
||||||
:
|
:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ local kernelLibArchObjects =
|
|||||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
|
<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
|
debug_uart_8250.cpp
|
||||||
arch_uart_8250.cpp
|
arch_uart_8250.cpp
|
||||||
arch_elf.cpp
|
arch_elf.cpp
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ local kernelLibArchObjects =
|
|||||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>byteorder.o
|
<src!system!kernel!lib!arch!$(TARGET_ARCH)>byteorder.o
|
||||||
;
|
;
|
||||||
|
|
||||||
KernelMergeObject boot_arch_$(TARGET_ARCH).o :
|
BootMergeObject boot_arch_$(TARGET_ARCH).o :
|
||||||
$(kernelArchSources)
|
$(kernelArchSources)
|
||||||
$(kernelLibArchSources)
|
$(kernelLibArchSources)
|
||||||
: # additional flags
|
: # additional flags
|
||||||
|
|||||||
@@ -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 ] ;
|
||||||
@@ -50,7 +50,7 @@ UsePrivateHeaders shared storage ;
|
|||||||
SubDirC++Flags $(defines) -fno-rtti ;
|
SubDirC++Flags $(defines) -fno-rtti ;
|
||||||
}
|
}
|
||||||
|
|
||||||
KernelStaticLibrary boot_loader :
|
BootStaticLibrary boot_loader :
|
||||||
elf.cpp
|
elf.cpp
|
||||||
heap.cpp
|
heap.cpp
|
||||||
kernel_args.cpp
|
kernel_args.cpp
|
||||||
@@ -81,7 +81,7 @@ KernelStaticLibrary boot_loader :
|
|||||||
# The partition support is built in an extra static library
|
# The partition support is built in an extra static library
|
||||||
# so that only the ones that are used will be included.
|
# so that only the ones that are used will be included.
|
||||||
|
|
||||||
KernelStaticLibrary boot_partitions :
|
BootStaticLibrary boot_partitions :
|
||||||
FileMapDisk.cpp
|
FileMapDisk.cpp
|
||||||
amiga_rdb.cpp
|
amiga_rdb.cpp
|
||||||
apple.cpp
|
apple.cpp
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ UsePrivateHeaders kernel storage ;
|
|||||||
|
|
||||||
SubDirC++Flags -fno-rtti ;
|
SubDirC++Flags -fno-rtti ;
|
||||||
|
|
||||||
KernelStaticLibrary boot_amiga_ffs :
|
BootStaticLibrary boot_amiga_ffs :
|
||||||
amiga_ffs.cpp
|
amiga_ffs.cpp
|
||||||
Volume.cpp
|
Volume.cpp
|
||||||
Directory.cpp
|
Directory.cpp
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ local defines = [ FDefines _BOOT_MODE ] ;
|
|||||||
SubDirCcFlags $(defines) ;
|
SubDirCcFlags $(defines) ;
|
||||||
SubDirC++Flags -fno-rtti $(defines) ;
|
SubDirC++Flags -fno-rtti $(defines) ;
|
||||||
|
|
||||||
KernelStaticLibrary boot_bfs :
|
BootStaticLibrary boot_bfs :
|
||||||
bfs.cpp
|
bfs.cpp
|
||||||
Directory.cpp
|
Directory.cpp
|
||||||
File.cpp
|
File.cpp
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ local defines = [ FDefines _BOOT_MODE ] ;
|
|||||||
SubDirCcFlags $(defines) ;
|
SubDirCcFlags $(defines) ;
|
||||||
SubDirC++Flags -fno-rtti $(defines) ;
|
SubDirC++Flags -fno-rtti $(defines) ;
|
||||||
|
|
||||||
KernelStaticLibrary boot_fatfs :
|
BootStaticLibrary boot_fatfs :
|
||||||
fatfs.cpp
|
fatfs.cpp
|
||||||
Volume.cpp
|
Volume.cpp
|
||||||
CachedBlock.cpp
|
CachedBlock.cpp
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ UsePrivateHeaders kernel storage ;
|
|||||||
|
|
||||||
SubDirC++Flags -fno-rtti ;
|
SubDirC++Flags -fno-rtti ;
|
||||||
|
|
||||||
KernelStaticLibrary boot_hfs_plus :
|
BootStaticLibrary boot_hfs_plus :
|
||||||
hfs_plus.cpp
|
hfs_plus.cpp
|
||||||
: -fno-pic
|
: -fno-pic
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ SubDirC++Flags -fno-rtti $(defines) ;
|
|||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src libs zlib ] ;
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src libs zlib ] ;
|
||||||
|
|
||||||
|
|
||||||
KernelStaticLibrary boot_zlib :
|
BootStaticLibrary boot_zlib :
|
||||||
inflate.c
|
inflate.c
|
||||||
inffast.c
|
inffast.c
|
||||||
inftrees.c
|
inftrees.c
|
||||||
@@ -25,7 +25,7 @@ KernelStaticLibrary boot_zlib :
|
|||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
KernelStaticLibrary boot_tarfs :
|
BootStaticLibrary boot_tarfs :
|
||||||
tarfs.cpp
|
tarfs.cpp
|
||||||
: -fno-pic
|
: -fno-pic
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if $(TARGET_ARCH) = ppc {
|
|||||||
iscsi = iSCSITarget.cpp ;
|
iscsi = iSCSITarget.cpp ;
|
||||||
}
|
}
|
||||||
|
|
||||||
KernelStaticLibrary boot_net :
|
BootStaticLibrary boot_net :
|
||||||
ARP.cpp
|
ARP.cpp
|
||||||
ChainBuffer.cpp
|
ChainBuffer.cpp
|
||||||
Ethernet.cpp
|
Ethernet.cpp
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ UsePrivateHeaders [ FDirName storage ] ;
|
|||||||
|
|
||||||
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
#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
|
shell.S
|
||||||
: -Wa,--pcrel
|
: -Wa,--pcrel
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
KernelMergeObject boot_platform_amiga_m68k_other.o :
|
BootMergeObject boot_platform_amiga_m68k_other.o :
|
||||||
# shell.S
|
# shell.S
|
||||||
start.cpp
|
start.cpp
|
||||||
rom_calls.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_shell.o
|
||||||
boot_platform_amiga_m68k_other.o
|
boot_platform_amiga_m68k_other.o
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ UsePrivateHeaders [ FDirName storage ] ;
|
|||||||
|
|
||||||
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
#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
|
shell.S
|
||||||
: -Wa,--pcrel
|
: -Wa,--pcrel
|
||||||
;
|
;
|
||||||
@@ -30,7 +30,7 @@ KernelMergeObject boot_platform_atari_m68k_shell.o :
|
|||||||
# TODO: add 020+68851 support
|
# TODO: add 020+68851 support
|
||||||
|
|
||||||
|
|
||||||
KernelMergeObject boot_platform_atari_m68k_other.o :
|
BootMergeObject boot_platform_atari_m68k_other.o :
|
||||||
# shell.S
|
# shell.S
|
||||||
start.cpp
|
start.cpp
|
||||||
toscalls.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_shell.o
|
||||||
boot_platform_atari_m68k_other.o
|
boot_platform_atari_m68k_other.o
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ UsePrivateHeaders [ FDirName storage ] ;
|
|||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
KernelMergeObject boot_platform_bios_ia32.o :
|
BootMergeObject boot_platform_bios_ia32.o :
|
||||||
shell.S
|
shell.S
|
||||||
start.cpp
|
start.cpp
|
||||||
debug.cpp
|
debug.cpp
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
#include <boot/platform/generic/text_console.h>
|
#include <boot/platform/generic/text_console.h>
|
||||||
|
|
||||||
#include <arch_cpu.h>
|
#include <arch_cpu.h>
|
||||||
#include <descriptors.h>
|
#include <arch/x86/descriptors.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ UsePrivateHeaders [ FDirName graphics common ] ;
|
|||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
KernelMergeObject boot_platform_cfe.o :
|
BootMergeObject boot_platform_cfe.o :
|
||||||
console.cpp
|
console.cpp
|
||||||
debug.cpp
|
debug.cpp
|
||||||
devices.cpp
|
devices.cpp
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_ARCH) ]
|
|||||||
|
|
||||||
SubDirC++Flags -fno-rtti ;
|
SubDirC++Flags -fno-rtti ;
|
||||||
|
|
||||||
KernelStaticLibrary boot_platform_cfe_ppc :
|
BootStaticLibrary boot_platform_cfe_ppc :
|
||||||
arch_mmu.cpp
|
arch_mmu.cpp
|
||||||
arch_cpu_asm.S
|
arch_cpu_asm.S
|
||||||
arch_start_kernel.S
|
arch_start_kernel.S
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ UsePrivateKernelHeaders ;
|
|||||||
|
|
||||||
SubDirC++Flags -D_BOOT_MODE -fno-rtti ;
|
SubDirC++Flags -D_BOOT_MODE -fno-rtti ;
|
||||||
|
|
||||||
KernelStaticLibrary boot_platform_generic :
|
BootStaticLibrary boot_platform_generic :
|
||||||
text_menu.cpp
|
text_menu.cpp
|
||||||
video_blit.cpp
|
video_blit.cpp
|
||||||
video_splash.cpp
|
video_splash.cpp
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ UsePrivateHeaders [ FDirName graphics common ] ;
|
|||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
KernelMergeObject boot_platform_openfirmware.o :
|
BootMergeObject boot_platform_openfirmware.o :
|
||||||
console.cpp
|
console.cpp
|
||||||
debug.cpp
|
debug.cpp
|
||||||
devices.cpp
|
devices.cpp
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_ARCH) ]
|
|||||||
|
|
||||||
SubDirC++Flags -fno-rtti ;
|
SubDirC++Flags -fno-rtti ;
|
||||||
|
|
||||||
KernelStaticLibrary boot_platform_openfirmware_ppc :
|
BootStaticLibrary boot_platform_openfirmware_ppc :
|
||||||
arch_mmu.cpp
|
arch_mmu.cpp
|
||||||
arch_cpu_asm.S
|
arch_cpu_asm.S
|
||||||
arch_start_kernel.S
|
arch_start_kernel.S
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ local bios_ia32_edid_src =
|
|||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
KernelMergeObject boot_platform_pxe_ia32.o :
|
BootMergeObject boot_platform_pxe_ia32.o :
|
||||||
pxe_stage2.S
|
pxe_stage2.S
|
||||||
smp_trampoline.S
|
smp_trampoline.S
|
||||||
pxe_bios.S
|
pxe_bios.S
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ UsePrivateHeaders [ FDirName kernel arch $(TARGET_ARCH) board $(TARGET_BOOT_BOAR
|
|||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
KernelMergeObject boot_platform_raspberrypi_arm.o :
|
BootMergeObject boot_platform_raspberrypi_arm.o :
|
||||||
entry.S
|
entry.S
|
||||||
start.c
|
start.c
|
||||||
console.cpp
|
console.cpp
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ local genericPlatformSources =
|
|||||||
# video_splash.cpp
|
# video_splash.cpp
|
||||||
;
|
;
|
||||||
|
|
||||||
KernelMergeObject boot_platform_routerboard_mipsel.o :
|
BootMergeObject boot_platform_routerboard_mipsel.o :
|
||||||
console.cpp
|
console.cpp
|
||||||
cpu.cpp
|
cpu.cpp
|
||||||
debug.c
|
debug.c
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ local uImageFakeOS = "netbsd" ;
|
|||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
# First build the non arch dependent parts
|
# First build the non arch dependent parts
|
||||||
KernelMergeObject boot_platform_u-boot_common.o :
|
BootMergeObject boot_platform_u-boot_common.o :
|
||||||
start.cpp
|
start.cpp
|
||||||
debug.cpp
|
debug.cpp
|
||||||
console.cpp
|
console.cpp
|
||||||
@@ -48,7 +48,7 @@ KernelMergeObject boot_platform_u-boot_common.o :
|
|||||||
: boot_platform_generic.a
|
: 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
|
# must come first to have _start_* at correct locations
|
||||||
boot_platform_u-boot_$(TARGET_ARCH).o
|
boot_platform_u-boot_$(TARGET_ARCH).o
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ UsePrivateHeaders [ FDirName kernel arch $(TARGET_ARCH) board $(TARGET_BOOT_BOAR
|
|||||||
|
|
||||||
SubDirC++Flags -fno-rtti ;
|
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
|
# must come first to have _start_* at correct locations
|
||||||
shell.S
|
shell.S
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ UsePrivateHeaders [ FDirName kernel arch $(TARGET_ARCH) board $(TARGET_BOOT_BOAR
|
|||||||
|
|
||||||
SubDirC++Flags -fno-rtti ;
|
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
|
# must come first to have _start_* at correct locations
|
||||||
shell.S
|
shell.S
|
||||||
|
|
||||||
|
|||||||
@@ -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*) }
|
||||||
|
}
|
||||||
@@ -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*) }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user