Fixed the build of the boot loader test application.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21470 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-06-20 01:09:00 +00:00
parent ee76fc8f16
commit 268403d4cc
8 changed files with 50 additions and 15 deletions
+5 -1
View File
@@ -4,8 +4,12 @@ UsePrivateHeaders [ FDirName kernel ] ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName storage ] ; UsePrivateHeaders [ FDirName storage ] ;
UsePrivateHeaders [ FDirName shared ] ; UsePrivateHeaders [ FDirName shared ] ;
SubDirHdrs $(HAIKU_TOP) headers private kernel arch $(TARGET_ARCH) ; SubDirSysHdrs $(HAIKU_TOP) headers private kernel arch $(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ;
SubDirHdrs $(HAIKU_TOP) src system boot loader ; SubDirHdrs $(HAIKU_TOP) src system boot loader ;
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 intel ;
# we need to redefine certain calls in the boot loader so that # we need to redefine certain calls in the boot loader so that
# they will really be used instead of their POSIX counterparts # they will really be used instead of their POSIX counterparts
@@ -3,7 +3,8 @@ SubDir HAIKU_TOP src tests system boot loader file_systems amiga_ffs ;
UsePrivateHeaders [ FDirName kernel ] ; UsePrivateHeaders [ FDirName kernel ] ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName storage ] ; UsePrivateHeaders [ FDirName storage ] ;
SubDirHdrs $(HAIKU_TOP) src tests system boot loader ; SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ;
SubDirHdrs $(HAIKU_TOP) src system boot loader file_systems amiga_ffs ;
ObjectDefines ObjectDefines
amiga_ffs.cpp amiga_ffs.cpp
@@ -3,7 +3,8 @@ SubDir HAIKU_TOP src tests system boot loader file_systems bfs ;
UsePrivateHeaders [ FDirName kernel ] ; UsePrivateHeaders [ FDirName kernel ] ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName storage ] ; UsePrivateHeaders [ FDirName storage ] ;
SubDirHdrs $(HAIKU_TOP) src tests system boot loader ; SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ;
SubDirHdrs $(HAIKU_TOP) src system boot loader file_systems bfs ;
SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems bfs ; SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems bfs ;
ObjectDefines ObjectDefines
@@ -2,8 +2,9 @@ SubDir HAIKU_TOP src tests system boot loader file_systems tarfs ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders kernel shared storage ; UsePrivateHeaders kernel shared storage ;
SubDirHdrs $(HAIKU_TOP) src tests system boot loader ; SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ;
SubDirSysHdrs $(HAIKU_TOP) headers libs zlib ; SubDirSysHdrs $(HAIKU_TOP) headers libs zlib ;
SubDirHdrs $(HAIKU_TOP) src system boot loader file_systems tarfs ;
ObjectDefines ObjectDefines
tarfs.cpp tarfs.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2005, Axel Dörfler, [email protected]. * Copyright 2003-2007, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
@@ -132,16 +132,24 @@ get_next_device(int32 *cookie)
// #pragma mark - // #pragma mark -
status_t status_t
platform_get_boot_device(struct stage2_args *args, Node **_device) platform_add_boot_device(struct stage2_args *args, NodeList *devicesList)
{ {
// we accept a boot device from the command line // we accept a boot device from the command line
status_t status = B_ERROR;
Node *device;
int32 cookie = 0; int32 cookie = 0;
char *path = get_next_device(&cookie); char *path = get_next_device(&cookie);
if (path != NULL) if (path != NULL)
return get_device(path, _device); status = get_device(path, &device);
else
status = get_device("/boot/home/test-file-device", &device);
return get_device("/boot/home/test-file-device", _device); if (status == B_OK)
devicesList->Add(device);
return status;
} }
@@ -12,6 +12,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
const char *kNormalColor = "\33[0m"; const char *kNormalColor = "\33[0m";
+19 -1
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2005, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003-2007, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
@@ -35,3 +35,21 @@ platform_switch_to_text_mode(void)
{ {
} }
// #pragma mark -
extern "C" status_t
boot_arch_elf_relocate_rel(struct preloaded_image *image,
struct Elf32_Rel *rel, int rel_len)
{
return B_ERROR;
}
extern "C" status_t
boot_arch_elf_relocate_rela(struct preloaded_image *image,
struct Elf32_Rela *rel, int rel_len)
{
return B_ERROR;
}
@@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
@@ -11,10 +11,11 @@
status_t status_t
platform_allocate_region(void **_address, size_t size, uint8 protection) platform_allocate_region(void **_address, size_t size, uint8 protection,
bool exactAddress)
{ {
printf("platform_allocate_region(address = %p, size = %lu, protection = %u)\n", printf("platform_allocate_region(address = %p, size = %lu, protection = %u, exactAdress = %d)\n",
*_address, size, protection); *_address, size, protection, exactAddress);
void *address = malloc(size); void *address = malloc(size);
if (address == NULL) if (address == NULL)