Skip to content

Commit

Permalink
Allow IFS dumping from OMAP firmware.
Browse files Browse the repository at this point in the history
  • Loading branch information
xsacha committed Oct 2, 2014
1 parent 3991b1a commit b7dc487
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
19 changes: 14 additions & 5 deletions src/fs/ifs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,21 @@ void IFS::extractDir(int offset, int numNodes, QString basedir, qint64 startPos)
}

bool IFS::createContents() {
_file->seek(_offset + 0x1020);
qint32 boot_size, startup_size;
QNXStream stream(_file);
// boot @ 0 with boot_size;
stream >> boot_size;
boot_size &= 0xfffff;
_file->seek(2);
qint8 type;
qint32 boot_size, startup_size;
stream >> type;
if (type == 3) { // Qualcomm
_file->seek(_offset + 0x1020);
// boot @ 0 with boot_size;
stream >> boot_size;
boot_size &= 0xfffff;
}
else { // 1 // OMAP
// No boot.bin
boot_size = 0x808;
}

_file->seek(_offset + boot_size);
// Make sure there is a startup header
Expand Down
5 changes: 3 additions & 2 deletions src/splitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void Splitter::processExtractAutoloader() {
type |= PACKED_FILE_USER;
} else if (typeChar == 6) {
type |= PACKED_FILE_OS;
} else if (typeChar == 10 || typeChar == 12) {
} else if (typeChar == 12) { // Always seem to have 10 as well, sometimes 11
type |= PACKED_FILE_RADIO;
} else if (typeChar == 8) {
type |= PACKED_FILE_IFS;
Expand Down Expand Up @@ -376,11 +376,12 @@ void Splitter::processExtract(QIODevice* dev, qint64 signedSize, qint64 signedPo
blocks += blockCount;
}
partInfo.last().size = blocks * (qint64)65536;
// Type is at partitionTable.at(i). 5 is UserFS, 8 is Sig
partInfo.append(PartitionInfo(dev, partInfo.last().offset + partInfo.last().size));
}
}
partInfo.last().size = signedPos + signedSize - partInfo.last().offset;
if (partInfo.last().size < 65536)
partInfo.removeLast();

// Add to the main partition list
foreach(PartitionInfo info, partInfo) {
Expand Down
3 changes: 2 additions & 1 deletion src/splitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ struct PartitionInfo {
type = FS_RCFS;
else if (header == QByteArray::fromHex("EB109000"))
type = FS_QNX6;
else if (header == QByteArray::fromHex("FE0300EA"))
else if (header == QByteArray::fromHex("FE0300EA") // Qualcomm
|| header == QByteArray::fromHex("FE0100EA")) // OMAP
type = FS_IFS;
else
type = FS_UNKNOWN;
Expand Down

0 comments on commit b7dc487

Please sign in to comment.