diff --git a/headers/private/kernel/boot/partitions.h b/headers/private/kernel/boot/partitions.h index 728b382936..7b226e36d4 100644 --- a/headers/private/kernel/boot/partitions.h +++ b/headers/private/kernel/boot/partitions.h @@ -1,5 +1,5 @@ /* - * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2003-2007, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. */ #ifndef KERNEL_BOOT_PARTITIONS_H @@ -76,9 +76,10 @@ class Partition : public Node, public partition_data { // structure definitions as used in the boot loader struct partition_module_info; extern partition_module_info gAmigaPartitionModule; +extern partition_module_info gApplePartitionModule; +extern partition_module_info gEFIPartitionModule; extern partition_module_info gIntelPartitionMapModule; extern partition_module_info gIntelExtendedPartitionModule; -extern partition_module_info gApplePartitionModule; // the file system module info is not a standard module info; // their modules are specifically written for the boot loader, diff --git a/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp b/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp index 1fc07ff281..46b99cbd59 100644 --- a/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp +++ b/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp @@ -187,7 +187,7 @@ efi_gpt_scan_partition(int fd, partition_data *partition, void *_cookie) // scan all children - status_t status; + status_t status = B_ERROR; if (status == B_ENTRY_NOT_FOUND) return B_OK; diff --git a/src/system/boot/loader/Jamfile b/src/system/boot/loader/Jamfile index d9338eb6a0..99eccdd16e 100644 --- a/src/system/boot/loader/Jamfile +++ b/src/system/boot/loader/Jamfile @@ -2,6 +2,7 @@ SubDir 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 efi ; SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ; UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; @@ -15,6 +16,7 @@ UsePrivateHeaders kernel shared storage ; BOOT_SUPPORT_PARTITION_AMIGA BOOT_SUPPORT_PARTITION_APPLE + BOOT_SUPPORT_PARTITION_EFI BOOT_SUPPORT_PARTITION_INTEL BOOT_SUPPORT_FILE_SYSTEM_BFS @@ -56,6 +58,7 @@ KernelStaticLibrary boot_loader : KernelStaticLibrary boot_partitions : amiga_rdb.cpp apple.cpp + efi_gpt.cpp intel.cpp PartitionMap.cpp PartitionMapParser.cpp @@ -75,6 +78,9 @@ SEARCH on [ FGristFiles amiga_rdb.cpp ] SEARCH on [ FGristFiles apple.cpp ] = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ; +SEARCH on [ FGristFiles efi_gpt.cpp ] + = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ] ; + SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ] = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ; diff --git a/src/system/boot/loader/partitions.cpp b/src/system/boot/loader/partitions.cpp index 368ca50c18..5165b62582 100644 --- a/src/system/boot/loader/partitions.cpp +++ b/src/system/boot/loader/partitions.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Copyright 2003-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Distributed under the terms of the MIT License. */ @@ -33,6 +33,9 @@ static const partition_module_info *sPartitionModules[] = { #ifdef BOOT_SUPPORT_PARTITION_AMIGA &gAmigaPartitionModule, #endif +#ifdef BOOT_SUPPORT_PARTITION_EFI + &gEFIPartitionModule, +#endif #ifdef BOOT_SUPPORT_PARTITION_INTEL &gIntelPartitionMapModule, &gIntelExtendedPartitionModule, diff --git a/src/tests/system/boot/loader/Jamfile b/src/tests/system/boot/loader/Jamfile index 889fa92a2d..073f629d74 100644 --- a/src/tests/system/boot/loader/Jamfile +++ b/src/tests/system/boot/loader/Jamfile @@ -9,6 +9,7 @@ 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 ; SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ; +SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ; SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ; # we need to redefine certain calls in the boot loader so that @@ -34,6 +35,7 @@ ObjectDefines # partitions amiga_rdb.cpp apple.cpp + efi_gpt.cpp intel.cpp PartitionMap.cpp PartitionMapParser.cpp @@ -91,6 +93,7 @@ SimpleTest BootLoaderTest : # partitioning systems amiga_rdb.cpp apple.cpp + efi_gpt.cpp intel.cpp PartitionMap.cpp PartitionMapParser.cpp @@ -130,6 +133,9 @@ SEARCH on [ FGristFiles amiga_rdb.cpp ] SEARCH on [ FGristFiles apple.cpp ] = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ; +SEARCH on [ FGristFiles efi_gpt.cpp ] + = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ] ; + SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ] = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;