Re: Generic bootloader
Posted: Mon Dec 10, 2012 5:35 am
Hi, just like b.zaar, I didn't read all of the pages. I just came on the forum after a long time, to discuss the need of a new bootloader, and whoa! I found this thread.
I'd love to help you with this project.
Thinking about style & language, I'm used to the one Griwes described. I would, however, prefer using tabs.
This way, each developer can configure his editor to make tabs look like 2/4/8 spaces at their wish. And you would still end up with consistent indenting.
Since this is a new and, afterall, experimental project, I would like to see some C++ advanced features. For example I would have a:
This might look crazy in such a low level environment, but you know C++ is almost 30 years old, and no mainstream bootoloader or OS really uses its powerful features.
Just... why not?
Edit:
Even though this won't solve the MBR problem (having different files for each combination of fs/device), once the main executable is booted, using C++ you may have the following neat code:
I'd love to help you with this project.
Thinking about style & language, I'm used to the one Griwes described. I would, however, prefer using tabs.
This way, each developer can configure his editor to make tabs look like 2/4/8 spaces at their wish. And you would still end up with consistent indenting.
Since this is a new and, afterall, experimental project, I would like to see some C++ advanced features. For example I would have a:
Code: Select all
class FileSystem
{
public:
virtual File *Open(const char *fn) = 0;
// [...]
};
class Fat32 : public FileSystem
{
public:
// [...]
};
Just... why not?
Edit:
Even though this won't solve the MBR problem (having different files for each combination of fs/device), once the main executable is booted, using C++ you may have the following neat code:
Code: Select all
Firmware *fw = new Bios; /* Or new UEFI */
Device *dev = new CDDevice(fw); /* Or new Disk, or PXE... */
Filesystem *fs = new Iso9660(dev); /* Or new Ext2, Fat32, ... */
File *file = fs->Open("/boot/kernel");
ExecutableFormat *exec = new Elf(file); /* ... */
exec->Load();
exec->Run();