Bootloader: Start work on bootloader

I wrote a fast first stage bootloader and a installer to put it into
a disk image.
This commit is contained in:
2023-11-09 22:42:47 +02:00
parent bc8fd1285f
commit cfc7313451
15 changed files with 984 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#include "GUID.h"
#include <iomanip>
#include <cstring>
bool GUID::operator==(const GUID& other) const
{
return std::memcmp(this, &other, sizeof(GUID)) == 0;
}
std::ostream& operator<<(std::ostream& out, const GUID& guid)
{
auto flags = out.flags();
out << std::hex << std::setfill('0');
out << std::setw(8) << guid.component1 << '-';
out << std::setw(4) << guid.component2 << '-';
out << std::setw(4) << guid.component3 << '-';
out << std::setw(2);
for (int i = 0; i < 2; i++) out << +guid.component45[i];
out << '-';
for (int i = 2; i < 6; i++) out << +guid.component45[i];
out.flags(flags);
return out;
}