[Etherboot-developers] On filesystems and booting from disk.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Eric W B. <ebi...@ln...> - 2002-08-22 05:52:26
|
The basic structure needed to extend etherboot to boot from disk, is
the same with or without a filesystem.
My first stab at the needed outer loop is:
static void main2(void)
{
struct class_operations *ops;
int i, class;
for(i = 0; i < sizeof(classes)/sizeof(classes[0]); i++) {
int adapter;
ops = &classes[i];
while((adapter = ops->probe(adapter)) > 0) {
ops->load_configuration();
ops->load();
}
}
}
Basically the same code we have today except with
how configuration is loaded from disk is different from
how the configuration is loaded from DHCP.
The big change is the outer loop walking through each
of the different classes of devices and trying them one by one. The
minor change is having a different probe, load_configuration, and load
functions for the different classes of devices.
With the above setup having filesystem support can be implemented
with different load_configuration, and load functions from the
stupid ELF loader. So it shouldn't limit anyone.
I still need to look at the disk loading code in detail to convince
myself it really is worth it, but I fully intend to allow it
to happen.
Eric
|