The boot loader now has special support for being booted from a boot image
like floppy or CD boot. This allows it to reduce the number of scans needed to identify the boot partition - when booted from a real floppy, this speeds up the boot process by a magnitude. Also, the loader now has a fall back in case there were no "boot" links on the disk - the current boot floppy script doesn't create them. With these changes, I was able to boot into a HD based Haiku installation from a floppy disk. It's not yet enough to boot from CD (as the boot device selection is a bit too simplistic right now), but it will eventually come next. Testing is a lot slower here, though, as neither qemu nor Bochs support multi-session CDs (at least I have no idea how to get them to do this). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14380 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include <disk_device_manager.h>
|
||||
|
||||
|
||||
struct file_system_module_info;
|
||||
|
||||
namespace boot {
|
||||
|
||||
class Partition : public Node, public partition_data {
|
||||
@@ -25,8 +27,8 @@ class Partition : public Node, public partition_data {
|
||||
|
||||
Partition *AddChild();
|
||||
|
||||
status_t Mount(Directory **_fileSystem = NULL);
|
||||
status_t Scan(bool mountFileSystems);
|
||||
status_t Mount(Directory **_fileSystem = NULL, bool isBootDevice = false);
|
||||
status_t Scan(bool mountFileSystems, bool isBootDevice = false);
|
||||
|
||||
void SetParent(Partition *parent) { fParent = parent; }
|
||||
Partition *Parent() const { return fParent; }
|
||||
@@ -38,6 +40,8 @@ class Partition : public Node, public partition_data {
|
||||
int FD() const { return fFD; }
|
||||
|
||||
private:
|
||||
status_t _Mount(file_system_module_info *module, Directory **_fileSystem);
|
||||
|
||||
int fFD;
|
||||
NodeList fChildren;
|
||||
Partition *fParent;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2004, Axel Dörfler, [email protected].
|
||||
* Copyright 2003-2005, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef KERNEL_BOOT_PLATFORM_H
|
||||
@@ -58,6 +58,7 @@ extern status_t platform_add_block_devices(struct stage2_args *args, NodeList *d
|
||||
extern status_t platform_get_boot_partition(struct stage2_args *args, Node *bootDevice,
|
||||
NodeList *partitions, boot::Partition **_partition);
|
||||
extern status_t platform_register_boot_device(Node *device);
|
||||
extern bool platform_boot_device_is_image();
|
||||
|
||||
/* menu functions */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2004, Axel Dörfler, [email protected].
|
||||
* Copyright 2003-2005, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef KERNEL_BOOT_VFS_H
|
||||
@@ -84,8 +84,8 @@ extern int open_from(Directory *directory, const char *path, int mode);
|
||||
|
||||
extern Node *get_node_from(int fd);
|
||||
|
||||
extern status_t add_partitions_for(int fd, bool mountFileSystems);
|
||||
extern status_t add_partitions_for(Node *device, bool mountFileSystems);
|
||||
extern status_t add_partitions_for(int fd, bool mountFileSystems, bool isBootDevice = false);
|
||||
extern status_t add_partitions_for(Node *device, bool mountFileSystems, bool isBootDevice = false);
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user