957a1b17eb
{HAIKU,HOST,TARGET}_KERNEL_PIC_{CC,LINK}FLAGS which define the compiler/linker flags specifying the kind of position independence the kernel shall have. For x86 we had and still have -fno-pic, but the PPC kernel has -fPIE (position independent executable) now, as we need to relocate it. * The boot loader relocates the kernel now. Mostly copied the relocation code from the kernel ELF loader. Almost completely rewrote the PPC specific relocation code, though. It's more correct and more complete now (some things are still missing though). * Added boot platform awareness to the kernel. Moved the generic Open Firmware code (openfirmware.c/h) from the boot loader to the kernel. * The kernel PPC serial debug output is sent to the console for the time being. * The PPC boot loader counts the CPUs now and allocates the kernel stacks (made OF device iteration a bit more flexible on the way -- the search can be restricted to subtree). Furthermore we really enter the kernel... (Yay! :-) ... and crash in the first dprintf() (in the atomic_set() called by acquire_spinlock()). kprintf() works, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15756 a95241bf-73f2-0310-859d-f6bbb57e9c96
75 lines
1.3 KiB
Plaintext
75 lines
1.3 KiB
Plaintext
SubDir HAIKU_TOP src system boot ;
|
|
|
|
local librootFunctions =
|
|
byteorder.o
|
|
ctype.o
|
|
qsort.o
|
|
kernel_vsprintf.o
|
|
memset.o
|
|
memcmp.o
|
|
memcpy.o
|
|
memmove.o
|
|
strdup.o
|
|
strlen.o
|
|
strnlen.o
|
|
strcmp.o
|
|
strcasecmp.o
|
|
strncmp.o
|
|
strcat.o
|
|
strcpy.o
|
|
strlcat.o
|
|
strlcpy.o
|
|
strchr.o
|
|
strrchr.o
|
|
strtol.o
|
|
;
|
|
|
|
local platformObjects = ;
|
|
if $(TARGET_ARCH) = x86 {
|
|
platformObjects += <src!system!kernel!arch!$(TARGET_ARCH)>cpuid.o ;
|
|
}
|
|
|
|
KernelLd boot_loader :
|
|
boot_platform_$(TARGET_BOOT_PLATFORM).o
|
|
boot_arch_$(TARGET_ARCH).o
|
|
boot_loader.a
|
|
boot_net.a
|
|
boot_partitions.a
|
|
|
|
# file systems
|
|
boot_bfs.a
|
|
boot_amiga_ffs.a
|
|
boot_tarfs.a
|
|
|
|
libz.a
|
|
|
|
# libroot functions needed by the stage2 boot loader (compiled for the
|
|
# kernel)
|
|
$(librootFunctions:G=src!system!kernel!lib)
|
|
|
|
# platform specific objects
|
|
$(platformObjects)
|
|
|
|
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader.ld
|
|
: -Bstatic
|
|
;
|
|
|
|
rule BuildZbeos {
|
|
local zbeos = $(1) ;
|
|
local bootLoader = $(2) ;
|
|
|
|
Depends $(zbeos) : $(bootLoader) ;
|
|
MakeLocateDebug $(zbeos) ;
|
|
}
|
|
|
|
actions BuildZbeos {
|
|
rm -f $(1)
|
|
$(TARGET_OBJCOPY) -O binary $(2) $(1)
|
|
}
|
|
|
|
BuildZbeos zbeos : boot_loader ;
|
|
|
|
SubInclude HAIKU_TOP src system boot arch $(TARGET_ARCH) ;
|
|
SubInclude HAIKU_TOP src system boot loader ;
|
|
SubInclude HAIKU_TOP src system boot platform ;
|