mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
ハードウェア情報を書き込めていなかったのを修正。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1242 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
82f4576c5d
commit
aab4e17a5a
@ -170,7 +170,7 @@ HwiInitResult ReadPrivateKey( void )
|
||||
spFree( s_pPrivKeyBuffer );
|
||||
s_pPrivKeyBuffer = NULL;
|
||||
}
|
||||
OS_TPrintf( "PrivKey read time = %dms\n", OS_TicksToMilliSeconds( OS_GetTick() - start ) );
|
||||
// OS_TPrintf( "PrivKey read time = %dms\n", OS_TicksToMilliSeconds( OS_GetTick() - start ) );
|
||||
|
||||
if (result) {
|
||||
#ifdef USE_PRODUCT_KEY
|
||||
@ -196,7 +196,7 @@ static void ReadHWInfoFile( void )
|
||||
OS_TPrintf( "HW Normal Info read failed.\n" );
|
||||
}
|
||||
|
||||
OS_TPrintf( "HW Normal Info read time = %dms\n", OS_TicksToMilliSeconds( OS_GetTick() - start ) );
|
||||
// OS_TPrintf( "HW Normal Info read time = %dms\n", OS_TicksToMilliSeconds( OS_GetTick() - start ) );
|
||||
|
||||
start = OS_GetTick();
|
||||
retval = LCFGi_THW_ReadSecureInfo();
|
||||
@ -205,7 +205,7 @@ static void ReadHWInfoFile( void )
|
||||
}else {
|
||||
OS_TPrintf( "HW Secure Info read failed.\n" );
|
||||
}
|
||||
OS_TPrintf( "HW Secure Info read time = %dms\n", OS_TicksToMilliSeconds( OS_GetTick() - start ) );
|
||||
// OS_TPrintf( "HW Secure Info read time = %dms\n", OS_TicksToMilliSeconds( OS_GetTick() - start ) );
|
||||
}
|
||||
|
||||
// HWInfoファイルのベリファイ
|
||||
|
||||
@ -21,6 +21,8 @@
|
||||
#USE_PRODUCT_KEY = TRUE
|
||||
#============================================================================
|
||||
|
||||
DISABLE_DEBUG ?= TRUE
|
||||
|
||||
TARGET_FIRM = SYSTEMMENU
|
||||
TARGET_PLATFORM = TWL
|
||||
TWL_ARCHGEN = LIMITED
|
||||
@ -44,7 +46,9 @@ SRCS = main.c \
|
||||
import.c \
|
||||
hwi.c \
|
||||
kami_pxi.c \
|
||||
kami_write_nandfirm.c
|
||||
kami_write_nandfirm.c \
|
||||
hw_info.c
|
||||
|
||||
|
||||
SRCS += $(ROOT)/build/tests/debugger/fio/src/fs_archive_hostio.c
|
||||
|
||||
|
||||
@ -226,4 +226,7 @@ RomSpec
|
||||
HostRoot $(PRIVKEY_PATH)
|
||||
Root /key
|
||||
File $(HWINFO_PRIVKEY)
|
||||
HostRoot $(TWL_IPL_RED_ROOT)/build/systemMenu_RED/NandInitializerRed/data
|
||||
Root /data
|
||||
File camera_volatile_info.bin
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include <sysmenu/namut.h>
|
||||
#include "kami_font.h"
|
||||
#include "import.h"
|
||||
#include "hw_info.h"
|
||||
#include "TWLHWInfo_api.h"
|
||||
#include "graphics.h"
|
||||
|
||||
@ -53,7 +54,6 @@ static u8 sStack[THREAD_STACK_SIZE];
|
||||
static void ProgressThread(void* arg);
|
||||
static void Destructor(void* arg);
|
||||
void ProgressDraw(f32 ratio);
|
||||
static void UpdateNandBoxCount( void );
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
処理関数定義
|
||||
@ -112,6 +112,9 @@ s32 kamiImportTad(int no, int total, const char* path)
|
||||
// 進捗スレッドの自力終了を待つ
|
||||
while (sProgress){};
|
||||
|
||||
// InstalledSoftBoxCount, FreeSoftBoxCount の値を現在のNANDの状態に合わせて更新します。
|
||||
UpdateNandBoxCount();
|
||||
|
||||
return nam_result;
|
||||
}
|
||||
|
||||
@ -229,37 +232,3 @@ void DrawResult(BOOL result)
|
||||
G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: UpdateNandBoxCount
|
||||
|
||||
Description: InstalledSoftBoxCount, FreeSoftBoxCount の値を
|
||||
現在のNANDの状態に合わせて更新します。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
static void UpdateNandBoxCount( void )
|
||||
{
|
||||
u32 installedSoftBoxCount;
|
||||
u32 freeSoftBoxCount;
|
||||
|
||||
// InstalledSoftBoxCount, FreeSoftBoxCount を数えなおす
|
||||
installedSoftBoxCount = NAMUT_SearchInstalledSoftBoxCount();
|
||||
freeSoftBoxCount = LCFG_TWL_FREE_SOFT_BOX_COUNT_MAX - installedSoftBoxCount;
|
||||
|
||||
// LCFGライブラリの静的変数に対する更新
|
||||
LCFG_TSD_SetInstalledSoftBoxCount( (u8)installedSoftBoxCount );
|
||||
LCFG_TSD_SetFreeSoftBoxCount( (u8)freeSoftBoxCount );
|
||||
|
||||
// LCFGライブラリの静的変数の値をNANDに反映
|
||||
{
|
||||
u8 *pBuffer = OS_Alloc( LCFG_WRITE_TEMP );
|
||||
if( pBuffer ) {
|
||||
(void)LCFG_WriteTWLSettings( (u8 (*)[ LCFG_WRITE_TEMP ] )pBuffer );
|
||||
OS_Free( pBuffer );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include "kami_font.h"
|
||||
#include "kami_write_nandfirm.h"
|
||||
#include "import.h"
|
||||
#include "hw_info.h"
|
||||
#include "graphics.h"
|
||||
#include "hwi.h"
|
||||
|
||||
@ -118,7 +119,6 @@ TwlMain()
|
||||
}
|
||||
|
||||
// HWInfo関連の前準備
|
||||
// InstalledSoftBoxCount, FreeSoftBoxCount の更新のために必要
|
||||
switch (HWI_Init( OS_AllocFromMain, OS_FreeToMain ))
|
||||
{
|
||||
case HWI_INIT_FAILURE:
|
||||
@ -132,8 +132,16 @@ TwlMain()
|
||||
break;
|
||||
}
|
||||
|
||||
// TADのインポート開始
|
||||
result = TRUE;
|
||||
|
||||
// 全ハードウェア情報の更新
|
||||
if (WriteHWInfoFile(OS_GetRegion(), OS_IsForceDisableWireless()) == FALSE)
|
||||
{
|
||||
result = FALSE;
|
||||
kamiFontPrintfConsole(CONSOLE_RED, "Hardware Update Failure!\n");
|
||||
}
|
||||
|
||||
// TADのインポート開始
|
||||
tadNum = sizeof(ImportTadFileList)/sizeof(ImportTadFileList[0]);
|
||||
|
||||
for (i=0; i<tadNum; i++)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user