Compare commits
5 Commits
first-pack
...
master
Author | SHA1 | Date |
---|---|---|
Henrik Grimler | 02b577ec77 | |
Henrik Grimler | 14f3521a6b | |
Henrik Grimler | 0cf817a591 | |
Henrik Grimler | c3516307d2 | |
Henrik Grimler | f6c4698c8b |
|
@ -114,7 +114,7 @@
|
|||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heimdall Frontend</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 2.0.1</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 2.0.2</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright © 2010-2017 Benjamin Dobell, Glass Echidna</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heimdall (command line)</span></p>
|
||||
|
|
|
@ -1088,15 +1088,12 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
|
||||
delete sendFilePartResponse;
|
||||
|
||||
if (filePartIndex == 0)
|
||||
if (!success)
|
||||
{
|
||||
// Hack
|
||||
success = true;
|
||||
receivedPartIndex = filePartIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int retry = 0; retry < 4; ++retry)
|
||||
Interface::PrintErrorSameLine("\n");
|
||||
Interface::PrintError("Failed to receive file part response!\n");
|
||||
|
||||
for (int retry = 0; retry < 4; retry++)
|
||||
{
|
||||
Interface::PrintErrorSameLine("\n");
|
||||
Interface::PrintError("Retrying...");
|
||||
|
@ -1109,7 +1106,7 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
if (!success)
|
||||
{
|
||||
Interface::PrintErrorSameLine("\n");
|
||||
Interface::PrintError("Failed to send file part packet 2!\n");
|
||||
Interface::PrintError("Failed to send file part packet!\n");
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
|
|
@ -116,16 +116,16 @@ static bool openFiles(Arguments& arguments, vector<PartitionFile>& partitionFile
|
|||
{
|
||||
const StringArgument *stringArgument = static_cast<const StringArgument *>(*it);
|
||||
FILE *file = FileOpen(stringArgument->GetValue().c_str(), "rb");
|
||||
FileSeek(file, 0, SEEK_END);
|
||||
unsigned long fileSize = (unsigned long)FileTell(file);
|
||||
FileRewind(file);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
Interface::PrintError("Failed to open file \"%s\"\n", stringArgument->GetValue().c_str());
|
||||
return (false);
|
||||
}
|
||||
|
||||
FileSeek(file, 0, SEEK_END);
|
||||
unsigned long fileSize = (unsigned long)FileTell(file);
|
||||
FileRewind(file);
|
||||
|
||||
partitionFiles.push_back(PartitionFile(argumentName.c_str(), file, fileSize));
|
||||
}
|
||||
}
|
||||
|
@ -303,11 +303,11 @@ static bool flashPartitions(BridgeManager *bridgeManager, const vector<Partition
|
|||
{
|
||||
const PitEntry *part = pitData->FindEntry(it->argumentName);
|
||||
if (part->GetDeviceType() != PitEntry::kDeviceTypeMMC &&
|
||||
part->GetDeviceType() != PitEntry::kDeviceTypeMMC4096)
|
||||
part->GetDeviceType() != PitEntry::kDeviceTypeUFS)
|
||||
continue;
|
||||
unsigned long partitionSize = part->GetBlockCount();
|
||||
unsigned int blockSize = 512;
|
||||
if (part->GetDeviceType() == PitEntry::kDeviceTypeMMC4096)
|
||||
if (part->GetDeviceType() == PitEntry::kDeviceTypeUFS)
|
||||
blockSize = 4096;
|
||||
if (partitionSize > 0 && it->fileSize > partitionSize*blockSize)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ using namespace Heimdall;
|
|||
map<string, Interface::ActionInfo> actionMap;
|
||||
bool stdoutErrors = false;
|
||||
|
||||
const char *version = "v2.0.1";
|
||||
const char *version = "v2.0.2";
|
||||
const char *actionUsage = "Usage: heimdall <action> <action arguments>\n";
|
||||
|
||||
const char *releaseInfo = "Heimdall %s\n\n\
|
||||
|
@ -211,7 +211,7 @@ void Interface::PrintPit(const PitData *pitData)
|
|||
Interface::Print("Entry Count: %d\n", pitData->GetEntryCount());
|
||||
Interface::Print("Unknown string: %s\n", pitData->GetComTar2());
|
||||
Interface::Print("CPU/bootloader tag: %s\n", pitData->GetCpuBlId());
|
||||
Interface::Print("Protocol version: 0x%04x\n", pitData->GetProtocolVersion());
|
||||
Interface::Print("Logic unit count: %d\n", pitData->GetLUCount());
|
||||
|
||||
for (unsigned int i = 0; i < pitData->GetEntryCount(); i++)
|
||||
{
|
||||
|
@ -257,8 +257,8 @@ void Interface::PrintPit(const PitData *pitData)
|
|||
Interface::Print("All (?)");
|
||||
break;
|
||||
|
||||
case PitEntry::kDeviceTypeMMC4096:
|
||||
Interface::Print("MMC 4096");
|
||||
case PitEntry::kDeviceTypeUFS:
|
||||
Interface::Print("UFS");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -69,7 +69,7 @@ PitData::PitData()
|
|||
com_tar2[0] = '\0';
|
||||
cpu_bl_id[0] = '\0';
|
||||
|
||||
protocol_version = 0;
|
||||
luCount = 0;
|
||||
}
|
||||
|
||||
PitData::~PitData()
|
||||
|
@ -98,7 +98,7 @@ bool PitData::Unpack(const unsigned char *data)
|
|||
return (false);
|
||||
cpu_bl_id[8]='\0';
|
||||
|
||||
protocol_version = PitData::UnpackShort(data, 24);
|
||||
luCount = PitData::UnpackShort(data, 24);
|
||||
|
||||
unsigned int integerValue;
|
||||
unsigned int entryOffset;
|
||||
|
@ -153,7 +153,7 @@ void PitData::Pack(unsigned char *data) const
|
|||
memcpy(&data[8], com_tar2, 8);
|
||||
memcpy(&data[16], cpu_bl_id, 8);
|
||||
|
||||
PitData::PackShort(data, 24, protocol_version);
|
||||
PitData::PackShort(data, 24, luCount);
|
||||
|
||||
int entryOffset;
|
||||
|
||||
|
@ -187,7 +187,7 @@ bool PitData::Matches(const PitData *otherPitData) const
|
|||
if (entryCount == otherPitData->entryCount &&
|
||||
(strncmp(com_tar2, otherPitData->com_tar2, 8) == 0) &&
|
||||
(strncmp(cpu_bl_id, otherPitData->cpu_bl_id, 8) == 0) &&
|
||||
protocol_version == otherPitData->protocol_version)
|
||||
luCount == otherPitData->luCount)
|
||||
{
|
||||
for (unsigned int i = 0; i < entryCount; i++)
|
||||
{
|
||||
|
@ -211,7 +211,7 @@ void PitData::Clear(void)
|
|||
|
||||
cpu_bl_id[0] = '\0';
|
||||
|
||||
protocol_version = 0;
|
||||
luCount = 0;
|
||||
|
||||
for (unsigned int i = 0; i < entries.size(); i++)
|
||||
delete entries[i];
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace libpit
|
|||
kDeviceTypeFile, // FAT
|
||||
kDeviceTypeMMC,
|
||||
kDeviceTypeAll, // ?
|
||||
kDeviceTypeMMC4096 = 8 // block size 4096
|
||||
kDeviceTypeUFS = 8
|
||||
};
|
||||
|
||||
enum
|
||||
|
@ -266,7 +266,7 @@ namespace libpit
|
|||
|
||||
char cpu_bl_id[8+1]; // 0x10
|
||||
|
||||
unsigned short protocol_version; // 0x18
|
||||
unsigned short luCount; // 0x18
|
||||
|
||||
// Entries start at 0x1C
|
||||
std::vector<PitEntry *> entries;
|
||||
|
@ -375,9 +375,9 @@ namespace libpit
|
|||
return cpu_bl_id;
|
||||
}
|
||||
|
||||
unsigned int GetProtocolVersion(void) const
|
||||
unsigned int GetLUCount(void) const
|
||||
{
|
||||
return protocol_version;
|
||||
return luCount;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue