Add bootloader extension

This commit is contained in:
Thomas Stoddard
2026-10-21 19:22:50 -04:00
committed by Kyle Schwarz
parent 4db27aa187
commit 6ac041cadc
61 changed files with 13816 additions and 68 deletions
@@ -0,0 +1,25 @@
#include "icsneo/device/extensions/bootloader/parser/fwloader.h"
#include "icsneo/device/extensions/bootloader/parser/fwbin.h"
#include "icsneo/device/extensions/bootloader/parser/fwbundle.h"
namespace icsneo {
namespace Bootloader {
std::unique_ptr<FWRepo> FWLoader::Load(const std::string& path) {
if(FWBundle::IsFWBundle(path)) {
auto bundle = std::make_unique<FWBundle>();
if(!bundle->load(path))
return nullptr;
return bundle;
}
auto bin = std::make_unique<FWBin>();
if(!bin->load(path))
return nullptr;
return bin;
}
} // namespace Bootloader
} // namespace icsneo