imgtools/romtools/rofsbuild/r_rofs.cpp
changeset 708 0757c2976f96
parent 698 e3ee96a3961c
--- a/imgtools/romtools/rofsbuild/r_rofs.cpp	Mon Nov 29 15:29:25 2010 +0800
+++ b/imgtools/romtools/rofsbuild/r_rofs.cpp	Mon Nov 29 15:37:06 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,6 +266,7 @@
 }
 class Worker : public boost::thread {
     public:
+    static boost::mutex iMutexOut;
     static void thrd_func(E32Rofs* rofs){
         CBytePair bpe;
 
@@ -273,7 +277,15 @@
                 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));
+		{
+		    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; 
+		}
+		iMutexOut.lock();
+		p->node->FlushLogMessages();
+		iMutexOut.unlock();
             }
             p = rofs->GetFileNode(deferred);
         }
@@ -288,6 +300,8 @@
     }
 };
 
+boost::mutex Worker::iMutexOut;
+
 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.