--- a/imgtools/romtools/rofsbuild/r_rofs.cpp Wed Nov 17 14:41:23 2010 +0800
+++ b/imgtools/romtools/rofsbuild/r_rofs.cpp Wed Nov 17 16:47:23 2010 +0800
@@ -32,6 +32,7 @@
extern TBool gLowMem;
extern TInt gThreadNum;
extern TBool gGenSymbols;
+extern TBool gGenBsymbols;
////////////////////////////////////////////////////////////////////////
@@ -49,8 +50,10 @@
//
: iObey( aObey ), iOverhead(0)
{
- if(gGenSymbols)
+ if(gGenSymbols || gGenBsymbols) {
iSymGen = SymbolGenerator::GetInstance();
+ iSymGen->SetImageType(ERofsImage);
+ }
else
iSymGen = NULL;
@@ -263,7 +266,6 @@
}
class Worker : public boost::thread {
public:
- static boost::mutex iOutputMutex;
static void thrd_func(E32Rofs* rofs){
CBytePair bpe;
@@ -274,9 +276,12 @@
p->len = p->node->PlaceFile(p->buf, (TUint32)-1, 0, &bpe);
//no symbol for hidden file
if(rofs->iSymGen && !p->node->iEntry->iHidden)
- rofs->iSymGen->AddFile(p->node->iEntry->iFileName,(p->node->iEntry->iCompressEnabled|| p->node->iEntry->iExecutable));
- boost::mutex::scoped_lock lock(iOutputMutex);
- p->node->FlushLogMessages();
+ {
+ char* fullsystemname= p->node->iEntry->GetSystemFullName();
+ TPlacedEntry tmpEntry(p->node->iEntry->iFileName, fullsystemname, (p->node->iEntry->iCompressEnabled|| p->node->iEntry->iExecutable));
+ rofs->iSymGen->AddEntry(tmpEntry);
+ delete[] fullsystemname;
+ }
}
p = rofs->GetFileNode(deferred);
}
@@ -284,9 +289,6 @@
p = rofs->GetDeferredJob();
while(p) {
p->len = p->node->PlaceFile(p->buf, (TUint32)-1, 0, &bpe);
- iOutputMutex.lock();
- p->node->FlushLogMessages();
- iOutputMutex.unlock();
p = rofs->GetDeferredJob();
}
}
@@ -294,8 +296,6 @@
}
};
-boost::mutex Worker::iOutputMutex;
-
TPlacingSection* E32Rofs::GetFileNode(bool &aDeferred) {
//get a node from the node list, the node list is protected by mutex iMuxTree.
//The iMuxTree also helps to make sure the order in iVPS is consistent with the node list.