system/boot: Add support for multiple bootloaders
This commit is contained in:
parent
f15270537a
commit
1f96a3cbde
@ -239,13 +239,15 @@ rule KernelArchitectureSetup architecture
|
|||||||
|
|
||||||
switch $(cpu) {
|
switch $(cpu) {
|
||||||
case ppc :
|
case ppc :
|
||||||
HAIKU_BOOT_PLATFORM ?= openfirmware ;
|
HAIKU_KERNEL_PLATFORM ?= openfirmware ;
|
||||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 2880 ; # in kB
|
HAIKU_BOOT_TARGETS += openfirmware ;
|
||||||
|
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ; # in kB
|
||||||
# offset in floppy image (>= sizeof(haiku_loader))
|
# offset in floppy image (>= sizeof(haiku_loader))
|
||||||
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 384 ; # in kB
|
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 384 ; # in kB
|
||||||
|
|
||||||
case arm :
|
case arm :
|
||||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
HAIKU_KERNEL_PLATFORM ?= u-boot ;
|
||||||
|
HAIKU_BOOT_TARGETS += u-boot ;
|
||||||
|
|
||||||
HAIKU_BOOT_SDIMAGE_SIZE ?= 128 ;
|
HAIKU_BOOT_SDIMAGE_SIZE ?= 128 ;
|
||||||
# SOC's like allwinner need an offset to skip the hardcoded initial loader
|
# SOC's like allwinner need an offset to skip the hardcoded initial loader
|
||||||
@ -269,7 +271,9 @@ rule KernelArchitectureSetup architecture
|
|||||||
HAIKU_BOOT_LOADER_BASE ?= 0x1000000 ;
|
HAIKU_BOOT_LOADER_BASE ?= 0x1000000 ;
|
||||||
|
|
||||||
case x86 :
|
case x86 :
|
||||||
HAIKU_BOOT_PLATFORM ?= bios_ia32 ;
|
HAIKU_KERNEL_PLATFORM ?= bios_ia32 ;
|
||||||
|
HAIKU_BOOT_TARGETS += bios_ia32 pxe_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))
|
||||||
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 320 ; # in kB
|
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 320 ; # in kB
|
||||||
@ -280,8 +284,10 @@ rule KernelArchitectureSetup architecture
|
|||||||
}
|
}
|
||||||
|
|
||||||
case x86_64 :
|
case x86_64 :
|
||||||
# x86_64 completely shares the x86 bootloader.
|
# x86_64 completely shares the x86 bootloader for MBR.
|
||||||
HAIKU_BOOT_PLATFORM ?= bios_ia32 ;
|
HAIKU_KERNEL_PLATFORM ?= bios_ia32 ;
|
||||||
|
HAIKU_BOOT_TARGETS += bios_ia32 efi pxe_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))
|
||||||
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 320 ; # in kB
|
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 320 ; # in kB
|
||||||
@ -295,8 +301,9 @@ rule KernelArchitectureSetup architecture
|
|||||||
}
|
}
|
||||||
|
|
||||||
case m68k :
|
case m68k :
|
||||||
HAIKU_BOOT_PLATFORM ?= atari_m68k ;
|
HAIKU_KERNEL_PLATFORM ?= atari_m68k ;
|
||||||
switch $(HAIKU_BOOT_PLATFORM) {
|
HAIKU_BOOT_TARGETS += atari_m68k ;
|
||||||
|
switch $(HAIKU_KERNEL_PLATFORM) {
|
||||||
case atari_m68k :
|
case atari_m68k :
|
||||||
{
|
{
|
||||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ; # in kB
|
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ; # in kB
|
||||||
@ -319,7 +326,7 @@ rule KernelArchitectureSetup architecture
|
|||||||
# private kernel headers to be used when compiling kernel code
|
# private kernel headers to be used when compiling kernel code
|
||||||
HAIKU_PRIVATE_KERNEL_HEADERS =
|
HAIKU_PRIVATE_KERNEL_HEADERS =
|
||||||
[ PrivateHeaders $(DOT) kernel libroot shared
|
[ PrivateHeaders $(DOT) kernel libroot shared
|
||||||
kernel/boot/platform/$(HAIKU_BOOT_PLATFORM) ]
|
kernel/boot/platform/$(HAIKU_KERNEL_PLATFORM) ]
|
||||||
[ ArchHeaders $(HAIKU_KERNEL_ARCH) ]
|
[ ArchHeaders $(HAIKU_KERNEL_ARCH) ]
|
||||||
[ FDirName $(HAIKU_COMMON_DEBUG_OBJECT_DIR_$(architecture)) system
|
[ FDirName $(HAIKU_COMMON_DEBUG_OBJECT_DIR_$(architecture)) system
|
||||||
kernel ]
|
kernel ]
|
||||||
@ -379,11 +386,8 @@ rule KernelArchitectureSetup architecture
|
|||||||
HAIKU_KERNEL_C++FLAGS += -mtune=68020-60 ;
|
HAIKU_KERNEL_C++FLAGS += -mtune=68020-60 ;
|
||||||
|
|
||||||
case x86 :
|
case x86 :
|
||||||
# EFI Bootloader
|
HAIKU_KERNEL_CCFLAGS += -march=pentium ;
|
||||||
if $(HAIKU_BOOT_PLATFORM) = efi {
|
HAIKU_KERNEL_C++FLAGS += -march=pentium ;
|
||||||
HAIKU_BOOT_CCFLAGS += -mno-red-zone -maccumulate-outgoing-args ;
|
|
||||||
HAIKU_BOOT_C++FLAGS += -mno-red-zone -maccumulate-outgoing-args ;
|
|
||||||
}
|
|
||||||
|
|
||||||
case x86_64 :
|
case x86_64 :
|
||||||
# Kernel lives in the top 2GB of the address space, use kernel code
|
# Kernel lives in the top 2GB of the address space, use kernel code
|
||||||
@ -398,23 +402,6 @@ rule KernelArchitectureSetup architecture
|
|||||||
HAIKU_KERNEL_PIC_LINKFLAGS += -z max-page-size=0x1000 ;
|
HAIKU_KERNEL_PIC_LINKFLAGS += -z max-page-size=0x1000 ;
|
||||||
HAIKU_KERNEL_ADDON_LINKFLAGS += -z max-page-size=0x1000 ;
|
HAIKU_KERNEL_ADDON_LINKFLAGS += -z max-page-size=0x1000 ;
|
||||||
|
|
||||||
# BIOS Bootloader is 32-bit.
|
|
||||||
if $(HAIKU_BOOT_PLATFORM) = bios_ia32 {
|
|
||||||
if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 {
|
|
||||||
HAIKU_BOOT_LINKFLAGS += -m elf_i386 ;
|
|
||||||
} else {
|
|
||||||
HAIKU_BOOT_LINKFLAGS += -m elf_i386_haiku ;
|
|
||||||
}
|
|
||||||
HAIKU_BOOT_CCFLAGS += -m32 -march=pentium ;
|
|
||||||
HAIKU_BOOT_C++FLAGS += -m32 -march=pentium ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# EFI Bootloader
|
|
||||||
if $(HAIKU_BOOT_PLATFORM) = efi {
|
|
||||||
HAIKU_BOOT_CCFLAGS += -mno-red-zone -maccumulate-outgoing-args ;
|
|
||||||
HAIKU_BOOT_C++FLAGS += -mno-red-zone -maccumulate-outgoing-args ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if x86 in $(HAIKU_ARCHS[2-]) || x86_gcc2 in $(HAIKU_ARCHS[2-]) {
|
if x86 in $(HAIKU_ARCHS[2-]) || x86_gcc2 in $(HAIKU_ARCHS[2-]) {
|
||||||
Echo "Enable kernel ia32 compatibility" ;
|
Echo "Enable kernel ia32 compatibility" ;
|
||||||
HAIKU_KERNEL_DEFINES += _COMPAT_MODE ;
|
HAIKU_KERNEL_DEFINES += _COMPAT_MODE ;
|
||||||
@ -422,15 +409,50 @@ rule KernelArchitectureSetup architecture
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $(HAIKU_BOOT_PLATFORM) = efi {
|
local bootTarget ;
|
||||||
HAIKU_BOOT_CCFLAGS += -fpic -fno-stack-protector -fPIC -fshort-wchar
|
for bootTarget in $(HAIKU_BOOT_TARGETS) {
|
||||||
-Wno-error=unused-variable ;
|
switch $(bootTarget) {
|
||||||
HAIKU_BOOT_C++FLAGS += -fpic -fno-stack-protector -fPIC -fshort-wchar
|
case efi :
|
||||||
-Wno-error=unused-variable ;
|
# efi bootloader is PIC
|
||||||
HAIKU_BOOT_LDFLAGS = -Bstatic -Bsymbolic -shared -nostdlib -znocombreloc -nostartfiles -no-undefined ;
|
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -fpic -fno-stack-protector
|
||||||
} else {
|
-fPIC -fshort-wchar -mno-red-zone -maccumulate-outgoing-args
|
||||||
HAIKU_BOOT_CCFLAGS += -fno-pic ;
|
-Wno-error=unused-variable -Wno-error=main ;
|
||||||
HAIKU_BOOT_C++FLAGS += -fno-pic ;
|
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -fpic -fno-stack-protector
|
||||||
|
-fPIC -fshort-wchar -mno-red-zone -maccumulate-outgoing-args
|
||||||
|
-Wno-error=unused-variable -Wno-error=main ;
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_LDFLAGS = -Bstatic -Bsymbolic
|
||||||
|
-nostdlib -znocombreloc -nostartfiles -no-undefined ;
|
||||||
|
case bios_ia32 :
|
||||||
|
# bios_ia32 is non-PIC
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -fno-pic -march=pentium ;
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -fno-pic -march=pentium ;
|
||||||
|
if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 {
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_LDFLAGS += -m elf_i386 ;
|
||||||
|
} else {
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_LDFLAGS += -m elf_i386_haiku ;
|
||||||
|
}
|
||||||
|
if $(gccVersion[1]) >= 3 {
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -Wno-error=main -m32 ;
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -Wno-error=main -m32 ;
|
||||||
|
}
|
||||||
|
case pxe_ia32 :
|
||||||
|
# pxe_ia32 is non-PIC
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -fno-pic -march=pentium ;
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -fno-pic -march=pentium ;
|
||||||
|
if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 {
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_LDFLAGS += -m elf_i386 ;
|
||||||
|
} else {
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_LDFLAGS += -m elf_i386_haiku ;
|
||||||
|
}
|
||||||
|
if $(gccVersion[1]) >= 3 {
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -Wno-error=main -m32 ;
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -Wno-error=main -m32 ;
|
||||||
|
}
|
||||||
|
case * :
|
||||||
|
# all other bootloaders are non-PIC
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -fno-pic -Wno-error=main ;
|
||||||
|
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -fno-pic -Wno-error=main ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# warning flags
|
# warning flags
|
||||||
|
@ -1,10 +1,72 @@
|
|||||||
|
rule MultiBootSubDirSetup bootTargets
|
||||||
|
{
|
||||||
|
local result ;
|
||||||
|
local bootTarget ;
|
||||||
|
bootTargets ?= $(HAIKU_BOOT_TARGETS) ;
|
||||||
|
for bootTarget in $(bootTargets) {
|
||||||
|
local bootTargetObject = $(bootTarget:G=<boot-target-object>) ;
|
||||||
|
result += $(bootTargetObject) ;
|
||||||
|
|
||||||
|
TARGET_BOOT_PLATFORM on $(bootTargetObject) = $(bootTarget) ;
|
||||||
|
|
||||||
|
SOURCE_GRIST on $(bootTargetObject)
|
||||||
|
= $(SOURCE_GRIST:E=)!$(bootTarget) ;
|
||||||
|
|
||||||
|
HDRGRIST on $(bootTargetObject)
|
||||||
|
= $(HDRGRIST:E=)!$(bootTarget) ;
|
||||||
|
|
||||||
|
local var ;
|
||||||
|
for var in TARGET_ARCH {
|
||||||
|
$(var) on $(architectureObject) = $($(var)_$(architecture)) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clone the current config variable values and the variables SubDir
|
||||||
|
# resets.
|
||||||
|
for var in $(AUTO_SET_UP_CONFIG_VARIABLES) SUBDIR$(SUBDIRRESET) {
|
||||||
|
$(var) on $(architectureObject) = $($(var)) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
local hostTarget = HOST TARGET ;
|
||||||
|
local objectDirVars =
|
||||||
|
COMMON_ARCH COMMON_DEBUG DEBUG_$(HAIKU_DEBUG_LEVELS)
|
||||||
|
;
|
||||||
|
objectDirVars =
|
||||||
|
COMMON_PLATFORM_LOCATE_TARGET
|
||||||
|
$(hostTarget)_$(objectDirVars)_LOCATE_TARGET
|
||||||
|
LOCATE_TARGET
|
||||||
|
LOCATE_SOURCE
|
||||||
|
SEARCH_SOURCE
|
||||||
|
;
|
||||||
|
|
||||||
|
for var in $(objectDirVars) {
|
||||||
|
$(var) on $(bootTargetObject) = ;
|
||||||
|
}
|
||||||
|
|
||||||
|
on $(bootTargetObject) {
|
||||||
|
SetupObjectsDir ;
|
||||||
|
SetupFeatureObjectsDir $(bootTarget) ;
|
||||||
|
|
||||||
|
for var in $(objectDirVars) {
|
||||||
|
$(var) on $(bootTargetObject) = $($(var)) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $(result) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
rule MultiBootGristFiles files
|
||||||
|
{
|
||||||
|
return $(files:G=$(TARGET_BOOT_PLATFORM)) ;
|
||||||
|
}
|
||||||
|
|
||||||
rule SetupBoot
|
rule SetupBoot
|
||||||
{
|
{
|
||||||
# Usage SetupBoot <sources_or_objects> : <extra_cc_flags> : <include_private_headers> ;
|
# Usage SetupBoot <sources_or_objects> : <extra_cc_flags> : <include_private_headers> ;
|
||||||
#
|
#
|
||||||
# <sources_or_objects> - Ideally sources, otherwise HDRSEARCH can not be
|
# <sources_or_objects> - Ideally sources, otherwise HDRSEARCH can not be
|
||||||
# set for the sources and the sources some header
|
# set for the sources and the sources some header
|
||||||
# dependencies might be missing.
|
# dependencies might be missing.
|
||||||
|
|
||||||
local sources = [ FGristFiles $(1) ] ;
|
local sources = [ FGristFiles $(1) ] ;
|
||||||
local objects = $(sources:S=$(SUFOBJ)) ;
|
local objects = $(sources:S=$(SUFOBJ)) ;
|
||||||
@ -19,20 +81,27 @@ rule SetupBoot
|
|||||||
$(HAIKU_BOOT_C++_HEADERS_DIR_$(TARGET_PACKAGING_ARCH)) ;
|
$(HAIKU_BOOT_C++_HEADERS_DIR_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# MultiBootSubDirSetup sets the target boot platform on the target object,
|
||||||
|
# so this will be correct here in SetupBoot.
|
||||||
|
# This does mean, however, that MultiBootSubDirSetup needs to be used in
|
||||||
|
# all Jamfiles for things to work correctly.
|
||||||
|
# Also means ArchitectureRules need to use platform specific variables,
|
||||||
|
# rather than the previously generic TARGET_BOOT_CCFLAGS and friends.
|
||||||
|
local platform = $(TARGET_BOOT_PLATFORM:U) ;
|
||||||
local object ;
|
local object ;
|
||||||
for object in $(objects) {
|
for object in $(objects) {
|
||||||
# add boot flags for the object
|
# add boot flags for the object
|
||||||
ObjectCcFlags $(object) : $(TARGET_BOOT_CCFLAGS) $(2) ;
|
ObjectCcFlags $(object) : $(HAIKU_BOOT_CCFLAGS) $(HAIKU_BOOT_$(platform)_CCFLAGS) $(2) ;
|
||||||
ObjectC++Flags $(object) : $(TARGET_BOOT_C++FLAGS) $(2) ;
|
ObjectC++Flags $(object) : $(HAIKU_BOOT_C++FLAGS) $(HAIKU_BOOT_$(platform)_C++FLAGS) $(2) ;
|
||||||
ObjectDefines $(object) : $(TARGET_KERNEL_DEFINES) ;
|
ObjectDefines $(object) : $(TARGET_KERNEL_DEFINES) ;
|
||||||
ASFLAGS on $(object) = $(TARGET_BOOT_CCFLAGS) ;
|
ASFLAGS on $(object) = $(HAIKU_BOOT_$(platform)_CCFLAGS) ;
|
||||||
|
|
||||||
# override warning flags
|
# override warning flags
|
||||||
TARGET_WARNING_CCFLAGS_$(TARGET_PACKAGING_ARCH) on $(object)
|
TARGET_WARNING_CCFLAGS_$(TARGET_PACKAGING_ARCH) on $(object)
|
||||||
= $(TARGET_KERNEL_WARNING_CCFLAGS) ;
|
= $(TARGET_KERNEL_WARNING_CCFLAGS) ;
|
||||||
TARGET_WARNING_C++FLAGS_$(TARGET_PACKAGING_ARCH) on $(object)
|
TARGET_WARNING_C++FLAGS_$(TARGET_PACKAGING_ARCH) on $(object)
|
||||||
= $(TARGET_KERNEL_WARNING_C++FLAGS) ;
|
= $(TARGET_KERNEL_WARNING_C++FLAGS) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rule BootObjects
|
rule BootObjects
|
||||||
@ -47,18 +116,20 @@ rule BootLd
|
|||||||
|
|
||||||
LINK on $(1) = $(TARGET_LD_$(TARGET_PACKAGING_ARCH)) ;
|
LINK on $(1) = $(TARGET_LD_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
|
|
||||||
LINKFLAGS on $(1) = $(TARGET_BOOT_LINKFLAGS) $(4) ;
|
LINKFLAGS on $(1) = $(HAIKU_BOOT_$(TARGET_BOOT_PLATFORM:U)_LDFLAGS) $(4) ;
|
||||||
if $(3) { LINKFLAGS on $(1) += --script=$(3) ; }
|
if $(3) { LINKFLAGS on $(1) += --script=$(3) ; }
|
||||||
|
|
||||||
# Remove any preset LINKLIBS, but link against libgcc.a. Linking against
|
# Remove any preset LINKLIBS, but link against libgcc.a. Linking against
|
||||||
# libsupc++ is opt-out.
|
# libsupc++ is opt-out.
|
||||||
local libs ;
|
if $(TARGET_BOOT_PLATFORM) != efi {
|
||||||
if ! [ on $(1) return $(HAIKU_NO_LIBSUPC++) ] {
|
local libs ;
|
||||||
libs += [ TargetBootLibsupc++ true ] ;
|
if ! [ on $(1) return $(HAIKU_NO_LIBSUPC++) ] {
|
||||||
Depends $(1) : [ TargetBootLibsupc++ ] ;
|
libs += [ TargetBootLibsupc++ true ] ;
|
||||||
|
Depends $(1) : [ TargetBootLibsupc++ ] ;
|
||||||
|
}
|
||||||
|
LINKLIBS on $(1) = $(libs) [ TargetBootLibgcc true ] ;
|
||||||
|
Depends $(1) : [ TargetBootLibgcc ] ;
|
||||||
}
|
}
|
||||||
LINKLIBS on $(1) = $(libs) [ TargetBootLibgcc true ] ;
|
|
||||||
Depends $(1) : [ TargetBootLibgcc ] ;
|
|
||||||
|
|
||||||
# TODO: Do we really want to invoke SetupBoot here? The objects should
|
# TODO: Do we really want to invoke SetupBoot here? The objects should
|
||||||
# have been compiled with BootObjects anyway, so we're doing that twice.
|
# have been compiled with BootObjects anyway, so we're doing that twice.
|
||||||
@ -93,13 +164,13 @@ rule BootMergeObject
|
|||||||
# <sources>: Sources to be compiled. Grist will be added.
|
# <sources>: Sources to be compiled. Grist will be added.
|
||||||
# <extra CFLAGS>: Additional flags for compilation.
|
# <extra CFLAGS>: Additional flags for compilation.
|
||||||
# <other objects>: Object files or static libraries to be merged. No grist
|
# <other objects>: Object files or static libraries to be merged. No grist
|
||||||
# will be added.
|
# will be added.
|
||||||
#
|
#
|
||||||
|
|
||||||
SetupBoot $(2) : $(3) ;
|
SetupBoot $(2) : $(3) ;
|
||||||
Objects $(2) ;
|
Objects $(2) ;
|
||||||
MergeObjectFromObjects $(1) : $(2:S=$(SUFOBJ)) : $(4) ;
|
MergeObjectFromObjects $(1) : $(2:S=$(SUFOBJ)) : $(4) ;
|
||||||
LINKFLAGS on $(1) += $(TARGET_BOOT_LINKFLAGS) ;
|
LINKFLAGS on $(1) += $(HAIKU_BOOT_$(TARGET_BOOT_PLATFORM:U)_LDFLAGS) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
rule BootStaticLibrary
|
rule BootStaticLibrary
|
||||||
|
@ -656,7 +656,7 @@ for var in $(archDependentBuildVars)_$(TARGET_PACKAGING_ARCHS) {
|
|||||||
TARGET_BOOT_LIBGCC = $(HAIKU_BOOT_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
|
TARGET_BOOT_LIBGCC = $(HAIKU_BOOT_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
TARGET_BOOT_LIBSUPC++ = $(HAIKU_BOOT_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
|
TARGET_BOOT_LIBSUPC++ = $(HAIKU_BOOT_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
|
|
||||||
TARGET_BOOT_PLATFORM ?= $(HAIKU_BOOT_PLATFORM) ;
|
TARGET_KERNEL_PLATFORM ?= $(HAIKU_KERNEL_PLATFORM) ;
|
||||||
|
|
||||||
local architecture ;
|
local architecture ;
|
||||||
for architecture in $(TARGET_PACKAGING_ARCHS) {
|
for architecture in $(TARGET_PACKAGING_ARCHS) {
|
||||||
|
@ -1492,12 +1492,12 @@ rule BuildFloppyBootImage image : haikuLoader : archive
|
|||||||
FLOPPY_IMAGE_SIZE on $(image) = $(HAIKU_BOOT_FLOPPY_IMAGE_SIZE) ;
|
FLOPPY_IMAGE_SIZE on $(image) = $(HAIKU_BOOT_FLOPPY_IMAGE_SIZE) ;
|
||||||
ARCHIVE_IMAGE_OFFSET on $(image) = $(HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET) ;
|
ARCHIVE_IMAGE_OFFSET on $(image) = $(HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET) ;
|
||||||
BuildFloppyBootImage1 $(image) : $(haikuLoader) $(archive) ;
|
BuildFloppyBootImage1 $(image) : $(haikuLoader) $(archive) ;
|
||||||
if $(HAIKU_BOOT_PLATFORM) = atari_m68k {
|
if $(HAIKU_KERNEL_PLATFORM) = atari_m68k {
|
||||||
Depends $(image) : <build>fixup_tos_boot_checksum ;
|
Depends $(image) : <build>fixup_tos_boot_checksum ;
|
||||||
BuildFloppyBootImageFixupM68K $(image)
|
BuildFloppyBootImageFixupM68K $(image)
|
||||||
: <build>fixup_tos_boot_checksum ;
|
: <build>fixup_tos_boot_checksum ;
|
||||||
}
|
}
|
||||||
if $(HAIKU_BOOT_PLATFORM) = amiga_m68k {
|
if $(HAIKU_KERNEL_PLATFORM) = amiga_m68k {
|
||||||
Depends $(image) : <build>fixup_amiga_boot_checksum ;
|
Depends $(image) : <build>fixup_amiga_boot_checksum ;
|
||||||
BuildFloppyBootImageFixupM68K $(image)
|
BuildFloppyBootImageFixupM68K $(image)
|
||||||
: <build>fixup_amiga_boot_checksum ;
|
: <build>fixup_amiga_boot_checksum ;
|
||||||
@ -1544,20 +1544,21 @@ actions BuildFloppyBootImageFixupM68K
|
|||||||
|
|
||||||
#pragma mark - CD Boot Image rules
|
#pragma mark - CD Boot Image rules
|
||||||
|
|
||||||
rule BuildCDBootImage image : bootfloppy : extrafiles
|
rule BuildCDBootImage image : bootfloppy : bootefi : extrafiles
|
||||||
{
|
{
|
||||||
Depends $(image) : $(bootfloppy) ;
|
Depends $(image) : $(bootfloppy) ;
|
||||||
|
Depends $(image) : $(bootefi) ;
|
||||||
Depends $(image) : $(extrafiles) ;
|
Depends $(image) : $(extrafiles) ;
|
||||||
BOOTIMG on $(image) = $(bootfloppy) ;
|
BOOTIMG on $(image) = $(bootfloppy) ;
|
||||||
|
BOOTEFI on $(image) = $(bootefi) ;
|
||||||
|
|
||||||
BuildCDBootImage1 $(image) : $(bootfloppy) $(extrafiles) ;
|
BuildCDBootImage1 $(image) : $(bootfloppy) $(bootefi) $(extrafiles) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
actions BuildCDBootImage1
|
actions BuildCDBootImage1
|
||||||
{
|
{
|
||||||
$(RM) $(<)
|
$(RM) $(<)
|
||||||
mkisofs -b $(BOOTIMG) -r -J -V bootimg -o $(<) $(>[1]) $(>[2-]) \
|
mkisofs -b $(BOOTIMG) -eltorito-alt-boot -no-emul-boot -e $(BOOTEFI) -r -J -V bootimg -o $(<) $(>[1]) $(>[2]) $(>[3-])
|
||||||
|| genisoimage -b $(BOOTIMG) -r -J -V bootimg -o $(<) $(>[1]) $(>[2-])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1600,3 +1601,22 @@ actions BuildCDBootPPCImage1 bind MAPS
|
|||||||
boot/haikuloader.xcf -r -o $(<) $(HAIKU_OUTPUT_DIR)/cd
|
boot/haikuloader.xcf -r -o $(<) $(HAIKU_OUTPUT_DIR)/cd
|
||||||
$(RM) -r $(HAIKU_OUTPUT_DIR)/cd
|
$(RM) -r $(HAIKU_OUTPUT_DIR)/cd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - EFI System Partition rules
|
||||||
|
|
||||||
|
rule BuildEfiSystemPartition image : efiLoader
|
||||||
|
{
|
||||||
|
Depends $(image) : $(efiLoader) ;
|
||||||
|
|
||||||
|
BuildEfiSystemPartition1 $(image) : $(efiLoader) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
actions BuildEfiSystemPartition1
|
||||||
|
{
|
||||||
|
$(RM) $(<)
|
||||||
|
dd if=/dev/zero of=$(<) bs=1024 count=2880
|
||||||
|
mformat -i $(<) -n 36 -h 2 -t 80
|
||||||
|
mmd -D s -i $(<) ::/EFI
|
||||||
|
mmd -D s -i $(<) ::/EFI/BOOT
|
||||||
|
mcopy -D o -i $(<) $(>) ::/EFI/BOOT/BOOTX64.EFI
|
||||||
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
HAIKU_BOARD_DESCRIPTION = "ACube Sam460ex" ;
|
HAIKU_BOARD_DESCRIPTION = "ACube Sam460ex" ;
|
||||||
|
|
||||||
# must force both since they are set before this file is read.
|
# must force both since they are set before this file is read.
|
||||||
HAIKU_BOOT_PLATFORM = u-boot ;
|
HAIKU_KERNEL_PLATFORM = u-boot ;
|
||||||
|
|
||||||
#FIXME!!!!!!!!!!!!!!!
|
#FIXME!!!!!!!!!!!!!!!
|
||||||
#
|
#
|
||||||
|
@ -19,13 +19,41 @@ actions BuildAnybootImage1 {
|
|||||||
$(2[1]) -b $(2[2]) $(2[3]) $(2[4]) $(1)
|
$(2[1]) -b $(2[2]) $(2[3]) $(2[4]) $(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rule BuildAnybootImageEfi anybootImage : mbrPart : efiPart : isoPart : imageFile {
|
||||||
|
local anyboot = <build>anyboot ;
|
||||||
|
|
||||||
|
Depends $(anybootImage) : $(anyboot) ;
|
||||||
|
Depends $(anybootImage) : $(isoPart) ;
|
||||||
|
Depends $(anybootImage) : $(mbrPart) ;
|
||||||
|
Depends $(anybootImage) : $(efiPart) ;
|
||||||
|
Depends $(anybootImage) : $(imageFile) ;
|
||||||
|
|
||||||
|
BuildAnybootImageEfi1 $(anybootImage) : $(anyboot) $(mbrPart) $(efiPart) $(isoPart) $(imageFile) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
actions BuildAnybootImageEfi1 {
|
||||||
|
$(2[1]) -b $(2[2]) -e $(2[3]) $(2[4]) $(2[5]) $(1)
|
||||||
|
}
|
||||||
|
|
||||||
local baseMBR = base_mbr.bin ;
|
local baseMBR = base_mbr.bin ;
|
||||||
local mbrSource = [ FDirName $(HAIKU_TOP) src bin writembr mbr.S ] ;
|
local mbrSource = [ FDirName $(HAIKU_TOP) src bin writembr mbr.S ] ;
|
||||||
BuildMBR $(baseMBR) : $(mbrSource) ;
|
BuildMBR $(baseMBR) : $(mbrSource) ;
|
||||||
MakeLocate $(baseMBR) : $(HAIKU_OUTPUT_DIR) ;
|
MakeLocate $(baseMBR) : $(HAIKU_OUTPUT_DIR) ;
|
||||||
MakeLocate $(HAIKU_ANYBOOT) : $(HAIKU_ANYBOOT_DIR) ;
|
MakeLocate $(HAIKU_ANYBOOT) : $(HAIKU_ANYBOOT_DIR) ;
|
||||||
BuildAnybootImage $(HAIKU_ANYBOOT) : $(baseMBR) : $(HAIKU_CD_BOOT_IMAGE)
|
|
||||||
: $(HAIKU_IMAGE_NAME) ;
|
if $(HAIKU_ANYBOOT_UEFI) = 1 {
|
||||||
|
Echo "Anyboot is MBR/UEFI hybrid" ;
|
||||||
|
local efiLoader = haiku_loader.efi ;
|
||||||
|
local efiPartition = esp.image ;
|
||||||
|
MakeLocate $(efiPartition) ;
|
||||||
|
BuildEfiSystemPartition $(efiPartition) : $(efiLoader) ;
|
||||||
|
BuildAnybootImageEfi $(HAIKU_ANYBOOT) : $(baseMBR) : $(efiPartition) : $(HAIKU_CD_BOOT_IMAGE)
|
||||||
|
: $(HAIKU_IMAGE_NAME) ;
|
||||||
|
} else {
|
||||||
|
Echo "Anyboot is MBR only" ;
|
||||||
|
BuildAnybootImage $(HAIKU_ANYBOOT) : $(baseMBR) : $(HAIKU_CD_BOOT_IMAGE)
|
||||||
|
: $(HAIKU_IMAGE_NAME) ;
|
||||||
|
}
|
||||||
|
|
||||||
# TODO: this one seems to cause the build to fail each other run (caching?)
|
# TODO: this one seems to cause the build to fail each other run (caching?)
|
||||||
#RmTemps $(HAIKU_ANYBOOT) : $(baseMBR) ;
|
#RmTemps $(HAIKU_ANYBOOT) : $(baseMBR) ;
|
||||||
|
@ -28,9 +28,14 @@ if $(TARGET_ARCH) = ppc {
|
|||||||
|
|
||||||
BuildCDBootPPCImage $(HAIKU_CD_BOOT_IMAGE) : $(hfsmaps) : $(elfloader) : $(coffloader) : $(chrpscript) : $(extras) ;
|
BuildCDBootPPCImage $(HAIKU_CD_BOOT_IMAGE) : $(hfsmaps) : $(elfloader) : $(coffloader) : $(chrpscript) : $(extras) ;
|
||||||
} else {
|
} else {
|
||||||
SEARCH on $(extras) = [ FDirName $(HAIKU_TOP) data boot_cd ] ;
|
local efiLoader = haiku_loader.efi ;
|
||||||
|
local efiPartition = esp.image ;
|
||||||
|
MakeLocate $(efiPartition) : $(HAIKU_OUTPUT_DIR) ;
|
||||||
|
BuildEfiSystemPartition $(efiPartition) : $(efiLoader) ;
|
||||||
|
|
||||||
BuildCDBootImage $(HAIKU_CD_BOOT_IMAGE) : $(HAIKU_BOOT_FLOPPY) : $(extras) ;
|
BuildCDBootImage $(HAIKU_CD_BOOT_IMAGE) : $(HAIKU_BOOT_FLOPPY) : $(efiPartition) : $(extras) ;
|
||||||
|
|
||||||
|
SEARCH on $(extras) = [ FDirName $(HAIKU_TOP) data boot_cd ] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
NotFile haiku-boot-cd ;
|
NotFile haiku-boot-cd ;
|
||||||
|
@ -169,7 +169,7 @@ Depends haiku-floppyboot-archive : $(HAIKU_FLOPPY_BOOT_ARCHIVE) ;
|
|||||||
HAIKU_BOOT_FLOPPY = haiku-boot-floppy.image ;
|
HAIKU_BOOT_FLOPPY = haiku-boot-floppy.image ;
|
||||||
MakeLocate $(HAIKU_BOOT_FLOPPY) : $(HAIKU_OUTPUT_DIR) ;
|
MakeLocate $(HAIKU_BOOT_FLOPPY) : $(HAIKU_OUTPUT_DIR) ;
|
||||||
|
|
||||||
BuildFloppyBootImage $(HAIKU_BOOT_FLOPPY) : haiku_loader
|
BuildFloppyBootImage $(HAIKU_BOOT_FLOPPY) : haiku_loader.$(HAIKU_KERNEL_PLATFORM)
|
||||||
: $(HAIKU_FLOPPY_BOOT_ARCHIVE) ;
|
: $(HAIKU_FLOPPY_BOOT_ARCHIVE) ;
|
||||||
|
|
||||||
# remove the archive
|
# remove the archive
|
||||||
|
@ -3,7 +3,7 @@ HaikuPackage $(haikuLoaderPackage) ;
|
|||||||
|
|
||||||
|
|
||||||
# boot loader
|
# boot loader
|
||||||
AddFilesToPackage : haiku_loader ;
|
AddFilesToPackage : haiku_loader.$(HAIKU_KERNEL_PLATFORM) ;
|
||||||
|
|
||||||
|
|
||||||
# Force no compression, so the stage one loader can directly execute the boot
|
# Force no compression, so the stage one loader can directly execute the boot
|
||||||
|
@ -2,11 +2,11 @@ SubDir HAIKU_TOP src add-ons kernel bluetooth btCoreData ;
|
|||||||
|
|
||||||
UsePrivateHeaders kernel net bluetooth ;
|
UsePrivateHeaders kernel net bluetooth ;
|
||||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
#UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_KERNEL_PLATFORM) ] ;
|
||||||
|
|
||||||
# disable debug output, if debugging is disabled
|
# disable debug output, if debugging is disabled
|
||||||
if $(DEBUG) = 0 {
|
if $(DEBUG) = 0 {
|
||||||
SubDirCcFlags [ FDefines DEBUG_MAX_LEVEL_FLOW=0 DEBUG_MAX_LEVEL_INFO=0 ] ;
|
SubDirCcFlags [ FDefines DEBUG_MAX_LEVEL_FLOW=0 DEBUG_MAX_LEVEL_INFO=0 ] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@ SubDir HAIKU_TOP src add-ons kernel bluetooth hci ;
|
|||||||
UsePrivateKernelHeaders ;
|
UsePrivateKernelHeaders ;
|
||||||
UsePrivateHeaders net bluetooth ;
|
UsePrivateHeaders net bluetooth ;
|
||||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
#UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_KERNEL_PLATFORM) ] ;
|
||||||
|
|
||||||
# disable debug output, if debugging is disabled
|
# disable debug output, if debugging is disabled
|
||||||
if $(DEBUG) = 0 {
|
if $(DEBUG) = 0 {
|
||||||
SubDirCcFlags [ FDefines DEBUG_MAX_LEVEL_FLOW=0 DEBUG_MAX_LEVEL_INFO=0 ] ;
|
SubDirCcFlags [ FDefines DEBUG_MAX_LEVEL_FLOW=0 DEBUG_MAX_LEVEL_INFO=0 ] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
KernelAddon hci :
|
KernelAddon hci :
|
||||||
|
@ -3,7 +3,6 @@ SubDir HAIKU_TOP src add-ons kernel bus_managers isa arch arm ;
|
|||||||
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
|
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
|
||||||
|
|
||||||
UsePrivateHeaders kernel [ FDirName kernel arch arm ] ;
|
UsePrivateHeaders kernel [ FDirName kernel arch arm ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
|
|
||||||
KernelStaticLibrary isa_arch_bus_manager :
|
KernelStaticLibrary isa_arch_bus_manager :
|
||||||
isa_dma.c
|
isa_dma.c
|
||||||
|
@ -3,7 +3,6 @@ SubDir HAIKU_TOP src add-ons kernel bus_managers isa arch m68k ;
|
|||||||
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
|
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
|
||||||
|
|
||||||
UsePrivateHeaders kernel [ FDirName kernel arch m68k ] ;
|
UsePrivateHeaders kernel [ FDirName kernel arch m68k ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
|
|
||||||
KernelStaticLibrary isa_arch_bus_manager :
|
KernelStaticLibrary isa_arch_bus_manager :
|
||||||
isa_dma.c
|
isa_dma.c
|
||||||
|
@ -3,7 +3,6 @@ SubDir HAIKU_TOP src add-ons kernel bus_managers isa arch ppc ;
|
|||||||
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
|
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
|
||||||
|
|
||||||
#UsePrivateHeaders kernel [ FDirName kernel arch ppc ] ;
|
#UsePrivateHeaders kernel [ FDirName kernel arch ppc ] ;
|
||||||
#UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
UsePrivateKernelHeaders ;
|
UsePrivateKernelHeaders ;
|
||||||
|
|
||||||
KernelStaticLibrary isa_arch_bus_manager :
|
KernelStaticLibrary isa_arch_bus_manager :
|
||||||
|
@ -3,7 +3,6 @@ SubDir HAIKU_TOP src add-ons kernel bus_managers isa arch x86 ;
|
|||||||
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
|
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
|
||||||
|
|
||||||
UsePrivateHeaders kernel [ FDirName kernel arch x86 ] ;
|
UsePrivateHeaders kernel [ FDirName kernel arch x86 ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
|
|
||||||
KernelStaticLibrary isa_arch_bus_manager :
|
KernelStaticLibrary isa_arch_bus_manager :
|
||||||
isa_dma.cpp
|
isa_dma.cpp
|
||||||
|
@ -2,7 +2,6 @@ SubDir HAIKU_TOP src add-ons kernel file_cache ;
|
|||||||
|
|
||||||
UsePrivateKernelHeaders ;
|
UsePrivateKernelHeaders ;
|
||||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
|
|
||||||
KernelAddon log :
|
KernelAddon log :
|
||||||
log.cpp
|
log.cpp
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src bin makebootable ;
|
SubDir HAIKU_TOP src bin makebootable ;
|
||||||
|
|
||||||
if $(TARGET_BOOT_PLATFORM) {
|
if $(TARGET_KERNEL_PLATFORM) {
|
||||||
SubInclude HAIKU_TOP src bin makebootable platform $(TARGET_BOOT_PLATFORM) ;
|
SubInclude HAIKU_TOP src bin makebootable platform $(TARGET_KERNEL_PLATFORM) ;
|
||||||
}
|
}
|
||||||
|
@ -1,87 +1,9 @@
|
|||||||
SubDir HAIKU_TOP src system boot ;
|
SubDir HAIKU_TOP src system boot ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
DEFINES += _BOOT_MODE ;
|
DEFINES += _BOOT_MODE ;
|
||||||
|
|
||||||
if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi {
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot os arch
|
|
||||||
x86_64 ] ;
|
|
||||||
} else {
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot os arch
|
|
||||||
$(TARGET_KERNEL_ARCH) ] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 ] ;
|
UsePrivateHeaders [ FDirName libroot locale ] ;
|
||||||
|
|
||||||
local extraSources = ;
|
|
||||||
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) = 2 {
|
|
||||||
extraSources += atomic.S ;
|
|
||||||
}
|
|
||||||
|
|
||||||
BootMergeObject boot_libroot.o :
|
|
||||||
abs.c
|
|
||||||
ctype.cpp
|
|
||||||
LocaleData.cpp
|
|
||||||
qsort.c
|
|
||||||
kernel_vsprintf.cpp
|
|
||||||
memchr.c
|
|
||||||
memcmp.c
|
|
||||||
memmove.c
|
|
||||||
strdup.cpp
|
|
||||||
strndup.cpp
|
|
||||||
strlen.cpp
|
|
||||||
strnlen.cpp
|
|
||||||
strcmp.c
|
|
||||||
strcasecmp.c
|
|
||||||
strncmp.c
|
|
||||||
strcat.c
|
|
||||||
strcpy.c
|
|
||||||
strerror.c
|
|
||||||
strlcat.c
|
|
||||||
strlcpy.c
|
|
||||||
strchr.c
|
|
||||||
strrchr.c
|
|
||||||
strtol.c
|
|
||||||
strtoul.c
|
|
||||||
$(extraSources)
|
|
||||||
;
|
|
||||||
|
|
||||||
AddResources haiku_loader : boot_loader.rdef ;
|
|
||||||
|
|
||||||
BootLd boot_loader_$(TARGET_BOOT_PLATFORM) :
|
|
||||||
boot_platform_$(TARGET_BOOT_PLATFORM).o
|
|
||||||
boot_arch_$(TARGET_KERNEL_ARCH).o
|
|
||||||
boot_loader.a
|
|
||||||
boot_net.a
|
|
||||||
boot_partitions.a
|
|
||||||
|
|
||||||
# file systems
|
|
||||||
boot_bfs.a
|
|
||||||
boot_amiga_ffs.a
|
|
||||||
boot_tarfs.a
|
|
||||||
boot_fatfs.a
|
|
||||||
boot_packagefs.a
|
|
||||||
|
|
||||||
boot_loader.a
|
|
||||||
# a second time, so undefined references in the file systems can be
|
|
||||||
# resolved
|
|
||||||
|
|
||||||
# needed by tarfs, packagefs, and video_splash.cpp
|
|
||||||
boot_zlib.a
|
|
||||||
|
|
||||||
# libroot functions needed by the stage2 boot loader
|
|
||||||
boot_libroot.o
|
|
||||||
|
|
||||||
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld
|
|
||||||
: $(TARGET_BOOT_LDFLAGS)
|
|
||||||
;
|
|
||||||
|
|
||||||
rule BuildCoffLoader {
|
rule BuildCoffLoader {
|
||||||
local coffLoader = $(1) ;
|
local coffLoader = $(1) ;
|
||||||
local bootLoader = $(2) ;
|
local bootLoader = $(2) ;
|
||||||
@ -107,8 +29,6 @@ actions BuildCoffLoader bind HACK_COFF {
|
|||||||
$(HACK_COFF) $(1)
|
$(HACK_COFF) $(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildCoffLoader boot_loader_$(TARGET_BOOT_PLATFORM)_coff : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
rule BuildBiosLoader {
|
rule BuildBiosLoader {
|
||||||
local haikuLoader = $(1) ;
|
local haikuLoader = $(1) ;
|
||||||
local bootLoader = $(2) ;
|
local bootLoader = $(2) ;
|
||||||
@ -128,11 +48,6 @@ actions BuildBiosLoader {
|
|||||||
$(TARGET_OBJCOPY_$(TARGET_PACKAGING_ARCH)) -O binary $(2) $(1)
|
$(TARGET_OBJCOPY_$(TARGET_PACKAGING_ARCH)) -O binary $(2) $(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildBiosLoader haiku_loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
# different target for PXE, to be build with TARGET_BOOT_PLATFORM=pxe_ia32 jam pxehaiku-loader
|
|
||||||
BuildBiosLoader pxehaiku-loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
rule BuildEFILoader {
|
rule BuildEFILoader {
|
||||||
local efiLoader = $(1) ;
|
local efiLoader = $(1) ;
|
||||||
local bootLoader = $(2) ;
|
local bootLoader = $(2) ;
|
||||||
@ -147,7 +62,104 @@ actions BuildEFILoader {
|
|||||||
-j .rel -j .rela -j .reloc --target=efi-app-x86_64 $(2) $(1)
|
-j .rel -j .rela -j .reloc --target=efi-app-x86_64 $(2) $(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildEFILoader haiku_loader.efi : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
local extraSources = ;
|
||||||
|
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) = 2 {
|
||||||
|
extraSources += atomic.S ;
|
||||||
|
}
|
||||||
|
|
||||||
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
|
on $(platform) {
|
||||||
|
if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi {
|
||||||
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot os arch
|
||||||
|
x86_64 ] ;
|
||||||
|
} else {
|
||||||
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) libroot os arch
|
||||||
|
$(TARGET_KERNEL_ARCH) ] ;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 ] ;
|
||||||
|
|
||||||
|
BootMergeObject boot_libroot_$(platform:G=).o :
|
||||||
|
abs.c
|
||||||
|
ctype.cpp
|
||||||
|
LocaleData.cpp
|
||||||
|
qsort.c
|
||||||
|
kernel_vsprintf.cpp
|
||||||
|
memchr.c
|
||||||
|
memcmp.c
|
||||||
|
memmove.c
|
||||||
|
strdup.cpp
|
||||||
|
strndup.cpp
|
||||||
|
strlen.cpp
|
||||||
|
strnlen.cpp
|
||||||
|
strcmp.c
|
||||||
|
strcasecmp.c
|
||||||
|
strncmp.c
|
||||||
|
strcat.c
|
||||||
|
strcpy.c
|
||||||
|
strerror.c
|
||||||
|
strlcat.c
|
||||||
|
strlcpy.c
|
||||||
|
strchr.c
|
||||||
|
strrchr.c
|
||||||
|
strtol.c
|
||||||
|
strtoul.c
|
||||||
|
$(extraSources)
|
||||||
|
;
|
||||||
|
|
||||||
|
AddResources haiku_loader.$(TARGET_BOOT_PLATFORM) : boot_loader.rdef ;
|
||||||
|
|
||||||
|
local archGrist = [ FGrist src system boot arch $(TARGET_KERNEL_ARCH) $(platform:G=) ] ;
|
||||||
|
local archObject = boot_arch_$(TARGET_KERNEL_ARCH).o ;
|
||||||
|
local ldflags = $(HAIKU_BOOT_$(platform:G=:U)_LDFLAGS) ;
|
||||||
|
ldflags ?= $(TARGET_BOOT_LDFLAGS) ;
|
||||||
|
|
||||||
|
# efi loader needs to be shared.
|
||||||
|
if $(TARGET_BOOT_PLATFORM) = efi {
|
||||||
|
ldflags += -shared ;
|
||||||
|
}
|
||||||
|
|
||||||
|
BootLd boot_loader_$(platform:G=) :
|
||||||
|
boot_platform_$(platform:G=).o
|
||||||
|
$(archObject:G=$(archGrist))
|
||||||
|
[ MultiBootGristFiles
|
||||||
|
boot_loader.a
|
||||||
|
boot_net.a
|
||||||
|
boot_partitions.a
|
||||||
|
|
||||||
|
# file systems
|
||||||
|
boot_bfs.a
|
||||||
|
boot_amiga_ffs.a
|
||||||
|
boot_tarfs.a
|
||||||
|
boot_fatfs.a
|
||||||
|
boot_packagefs.a
|
||||||
|
|
||||||
|
boot_loader.a
|
||||||
|
# a second time, so undefined references in the file systems can be
|
||||||
|
# resolved
|
||||||
|
|
||||||
|
# needed by tarfs, packagefs, and video_splash.cpp
|
||||||
|
boot_zlib.a
|
||||||
|
]
|
||||||
|
# libroot functions needed by the stage2 boot loader
|
||||||
|
boot_libroot_$(platform:G=).o
|
||||||
|
|
||||||
|
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(platform:G=).ld
|
||||||
|
: $(ldflags)
|
||||||
|
;
|
||||||
|
|
||||||
|
BuildCoffLoader boot_loader_$(TARGET_BOOT_PLATFORM)_coff : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
||||||
|
|
||||||
|
if $(TARGET_BOOT_PLATFORM) != efi {
|
||||||
|
BuildBiosLoader haiku_loader.$(TARGET_BOOT_PLATFORM) : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
||||||
|
} else {
|
||||||
|
BuildEFILoader haiku_loader.$(TARGET_BOOT_PLATFORM) : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SubInclude HAIKU_TOP src system boot arch $(TARGET_KERNEL_ARCH) ;
|
SubInclude HAIKU_TOP src system boot arch $(TARGET_KERNEL_ARCH) ;
|
||||||
SubInclude HAIKU_TOP src system boot loader ;
|
SubInclude HAIKU_TOP src system boot loader ;
|
||||||
|
@ -1,47 +1,51 @@
|
|||||||
SubDir HAIKU_TOP src system boot arch x86 ;
|
SubDir HAIKU_TOP src system boot arch x86 ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
local platform ;
|
||||||
|
for platform in [ MultiBootSubDirSetup bios_ia32 efi pxe_ia32 ] {
|
||||||
|
on $(platform) {
|
||||||
|
DEFINES += _BOOT_MODE ;
|
||||||
|
|
||||||
DEFINES += _BOOT_MODE ;
|
local kernelArchSources =
|
||||||
|
arch_elf.cpp
|
||||||
|
;
|
||||||
|
|
||||||
local kernelArchSources =
|
local kernelArchSpecificSources ;
|
||||||
arch_elf.cpp
|
local kernelLibArchSpecificSources ;
|
||||||
;
|
if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi {
|
||||||
|
kernelArchSpecificSources = cpuid.cpp ;
|
||||||
|
kernelLibArchSpecificSources = arch_string.cpp ;
|
||||||
|
} else {
|
||||||
|
kernelArchSpecificSources = cpuid.S ;
|
||||||
|
kernelLibArchSpecificSources = arch_string.S ;
|
||||||
|
}
|
||||||
|
|
||||||
local kernelArchSpecificSources ;
|
local librootOsArchSources =
|
||||||
local kernelLibArchSpecificSources ;
|
byteorder.S
|
||||||
if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi {
|
;
|
||||||
kernelArchSpecificSources = cpuid.cpp ;
|
|
||||||
kernelLibArchSpecificSources = arch_string.cpp ;
|
BootMergeObject [ FGristFiles boot_arch_$(TARGET_KERNEL_ARCH).o ] :
|
||||||
} else {
|
$(kernelArchSources)
|
||||||
kernelArchSpecificSources = cpuid.S ;
|
$(kernelArchSpecificSources)
|
||||||
kernelLibArchSpecificSources = arch_string.S ;
|
$(kernelLibArchSpecificSources)
|
||||||
|
$(librootOsArchSources)
|
||||||
|
: -std=c++11 # additional flags
|
||||||
|
;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles $(kernelArchSources) ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system kernel arch x86 ] ;
|
||||||
|
|
||||||
|
if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi {
|
||||||
|
SEARCH on [ FGristFiles $(kernelArchSpecificSources) ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system kernel arch x86 64 ] ;
|
||||||
|
SEARCH on [ FGristFiles $(kernelLibArchSpecificSources) ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system libroot posix string arch x86_64 ] ;
|
||||||
|
} else {
|
||||||
|
SEARCH on [ FGristFiles $(kernelArchSpecificSources) ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system kernel arch x86 32 ] ;
|
||||||
|
SEARCH on [ FGristFiles $(kernelLibArchSpecificSources) ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system kernel lib arch x86 ] ;
|
||||||
|
}
|
||||||
|
SEARCH on [ FGristFiles $(librootOsArchSources) ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system libroot os arch x86 ] ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local librootOsArchSources =
|
|
||||||
byteorder.S
|
|
||||||
;
|
|
||||||
|
|
||||||
BootMergeObject boot_arch_$(TARGET_KERNEL_ARCH).o :
|
|
||||||
$(kernelArchSources)
|
|
||||||
$(kernelArchSpecificSources)
|
|
||||||
$(kernelLibArchSpecificSources)
|
|
||||||
$(librootOsArchSources)
|
|
||||||
;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles $(kernelArchSources) ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system kernel arch x86 ] ;
|
|
||||||
|
|
||||||
if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi {
|
|
||||||
SEARCH on [ FGristFiles $(kernelArchSpecificSources) ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system kernel arch x86 64 ] ;
|
|
||||||
SEARCH on [ FGristFiles $(kernelLibArchSpecificSources) ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system libroot posix string arch x86_64 ] ;
|
|
||||||
} else {
|
|
||||||
SEARCH on [ FGristFiles $(kernelArchSpecificSources) ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system kernel arch x86 32 ] ;
|
|
||||||
SEARCH on [ FGristFiles $(kernelLibArchSpecificSources) ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system kernel lib arch x86 ] ;
|
|
||||||
}
|
|
||||||
SEARCH on [ FGristFiles $(librootOsArchSources) ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system libroot os arch x86 ] ;
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src system boot loader ;
|
SubDir HAIKU_TOP src system boot loader ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ;
|
SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ;
|
||||||
SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ;
|
SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ;
|
||||||
SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ;
|
SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ;
|
||||||
@ -11,142 +9,150 @@ UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
|||||||
UsePrivateHeaders [ FDirName kernel util ] ;
|
UsePrivateHeaders [ FDirName kernel util ] ;
|
||||||
UsePrivateHeaders shared storage ;
|
UsePrivateHeaders shared storage ;
|
||||||
|
|
||||||
{
|
local defines = $(DEFINES) ;
|
||||||
DEFINES +=
|
|
||||||
_BOOT_MODE
|
|
||||||
BOOT_ARCH=\\\"$(TARGET_KERNEL_ARCH)\\\"
|
|
||||||
KMESSAGE_CONTAINER_ONLY
|
|
||||||
|
|
||||||
BOOT_SUPPORT_PARTITION_INTEL
|
local platform ;
|
||||||
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
BOOT_SUPPORT_FILE_SYSTEM_BFS
|
on $(platform) {
|
||||||
BOOT_SUPPORT_FILE_SYSTEM_TARFS
|
|
||||||
#BOOT_SUPPORT_FILE_MAP_DISK
|
|
||||||
BOOT_SUPPORT_FILE_SYSTEM_FAT
|
|
||||||
;
|
|
||||||
|
|
||||||
# Add architecture specific partition/file system modules
|
|
||||||
|
|
||||||
switch $(TARGET_KERNEL_ARCH) {
|
|
||||||
case "ppc" :
|
|
||||||
{
|
{
|
||||||
|
DEFINES = $(defines) ;
|
||||||
|
|
||||||
DEFINES +=
|
DEFINES +=
|
||||||
BOOT_SUPPORT_PARTITION_AMIGA
|
_BOOT_MODE
|
||||||
BOOT_SUPPORT_PARTITION_APPLE
|
BOOT_ARCH=\\\"$(TARGET_KERNEL_ARCH)\\\"
|
||||||
|
KMESSAGE_CONTAINER_ONLY
|
||||||
|
|
||||||
BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
|
BOOT_SUPPORT_PARTITION_INTEL
|
||||||
|
|
||||||
|
BOOT_SUPPORT_FILE_SYSTEM_BFS
|
||||||
|
BOOT_SUPPORT_FILE_SYSTEM_TARFS
|
||||||
|
#BOOT_SUPPORT_FILE_MAP_DISK
|
||||||
|
BOOT_SUPPORT_FILE_SYSTEM_FAT
|
||||||
;
|
;
|
||||||
}
|
|
||||||
case "x86" :
|
|
||||||
{
|
|
||||||
DEFINES +=
|
|
||||||
ALTERNATE_BOOT_ARCH=\\\"x86_64\\\"
|
|
||||||
BOOT_SUPPORT_ELF64
|
|
||||||
|
|
||||||
BOOT_SUPPORT_PARTITION_EFI
|
# Add architecture specific partition/file system modules
|
||||||
|
|
||||||
#BOOT_SUPPORT_FILE_SYSTEM_FAT
|
switch $(TARGET_KERNEL_ARCH) {
|
||||||
;
|
case "ppc" :
|
||||||
if $(HAIKU_BOOT_PLATFORM) = efi {
|
{
|
||||||
DEFINES +=
|
DEFINES +=
|
||||||
_BOOT_PLATFORM_EFI
|
BOOT_SUPPORT_PARTITION_AMIGA
|
||||||
;
|
BOOT_SUPPORT_PARTITION_APPLE
|
||||||
|
|
||||||
|
BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
|
||||||
|
;
|
||||||
|
}
|
||||||
|
case "x86" :
|
||||||
|
{
|
||||||
|
DEFINES +=
|
||||||
|
ALTERNATE_BOOT_ARCH=\\\"x86_64\\\"
|
||||||
|
BOOT_SUPPORT_ELF64
|
||||||
|
|
||||||
|
BOOT_SUPPORT_PARTITION_EFI
|
||||||
|
|
||||||
|
#BOOT_SUPPORT_FILE_SYSTEM_FAT
|
||||||
|
;
|
||||||
|
if $(TARGET_BOOT_PLATFORM) = efi {
|
||||||
|
DEFINES +=
|
||||||
|
_BOOT_PLATFORM_EFI
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $(TARGET_BOOT_PLATFORM) != efi {
|
||||||
|
DEFINES += BOOT_SUPPORT_ELF32 ;
|
||||||
|
}
|
||||||
|
|
||||||
|
local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
|
||||||
|
kernel_cpp.h ] ;
|
||||||
|
|
||||||
|
SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BootStaticLibrary [ MultiBootGristFiles boot_loader ] :
|
||||||
|
PathBlacklist.cpp
|
||||||
|
elf.cpp
|
||||||
|
heap.cpp
|
||||||
|
kernel_args.cpp
|
||||||
|
load_driver_settings.cpp
|
||||||
|
loader.cpp
|
||||||
|
main.cpp
|
||||||
|
menu.cpp
|
||||||
|
package_support.cpp
|
||||||
|
pager.cpp
|
||||||
|
partitions.cpp
|
||||||
|
RootFileSystem.cpp
|
||||||
|
stdio.cpp
|
||||||
|
vfs.cpp
|
||||||
|
vm.cpp
|
||||||
|
|
||||||
|
# libroot
|
||||||
|
driver_settings.cpp
|
||||||
|
|
||||||
|
# utils
|
||||||
|
kernel_cpp.cpp
|
||||||
|
KMessage.cpp
|
||||||
|
list.cpp
|
||||||
|
ring_buffer.cpp
|
||||||
|
safemode_settings.cpp
|
||||||
|
StringHash.cpp
|
||||||
|
|
||||||
|
DataIO.cpp
|
||||||
|
Referenceable.cpp
|
||||||
|
;
|
||||||
|
|
||||||
|
# The partition support is built in an extra static library
|
||||||
|
# so that only the ones that are used will be included.
|
||||||
|
|
||||||
|
BootStaticLibrary [ MultiBootGristFiles boot_partitions ] :
|
||||||
|
FileMapDisk.cpp
|
||||||
|
amiga_rdb.cpp
|
||||||
|
apple.cpp
|
||||||
|
|
||||||
|
efi_gpt.cpp
|
||||||
|
Header.cpp
|
||||||
|
crc32.cpp
|
||||||
|
utility.cpp
|
||||||
|
|
||||||
|
intel.cpp
|
||||||
|
PartitionMap.cpp
|
||||||
|
PartitionMapParser.cpp
|
||||||
|
;
|
||||||
|
|
||||||
|
# Tell Jam where to find the utility sources
|
||||||
|
SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles KMessage.cpp ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles safemode_settings.cpp ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles driver_settings.cpp ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles amiga_rdb.cpp ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles apple.cpp ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles efi_gpt.cpp Header.cpp crc32.cpp utility.cpp ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles stage2_crt0.S ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src kits support ] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if $(HAIKU_BOOT_PLATFORM) != efi {
|
|
||||||
DEFINES += BOOT_SUPPORT_ELF32 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
|
|
||||||
kernel_cpp.h ] ;
|
|
||||||
|
|
||||||
SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BootStaticLibrary boot_loader :
|
|
||||||
PathBlacklist.cpp
|
|
||||||
elf.cpp
|
|
||||||
heap.cpp
|
|
||||||
kernel_args.cpp
|
|
||||||
load_driver_settings.cpp
|
|
||||||
loader.cpp
|
|
||||||
main.cpp
|
|
||||||
menu.cpp
|
|
||||||
package_support.cpp
|
|
||||||
pager.cpp
|
|
||||||
partitions.cpp
|
|
||||||
RootFileSystem.cpp
|
|
||||||
stdio.cpp
|
|
||||||
vfs.cpp
|
|
||||||
vm.cpp
|
|
||||||
|
|
||||||
# libroot
|
|
||||||
driver_settings.cpp
|
|
||||||
|
|
||||||
# utils
|
|
||||||
kernel_cpp.cpp
|
|
||||||
KMessage.cpp
|
|
||||||
list.cpp
|
|
||||||
ring_buffer.cpp
|
|
||||||
safemode_settings.cpp
|
|
||||||
StringHash.cpp
|
|
||||||
|
|
||||||
DataIO.cpp
|
|
||||||
Referenceable.cpp
|
|
||||||
;
|
|
||||||
|
|
||||||
# The partition support is built in an extra static library
|
|
||||||
# so that only the ones that are used will be included.
|
|
||||||
|
|
||||||
BootStaticLibrary boot_partitions :
|
|
||||||
FileMapDisk.cpp
|
|
||||||
amiga_rdb.cpp
|
|
||||||
apple.cpp
|
|
||||||
|
|
||||||
efi_gpt.cpp
|
|
||||||
Header.cpp
|
|
||||||
crc32.cpp
|
|
||||||
utility.cpp
|
|
||||||
|
|
||||||
intel.cpp
|
|
||||||
PartitionMap.cpp
|
|
||||||
PartitionMapParser.cpp
|
|
||||||
;
|
|
||||||
|
|
||||||
# Tell Jam where to find the utility sources
|
|
||||||
SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles KMessage.cpp ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles safemode_settings.cpp ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles driver_settings.cpp ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles amiga_rdb.cpp ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles apple.cpp ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles efi_gpt.cpp Header.cpp crc32.cpp utility.cpp ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles stage2_crt0.S ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ] ;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ]
|
|
||||||
= [ FDirName $(HAIKU_TOP) src kits support ] ;
|
|
||||||
|
|
||||||
|
|
||||||
SubInclude HAIKU_TOP src system boot loader file_systems ;
|
SubInclude HAIKU_TOP src system boot loader file_systems ;
|
||||||
SubInclude HAIKU_TOP src system boot loader net ;
|
SubInclude HAIKU_TOP src system boot loader net ;
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src system boot loader file_systems amiga_ffs ;
|
SubDir HAIKU_TOP src system boot loader file_systems amiga_ffs ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||||
UsePrivateHeaders kernel storage ;
|
UsePrivateHeaders kernel storage ;
|
||||||
|
|
||||||
@ -10,9 +7,16 @@ UsePrivateHeaders kernel storage ;
|
|||||||
|
|
||||||
SubDirC++Flags -fno-rtti ;
|
SubDirC++Flags -fno-rtti ;
|
||||||
|
|
||||||
BootStaticLibrary boot_amiga_ffs :
|
local platform ;
|
||||||
amiga_ffs.cpp
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
Volume.cpp
|
on $(platform) {
|
||||||
Directory.cpp
|
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
File.cpp
|
|
||||||
;
|
BootStaticLibrary [ MultiBootGristFiles boot_amiga_ffs ] :
|
||||||
|
amiga_ffs.cpp
|
||||||
|
Volume.cpp
|
||||||
|
Directory.cpp
|
||||||
|
File.cpp
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src system boot loader file_systems bfs ;
|
SubDir HAIKU_TOP src system boot loader file_systems bfs ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
UsePrivateKernelHeaders ;
|
UsePrivateKernelHeaders ;
|
||||||
UsePrivateHeaders file_systems shared storage ;
|
UsePrivateHeaders file_systems shared storage ;
|
||||||
|
|
||||||
@ -12,18 +10,23 @@ local defines = [ FDefines _BOOT_MODE ] ;
|
|||||||
SubDirCcFlags $(defines) ;
|
SubDirCcFlags $(defines) ;
|
||||||
SubDirC++Flags -fno-rtti $(defines) ;
|
SubDirC++Flags -fno-rtti $(defines) ;
|
||||||
|
|
||||||
BootStaticLibrary boot_bfs :
|
local platform ;
|
||||||
bfs.cpp
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
Directory.cpp
|
on $(platform) {
|
||||||
File.cpp
|
BootStaticLibrary [ MultiBootGristFiles boot_bfs ] :
|
||||||
Link.cpp
|
bfs.cpp
|
||||||
Stream.cpp
|
Directory.cpp
|
||||||
BPlusTree.cpp
|
File.cpp
|
||||||
QueryParserUtils.cpp
|
Link.cpp
|
||||||
;
|
Stream.cpp
|
||||||
|
BPlusTree.cpp
|
||||||
|
QueryParserUtils.cpp
|
||||||
|
;
|
||||||
|
|
||||||
SEARCH on [ FGristFiles BPlusTree.cpp ]
|
SEARCH on [ FGristFiles BPlusTree.cpp ]
|
||||||
= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems bfs ] ;
|
= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems bfs ] ;
|
||||||
|
|
||||||
SEARCH on [ FGristFiles QueryParserUtils.cpp ]
|
SEARCH on [ FGristFiles QueryParserUtils.cpp ]
|
||||||
+= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems shared ] ;
|
+= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems shared ] ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,25 +1,23 @@
|
|||||||
SubDir HAIKU_TOP src system boot loader file_systems fat ;
|
SubDir HAIKU_TOP src system boot loader file_systems fat ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
#UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
#UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
|
||||||
#UsePrivateHeaders [ FDirName storage ] ;
|
|
||||||
UsePrivateKernelHeaders ;
|
UsePrivateKernelHeaders ;
|
||||||
UsePrivateHeaders shared storage ;
|
UsePrivateHeaders shared storage ;
|
||||||
|
|
||||||
#SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems fat ;
|
|
||||||
|
|
||||||
local defines = [ FDefines _BOOT_MODE ] ;
|
local defines = [ FDefines _BOOT_MODE ] ;
|
||||||
|
|
||||||
SubDirCcFlags $(defines) ;
|
SubDirCcFlags $(defines) ;
|
||||||
SubDirC++Flags -fno-rtti $(defines) ;
|
SubDirC++Flags -fno-rtti $(defines) ;
|
||||||
|
|
||||||
BootStaticLibrary boot_fatfs :
|
local platform ;
|
||||||
fatfs.cpp
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
Volume.cpp
|
on $(platform) {
|
||||||
CachedBlock.cpp
|
BootStaticLibrary [ MultiBootGristFiles boot_fatfs ] :
|
||||||
Directory.cpp
|
fatfs.cpp
|
||||||
File.cpp
|
Volume.cpp
|
||||||
Stream.cpp
|
CachedBlock.cpp
|
||||||
;
|
Directory.cpp
|
||||||
|
File.cpp
|
||||||
|
Stream.cpp
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
SubDir HAIKU_TOP src system boot loader file_systems hfs_plus ;
|
SubDir HAIKU_TOP src system boot loader file_systems hfs_plus ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||||
UsePrivateHeaders kernel storage ;
|
UsePrivateHeaders kernel storage ;
|
||||||
|
|
||||||
SubDirC++Flags -fno-rtti ;
|
SubDirC++Flags -fno-rtti ;
|
||||||
|
|
||||||
BootStaticLibrary boot_hfs_plus :
|
local platform ;
|
||||||
hfs_plus.cpp
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
;
|
on $(platform) {
|
||||||
|
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
|
|
||||||
|
BootStaticLibrary [ MultiBootGristFiles boot_hfs_plus ] :
|
||||||
|
hfs_plus.cpp
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src system boot loader file_systems packagefs ;
|
SubDir HAIKU_TOP src system boot loader file_systems packagefs ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
UsePrivateHeaders kernel shared storage support ;
|
UsePrivateHeaders kernel shared storage support ;
|
||||||
UseBuildFeatureHeaders zlib ;
|
UseBuildFeatureHeaders zlib ;
|
||||||
|
|
||||||
@ -13,43 +10,48 @@ local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
|
|||||||
|
|
||||||
SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
|
SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
|
||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package ] ;
|
local platform ;
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package hpkg ] ;
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits storage ] ;
|
on $(platform) {
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits support ] ;
|
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
|
|
||||||
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package ] ;
|
||||||
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package hpkg ] ;
|
||||||
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits storage ] ;
|
||||||
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits support ] ;
|
||||||
|
|
||||||
BootStaticLibrary boot_packagefs :
|
BootStaticLibrary [ MultiBootGristFiles boot_packagefs ] :
|
||||||
packagefs.cpp
|
packagefs.cpp
|
||||||
PackageSettingsItem.cpp
|
PackageSettingsItem.cpp
|
||||||
|
|
||||||
# package kit/hpkg
|
# package kit/hpkg
|
||||||
BlockBufferPool.cpp
|
BlockBufferPool.cpp
|
||||||
BlockBufferPoolImpl.cpp
|
BlockBufferPoolImpl.cpp
|
||||||
BlockBufferPoolNoLock.cpp
|
BlockBufferPoolNoLock.cpp
|
||||||
BufferPool.cpp
|
BufferPool.cpp
|
||||||
PoolBuffer.cpp
|
PoolBuffer.cpp
|
||||||
DataReader.cpp
|
DataReader.cpp
|
||||||
ErrorOutput.cpp
|
ErrorOutput.cpp
|
||||||
FDDataReader.cpp
|
FDDataReader.cpp
|
||||||
PackageContentHandler.cpp
|
PackageContentHandler.cpp
|
||||||
PackageData.cpp
|
PackageData.cpp
|
||||||
PackageDataReader.cpp
|
PackageDataReader.cpp
|
||||||
PackageEntry.cpp
|
PackageEntry.cpp
|
||||||
PackageEntryAttribute.cpp
|
PackageEntryAttribute.cpp
|
||||||
PackageFileHeapAccessorBase.cpp
|
PackageFileHeapAccessorBase.cpp
|
||||||
PackageFileHeapReader.cpp
|
PackageFileHeapReader.cpp
|
||||||
PackageReaderImpl.cpp
|
PackageReaderImpl.cpp
|
||||||
ReaderImplBase.cpp
|
ReaderImplBase.cpp
|
||||||
|
|
||||||
# storage kit
|
# storage kit
|
||||||
FdIO.cpp
|
FdIO.cpp
|
||||||
|
|
||||||
# support kit
|
# support kit
|
||||||
CompressionAlgorithm.cpp
|
CompressionAlgorithm.cpp
|
||||||
ZlibCompressionAlgorithm.cpp
|
ZlibCompressionAlgorithm.cpp
|
||||||
;
|
;
|
||||||
|
|
||||||
Includes [ FGristFiles ZlibCompressionAlgorithm.cpp ]
|
|
||||||
: [ BuildFeatureAttribute zlib : headers ] ;
|
|
||||||
|
|
||||||
|
Includes [ FGristFiles ZlibCompressionAlgorithm.cpp ]
|
||||||
|
: [ BuildFeatureAttribute zlib : headers ] ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src system boot loader file_systems tarfs ;
|
SubDir HAIKU_TOP src system boot loader file_systems tarfs ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||||
UsePrivateHeaders kernel shared storage ;
|
UsePrivateHeaders kernel shared storage ;
|
||||||
|
|
||||||
@ -25,21 +22,28 @@ local zlibSources =
|
|||||||
zutil.c
|
zutil.c
|
||||||
;
|
;
|
||||||
|
|
||||||
LOCATE on [ FGristFiles $(zlibSources) ] = $(zlibSourceDirectory) ;
|
local platform ;
|
||||||
Depends [ FGristFiles $(zlibSources) ]
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
: [ BuildFeatureAttribute zlib : sources ] ;
|
on $(platform) {
|
||||||
|
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
|
|
||||||
BootStaticLibrary boot_zlib :
|
LOCATE on [ FGristFiles $(zlibSources) ] = $(zlibSourceDirectory) ;
|
||||||
$(zlibSources)
|
Depends [ FGristFiles $(zlibSources) ]
|
||||||
;
|
: [ BuildFeatureAttribute zlib : sources ] ;
|
||||||
|
|
||||||
|
BootStaticLibrary [ MultiBootGristFiles boot_zlib ] :
|
||||||
|
$(zlibSources)
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
Includes [ FGristFiles tarfs.cpp ] : [ BuildFeatureAttribute zlib : sources ] ;
|
Includes [ FGristFiles tarfs.cpp ] : [ BuildFeatureAttribute zlib : sources ] ;
|
||||||
# Strictly speaking it should be "headers", but the sources contain the
|
# Strictly speaking it should be "headers", but the sources contain the
|
||||||
# headers as well and we have already added the sources directory to the
|
# headers as well and we have already added the sources directory to the
|
||||||
# header search path for the subdirectory. Should building boot_zlib be
|
# header search path for the subdirectory. Should building boot_zlib be
|
||||||
# moved to its own directory, this should better be changes as well.
|
# moved to its own directory, this should better be changes as well.
|
||||||
|
|
||||||
BootStaticLibrary boot_tarfs :
|
BootStaticLibrary [ MultiBootGristFiles boot_tarfs ] :
|
||||||
tarfs.cpp
|
tarfs.cpp
|
||||||
;
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -260,7 +260,9 @@ load_modules(stage2_args* args, BootVolume& volume)
|
|||||||
// and now load all partitioning and file system modules
|
// and now load all partitioning and file system modules
|
||||||
// needed to identify the boot volume
|
// needed to identify the boot volume
|
||||||
|
|
||||||
if (!gBootVolume.GetBool(BOOT_VOLUME_BOOTED_FROM_IMAGE, false)) {
|
if (!gBootVolume.GetBool(BOOT_VOLUME_BOOTED_FROM_IMAGE, false)
|
||||||
|
&& gBootVolume.GetInt32(BOOT_METHOD, BOOT_METHOD_DEFAULT)
|
||||||
|
!= BOOT_METHOD_CD) {
|
||||||
// iterate over the mounted volumes and load their file system
|
// iterate over the mounted volumes and load their file system
|
||||||
Partition *partition;
|
Partition *partition;
|
||||||
if (gRoot->GetPartitionFor(volume.RootDirectory(), &partition)
|
if (gRoot->GetPartitionFor(volume.RootDirectory(), &partition)
|
||||||
|
@ -1,28 +1,32 @@
|
|||||||
SubDir HAIKU_TOP src system boot loader net ;
|
SubDir HAIKU_TOP src system boot loader net ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
UsePrivateHeaders kernel [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
UsePrivateHeaders drivers ;
|
UsePrivateHeaders drivers ;
|
||||||
|
|
||||||
SubDirC++Flags -D_BOOT_MODE -fno-rtti ;
|
SubDirC++Flags -D_BOOT_MODE -fno-rtti ;
|
||||||
|
|
||||||
local tcp = ;
|
local platform ;
|
||||||
local iscsi = ;
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
if $(TARGET_ARCH) = ppc {
|
on $(platform) {
|
||||||
tcp = TCP.cpp ;
|
UsePrivateHeaders kernel [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
iscsi = iSCSITarget.cpp ;
|
|
||||||
}
|
|
||||||
|
|
||||||
BootStaticLibrary boot_net :
|
local tcp = ;
|
||||||
ARP.cpp
|
local iscsi = ;
|
||||||
ChainBuffer.cpp
|
if $(TARGET_ARCH) = ppc {
|
||||||
Ethernet.cpp
|
tcp = TCP.cpp ;
|
||||||
IP.cpp
|
iscsi = iSCSITarget.cpp ;
|
||||||
NetDefs.cpp
|
}
|
||||||
NetStack.cpp
|
|
||||||
RemoteDisk.cpp
|
BootStaticLibrary [ MultiBootGristFiles boot_net ] :
|
||||||
UDP.cpp
|
ARP.cpp
|
||||||
$(tcp)
|
ChainBuffer.cpp
|
||||||
$(iscsi)
|
Ethernet.cpp
|
||||||
;
|
IP.cpp
|
||||||
|
NetDefs.cpp
|
||||||
|
NetStack.cpp
|
||||||
|
RemoteDisk.cpp
|
||||||
|
UDP.cpp
|
||||||
|
$(tcp)
|
||||||
|
$(iscsi)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
SubDir HAIKU_TOP src system boot platform ;
|
SubDir HAIKU_TOP src system boot platform ;
|
||||||
|
|
||||||
if $(TARGET_BOOT_PLATFORM) {
|
if $(HAIKU_BOOT_TARGETS) {
|
||||||
SubInclude HAIKU_TOP src system boot platform generic ;
|
SubInclude HAIKU_TOP src system boot platform generic ;
|
||||||
SubInclude HAIKU_TOP src system boot platform $(TARGET_BOOT_PLATFORM) ;
|
for platform in $(HAIKU_BOOT_TARGETS) {
|
||||||
|
SubInclude HAIKU_TOP src system boot platform $(platform) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
SubDir HAIKU_TOP src system boot platform bios_ia32 ;
|
SubDir HAIKU_TOP src system boot platform bios_ia32 ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform bios_ia32 ;
|
||||||
|
|
||||||
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||||
UsePrivateHeaders [ FDirName graphics common ] ;
|
UsePrivateHeaders [ FDirName graphics common ] ;
|
||||||
@ -17,42 +15,49 @@ UsePrivateHeaders [ FDirName storage ] ;
|
|||||||
SubDirC++Flags $(defines) -fno-rtti ;
|
SubDirC++Flags $(defines) -fno-rtti ;
|
||||||
}
|
}
|
||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
local platform ;
|
||||||
|
for platform in [ MultiBootSubDirSetup bios_ia32 ] {
|
||||||
|
on $(platform) {
|
||||||
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
BootMergeObject boot_platform_bios_ia32.o :
|
BootMergeObject boot_platform_bios_ia32.o :
|
||||||
shell.S
|
shell.S
|
||||||
start.cpp
|
start.cpp
|
||||||
debug.cpp
|
debug.cpp
|
||||||
bios.cpp
|
bios.cpp
|
||||||
bios_asm.S
|
bios_asm.S
|
||||||
console.cpp
|
console.cpp
|
||||||
serial.cpp
|
serial.cpp
|
||||||
devices.cpp
|
devices.cpp
|
||||||
keyboard.cpp
|
keyboard.cpp
|
||||||
menu.cpp
|
menu.cpp
|
||||||
mmu.cpp
|
mmu.cpp
|
||||||
multiboot.cpp
|
multiboot.cpp
|
||||||
cpu.cpp
|
cpu.cpp
|
||||||
acpi.cpp
|
acpi.cpp
|
||||||
smp.cpp
|
smp.cpp
|
||||||
smp_trampoline.S
|
smp_trampoline.S
|
||||||
support.S
|
support.S
|
||||||
video.cpp
|
video.cpp
|
||||||
apm.cpp
|
apm.cpp
|
||||||
hpet.cpp
|
hpet.cpp
|
||||||
interrupts.cpp
|
interrupts.cpp
|
||||||
interrupts_asm.S
|
interrupts_asm.S
|
||||||
long.cpp
|
long.cpp
|
||||||
long_asm.S
|
long_asm.S
|
||||||
|
|
||||||
# VESA/DDC EDID
|
# VESA/DDC EDID
|
||||||
decode_edid.c
|
decode_edid.c
|
||||||
dump_edid.c
|
dump_edid.c
|
||||||
|
|
||||||
:
|
:
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic_bios_ia32.a
|
||||||
;
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NASMFLAGS on stage1.bin = -f bin -O5 ;
|
local flags = -f bin -O5 -dKERNEL_PLATFORM=$(HAIKU_KERNEL_PLATFORM) ;
|
||||||
|
NASMFLAGS on stage1.bin = $(flags) ;
|
||||||
|
Echo "NASMFLAGS = $(flags)" ;
|
||||||
|
|
||||||
Object stage1.bin : stage1.nasm ;
|
Object stage1.bin : stage1.nasm ;
|
||||||
|
@ -644,11 +644,14 @@ kErrorString db "Failed to load OS. Press any key to reboot..."
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
; the path to the boot loader
|
; the path to the boot loader
|
||||||
|
%defstr platformName KERNEL_PLATFORM
|
||||||
|
%defstr loaderName
|
||||||
|
%strcat loaderName "haiku_loader",".",platformName
|
||||||
kPathComponents:
|
kPathComponents:
|
||||||
pathComponent "system"
|
pathComponent "system"
|
||||||
pathComponent "packages"
|
pathComponent "packages"
|
||||||
kLastPathComponent:
|
kLastPathComponent:
|
||||||
pathComponent "haiku_loader"
|
pathComponent loaderName
|
||||||
db 0
|
db 0
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src system boot platform efi ;
|
SubDir HAIKU_TOP src system boot platform efi ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel boot ] ;
|
UsePrivateHeaders [ FDirName kernel boot ] ;
|
||||||
UseBuildFeatureHeaders gnuefi ;
|
UseBuildFeatureHeaders gnuefi ;
|
||||||
UseBuildFeatureHeaders gnuefi : headersProtocol ;
|
UseBuildFeatureHeaders gnuefi : headersProtocol ;
|
||||||
@ -46,16 +44,22 @@ Includes [ FGristFiles $(efi_glue_src) $(platform_src) ]
|
|||||||
[ BuildFeatureAttribute gnuefi : headersArch ]
|
[ BuildFeatureAttribute gnuefi : headersArch ]
|
||||||
;
|
;
|
||||||
|
|
||||||
BootMergeObject boot_platform_efi.o :
|
local platform ;
|
||||||
$(efi_glue_src)
|
for platform in [ MultiBootSubDirSetup efi ] {
|
||||||
$(platform_src)
|
on $(platform) {
|
||||||
:
|
|
||||||
: boot_platform_generic.a
|
|
||||||
;
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles relocation_func.cpp ]
|
BootMergeObject boot_platform_efi.o :
|
||||||
= [ FDirName $(SUBDIR) arch $(TARGET_ARCH) ] ;
|
$(efi_glue_src)
|
||||||
LOCATE on [ FGristFiles $(efi_glue_src) ]
|
$(platform_src)
|
||||||
= [ BuildFeatureAttribute gnuefi : libdir : path ] ;
|
:
|
||||||
Depends [ FGristFiles $(efi_glue_src) ]
|
: boot_platform_generic_efi.a
|
||||||
: [ BuildFeatureAttribute gnuefi : libdir ] ;
|
;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles relocation_func.cpp ]
|
||||||
|
= [ FDirName $(SUBDIR) arch $(TARGET_ARCH) ] ;
|
||||||
|
LOCATE on [ FGristFiles $(efi_glue_src) ]
|
||||||
|
= [ BuildFeatureAttribute gnuefi : libdir : path ] ;
|
||||||
|
Depends [ FGristFiles $(efi_glue_src) ]
|
||||||
|
: [ BuildFeatureAttribute gnuefi : libdir ] ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
SubDir HAIKU_TOP src system boot platform generic ;
|
SubDir HAIKU_TOP src system boot platform generic ;
|
||||||
|
|
||||||
SetupFeatureObjectsDir $(TARGET_BOOT_PLATFORM) ;
|
|
||||||
|
|
||||||
UseBuildFeatureHeaders zlib ;
|
UseBuildFeatureHeaders zlib ;
|
||||||
UsePrivateKernelHeaders ;
|
UsePrivateKernelHeaders ;
|
||||||
|
|
||||||
SubDirC++Flags -D_BOOT_MODE -fno-rtti ;
|
SubDirC++Flags -D_BOOT_MODE -fno-rtti ;
|
||||||
|
|
||||||
BootStaticLibrary boot_platform_generic :
|
local platform ;
|
||||||
text_menu.cpp
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
video_blit.cpp
|
on $(platform) {
|
||||||
video_splash.cpp
|
BootStaticLibrary boot_platform_generic_$(platform:G=) :
|
||||||
;
|
text_menu.cpp
|
||||||
|
video_blit.cpp
|
||||||
|
video_splash.cpp
|
||||||
|
;
|
||||||
|
|
||||||
Includes [ FGristFiles video_splash.cpp ]
|
Includes [ FGristFiles video_splash.cpp ]
|
||||||
: [ BuildFeatureAttribute zlib : headers ] ;
|
: [ BuildFeatureAttribute zlib : headers ] ;
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src system boot platform pxe_ia32 ;
|
|||||||
|
|
||||||
SubDirHdrs $(SUBDIR) $(DOTDOT) bios_ia32 ;
|
SubDirHdrs $(SUBDIR) $(DOTDOT) bios_ia32 ;
|
||||||
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform bios_ia32 ;
|
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform bios_ia32 ;
|
||||||
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform $(TARGET_BOOT_PLATFORM) ;
|
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform pxe_ia32 ;
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||||
UsePrivateHeaders [ FDirName graphics common ] ;
|
UsePrivateHeaders [ FDirName graphics common ] ;
|
||||||
@ -47,30 +47,35 @@ local bios_ia32_edid_src =
|
|||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
BootMergeObject boot_platform_pxe_ia32.o :
|
local platform ;
|
||||||
pxe_stage2.S
|
for platform in [ MultiBootSubDirSetup pxe_ia32 ] {
|
||||||
smp_trampoline.S
|
on $(platform) {
|
||||||
pxe_bios.S
|
BootMergeObject boot_platform_pxe_ia32.o :
|
||||||
devices.cpp
|
pxe_stage2.S
|
||||||
network.cpp
|
smp_trampoline.S
|
||||||
pxe_undi.cpp
|
pxe_bios.S
|
||||||
$(bios_ia32_src)
|
devices.cpp
|
||||||
$(bios_ia32_edid_src)
|
network.cpp
|
||||||
|
pxe_undi.cpp
|
||||||
|
$(bios_ia32_src)
|
||||||
|
$(bios_ia32_edid_src)
|
||||||
|
|
||||||
:
|
:
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic_pxe_ia32.a
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles $(bios_ia32_src) ]
|
SEARCH on [ FGristFiles $(bios_ia32_src) ]
|
||||||
= [ FDirName $(SUBDIR) $(DOTDOT) bios_ia32 ] ;
|
= [ FDirName $(SUBDIR) $(DOTDOT) bios_ia32 ] ;
|
||||||
|
|
||||||
SEARCH on [ FGristFiles $(bios_ia32_edid_src) ]
|
SEARCH on [ FGristFiles $(bios_ia32_edid_src) ]
|
||||||
= [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
= [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
SEARCH on [ FGristFiles $(genericPlatformSources) ]
|
SEARCH on [ FGristFiles $(genericPlatformSources) ]
|
||||||
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
|
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
|
||||||
|
|
||||||
# We also need the bios_ia32 stage1.bin for building bin/makebootable
|
# We also need the bios_ia32 stage1.bin for building bin/makebootable
|
||||||
SEARCH on stage1.bin
|
SEARCH on stage1.bin
|
||||||
= [ FDirName $(SUBDIR) $(DOTDOT) bios_ia32 ] ;
|
= [ FDirName $(SUBDIR) $(DOTDOT) bios_ia32 ] ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -113,7 +113,7 @@ KernelLd kernel_$(TARGET_ARCH) :
|
|||||||
kernel_vm.o
|
kernel_vm.o
|
||||||
|
|
||||||
kernel_arch_$(TARGET_KERNEL_ARCH).o
|
kernel_arch_$(TARGET_KERNEL_ARCH).o
|
||||||
kernel_platform_$(TARGET_BOOT_PLATFORM).o
|
kernel_platform_$(TARGET_KERNEL_PLATFORM).o
|
||||||
|
|
||||||
linkhack.so
|
linkhack.so
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ if $(HAIKU_ARCH) in x86_64 arm {
|
|||||||
kernel_vm.o
|
kernel_vm.o
|
||||||
|
|
||||||
kernel_arch_$(TARGET_KERNEL_ARCH).o
|
kernel_arch_$(TARGET_KERNEL_ARCH).o
|
||||||
kernel_platform_$(TARGET_BOOT_PLATFORM).o
|
kernel_platform_$(TARGET_KERNEL_PLATFORM).o
|
||||||
|
|
||||||
linkhack.so
|
linkhack.so
|
||||||
|
|
||||||
@ -202,6 +202,6 @@ SubInclude HAIKU_TOP src system kernel slab ;
|
|||||||
SubInclude HAIKU_TOP src system kernel util ;
|
SubInclude HAIKU_TOP src system kernel util ;
|
||||||
SubInclude HAIKU_TOP src system kernel vm ;
|
SubInclude HAIKU_TOP src system kernel vm ;
|
||||||
|
|
||||||
if $(TARGET_BOOT_PLATFORM) {
|
if $(TARGET_KERNEL_PLATFORM) {
|
||||||
SubInclude HAIKU_TOP src system kernel platform $(TARGET_BOOT_PLATFORM) ;
|
SubInclude HAIKU_TOP src system kernel platform $(TARGET_KERNEL_PLATFORM) ;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src system kernel device_manager ;
|
SubDir HAIKU_TOP src system kernel device_manager ;
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
UsePrivateHeaders [ FDirName kernel util ] shared ;
|
UsePrivateHeaders [ FDirName kernel util ] shared ;
|
||||||
|
|
||||||
KernelMergeObject kernel_device_manager.o :
|
KernelMergeObject kernel_device_manager.o :
|
||||||
|
@ -4,7 +4,6 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) jobs ] ;
|
|||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits storage disk_device ] ;
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits storage disk_device ] ;
|
||||||
# DiskDeviceTypes.cpp
|
# DiskDeviceTypes.cpp
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
|
||||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel ] ;
|
UsePrivateHeaders [ FDirName kernel ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel fs ] ;
|
UsePrivateHeaders [ FDirName kernel fs ] ;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
SubDir HAIKU_TOP src system kernel platform u-boot ;
|
SubDir HAIKU_TOP src system kernel platform u-boot ;
|
||||||
|
|
||||||
SubDirHdrs $(HAIKU_TOP) headers private kernel platform $(TARGET_BOOT_PLATFORM) ;
|
SubDirHdrs $(HAIKU_TOP) headers private kernel platform $(TARGET_KERNEL_PLATFORM) ;
|
||||||
UseLibraryHeaders [ FDirName libfdt ] ;
|
UseLibraryHeaders [ FDirName libfdt ] ;
|
||||||
|
|
||||||
SubDirCcFlags $(TARGET_KERNEL_PIC_CCFLAGS) ;
|
SubDirCcFlags $(TARGET_KERNEL_PIC_CCFLAGS) ;
|
||||||
|
@ -8,7 +8,7 @@ SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits storage ] ;
|
|||||||
|
|
||||||
#UsePrivateHeaders $(DOT) ;
|
#UsePrivateHeaders $(DOT) ;
|
||||||
UsePrivateHeaders shared ;
|
UsePrivateHeaders shared ;
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_KERNEL_PLATFORM) ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel fs ] ;
|
UsePrivateHeaders [ FDirName kernel fs ] ;
|
||||||
|
@ -4,7 +4,7 @@ SubDir HAIKU_TOP src tests system kernel scheduler ;
|
|||||||
|
|
||||||
UsePrivateHeaders kernel ;
|
UsePrivateHeaders kernel ;
|
||||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_KERNEL_PLATFORM) ] ;
|
||||||
#UseHeaders [ FDirName $(HAIKU_TOP) src system kernel cache ] ;
|
#UseHeaders [ FDirName $(HAIKU_TOP) src system kernel cache ] ;
|
||||||
|
|
||||||
local includes = -include $(SUBDIR)/override_types.h ;
|
local includes = -include $(SUBDIR)/override_types.h ;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
SubDir HAIKU_TOP src tools makebootable ;
|
SubDir HAIKU_TOP src tools makebootable ;
|
||||||
|
|
||||||
if $(TARGET_BOOT_PLATFORM) {
|
if $(TARGET_KERNEL_PLATFORM) {
|
||||||
SubInclude HAIKU_TOP src tools makebootable platform
|
SubInclude HAIKU_TOP src tools makebootable platform
|
||||||
$(TARGET_BOOT_PLATFORM) ;
|
$(TARGET_KERNEL_PLATFORM) ;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user