Fixed BootLoaderTest build and debug build.

This commit is contained in:
Axel Dörfler
2012-06-18 21:52:30 +02:00
parent 90f510906d
commit d6e44a2a3a
8 changed files with 114 additions and 22 deletions
+14 -10
View File
@@ -2,11 +2,11 @@ SubDir HAIKU_TOP src tests system boot loader ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders [ FDirName kernel ] ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName storage ] ;
UsePrivateHeaders [ FDirName shared ] ;
UsePrivateHeaders [ FDirName kernel util ] ;
UsePrivateHeaders kernel shared storage system ;
SubDirSysHdrs $(HAIKU_TOP) headers private kernel arch $(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) headers private system arch $(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ;
SubDirHdrs $(HAIKU_TOP) src system boot loader ;
SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ;
@@ -34,6 +34,7 @@ ObjectDefines
loader.cpp
kernel_args.cpp
load_driver_settings.cpp
pager.cpp
# other
platform_menu.cpp
@@ -79,6 +80,7 @@ ObjectDefines
SimpleTest BootLoaderTest :
# userland bindings
platform_start.cpp
platform_console.cpp
platform_debug.cpp
platform_devices.cpp
platform_heap.cpp
@@ -97,6 +99,7 @@ SimpleTest BootLoaderTest :
loader.cpp
kernel_args.cpp
load_driver_settings.cpp
pager.cpp
# partitioning systems
amiga_rdb.cpp
@@ -106,19 +109,20 @@ SimpleTest BootLoaderTest :
PartitionMap.cpp
PartitionMapParser.cpp
# utility functions - Dano has a strlcpy() function in libroot.so, while R5 has not
# utility functions
list.cpp
strlcat.c
strlcpy.c
driver_settings.cpp
ring_buffer.cpp
KMessage.cpp
: boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a
;
:
boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a
kernelland_emu
;
# Tell Jam where to find the utility sources
SEARCH on [ FGristFiles list.cpp ]
SEARCH on [ FGristFiles list.cpp ring_buffer.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
SEARCH on [ FGristFiles KMessage.cpp ]
@@ -134,7 +138,7 @@ SEARCH on [ FGristFiles
main.cpp vfs.cpp partitions.cpp
heap.cpp RootFileSystem.cpp
elf.cpp menu.cpp loader.cpp
kernel_args.cpp load_driver_settings.cpp
kernel_args.cpp load_driver_settings.cpp pager.cpp
] = [ FDirName $(HAIKU_TOP) src system boot loader ] ;
# partitioning system modules
@@ -2,7 +2,8 @@ SubDir HAIKU_TOP src tests system boot loader file_systems amiga_ffs ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders [ FDirName kernel ] ;
UsePrivateKernelHeaders ;
UsePrivateSystemHeaders ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName storage ] ;
SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ;
@@ -13,7 +14,7 @@ if $(TARGET_PLATFORM) != haiku {
UsePublicHeaders storage ; # DiskDeviceDefs.h
}
ObjectDefines
ObjectDefines
amiga_ffs.cpp
Volume.cpp
Directory.cpp
@@ -2,7 +2,8 @@ SubDir HAIKU_TOP src tests system boot loader file_systems bfs ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders [ FDirName kernel ] ;
UsePrivateKernelHeaders ;
UsePrivateSystemHeaders ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName storage ] ;
SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ;
@@ -2,8 +2,10 @@ SubDir HAIKU_TOP src tests system boot loader file_systems tarfs ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateKernelHeaders ;
UsePrivateSystemHeaders ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders kernel shared storage ;
UsePrivateHeaders shared storage ;
SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ;
SubDirSysHdrs $(HAIKU_TOP) headers libs zlib ;
SubDirHdrs $(HAIKU_TOP) src system boot loader file_systems tarfs ;
@@ -15,7 +17,7 @@ if $(TARGET_PLATFORM) != haiku {
ObjectDefines tarfs.cpp : B_BUFFER_OVERFLOW=B_BAD_VALUE ;
}
ObjectDefines
ObjectDefines
tarfs.cpp
:
read_pos=boot_read_pos fstat=boot_fstat open=boot_open close=boot_close _BOOT_MODE
@@ -0,0 +1,65 @@
/*
* Copyright 2012, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*/
#include <boot/platform/generic/text_console.h>
void
console_clear_screen(void)
{
}
int32
console_width(void)
{
return 80;
}
int32
console_height(void)
{
return 25;
}
void
console_set_cursor(int32 x, int32 y)
{
}
void
console_show_cursor(void)
{
}
void
console_hide_cursor(void)
{
}
void
console_set_color(int32 foreground, int32 background)
{
}
int
console_wait_for_key(void)
{
return 0;
}
status_t
console_init(void)
{
return B_OK;
}
@@ -1,7 +1,7 @@
/*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
* Copyright 2003-2012, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*/
#include <boot/platform.h>
@@ -32,3 +32,9 @@ dprintf(const char *format, ...)
va_end(args);
}
char*
platform_debug_get_log_buffer(size_t* _size)
{
return NULL;
}
+15 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Copyright 2004-2012, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
@@ -40,7 +40,7 @@ print_item_at(int32 line, MenuItem *item, bool clearHelp = true)
printf(" ");
printf(item->Label());
if (item->Submenu() && item->Submenu()->Type() == CHOICE_MENU) {
// show the current choice (if any)
Menu *subMenu = item->Submenu();
@@ -165,11 +165,16 @@ platform_run_menu(Menu *menu)
char buffer[32];
if (fgets(buffer, sizeof(buffer), stdin) == NULL)
return;
if (buffer[0] != '\n')
selected = atoi(buffer);
item = menu->ItemAt(selected);
if (item == NULL) {
printf("Invalid choice.");
continue;
}
item->Select(true);
// leave the menu
@@ -194,3 +199,10 @@ platform_run_menu(Menu *menu)
}
}
size_t
platform_get_user_input_text(Menu* menu, MenuItem* item, char* buffer,
size_t bufferSize)
{
return 0;
}
@@ -35,7 +35,8 @@ main(int argc, char **argv)
{
// The command arguments are evaluated in platform_devices.cpp!
boot_main(NULL);
stage2_args args;
boot_main(&args);
return 0;
}