Lines Matching refs:rkImageHead

1099     STRUCT_RKIMAGE_HDR rkImageHead;  in IsExistPartitionInFw()  local
1105 bRet = m_pImage->GetData(dwFwOffset, iHeadSize, (PBYTE)&rkImageHead); in IsExistPartitionInFw()
1110 if (rkImageHead.item_count <= 0) in IsExistPartitionInFw()
1119 for (int i = 0; i < rkImageHead.item_count; i++) in IsExistPartitionInFw()
1121 if (strncmp(rkImageHead.item[i].name, partName, strlen(partName)) != 0) in IsExistPartitionInFw()
1126 if (rkImageHead.item[i].file[55] == 'H') in IsExistPartitionInFw()
1128 partitionSize = *((DWORD *)(&rkImageHead.item[i].file[56])); in IsExistPartitionInFw()
1130 partitionSize += rkImageHead.item[i].size; in IsExistPartitionInFw()
1134 partitionSize = rkImageHead.item[i].size; in IsExistPartitionInFw()
1137 partitionOffset = rkImageHead.item[i].offset; in IsExistPartitionInFw()
1154 STRUCT_RKIMAGE_HDR rkImageHead; in IsExistBootloaderInFw() local
1160 bRet = m_pImage->GetData(dwFwOffset, iHeadSize, (PBYTE)&rkImageHead); in IsExistBootloaderInFw()
1166 if (rkImageHead.item_count <= 0) in IsExistBootloaderInFw()
1184 for (int i = 0; i < rkImageHead.item_count; i++) in IsExistBootloaderInFw()
1186 if (strcmp(rkImageHead.item[i].name, "package-file") != 0) in IsExistBootloaderInFw()
1191 if (rkImageHead.item[i].file[55] == 'H') in IsExistBootloaderInFw()
1193 fileBufferSize = *((DWORD *)(&rkImageHead.item[i].file[56])); in IsExistBootloaderInFw()
1195 fileBufferSize += rkImageHead.item[i].size; in IsExistBootloaderInFw()
1199 fileBufferSize = rkImageHead.item[i].size; in IsExistBootloaderInFw()
1204 if (rkImageHead.item[i].file[50] == 'H') in IsExistBootloaderInFw()
1206 entryStartOffset = *((DWORD *)(&rkImageHead.item[i].file[51])); in IsExistBootloaderInFw()
1208 entryStartOffset += rkImageHead.item[i].offset; in IsExistBootloaderInFw()
1214 entryStartOffset += rkImageHead.item[i].offset; in IsExistBootloaderInFw()
1247 if (!strcmp(rkImageHead.item[i].name, PARTNAME_PARAMETER)) in IsExistBootloaderInFw()
1258 printf(" ### save %s fail!!! ###\n", rkImageHead.item[i].name); in IsExistBootloaderInFw()
1336 STRUCT_RKIMAGE_HDR rkImageHead; in DownloadImage() local
1351 bRet = m_pImage->GetData(dwFwOffset, iHeadSize, (PBYTE)&rkImageHead); in DownloadImage()
1360 if (rkImageHead.item_count <= 0) in DownloadImage()
1376 for (i = 0; i < rkImageHead.item_count; i++) in DownloadImage()
1378 if (rkImageHead.item[i].flash_offset != 0xFFFFFFFF) in DownloadImage()
1380 if (strcmp(rkImageHead.item[i].name, PARTNAME_PARAMETER) == 0) in DownloadImage()
1387 if (strcmp(rkImageHead.item[i].name, PARTNAME_BACKUP) == 0) in DownloadImage()
1389 m_dwBackupOffset = rkImageHead.item[i].flash_offset; in DownloadImage()
1392 if (strcmp(rkImageHead.item[i].name, PARTNAME_RECOVERY) == 0 || in DownloadImage()
1393 strcmp(rkImageHead.item[i].name, PARTNAME_MISC) == 0) in DownloadImage()
1405 if (look_for_userdata(rkImageHead.item[i].name) == 0 && bFwFromUserdata) in DownloadImage()
1408 if (rkImageHead.item[i].file[55] == 'H') in DownloadImage()
1410 ulItemSize = *((DWORD *)(&rkImageHead.item[i].file[56])); in DownloadImage()
1412 ulItemSize += rkImageHead.item[i].size; in DownloadImage()
1416 ulItemSize = rkImageHead.item[i].size; in DownloadImage()
1422 if (!strcmp(rkImageHead.item[i].name, gstUpdateOrder[idx].partName)) in DownloadImage()
1424 gstUpdateOrder[idx].stItem = rkImageHead.item[i]; in DownloadImage()
1444 if (!MakeParamFileBuffer(rkImageHead.item[iParamPos])) in DownloadImage()
1453 GptFlag = GetParameterGptFlag(rkImageHead.item[iParamPos]); in DownloadImage()
1459 if (!CheckParamPartSize(rkImageHead, iParamPos)) in DownloadImage()
1487 for (i = 0; i < rkImageHead.item_count; i++) in DownloadImage()
1493 if (rkImageHead.item[i].flash_offset == 0xFFFFFFFF) in DownloadImage()
1502 sprintf(szPrompt, "%s writing...\n", rkImageHead.item[i].name); in DownloadImage()
1508 bRet = RKA_Gpt_Download(rkImageHead.item[i], uiCurrentByte, uiTotalSize); in DownloadImage()
1520 bRet = RKA_Param_Download(rkImageHead.item[i], uiCurrentByte, uiTotalSize); in DownloadImage()
1538 if (strcmp(rkImageHead.item[i].name, PARTNAME_RECOVERY) == 0 || in DownloadImage()
1539 strcmp(rkImageHead.item[i].name, PARTNAME_MISC) == 0) in DownloadImage()
1545 … m_pLog->Record(_T("INFO:## Ignore [ %s ] download ##"), rkImageHead.item[i].name); in DownloadImage()
1551 if (look_for_userdata(rkImageHead.item[i].name) == 0 && bFwFromUserdata) in DownloadImage()
1555 if (isInOrderList(rkImageHead.item[i].name)) in DownloadImage()
1561 m_pLog->Record(_T("INFO:###### Downloading %s #######"), rkImageHead.item[i].name); in DownloadImage()
1563 if (rkImageHead.item[i].file[55] == 'H') in DownloadImage()
1565 ulItemSize = *((DWORD *)(&rkImageHead.item[i].file[56])); in DownloadImage()
1567 ulItemSize += rkImageHead.item[i].size; in DownloadImage()
1571 ulItemSize = rkImageHead.item[i].size; in DownloadImage()
1578 sprintf(szPrompt, "%s writing...\n", rkImageHead.item[i].name); in DownloadImage()
1581 bRet = RKA_File_Download(rkImageHead.item[i], uiCurrentByte, uiTotalSize); in DownloadImage()
1587 rkImageHead.item[i].name); in DownloadImage()
1591 … m_pLog->Record(_T("INFO:###### Download %s Done #######"), rkImageHead.item[i].name); in DownloadImage()
1601 m_pLog->Record(_T("INFO:###### Downloading %s #######"), rkImageHead.item[i].name); in DownloadImage()
1639 for (i = 0; i < rkImageHead.item_count; i++) in DownloadImage()
1645 if (rkImageHead.item[i].flash_offset == 0xFFFFFFFF) in DownloadImage()
1653 sprintf(szPrompt, "%s checking...\n", rkImageHead.item[i].name); in DownloadImage()
1658 bRet = RKA_Gpt_Check(rkImageHead.item[i], uiCurrentByte, uiTotalSize); in DownloadImage()
1670 bRet = RKA_Param_Check(rkImageHead.item[i], uiCurrentByte, uiTotalSize); in DownloadImage()
1683 if (strcmp(rkImageHead.item[i].name, PARTNAME_RECOVERY) == 0 || in DownloadImage()
1684 strcmp(rkImageHead.item[i].name, PARTNAME_MISC) == 0 || in DownloadImage()
1685 look_for_userdata(rkImageHead.item[i].name) == 0) in DownloadImage()
1691 m_pLog->Record(_T("INFO:# Ignore [ %s ] Check #"), rkImageHead.item[i].name); in DownloadImage()
1696 if (rkImageHead.item[i].file[55] == 'H') in DownloadImage()
1698 ulItemSize = *((DWORD *)(&rkImageHead.item[i].file[56])); in DownloadImage()
1700 ulItemSize += rkImageHead.item[i].size; in DownloadImage()
1704 ulItemSize = rkImageHead.item[i].size; in DownloadImage()
1710 sprintf(szPrompt, "%s checking...\n", rkImageHead.item[i].name); in DownloadImage()
1713 bRet = RKA_File_Check(rkImageHead.item[i], uiCurrentByte, uiTotalSize); in DownloadImage()
1718 … m_pLog->Record(_T("ERROR:DownloadImage-->RKA_File_Check failed(%s)"), rkImageHead.item[i].name); in DownloadImage()
1786 STRUCT_RKIMAGE_HDR rkImageHead; in UpgradePartition() local
1797 bRet = m_pImage->GetData(dwFwOffset, iHeadSize, (PBYTE)&rkImageHead); in UpgradePartition()
1806 if (rkImageHead.item_count <= 0) in UpgradePartition()
1822 for (i = 0; i < rkImageHead.item_count; i++) in UpgradePartition()
1824 if (rkImageHead.item[i].flash_offset != 0xFFFFFFFF) in UpgradePartition()
1828 if (rkImageHead.item[*iter].flash_offset > rkImageHead.item[i].flash_offset) in UpgradePartition()
1839 if (strcmp(rkImageHead.item[i].name, PARTNAME_PARAMETER) == 0) in UpgradePartition()
1846 if (strcmp(rkImageHead.item[i].name, PARTNAME_SYSTEM) == 0 || in UpgradePartition()
1847 !strcmp(rkImageHead.item[i].name, PARTNAME_ROOTFS)) in UpgradePartition()
1851 if (strcmp(rkImageHead.item[i].name, PARTNAME_MISC) == 0) in UpgradePartition()
1853 … dwFlagSector = rkImageHead.item[i].flash_offset + rkImageHead.item[i].part_size - 4; in UpgradePartition()
1855 if (look_for_userdata(rkImageHead.item[i].name) == 0) in UpgradePartition()
1860 if (strcmp(rkImageHead.item[i].name, PARTNAME_BACKUP) == 0) in UpgradePartition()
1862 m_dwBackupOffset = rkImageHead.item[i].flash_offset; in UpgradePartition()
1865 if (rkImageHead.item[i].file[55] == 'H') in UpgradePartition()
1867 ulItemSize = *((DWORD *)(&rkImageHead.item[i].file[56])); in UpgradePartition()
1869 ulItemSize += rkImageHead.item[i].size; in UpgradePartition()
1873 ulItemSize = rkImageHead.item[i].size; in UpgradePartition()
1889 if (!MakeParamFileBuffer(rkImageHead.item[iParamPos])) in UpgradePartition()
1898 if (!CheckParamPartSize(rkImageHead, iParamPos)) in UpgradePartition()
1932 if ((bSameFw) && (uiFlag >= rkImageHead.item[vecUpgradePartition[i]].flash_offset)) in UpgradePartition()
1939 sprintf(szPrompt, "%s writing...\n", rkImageHead.item[vecUpgradePartition[i]].name); in UpgradePartition()
1942 … bRet = RKA_Param_Download(rkImageHead.item[vecUpgradePartition[i]], uiCurrentByte, uiTotalSize); in UpgradePartition()
1954 … sprintf(szPrompt, "%s checking...\n", rkImageHead.item[vecUpgradePartition[i]].name); in UpgradePartition()
1958 … bRet = RKA_Param_Check(rkImageHead.item[vecUpgradePartition[i]], uiCurrentByte, uiTotalSize); in UpgradePartition()
1970 if (rkImageHead.item[vecUpgradePartition[i]].file[55] == 'H') in UpgradePartition()
1972 ulItemSize = *((DWORD *)(&rkImageHead.item[vecUpgradePartition[i]].file[56])); in UpgradePartition()
1974 ulItemSize += rkImageHead.item[vecUpgradePartition[i]].size; in UpgradePartition()
1978 ulItemSize = rkImageHead.item[vecUpgradePartition[i]].size; in UpgradePartition()
1980 if ((bSameFw) && (uiFlag >= rkImageHead.item[vecUpgradePartition[i]].flash_offset)) in UpgradePartition()
1990 … sprintf(szPrompt, "%s writing...\n", rkImageHead.item[vecUpgradePartition[i]].name); in UpgradePartition()
1993 … bRet = RKA_File_Download(rkImageHead.item[vecUpgradePartition[i]], uiCurrentByte, uiTotalSize); in UpgradePartition()
1998 …g->Record(_T("ERROR:UpgradePartition-->RKA_File_Download failed(%s)"), rkImageHead.item[vecUpgrade… in UpgradePartition()
2005 … sprintf(szPrompt, "%s checking...\n", rkImageHead.item[vecUpgradePartition[i]].name); in UpgradePartition()
2009 … bRet = RKA_File_Check(rkImageHead.item[vecUpgradePartition[i]], uiCurrentByte, uiTotalSize); in UpgradePartition()
2014 …pLog->Record(_T("ERROR:UpgradePartition-->RKA_File_Check failed(%s)"), rkImageHead.item[vecUpgrade… in UpgradePartition()
2026 …write_partition_upgrade_flag(dwFlagSector, fwMd5, rkImageHead.item[vecUpgradePartition[i]].flash_o… in UpgradePartition()
3133 bool CRKAndroidDevice::CheckParamPartSize(STRUCT_RKIMAGE_HDR &rkImageHead, int iParamPos) in CheckParamPartSize() argument
3148 if (!GetParameterPartSize(rkImageHead.item[iParamPos])) in CheckParamPartSize()
3152 if (m_uiParamFileSize > rkImageHead.item[iParamPos].part_size / 8 * 512) //�Ƿ�������8�� in CheckParamPartSize()