# HG changeset patch # User jjkang # Date 1277470713 -28800 # Node ID 122d2b873fd14c8dabd94717326db60af79f5268 # Parent b33dd54aaa5282f39a975c77097081a399ecbc12 Minor changes: rofsbuild diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/gcce-3.4.3/arm-none-symbianelf-2005-q1c.exe Binary file cpptoolsplat/gcce-3.4.3/arm-none-symbianelf-2005-q1c.exe has changed diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/gcce-3.4.3/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpptoolsplat/gcce-3.4.3/group/bld.inf Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,19 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +PRJ_EXPORTS + +../arm-none-symbianelf-2005-q1c.exe /epoc32/tools/distrib/arm-none-symbianelf-2005-q1c.exe + diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/gcce-3.4.3/group/gcce-3.4.3.mrp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpptoolsplat/gcce-3.4.3/group/gcce-3.4.3.mrp Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,10 @@ +component dev_build_cpptoolsplat_gcce-3.4.3 + +source /src/tools/build/cpptoolsplat/gcce-3.4.3 +exports /src/tools/build/cpptoolsplat/gcce-3.4.3/group + +notes_source ./release.txt + +ipr T +ipr O /src/tools/build/cpptoolsplat/gcce-3.4.3 + diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/gcce-3.4.3/group/release.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpptoolsplat/gcce-3.4.3/group/release.txt Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,6 @@ +NOTESRC_RELEASER +Nokia Corporation + +NOTESRC_RELEASE_REASON +gcce-3.4.3 Release + diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/gcce-4.3.2/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpptoolsplat/gcce-4.3.2/group/bld.inf Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,19 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +PRJ_EXPORTS + +../arm-none-symbianelf-2008-q3-67.exe /epoc32/tools/distrib/arm-none-symbianelf-2008-q3-67.exe + diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/gcce-4.3.2/group/gcce-4.3.2.mrp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpptoolsplat/gcce-4.3.2/group/gcce-4.3.2.mrp Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,10 @@ +component dev_build_cpptoolsplat_gcce-4.3.2 + +source /src/tools/build/cpptoolsplat/gcce-4.3.2 +exports /src/tools/build/cpptoolsplat/gcce-4.3.2/group + +notes_source ./release.txt + +ipr T +ipr O /src/tools/build/cpptoolsplat/gcce-4.3.2 + diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/gcce-4.3.2/group/release.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpptoolsplat/gcce-4.3.2/group/release.txt Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,7 @@ +NOTESRC_RELEASER +Symbian Software Ltd. (kits.notify@symbian.com) + +NOTESRC_RELEASE_REASON +gcce-4.3.2 Release + + diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/stlport/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpptoolsplat/stlport/group/bld.inf Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,29 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +PRJ_PLATFORMS +TOOLS2 + +PRJ_EXTENSIONS +START EXTENSION tools/stlport + OPTION STLPORT_VERSION 5.1.0 + OPTION STL_REL_LIB_NAME libstlport.5.1.a + OPTION STL_DEB_LIB_NAME libstlportg.5.1.a + OPTION SOURCE_ARCHIVE ../source/STLport-5.1.0.zip +END + +PRJ_EXPORTS + +:zip ../source/STLport-5.1.0_exports.zip /epoc32/include/tools/stlport \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/stlport/group/stlport.mrp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpptoolsplat/stlport/group/stlport.mrp Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,8 @@ +component dev_build_cpptoolsplat_stlport + +source \src\tools\build\cpptoolsplat\stlport +binary \src\tools\build\cpptoolsplat\stlport\group all +exports \src\tools\build\cpptoolsplat\stlport\group +notes_source \component_defs\release.src + +ipr T diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/stlport/source/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpptoolsplat/stlport/source/README.txt Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,3 @@ +The File has been manually configured, in order for it to recognise the g++ compiler. + +The Change is made to the _STLP_NATIVE_INCLUDE_PATH macro, by uncommenting it, and removing the path (../include) being pointed to by it. \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/stlport/source/STLport-5.1.0.zip Binary file cpptoolsplat/stlport/source/STLport-5.1.0.zip has changed diff -r b33dd54aaa52 -r 122d2b873fd1 cpptoolsplat/stlport/source/STLport-5.1.0_exports.zip Binary file cpptoolsplat/stlport/source/STLport-5.1.0_exports.zip has changed diff -r b33dd54aaa52 -r 122d2b873fd1 imgtools/imglib/inc/fatdefines.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imgtools/imglib/inc/fatdefines.h Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,137 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef __FAT_DEFINES_HEADER__ +#define __FAT_DEFINES_HEADER__ +#include +struct TFATBootSector { + TUint8 BS_jmpBoot[3]; + TUint8 BS_OEMName[8]; + TUint8 BPB_BytsPerSec[2]; + TUint8 BPB_SecPerClus; + TUint8 BPB_RsvdSecCnt[2]; + TUint8 BPB_NumFATs; + TUint8 BPB_RootEntCnt[2]; + TUint8 BPB_TotSec16[2]; + TUint8 BPB_Media; + TUint8 BPB_FATSz16[2]; + TUint8 BPB_SecPerTrk[2]; + TUint8 BPB_NumHeads[2]; + TUint8 BPB_HiddSec[4]; + TUint8 BPB_TotSec32[4]; +}; +struct TFAT32BSExt { + TUint8 BPB_FATSz32[4]; + TUint8 BPB_ExtFlags[2]; + TUint8 BPB_FSVer[2]; + TUint8 BPB_RootClus[4]; + TUint8 BPB_FSInfo[2]; + TUint8 BPB_BkBootSec[2]; + TUint8 BPB_Reserved[12]; +}; + +struct TFATHeader { + TUint8 BS_DrvNum ; + TUint8 BS_Reserved1; + TUint8 BS_BootSig; + TUint8 BS_VolID[4]; + TUint8 BS_VolLab[11]; + TUint8 BS_FilSysType[8]; +}; + +struct TFAT32FSInfoSector { + TUint8 FSI_LeadSig[4]; + TUint8 FSI_Reserved1[480]; + TUint8 FSI_StrucSig[4]; + TUint8 FSI_Free_Count[4]; + TUint8 FSI_Nxt_Free[4]; + TUint8 FSI_Reserved2[12]; + TUint8 FSI_TrailSig[4]; +}; +struct TShortDirEntry { + TUint8 DIR_Name[11]; + TUint8 DIR_Attr ; + TUint8 DIR_NTRes ; + TUint8 DIR_CrtTimeTenth ; + TUint8 DIR_CrtTime[2] ; + TUint8 DIR_CrtDate[2] ; + TUint8 DIR_LstAccDate[2] ; + TUint8 DIR_FstClusHI[2] ; + TUint8 DIR_WrtTime[2] ; + TUint8 DIR_WrtDate[2]; + TUint8 DIR_FstClusLO[2]; + TUint8 DIR_FileSize[4] ; +}; + +struct TLongDirEntry { + TUint8 LDIR_Ord ; + TUint8 LDIR_Name1[10] ; + TUint8 LDIR_Attr ; + TUint8 LDIR_Type ; + TUint8 LDIR_Chksum ; + TUint8 LDIR_Name2[12] ; + TUint8 LDIR_FstClusLO[2] ; + TUint8 LDIR_Name3[4] ; +}; +const TUint8 ATTR_READ_ONLY = 0x01 ; +const TUint8 ATTR_HIDDEN = 0x02; +const TUint8 ATTR_SYSTEM = 0x04; +const TUint8 ATTR_VOLUME_ID = 0x08; +const TUint8 ATTR_DIRECTORY = 0x10; +const TUint8 ATTR_ARCHIVE = 0x20; +const TUint8 ATTR_LONG_NAME = ATTR_READ_ONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUME_ID; + +//Time format, should be written as a integer in FAT image +struct FatTime +{ + TUint16 Seconds:5; + TUint16 Minute:6; + TUint16 Hour:5; +}; + +//Date format, should be written as a integer in FAT image +struct FatDate +{ + TUint16 Day:5; + TUint16 Month:4; + TUint16 Year:7; +}; + +//This union convention used to convert bit fields into integer +union TDateInteger +{ + FatDate iCurrentDate; + TUint16 iImageDate; +}; + +//This union convention used to convert bit fields into integer +union TTimeInteger +{ + FatTime iCurrentTime; + TUint16 iImageTime; +}; +struct ConfigurableFatAttributes +{ + char iDriveVolumeLabel[12]; + TInt64 iImageSize ; + TUint16 iDriveSectorSize; + TUint8 iSectorPerCluster ; + TUint8 iDriveNoOfFATs; + ConfigurableFatAttributes():iImageSize(0),iDriveSectorSize(512),iSectorPerCluster(0),iDriveNoOfFATs(2){ + memcpy(iDriveVolumeLabel,"NO NAME \0",12); + } +}; +#endif diff -r b33dd54aaa52 -r 122d2b873fd1 imgtools/romtools/rofsbuild/fatcluster.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imgtools/romtools/rofsbuild/fatcluster.cpp Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,57 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#include "fatcluster.h" +#include +#include +#include + +TFatCluster::TFatCluster(int aIndex,int aActClustCnt/* = 1*/) :iIndex(aIndex), iActualClusterCount(aActClustCnt), +iSize(0) ,iData(0),iFileName(0),iLazy(true){ +} + +TFatCluster::~TFatCluster() { + if(iData) + delete []iData ; + if(iFileName) + delete []iFileName; +} + + +bool TFatCluster::Init(TUint aSize) { + if(iData == 0){ + iData = reinterpret_cast(new(std::nothrow) char[aSize]); + if(iData == 0) + return false ; + memset(iData,0,aSize); + iSize = aSize ; + iLazy = false ; + return true ; + } + return false ; +} +bool TFatCluster::LazyInit(const char* aFileName,TUint aFileSize){ + if(iFileName == 0){ + int len = strlen(aFileName) + 1; + iFileName = new(std::nothrow) char[len] ; + if(iFileName == 0) + return false ; + iLazy = true ; + memcpy(iFileName,aFileName,len); + iSize = aFileSize ; + } + return false; +} diff -r b33dd54aaa52 -r 122d2b873fd1 imgtools/romtools/rofsbuild/fatcluster.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imgtools/romtools/rofsbuild/fatcluster.h Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef __FAT_CLUSTER_HEADER__ +#define __FAT_CLUSTER_HEADER__ +#include +class TFatCluster { +public: + TFatCluster(int aIndex,int aActClustCnt = 1); + ~TFatCluster(); + bool Init(TUint aSize); + bool LazyInit(const char* aFileName,TUint aFileSize); + inline TUint8* GetData() const {return iData ; } + inline TUint GetSize() const { return iSize ;} + inline const char* GetFileName() const { return iFileName ;} + inline bool IsLazy() const { return iLazy;} + inline int ActualClusterCount() const { return iActualClusterCount;} + inline int GetIndex() const { return iIndex ;} +protected: + int iIndex ; + int iActualClusterCount ; + TUint iSize ; // length of file or size of data + TUint8* iData ; + char* iFileName ; + bool iLazy ; +}; + +#endif diff -r b33dd54aaa52 -r 122d2b873fd1 imgtools/romtools/rofsbuild/fatimagegenerator.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imgtools/romtools/rofsbuild/fatimagegenerator.cpp Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,541 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#include "fatimagegenerator.h" +#include "fatcluster.h" +#include "fsnode.h" +#include "h_utl.h" + +#include +#include +#include +#include +#include +using namespace std; + +const TInt KCharsOfCmdWndLine = 80 ; +const TInt KRootEntryCount = 0x200; +const TInt KRootClusterIndex = 0; + +TFatImgGenerator::TFatImgGenerator(TSupportedFatType aType ,ConfigurableFatAttributes& aAttr ) : +iType(aType), +iFatTable(0), +iFatTableBytes(0), +iTotalClusters(0), +iBytsPerClus(0) +{ + memset(&iBootSector,0,sizeof(iBootSector)); + memset(&iFat32Ext,0,sizeof(iFat32Ext)); + memset(&iFatHeader,0,sizeof(iFatHeader)); + if(aAttr.iDriveSectorSize != 512 && aAttr.iDriveSectorSize != 1024 && aAttr.iDriveSectorSize != 2048 && aAttr.iDriveSectorSize != 4096) { + iType = EFatUnknown ; + return ; + } + *((TUint32*)iBootSector.BS_jmpBoot) = 0x00905AEB ; + memcpy(iBootSector.BS_OEMName,"SYMBIAN ",8); + *((TUint16 *)iBootSector.BPB_BytsPerSec) = aAttr.iDriveSectorSize; + + iBootSector.BPB_NumFATs = aAttr.iDriveNoOfFATs; + iBootSector.BPB_Media = 0xF8 ; + iFatHeader.BS_DrvNum = 0x80 ; + iFatHeader.BS_BootSig = 0x29 ; + + time_t rawtime; + time(&rawtime); + *((TUint32*)iFatHeader.BS_VolID) = (TUint32)rawtime; + memcpy(iFatHeader.BS_VolLab,aAttr.iDriveVolumeLabel,sizeof(iFatHeader.BS_VolLab)); + if(aAttr.iImageSize == 0){ + if(aType == EFat32) + aAttr.iImageSize = 0x100000000LL ;// 4G + else + aAttr.iImageSize = 0x40000000LL ; // 1G + } + + TUint32 totalSectors = (TUint32)((aAttr.iImageSize + aAttr.iDriveSectorSize - 1) / aAttr.iDriveSectorSize); + if(aType == EFat32) { + InitAsFat32(totalSectors,aAttr.iSectorPerCluster ,aAttr.iDriveSectorSize); + } + else if(aType == EFat16) { + InitAsFat16(totalSectors,aAttr.iSectorPerCluster,aAttr.iDriveSectorSize); + } + if(iType == EFatUnknown) return ; + iBytsPerClus = iBootSector.BPB_SecPerClus * aAttr.iDriveSectorSize; +// if(iBytsPerClus > KMaxClusterBytes){ +// Print(EError,"Cluster too large!\n"); +// iType = EFatUnknown; +// return ; +// } + + +} +TFatImgGenerator::~TFatImgGenerator() { + if(iFatTable) + delete []iFatTable; + Interator it = iDataClusters.begin(); + while(it != iDataClusters.end()){ + TFatCluster* cluster = *it ; + delete cluster; + it++; + } +} + +void TFatImgGenerator::InitAsFat16(TUint32 aTotalSectors,TUint8 aSecPerClus,TUint16 aBytsPerSec){ + + TUint32 numOfClusters ; + if(aSecPerClus == 0) { + //Auto-calc the SecPerClus + // FAT32 ,Count of clusters must >= 4085 and < 65525 , however , to avoid the "off by xx" warning, + // proprositional value >= (4085 + 16) && < (65525 - 16) + if(aTotalSectors < (4085 + 16)) { //when SecPerClus is 1, numOfClusters eq to aTotalSectors + iType = EFatUnknown ; + Print(EError,"Size is too small for FAT16, please set a bigger size !\n"); + return ; + } + TUint8 secPerClusMax = KMaxClusterBytes / aBytsPerSec; + numOfClusters = (aTotalSectors + secPerClusMax - 1) / secPerClusMax ; + if(numOfClusters >= (65525 - 16)) { // too big + iType = EFatUnknown ; + Print(EError,"Size is too big for FAT16, please use the FAT32 format!\n"); + return ; + } + + aSecPerClus = 1; + while(aSecPerClus < secPerClusMax){ + numOfClusters = (aTotalSectors + aSecPerClus - 1) / aSecPerClus ; + if (numOfClusters >= (4085 + 16) && numOfClusters < (65525 - 16)) { + break; + } + aSecPerClus <<= 1 ; + } + } + else { + if( (aSecPerClus * aBytsPerSec) > KMaxClusterBytes){ + Print(EError,"Cluster too large!\n"); + iType = EFatUnknown; + return ; + } + numOfClusters = (aTotalSectors + aSecPerClus - 1) / aSecPerClus; + if(numOfClusters >= (65525 - 16)){ + Print(EError,"Cluster count is too big for FAT16, please use the FAT32 format or set a new bigger sector count of cluster!\n"); + iType = EFatUnknown ; + return ; + } + else if(numOfClusters < (4085 + 16)){ + Print(EError,"Cluster count is too small for FAT16, please set a new small sector count of cluster or set the size bigger!\n"); + iType = EFatUnknown ; + return ; + } + + } + iTotalClusters = (aTotalSectors + aSecPerClus - 1) / aSecPerClus ; + iFatTableBytes = ((iTotalClusters << 1) + aBytsPerSec - 1) & (~(aBytsPerSec - 1)); + iFatTable = new(std::nothrow) char[iFatTableBytes]; + if(!iFatTable) { + Print(EError,"Memory allocation failed for FAT16 Table!\n"); + iType = EFatUnknown ; + return ; + } + memset(iFatTable,0,iFatTableBytes); + *((TUint32*)iFatTable) = 0xFFFFFFF8 ; + iBootSector.BPB_SecPerClus = aSecPerClus; + *((TUint16*)iBootSector.BPB_RsvdSecCnt) = 0x0001 ; + *((TUint16*)iBootSector.BPB_RootEntCnt) = KRootEntryCount ; + if(aTotalSectors > 0xFFFF) + *((TUint32*)iBootSector.BPB_TotSec32) = aTotalSectors; + else + *((TUint16*)iBootSector.BPB_TotSec16) = (TUint16)aTotalSectors; + TUint16 sectorsForFAT = (TUint16)((iFatTableBytes + aBytsPerSec - 1) / aBytsPerSec); + *((TUint16*)iBootSector.BPB_FATSz16) = sectorsForFAT ; + memcpy(iFatHeader.BS_FilSysType,"FAT16 ",sizeof(iFatHeader.BS_FilSysType)); +} +void TFatImgGenerator::InitAsFat32(TUint32 aTotalSectors,TUint8 aSecPerClus,TUint16 aBytsPerSec) { + + TUint32 numOfClusters; + if(aSecPerClus == 0) { + //Auto-calc the SecPerClus + // FAT32 ,Count of clusters must >= 65525, however , to avoid the "off by xx" warning, + // proprositional value >= (65525 + 16) + if(aTotalSectors < (65525 + 16)) { //when SecPerClus is 1, numOfClusters eq to aTotalSectors + iType = EFatUnknown ; + Print(EError,"Size is too small for FAT32, please use the FAT16 format, or set the data size bigger!\n"); + return ; + } + + TUint8 secPerClusMax = KMaxClusterBytes / aBytsPerSec; + aSecPerClus = secPerClusMax; + while(aSecPerClus > 1){ + numOfClusters = (aTotalSectors + aSecPerClus - 1) / aSecPerClus ; + if (numOfClusters >= (65525 + 16)) { + break; + } + aSecPerClus >>= 1 ; + } + } + else { + if( (aSecPerClus * aBytsPerSec) > KMaxClusterBytes){ + Print(EError,"Cluster too large!\n"); + iType = EFatUnknown; + return ; + } + numOfClusters = (aTotalSectors + aSecPerClus - 1) / aSecPerClus; + if(numOfClusters < (65525 + 16)) { + Print(EError,"Cluster count is too small for FAT32, please set a new small sector count of cluster or set the size bigger or use the FAT16 format!\n"); + iType = EFatUnknown ; + return ; + } + + } + iTotalClusters = (aTotalSectors + aSecPerClus - 1) / aSecPerClus ; + iFatTableBytes = ((iTotalClusters << 2) + aBytsPerSec - 1) & (~(aBytsPerSec - 1)); + iFatTable = new(std::nothrow) char[iFatTableBytes]; + if(!iFatTable) { + Print(EError,"Memory allocation failed for FAT32 Table!\n"); + iType = EFatUnknown ; + return ; + } + memset(iFatTable,0,iFatTableBytes); + TUint32* fat32table = reinterpret_cast(iFatTable); + fat32table[0] = 0x0FFFFFF8 ; + fat32table[1] = 0x0FFFFFFF ; + iBootSector.BPB_SecPerClus = aSecPerClus; + iBootSector.BPB_RsvdSecCnt[0] = 0x20 ; + *((TUint32*)iBootSector.BPB_TotSec32) = aTotalSectors; + *((TUint32*)iFat32Ext.BPB_FATSz32) = (iFatTableBytes + aBytsPerSec - 1) / aBytsPerSec; + *((TUint32*)iFat32Ext.BPB_RootClus) = 2 ; + *((TUint16*)iFat32Ext.BPB_FSInfo) = 1 ; + *((TUint16*)iFat32Ext.BPB_BkBootSec) = 6 ; + memcpy(iFatHeader.BS_FilSysType,"FAT32 ",sizeof(iFatHeader.BS_FilSysType)); +} + +bool TFatImgGenerator::Execute(TFSNode* aRootDir , const char* aOutputFile){ + if(EFatUnknown == iType) + return false ; + ofstream o(aOutputFile,ios_base::binary + ios_base::out + ios_base::trunc); + TUint32 writtenBytes = 0 ; + if(!o.is_open()) { + Print(EError,"Can not open \"%s\" for writing !\n",aOutputFile) ; + return false; + } + TUint16 bytsPerSector = *((TUint16*)iBootSector.BPB_BytsPerSec); + Interator it = iDataClusters.begin(); + while(it != iDataClusters.end()){ + TFatCluster* cluster = *it ; + delete cluster; + it++; + } + iDataClusters.clear(); + Print(EAlways,"Filesystem ready.\nWriting Header..."); + + if(EFat16 == iType){ + char* header = new(std::nothrow) char[bytsPerSector]; + if(!header){ + Print(EError,"Can not allocate memory for FAT16 header!\n"); + o.close(); + return false ; + } + int offset = 0; + memcpy(header,&iBootSector,sizeof(iBootSector)); + offset = sizeof(iBootSector); + memcpy(&header[offset],&iFatHeader,sizeof(iFatHeader)); + offset += sizeof(iFatHeader); + memset(&header[offset],0,bytsPerSector - offset); + *((TUint16*)(&header[510])) = 0xAA55 ; + + o.write(header,bytsPerSector); + writtenBytes += bytsPerSector; + delete []header ; + TUint16 rootDirSectors = (KRootEntryCount * 32) / bytsPerSector ; + TUint16 rootDirClusters = (rootDirSectors + iBootSector.BPB_SecPerClus - 1) /iBootSector.BPB_SecPerClus; + TUint32 rootDirBytes = KRootEntryCount * 32; + TFatCluster* rootDir = new(std::nothrow) TFatCluster(0,rootDirClusters); + rootDir->Init(rootDirBytes); + iDataClusters.push_back(rootDir); + aRootDir->WriteDirEntries(KRootClusterIndex,rootDir->GetData()); + + TUint index = 2 ; + Print(EAlways," OK.\nPreparing cluster list..."); + TFSNode* child = aRootDir->GetFirstChild() ; + while(child){ + if(!PrepareClusters(index,child)){ + Print(EAlways," Failed.\nError:Image size is expected to be big enough for all the files.\n"); + return false ; + } + child = child->GetSibling() ; + } + } + else if(EFat32 == iType){ + + TUint headerSize = ( bytsPerSector << 5 ); // 32 reserved sectors for fat32 + char* header = new(std::nothrow) char[headerSize]; + if(!header){ + Print(EError,"Can not allocate memory for FAT32 header!\n"); + o.close(); + return false ; + } + memset(header,0,headerSize); + + int offset = 0; + memcpy(header,&iBootSector,sizeof(iBootSector)); + offset = sizeof(iBootSector); + memcpy(&header[offset],&iFat32Ext,sizeof(iFat32Ext)); + offset += sizeof(iFat32Ext); + memcpy(&header[offset],&iFatHeader,sizeof(iFatHeader)); + offset += sizeof(iFatHeader); + + TFAT32FSInfoSector* fsinfo = reinterpret_cast(&header[bytsPerSector]); + *((TUint32*)fsinfo->FSI_LeadSig) = 0x41615252 ; + *((TUint32*)fsinfo->FSI_StrucSig) = 0x61417272 ; + memset(fsinfo->FSI_Free_Count,0xFF,8); + char* tailed = header + 510 ; + for(int i = 0 ; i < 32 ; i++ , tailed += bytsPerSector ) + *((TUint16*)tailed) = 0xAA55 ; + + TUint index = 2 ; + Print(EAlways," OK.\nPreparing cluster list..."); + if(!PrepareClusters(index,aRootDir)) { + Print(EAlways," Failed.\nERROR: Image size is expected to be big enough for all the files.\n"); + delete []header ; + return false; + } + + + *(TUint32*)(fsinfo->FSI_Free_Count) = iTotalClusters - index + 3; + *(TUint32*)(fsinfo->FSI_Nxt_Free) = index ; + + // write bakup boot sectors + memcpy(&header[bytsPerSector * 6],header,(bytsPerSector << 1)); + o.write(header,headerSize); + writtenBytes += headerSize; + delete []header ; + } + //iDataClusters.sort(); + it = iDataClusters.end() ; + it -- ; + int clusters = (*it)->GetIndex() + (*it)->ActualClusterCount() - 1; + + Print(EAlways," OK.\n%d clusters of data need to be written.\nWriting Fat table...",clusters); + for(TUint8 w = 0 ; w < iBootSector.BPB_NumFATs ; w++){ + o.write(iFatTable,iFatTableBytes); + if(o.bad() || o.fail()){ + Print(EAlways,"\nERROR:Writting failed. Please check the filesystem\n"); + delete []iFatTable, + o.close(); + return false ; + } + writtenBytes += iFatTableBytes; + } + char* buffer = new(std::nothrow) char[KBufferedIOBytes]; + if(!buffer){ + Print(EError,"Can not allocate memory for I/O buffer !\n"); + o.close(); + return false ; + } + o.flush(); + Print(EAlways," OK.\nWriting clusters data..."); + + int bytesInBuffer = 0; + int writeTimes = 24; + + TFatCluster* lastClust = 0 ; + for(it = iDataClusters.begin(); it != iDataClusters.end() ; it++ ){ + TFatCluster* cluster = *it ; + TUint fileSize = cluster->GetSize(); + TUint toProcess = cluster->ActualClusterCount() * iBytsPerClus ; + if(toProcess > KBufferedIOBytes){ // big file + if(bytesInBuffer > 0){ + o.write(buffer,bytesInBuffer); + if(o.bad() || o.fail()){ + Print(EError,"Writting failed.\n"); + delete []buffer, + o.close(); + return false ; + } + writtenBytes += bytesInBuffer; + bytesInBuffer = 0; + Print(EAlways,"."); + writeTimes ++ ; + if((writeTimes % KCharsOfCmdWndLine) == 0){ + o.flush(); + cout << endl ; + } + } + if(cluster->IsLazy()){ + ifstream ifs(cluster->GetFileName(), ios_base::binary + ios_base::in); + if(!ifs.is_open()){ + Print(EError,"Can not open file \"%s\"\n",cluster->GetFileName()) ; + o.close(); + delete []buffer; + return false ; + } + if(!ifs.good()) ifs.clear(); + TUint processedBytes = 0 ; + + while(processedBytes < fileSize){ + TUint ioBytes = fileSize - processedBytes ; + if(ioBytes > KBufferedIOBytes) + ioBytes = KBufferedIOBytes; + ifs.read(buffer,ioBytes); + processedBytes += ioBytes; + o.write(buffer,ioBytes); + if(o.bad() || o.fail()){ + Print(EError,"Writting failed.\n"); + delete []iFatTable, + o.close(); + return false ; + } + writtenBytes += ioBytes; + Print(EAlways,"."); + writeTimes ++ ; + if((writeTimes % KCharsOfCmdWndLine) == 0){ + o.flush(); + Print(EAlways,"\n") ; + } + + } + TUint paddingBytes = toProcess - processedBytes; + if( paddingBytes > 0 ){ + memset(buffer,0,paddingBytes); + o.write(buffer,paddingBytes); + if(o.bad() || o.fail()){ + Print(EError,"Writting failed.\n"); + delete []buffer, + o.close(); + return false ; + } + writtenBytes += paddingBytes; + } + ifs.close(); + + } + else { + // impossible + Print(EError,"Unexpected result!\n"); + o.close(); + delete []buffer; + return false ; + } + } + else { + if(toProcess > (KBufferedIOBytes - bytesInBuffer)){ + o.write(buffer,bytesInBuffer); + if(o.bad() || o.fail()){ + Print(EError,"Writting failed.\n"); + delete []buffer, + o.close(); + return false ; + } + writtenBytes += bytesInBuffer; + Print(EAlways,"."); + writeTimes ++ ; + if((writeTimes % KCharsOfCmdWndLine) == 0){ + o.flush(); + cout << endl ; + } + bytesInBuffer = 0; + } + if(cluster->IsLazy()){ + ifstream ifs(cluster->GetFileName(), ios_base::binary + ios_base::in); + if(!ifs.is_open()){ + Print(EError,"Can not open file \"%s\"\n",cluster->GetFileName()) ; + o.close(); + delete []buffer; + return false ; + } + if(!ifs.good()) ifs.clear(); + ifs.read(&buffer[bytesInBuffer],fileSize); + bytesInBuffer += fileSize; + if(toProcess > fileSize) { // fill padding bytes + memset(&buffer[bytesInBuffer],0,toProcess - fileSize); + bytesInBuffer += (toProcess - fileSize); + } + ifs.close(); + + } + else{ + if(toProcess != cluster->GetSize() && cluster->GetIndex() != KRootClusterIndex){ + Print(EError,"Unexpected size!\n"); + o.close(); + delete []buffer; + return false ; + } + memcpy(&buffer[bytesInBuffer],cluster->GetData(),cluster->GetSize()); + bytesInBuffer += cluster->GetSize(); + } + + } + lastClust = cluster ; + + } + if(bytesInBuffer > 0){ + o.write(buffer,bytesInBuffer); + if(o.bad() || o.fail()){ + Print(EError,"Writting failed.\n"); + delete []buffer, + o.close(); + return false ; + } + writtenBytes += bytesInBuffer; + o.flush(); + } + Print(EAlways,"\nDone.\n\n"); + o.close(); + + return true ; +} +bool TFatImgGenerator::PrepareClusters(TUint& aNextClusIndex,TFSNode* aNode) { + TUint sizeOfItem = aNode->GetSize(); + TUint clusters = (sizeOfItem + iBytsPerClus - 1) / iBytsPerClus; + + if(iTotalClusters < aNextClusIndex + clusters) + return false ; + + TUint16* fat16Table = reinterpret_cast(iFatTable); + TUint32* fat32Table = reinterpret_cast(iFatTable); + + for(TUint i = aNextClusIndex + clusters - 1 ; i > aNextClusIndex ; i--){ + if(iType == EFat16) + fat16Table[i - 1] = i ; + else + fat32Table[i - 1] = i ; + } + if(iType == EFat16) + fat16Table[aNextClusIndex + clusters - 1] = 0xffff ; + else + fat32Table[aNextClusIndex + clusters - 1] = 0x0fffffff ; + + TFatCluster* cluster = new TFatCluster(aNextClusIndex,clusters); + if(aNode->IsDirectory()) { + TUint bytes = clusters * iBytsPerClus ; + cluster->Init(bytes); + aNode->WriteDirEntries(aNextClusIndex,cluster->GetData()); + } + else { + cluster->LazyInit(aNode->GetPCSideName(),sizeOfItem); + aNode->WriteDirEntries(aNextClusIndex,NULL); + } + iDataClusters.push_back(cluster); + + aNextClusIndex += clusters; + if(aNode->GetFirstChild()){ + if(!PrepareClusters(aNextClusIndex,aNode->GetFirstChild())) + return false ; + } + if(aNode->GetSibling()){ + if(!PrepareClusters(aNextClusIndex,aNode->GetSibling())) + return false; + } + return true ; +} diff -r b33dd54aaa52 -r 122d2b873fd1 imgtools/romtools/rofsbuild/fatimagegenerator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imgtools/romtools/rofsbuild/fatimagegenerator.h Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,70 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef __FAT_IMAGE_GENERATER_HEADER__ +#define __FAT_IMAGE_GENERATER_HEADER__ + +#include "fatdefines.h" + +#include +#include +#include +using namespace std ; +const unsigned int KBufferedIOBytes = 0x800000 ; // 8M +const unsigned int KMaxClusterBytes = 0x8000; // 32K +enum TSupportedFatType { + EFatUnknown = 0, + EFat16 = 1, + EFat32 = 2 +}; + +class TFSNode; +class TFatCluster; +typedef list PFatClusterList ; +typedef list::iterator Interator ; + +class TFatImgGenerator +{ +public : + //The constructor , + //a TFatImgGenerator is created and initialized, + //if the parameters breaks the FAT specification, + // then iType is set to EFatUnknown and thus + // IsValid return false + TFatImgGenerator(TSupportedFatType aType , ConfigurableFatAttributes& aAttr ); + ~TFatImgGenerator(); + inline bool IsValid() const { return (EFatUnknown != iType);} + + //Create the FAT image, + //If FAT image is not valid, or error accurs, return false + bool Execute(TFSNode* aRootDir , const char* aOutputFile); +protected : + void InitAsFat16(TUint32 aTotalSectors,TUint8 aSecPerClus,TUint16 aBytsPerSec); + void InitAsFat32(TUint32 aTotalSectors,TUint8 aSecPerClus,TUint16 aBytsPerSec); + bool PrepareClusters(TUint& aNextClusIndex,TFSNode* aNode); + TSupportedFatType iType ; + char* iFatTable ; + TUint iFatTableBytes ; + TUint iTotalClusters ; + TUint iBytsPerClus ; + TFATBootSector iBootSector ; + TFAT32BSExt iFat32Ext ; + TFATHeader iFatHeader ; + PFatClusterList iDataClusters ; +}; + + +#endif diff -r b33dd54aaa52 -r 122d2b873fd1 imgtools/romtools/rofsbuild/fsnode.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imgtools/romtools/rofsbuild/fsnode.cpp Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,518 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#include "fsnode.h" +#include "fatdefines.h" +#include "utf16string.h" +#include +#include +#include +#include +#include + +#include + + +#ifdef __LINUX__ +#include +#include +#include +#define SPLIT_CHAR '/' +#else +#include +#include //TODO: check under MinGW4 + stlport 5.2 +#include +#define SPLIT_CHAR '\\' +#endif + +using namespace std; + +const TUint KBytesPerEntry = 13 ; +// +TFSNode::TFSNode(TFSNode* aParent, const char* aFileName, TUint8 aAttrs, const char* aPCSideName) : +iParent(aParent),iFirstChild(0),iSibling(0),iAttrs(aAttrs), iPCSideName(0), iWideName(0){ + + // According to the FAT specification, short name should be inited with empty string (' ' string) + memset(iShortName,0x20,11); + iShortName[11] = 0 ; + if(aFileName) { + iFileName = strdup(aFileName); + GenerateBasicName() ; + } + if(aPCSideName) { + iPCSideName = strdup(aPCSideName); + } + iFATEntry = 0; + iCrtTimeTenth = 0; + iCrtTime.iImageTime = 0 ; + iCrtDate.iImageDate = 0 ; + iLstAccDate.iImageDate = 0 ; + iWrtTime.iImageTime = 0 ; + iWrtDate.iImageDate = 0 ; + iFileSize = 0; + if(!iParent) return ; + + if(!iParent->iFirstChild) + iParent->iFirstChild = this ; + else { + TFSNode* sibling = iParent->iFirstChild; + while(sibling->iSibling) + sibling = sibling->iSibling ; + sibling->iSibling = this ; + } + +} +TFSNode::~TFSNode(){ + if(iFirstChild) + delete iFirstChild ; + if(iSibling) + delete iSibling ; + if(iFileName) + free(iFileName) ; + if(iWideName) + delete iWideName; +} +TFSNode* TFSNode::CreateFromFolder(const char* aPath,TFSNode* aParent) { + static char fileName[2048]; + int len = strlen(aPath); +#ifdef __LINUX__ + DIR* dir = opendir(aPath); + if(dir == NULL) { + cout << aPath << " does not contain any subfolder/file.\n"; + return aParent; + } + if(!aParent) + aParent = new TFSNode(NULL,"/",ATTR_VOLUME_ID); + dirent* entry; + struct stat statbuf ; + while ((entry = readdir(dir)) != NULL) { + if(entry->d_name[0] == '.') continue ; + memcpy(fileName,aPath,len); + fileName[len] = SPLIT_CHAR; + strcpy(&fileName[len+1],entry->d_name); + stat(fileName , &statbuf); + TFSNode* pNewItem = new TFSNode(aParent,fileName,S_ISDIR(statbuf.st_mode) ? ATTR_DIRECTORY : 0); + pNewItem->Init(statbuf.st_ctime,statbuf.st_atime,statbuf.st_mtime,statbuf.st_size); + if(S_ISDIR(statbuf.st_mode)){ + CreateFromFolder(fileName,pNewItem); + } + } + closedir(dir); +#else + struct _finddata_t data ; + memset(&data, 0, sizeof(data)); + char* pattern = new char[len + 4] ; + memcpy(pattern,aPath,len); + pattern[len] = SPLIT_CHAR; + pattern[len+1] = '*'; + pattern[len+2] = 0; + + intptr_t hFind = _findfirst(pattern,&data); + delete []pattern ; + + if(hFind == (intptr_t)-1 ) { + cout << aPath << " does not contain any subfolder/file.\n"; + return aParent; + } + if(!aParent) + aParent = new TFSNode(NULL,"/",ATTR_VOLUME_ID); + do { + if(data.name[0] == '.') + continue ; + memcpy(fileName,aPath,len); + fileName[len] = SPLIT_CHAR; + strcpy(&fileName[len+1],data.name); + TUint8 attr = 0; + if(data.attrib & _A_SUBDIR) + attr |= ATTR_DIRECTORY; + if(data.attrib & _A_RDONLY) + attr |= ATTR_READ_ONLY ; + if(data.attrib & _A_HIDDEN) + attr |= ATTR_HIDDEN ; + if(data.attrib & _A_SYSTEM) + attr |= ATTR_SYSTEM ; + if(data.attrib & _A_ARCH) + attr |= ATTR_ARCHIVE; + TFSNode* pNewItem = new TFSNode(aParent,fileName,attr); + pNewItem->Init(data.time_create,data.time_access,data.time_write,data.size); + if(data.attrib & _A_SUBDIR){ + CreateFromFolder(fileName,pNewItem); + } + + } while(-1 != _findnext(hFind, &data)); + _findclose(hFind); +#endif + + return aParent; +} + + + +static const char* lbasename(const char* aFullName) { + const char* retval = aFullName ; + while(*aFullName) { + if('\\' == *aFullName || '/' == *aFullName ) + retval = ++aFullName ; + else + aFullName ++ ; + } + return retval ; +} +/** GenerateBasicName : Generate the short name according to long name + * + * algorithm : + * + * 1. The UNICODE name passed to the file system is converted to upper case. + * 2. The upper cased UNICODE name is converted to OEM. + * if (the uppercased UNICODE glyph does not exist as an OEM glyph in the OEM code page) + * or (the OEM glyph is invalid in an 8.3 name) + * { + * Replace the glyph to an OEM '_' (underscore) character. + * Set a "lossy conversion" flag. + * } + * 3. Strip all leading and embedded spaces from the long name. + * 4. Strip all leading periods from the long name. + * 5. While (not at end of the long name) + * and (char is not a period) + * and (total chars copied < 8) + * { + * Copy characters into primary portion of the basis name + * } + * 6. Insert a dot at the end of the primary components of the basis-name + * if the basis name has an extension after the last period in the name. + * + * 7. Scan for the last embedded period in the long name. + * If (the last embedded period was found) + * { + * While (not at end of the long name) and (total chars copied < 3) + * { + * Copy characters into extension portion of the basis name + * } + * } + * + */ +void TFSNode::GenerateBasicName() { + const char* filename = lbasename(iFileName); + TUint length = strlen(filename); + if(0 == length) + return ; + if(0 == strcmp(filename,".")){ + iShortName[0] = '.' ; + return ; + } + if(0 == strcmp(filename,"..")){ + iShortName[0] = '.' ; + iShortName[1] = '.' ; + return ; + } +#ifdef _DEBUG + cout << "GenericBasicName: \"" << filename ; +#endif + iWideName = new UTF16String(filename,length); // The unicode string + char base[10]; + const char* ext = filename + length; + + //Strip all leading periods and spaces from the long name. + while(*filename == '.' || *filename == ' ' || *filename == '\t') { + filename ++ ; + length -- ; + } + //find the extension + while(ext > filename && *ext != '.') + ext -- ; + if(ext == filename){ + ext = "" ; + } + else { + length = ext - filename; + ext ++ ; + } + bool lossyConv = false ; + TUint bl = 0; + for(TUint i = 0 ; i < length ; i++) { + if(filename[i] >= 'a' && filename[i] <= 'z') + base[bl++] = filename[i] + 'A' - 'a'; + else if(filename[i] >= 'A' && filename[i] <= 'Z') + base[bl++] = filename[i]; + else if(filename[i] == '$' || filename[i] == '%' || + filename[i] == '-' || filename[i] == '_' || filename[i] == '@' || + filename[i] == '~' || filename[i] == '`' || filename[i] == '!' || + filename[i] == '(' || filename[i] == ')' || filename[i] == '{' || + filename[i] == '}' || filename[i] == '^' || filename[i] == '#' || + filename[i] == '&' ||filename[i] == '\'') + base[bl++] = filename[i]; + else if(filename[i] != ' ' && filename[i] != '.'){ + base[bl++] = '_'; + lossyConv = true ; + } + if(bl > 8){ + bl -- ; + lossyConv = true ; + break ; + } + } + if(lossyConv){ + if(bl > 6) bl = 6 ; + iShortName[bl] = '~'; + iShortName[bl+1] = '1'; + } + memcpy(iShortName,base,bl); + + //Copy the extension part. + TUint ei = 8; + for(TUint e = 0; ei < 11 && ext[e] != 0 ; e++){ + if(ext[e] >= 'a' && ext[e] <= 'z') + iShortName[ei++] = ext[e] + 'A' - 'a'; + else if(ext[e] >= 'A' && ext[e] <= 'Z') + iShortName[ei++] = ext[e] ; + else if(ext[e] == '$' || ext[e] == '%' || ext[e] == '-' || ext[e] == '_' || + ext[e] == '@' || ext[e] == '~' || ext[e] == '`' || ext[e] == '!' || + ext[e] == '(' || ext[e] == ')' || ext[e] == '{' || ext[e] == '}' || + ext[e] == '^' || ext[e] == '#' || ext[e] == '&' ||ext[e] == '\'') + iShortName[ei++] = ext[e] ; + } + + if(iParent) + iParent->MakeUniqueShortName(iShortName,bl); +#ifdef _DEBUG + cout << "\" => \"" << iShortName << "\"\n"; +#endif +} + +#ifdef _DEBUG +void TFSNode::PrintTree(int nTab) { + for( int i = 0 ; i < nTab ; i++ ) + cout << " " ; + cout << (iFileName ? iFileName : "") << " [" << hex << setw(2) << setfill('0') << (unsigned short)iAttrs << "] \n" ; + if(iFirstChild) + iFirstChild->PrintTree(nTab + 2); + if(iSibling) + iSibling->PrintTree(nTab); +} +#endif +bool TFSNode::IsDirectory() const { + return 0 != (iAttrs & ATTR_DIRECTORY); +} +int TFSNode::GetWideNameLength() const { + if(!iWideName) + return 0 ; + return iWideName->length() ; +} +TUint TFSNode::GetSize() const { + + if( 0 == (iAttrs & ATTR_DIRECTORY)) + return iFileSize ; + TUint retVal = sizeof(TShortDirEntry) ; // the tailed entry + if(iParent) + retVal += sizeof(TShortDirEntry) * 2 ; + TFSNode* child = iFirstChild ; + while(child) { + TUint longNameEntries = (child->GetWideNameLength() + KBytesPerEntry) / KBytesPerEntry ; + retVal += longNameEntries * sizeof(TLongDirEntry) ; + retVal += sizeof(TShortDirEntry); + child = child->iSibling ; + } + return retVal ; +} + +void TFSNode::Init(time_t aCreateTime, time_t aAccessTime, time_t aWriteTime, TUint aSize ) { + + struct tm* temp = localtime(&aCreateTime); + iCrtDate.iCurrentDate.Day = temp->tm_mday; + iCrtDate.iCurrentDate.Month = temp->tm_mon+1; //As per FAT spec + iCrtDate.iCurrentDate.Year = temp->tm_year - 80;//As per FAT spec + iCrtTime.iCurrentTime.Hour = temp->tm_hour; + iCrtTime.iCurrentTime.Minute = temp->tm_min; + iCrtTime.iCurrentTime.Seconds = temp->tm_sec / 2;//As per FAT spec + iCrtTimeTenth = 0; + + temp = localtime(&aAccessTime); + iLstAccDate.iCurrentDate.Day = temp->tm_mday; + iLstAccDate.iCurrentDate.Month = temp->tm_mon+1; //As per FAT spec + iLstAccDate.iCurrentDate.Year = temp->tm_year - 80;//As per FAT spec + + temp = localtime(&aWriteTime); + iWrtDate.iCurrentDate.Day = temp->tm_mday; + iWrtDate.iCurrentDate.Month = temp->tm_mon+1; //As per FAT spec + iWrtDate.iCurrentDate.Year = temp->tm_year - 80;//As per FAT spec + iWrtTime.iCurrentTime.Hour = temp->tm_hour; + iWrtTime.iCurrentTime.Minute = temp->tm_min; + iWrtTime.iCurrentTime.Seconds = temp->tm_sec / 2;//As per FAT spec + + iFileSize = aSize ; +} +/** WriteDirEntries : Write FAT information for this node to a cluster buffer + * aStartIndex : [in],the beginning index of the outputed cluster + * aClusterData : [in,out] the cluster buffer + * + * notice, aClusterData is only required if node is a directory node. + * for a file node, no data will be written out. + * in this case, only corresponding cluster index information is updated. + */ +void TFSNode::WriteDirEntries(TUint aStartIndex,TUint8* aClusterData){ + if(iFATEntry){ + *((TUint16*)iFATEntry->DIR_FstClusHI) = (aStartIndex >> 16) ; + *((TUint16*)iFATEntry->DIR_FstClusLO) = (aStartIndex & 0xFFFF) ; + } + + if(iAttrs & ATTR_DIRECTORY) { // Directory , write dir entries ; + TShortDirEntry* entry = reinterpret_cast(aClusterData); + if(iParent != NULL) { + //Make + GetShortEntry(entry); + //TODO: Add comments to avoid mistaken deleting. + memcpy(entry->DIR_Name,". ",sizeof(entry->DIR_Name)); + entry ++ ; + iParent->GetShortEntry(entry); + memcpy(entry->DIR_Name,".. ",sizeof(entry->DIR_Name)); + entry ++ ; + } + TFSNode* child = iFirstChild ; + while(child){ + int items = child->GetLongEntries(reinterpret_cast(entry)); + entry += items ; + child->GetShortEntry(entry); + child->iFATEntry = entry ; + entry ++ ; + child = child->iSibling ; + + } + + } +} +/** GetShortEntry : Make a short directory entry (FAT16/32 conception) + * aEntry : the entry buffer + */ +void TFSNode::GetShortEntry(TShortDirEntry* aEntry) { + if(!aEntry) return ; + if(iFATEntry){ + if(iFATEntry != aEntry) + memcpy(aEntry,iFATEntry,sizeof(TShortDirEntry)); + return ; + } + memcpy(aEntry->DIR_Name,iShortName,sizeof(aEntry->DIR_Name)); + aEntry->DIR_Attr = iAttrs; + aEntry->DIR_NTRes = 0 ; + aEntry->DIR_CrtTimeTenth = 0 ; + memcpy(aEntry->DIR_CrtTime,&iCrtTime,sizeof(aEntry->DIR_CrtTime)); + memcpy(aEntry->DIR_CrtDate,&iCrtDate,sizeof(aEntry->DIR_CrtDate)); + memcpy(aEntry->DIR_LstAccDate,&iLstAccDate,sizeof(aEntry->DIR_LstAccDate)); + memset(aEntry->DIR_FstClusHI,0,sizeof(aEntry->DIR_FstClusHI)); + memcpy(aEntry->DIR_WrtTime,&iWrtTime,sizeof(aEntry->DIR_WrtTime)); + memcpy(aEntry->DIR_WrtDate,&iWrtDate,sizeof(aEntry->DIR_WrtDate)); + memset(aEntry->DIR_FstClusLO,0,sizeof(aEntry->DIR_FstClusLO)); + memcpy(aEntry->DIR_FileSize,&iFileSize,sizeof(aEntry->DIR_FileSize)); +} +TUint8 FATChkSum(const char* pFcbName) { + short fcbNameLen ; + TUint8 sum = 0 ; + for(fcbNameLen = 11 ; fcbNameLen != 0 ; fcbNameLen --) { + sum = ((sum & 1) ? 0x80 : 0 ) + (sum >> 1 ) + *pFcbName++ ; + } + return sum ; +} +/** GetLongEntries : Make a series of long directory entries (FAT16/32 conception) + * aEntries : the start addr of the long directory entries buffer + * + * return value : actual entris count. + */ +int TFSNode::GetLongEntries(TLongDirEntry* aEntries) { + + if(!aEntries) return 0; + int packs = (GetWideNameLength() + KBytesPerEntry) / KBytesPerEntry ; + + TUint buflen = packs * KBytesPerEntry; + TUint16* buffer = new(std::nothrow) TUint16[buflen]; + if(!buffer) + return 0 ; + memset(buffer,0xff,(buflen << 1)); + if(iWideName) { + memcpy(buffer,iWideName->c_str(),iWideName->bytes()); + buffer[iWideName->length()] = 0; + } + TUint8 chkSum = FATChkSum(iShortName);; + + TUint16* ptr = buffer ; + TLongDirEntry* entry = aEntries +(packs - 1); + for(int i = 1 ; i <= packs ; i++, entry--) { + entry->LDIR_Ord = i ; + entry->LDIR_Chksum = chkSum ; + entry->LDIR_Attr = (TUint8)ATTR_LONG_NAME; + *((TUint16*)(entry->LDIR_FstClusLO)) = 0; + entry->LDIR_Type = 0; + memcpy(entry->LDIR_Name1,ptr,10); + memcpy(entry->LDIR_Name2,&ptr[5],12); + memcpy(entry->LDIR_Name3,&ptr[11],4); + ptr += 13; + } + aEntries->LDIR_Ord |= 0x40 ; + + delete []buffer ; + return packs ; +} +/** Make a unique name for a new child which has not been added. + * to avoid same short names under a directory + * rShortName : [in,out] , The new short name to be checked and changed. + * baseNameLength: [in], the length of the base part of the short name + * not including the "~n" + * for example, + * "ABC.LOG" => baseNameLength == 3 ("ABC") + * "AB~1.TXT" => baseNameLength == 2 ("AB") + * + * + *The Numeric-Tail Generation Algorithm + + * If (a "lossy conversion" was not flagged) + * and (the long name fits within the 8.3 naming conventions) + * and (the basis-name does not collide with any existing short name) + * { + * The short name is only the basis-name without the numeric tail. + * } + * else { + * Insert a numeric-tail "~n" to the end of the primary name such that the value of + * the "~n" is chosen so that the name thus formed does not collide with + * any existing short name and that the primary name does not exceed eight + * characters in length. + * } + * The "~n" string can range from "~1" to "~999999". + * + */ + +void TFSNode::MakeUniqueShortName(char rShortName[12],TUint baseNameLength) const { + bool dup ; + char nstring[10]; + int n = 0 ; + do { + TFSNode* child = iFirstChild ; + dup = false ; + while(child){ + if(0 == memcmp(rShortName,child->iShortName,11)) { + dup = true ; + break ; + } + child = child->iSibling ; + } + if(dup){ //duplex , increase the index , make a new name + int nlen = sprintf(nstring,"~%u",++n); + while((baseNameLength + nlen > 8) && baseNameLength > 1) + baseNameLength -- ; + memcpy(&rShortName[baseNameLength],nstring,nlen); + + } + }while(dup) ; + +} + diff -r b33dd54aaa52 -r 122d2b873fd1 imgtools/romtools/rofsbuild/fsnode.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imgtools/romtools/rofsbuild/fsnode.h Fri Jun 25 20:58:33 2010 +0800 @@ -0,0 +1,85 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef __FILE_SYSTEM_ITEM_HEADER__ +#define __FILE_SYSTEM_ITEM_HEADER__ +#include "fatdefines.h" +#include +class UTF16String; +class TFSNode { +public : + TFSNode(TFSNode* aParent = 0 ,const char* aFileName = 0, TUint8 aAttrs = 0, const char* aPCSideName = 0); + ~TFSNode() ; +#ifdef _DEBUG + void PrintTree(int nTab = 0); +#endif + inline TUint8 GetAttrs() const { return iAttrs ;} + inline const char* GetFileName() const { return (iFileName != 0) ? iFileName : "" ;} + inline const char* GetPCSideName() const { return (iPCSideName != 0) ? iPCSideName : "" ;} + inline TFSNode* GetParent() const { return iParent;} + inline TFSNode* GetFirstChild() const {return iFirstChild;} + inline TFSNode* GetSibling() const { return iSibling ;} + + // return the size of memory needed to store this entry in a FAT system + // for a file entry, it's size of file + // for a directory entry, it's sumup of memory for subdir and files entry storage + TUint GetSize() const ; + + bool IsDirectory() const ; + + //Except for "." and "..", every direcoty/file entry in FAT filesystem are treated as with + //"long name", for the purpose of reserving case sensitive file name. + // This function is for GetLongEntries() to know length of long name . + int GetWideNameLength() const ; + + // To init the entry, + // For a file entry, aSize is the known file size, + // For a directory entry, aSize is not cared. + void Init(time_t aCreateTime, time_t aAccessTime, time_t aWriteTime, TUint aSize ); + + //This function is used by TFatImgGenerator::PrepareClusters, to prepare the clusters + // aClusterData should points to a buffer which is at least the size returns by + // GetSize() + void WriteDirEntries(TUint aStartIndex, TUint8* aClusterData ); + + static TFSNode* CreateFromFolder(const char* aPath,TFSNode* aParent = NULL); + + + +protected: + void GenerateBasicName(); + void MakeUniqueShortName(char rShortName[12],TUint baseNameLength) const; + void GetShortEntry(TShortDirEntry* aEntry); + int GetLongEntries(TLongDirEntry* aEntries) ; + TFSNode* iParent ; + TFSNode* iFirstChild ; + TFSNode* iSibling ; + TUint8 iAttrs ; + char* iPCSideName; + char* iFileName; + char iShortName[12]; + UTF16String* iWideName ; + TTimeInteger iCrtTime ; + TDateInteger iCrtDate ; + TUint8 iCrtTimeTenth ; + TDateInteger iLstAccDate ; + TTimeInteger iWrtTime ; + TDateInteger iWrtDate ; + TUint iFileSize ; + TShortDirEntry* iFATEntry ; +}; + +#endif diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/bldmake/distribution.policy.s60 --- a/sbsv1/abld/bldmake/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/doc/distribution.policy.s60 --- a/sbsv1/abld/doc/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -2 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/e32util/distribution.policy.s60 --- a/sbsv1/abld/e32util/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/genutil/distribution.policy.s60 --- a/sbsv1/abld/genutil/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/group/distribution.policy.s60 --- a/sbsv1/abld/group/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/kif/group/distribution.policy.s60 --- a/sbsv1/abld/kif/group/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/kif/perl/distribution.policy.s60 --- a/sbsv1/abld/kif/perl/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/makmake/distribution.policy.s60 --- a/sbsv1/abld/makmake/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/memtrace/distribution.policy.s60 --- a/sbsv1/abld/memtrace/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/platform/distribution.policy.s60 --- a/sbsv1/abld/platform/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/test/distribution.policy.s60 --- a/sbsv1/abld/test/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/test/featurevariantmap/distribution.policy.s60 --- a/sbsv1/abld/test/featurevariantmap/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/test/featurevariantmap/inc_jack/distribution.policy.s60 --- a/sbsv1/abld/test/featurevariantmap/inc_jack/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/test/featurevariantmap/inc_noel/distribution.policy.s60 --- a/sbsv1/abld/test/featurevariantmap/inc_noel/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/test/featurevariantparser/distribution.policy.s60 --- a/sbsv1/abld/test/featurevariantparser/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/abld/toolinfo/distribution.policy.s60 --- a/sbsv1/abld/toolinfo/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/bin/java/distribution.policy.s60 --- a/sbsv1/buildsystem/bin/java/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/app-services/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/app-services/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/application-protocols/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/application-protocols/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/base/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/base/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/converged-comms/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/converged-comms/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/graphics/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/graphics/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/security/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/security/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/syslibs/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/syslibs/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/syslibs/test/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/syslibs/test/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/techview/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/techview/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/extension/tools/distribution.policy.s60 --- a/sbsv1/buildsystem/extension/tools/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/group/distribution.policy.s60 --- a/sbsv1/buildsystem/group/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/shell/distribution.policy.s60 --- a/sbsv1/buildsystem/shell/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/test/binaryvariation/distribution.policy.s60 --- a/sbsv1/buildsystem/test/binaryvariation/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/test/distribution.policy.s60 --- a/sbsv1/buildsystem/test/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/test/extensions/distribution.policy.s60 --- a/sbsv1/buildsystem/test/extensions/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/test/helloworld/distribution.policy.s60 --- a/sbsv1/buildsystem/test/helloworld/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/tools/buildloggers/group/distribution.policy.s60 --- a/sbsv1/buildsystem/tools/buildloggers/group/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/buildsystem/tools/buildloggers/src/com/symbian/ant/distribution.policy.s60 --- a/sbsv1/buildsystem/tools/buildloggers/src/com/symbian/ant/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/fix_eabi_think_offsets/distribution.policy.s60 --- a/sbsv1/fix_eabi_think_offsets/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/fix_eabi_think_offsets/group/distribution.policy.s60 --- a/sbsv1/fix_eabi_think_offsets/group/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -2 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/make-abld/distribution.policy.s60 --- a/sbsv1/make-abld/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -2 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/make-abld/group/distribution.policy.s60 --- a/sbsv1/make-abld/group/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -2 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/scpp-abld/distribution.policy.s60 --- a/sbsv1/scpp-abld/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -2 \ No newline at end of file diff -r b33dd54aaa52 -r 122d2b873fd1 sbsv1/scpp-abld/group/distribution.policy.s60 --- a/sbsv1/scpp-abld/group/distribution.policy.s60 Fri Jun 25 19:56:45 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -2 \ No newline at end of file