diff --git a/build/components/hyena.TWL/hyena.lcf.template b/build/components/hyena.TWL/hyena.lcf.template index 2d148f01..b5421477 100644 --- a/build/components/hyena.TWL/hyena.lcf.template +++ b/build/components/hyena.TWL/hyena.lcf.template @@ -548,7 +548,8 @@ SECTIONS } > F ############################ OTHERS ################################# - SDK_WRAM_ARENA_LO = SDK_AUTOLOAD.WRAM.BSS_END; + SDK_SEA_KEY_STORE = SDK_AUTOLOAD.WRAM.BSS_END; + SDK_WRAM_ARENA_LO = SDK_AUTOLOAD.WRAM.BSS_END + 0x40; SDK_IRQ_STACKSIZE = ; # allocated in WRAM SDK_SYS_STACKSIZE = ; # allocated in WRAM diff --git a/build/components/hyena.TWL/hyena.lsf b/build/components/hyena.TWL/hyena.lsf index 1335831b..421dda92 100644 --- a/build/components/hyena.TWL/hyena.lsf +++ b/build/components/hyena.TWL/hyena.lsf @@ -68,6 +68,8 @@ Autoload WRAM Library libnvram_sp$(LIBSUFFIX).a Library librtc_sp$(LIBSUFFIX).a + Library libsea_sp$(LIBSUFFIX).a + Library libcrypto_sp$(LIBSUFFIX).a Object * (.etable) Object * (.wram) diff --git a/build/components/hyena.TWL/src/main.c b/build/components/hyena.TWL/src/main.c index 7e0afb66..738f05d6 100644 --- a/build/components/hyena.TWL/src/main.c +++ b/build/components/hyena.TWL/src/main.c @@ -41,9 +41,7 @@ #include "nvram_sp.h" #include "pm_pmic.h" #include "internal_api.h" -#ifdef SDK_SEA #include -#endif // ifdef SDK_SEA /*---------------------------------------------------------------------------* 定数定義 diff --git a/build/libraries_sysmenu/sysmenu/ARM9/src/title.c b/build/libraries_sysmenu/sysmenu/ARM9/src/title.c index afab503e..545ed7ef 100644 --- a/build/libraries_sysmenu/sysmenu/ARM9/src/title.c +++ b/build/libraries_sysmenu/sysmenu/ARM9/src/title.c @@ -877,7 +877,7 @@ static AuthResult SYSMi_AuthenticateHeader( TitleProperty *pBootTitle) return SYSMi_AuthenticateTWLHeader( pBootTitle ); case LAUNCHER_BOOTTYPE_TEMP: OS_TPrintf( "Authenticate :TWL_TEMP start.\n" ); - if (!hs->permit_tmp_jump) + if (!hs->permit_landing_tmp_jump) { OS_TPrintf("Authenticate failed: TMP flag error.\n"); return AUTH_RESULT_AUTHENTICATE_FAILED; @@ -903,7 +903,7 @@ static AuthResult SYSMi_AuthenticateHeader( TitleProperty *pBootTitle) return SYSMi_AuthenticateNTRNandAppHeader( pBootTitle ); case LAUNCHER_BOOTTYPE_TEMP: OS_TPrintf( "Authenticate :NTR_TEMP start.\n" ); - if (!hs->permit_tmp_jump) + if (!hs->permit_landing_tmp_jump) { OS_TPrintf("Authenticate failed: TMP flag error.\n"); return AUTH_RESULT_AUTHENTICATE_FAILED; diff --git a/build/systemMenu_RED/HWInfoWriter/ARM9/src/HWInfoWriter.c b/build/systemMenu_RED/HWInfoWriter/ARM9/src/HWInfoWriter.c index 03c6a454..d0daf2aa 100644 --- a/build/systemMenu_RED/HWInfoWriter/ARM9/src/HWInfoWriter.c +++ b/build/systemMenu_RED/HWInfoWriter/ARM9/src/HWInfoWriter.c @@ -31,7 +31,7 @@ // extern data------------------------------------------ // function's prototype declaration--------------------- -static void WriteHWInfoFile( u8 region ); +static void WriteHWInfoFile( u8 region, BOOL isDisableWireless ); static void DeleteHWInfoFile( void ); static void DispMessage( int x, int y, u16 color, const u16 *pMsg ); @@ -46,6 +46,7 @@ static u8 *s_pPrivKeyBuffer = NULL; static LCFGReadResult (*s_pReadSecureInfoFunc)( void ); static BOOL s_isReadTSD; static u8 s_region_old; +static BOOL s_isDisableWireless; // const data ----------------------------------------- static const u16 *const s_pStrWriter[ WRITER_ELEMENT_NUM ] = { @@ -59,13 +60,13 @@ static const u16 *const s_pStrWriter[ WRITER_ELEMENT_NUM ] = { }; static MenuPos s_writerPos[] = { - { TRUE, 3 * 8, 3 * 8 }, - { TRUE, 3 * 8, 5 * 8 }, - { TRUE, 3 * 8, 7 * 8 }, - { TRUE, 3 * 8, 9 * 8 }, - { TRUE, 3 * 8, 11 * 8 }, - { TRUE, 3 * 8, 13 * 8 }, - { TRUE, 3 * 8, 15 * 8 }, + { TRUE, 3 * 8, 4 * 8 }, + { TRUE, 3 * 8, 6 * 8 }, + { TRUE, 3 * 8, 8 * 8 }, + { TRUE, 3 * 8, 10 * 8 }, + { TRUE, 3 * 8, 12 * 8 }, + { TRUE, 3 * 8, 14 * 8 }, + { TRUE, 3 * 8, 16 * 8 }, }; @@ -91,6 +92,10 @@ static const char *strRegion[] = { //====================================================== // HW情報ライター //====================================================== +const char *pWireless[] = { + "Enable Wireless", + "Force disable Wireless", +}; // HW情報ライターの初期化 void HWInfoWriterInit( void ) @@ -121,7 +126,11 @@ void HWInfoWriterInit( void ) } PrintfSJIS( 14 * 8, 0 * 8, TXT_COLOR_RED, "[%s Signature MODE]", pMode ); } - + + // 無線強制ON/OFF情報の表示 + s_isDisableWireless = LCFG_THW_IsForceDisableWireless(); + PrintfSJIS( 3 * 8, 2 * 8, TXT_COLOR_BLACK, pWireless[ s_isDisableWireless ] ); + OS_TPrintf( "region = %d\n", LCFG_THW_GetRegion() ); PrintfSJISSub( 2 * 8, 16 * 8, TXT_COLOR_BLACK, "Region = %s", strRegion[ LCFG_THW_GetRegion() ] ); PrintfSJISSub( 2 * 8, 18 * 8, TXT_COLOR_BLACK, "SerialNo = %s", LCFG_THW_GetSerialNoPtr() ); @@ -159,7 +168,13 @@ void HWInfoWriterMain( void ) } } DrawMenu( s_csr, &s_writerParam ); - + + if( pad.trg & PAD_BUTTON_START ) { + PrintfSJIS( 3 * 8, 2 * 8, TXT_COLOR_WHITE, pWireless[ s_isDisableWireless ] ); + s_isDisableWireless ^= 0x01; + PrintfSJIS( 3 * 8, 2 * 8, TXT_COLOR_BLACK, pWireless[ s_isDisableWireless ] ); + } + // 実行 if( pad.trg == PAD_BUTTON_A ) { if( s_csr == WRITER_ELEMENT_NUM - 1 ) { @@ -167,7 +182,7 @@ void HWInfoWriterMain( void ) (void)DeleteHWInfoFile(); }else { OS_TPrintf( "Write start.\n" ); - WriteHWInfoFile( (u8)s_csr ); + WriteHWInfoFile( (u8)s_csr, s_isDisableWireless ); } } @@ -176,7 +191,7 @@ void HWInfoWriterMain( void ) // HW情報全体のライト -static void WriteHWInfoFile( u8 region ) +static void WriteHWInfoFile( u8 region, BOOL isDisableWireless ) { static const u16 *pMsgNormalWriting = (const u16 *)L"Writing Normal File..."; static const u16 *pMsgSecureWriting = (const u16 *)L"Writing Secure File..."; @@ -200,7 +215,7 @@ static void WriteHWInfoFile( u8 region ) // ------------------------------------- (void)PutStringUTF16( MSG_X * 8, ( MSG_Y + 2 ) * 8, TXT_COLOR_BLACK, pMsgSecureWriting ); - if( HWI_WriteHWSecureInfoFile( region, NULL ) ) { + if( HWI_WriteHWSecureInfoFile( region, NULL, isDisableWireless ) ) { (void)PutStringUTF16( ( MSG_X + 20 ) * 8, ( MSG_Y + 2 ) * 8, TXT_COLOR_BLUE, pMsgSucceeded ); }else { (void)PutStringUTF16( ( MSG_X + 20 ) * 8, ( MSG_Y + 2 ) * 8, TXT_COLOR_RED, pMsgFailed ); diff --git a/build/systemMenu_RED/HWInfoWriter/ARM9/src/hwi.c b/build/systemMenu_RED/HWInfoWriter/ARM9/src/hwi.c index 87b99697..37765583 100644 --- a/build/systemMenu_RED/HWInfoWriter/ARM9/src/hwi.c +++ b/build/systemMenu_RED/HWInfoWriter/ARM9/src/hwi.c @@ -273,7 +273,7 @@ void HWI_ModifyLanguage( u8 region ) LCFG_TSD_SetCountry( LCFG_TWL_COUNTRY_UNDEFINED ); // ペアレンタルコントロール情報もクリアしておく - + MI_CpuClearFast( (void *)LCFG_TSD_GetPCTLPtr(), sizeof(LCFGTWLParentalControl) ); // regionが変わった場合は、LANGUAGE_BITMAPも必ず変わるので、それをNTR側に反映させるために必ずTWL設定データの書き込みも行う。 { @@ -323,7 +323,7 @@ BOOL HWI_WriteHWNormalInfoFile( void ) Returns: None. *---------------------------------------------------------------------------*/ -BOOL HWI_WriteHWSecureInfoFile( u8 region, const u8 *pSerialNo ) +BOOL HWI_WriteHWSecureInfoFile( u8 region, const u8 *pSerialNo, BOOL isDisableWireless ) { BOOL isWrite = TRUE; LCFGReadResult result; @@ -338,7 +338,8 @@ BOOL HWI_WriteHWSecureInfoFile( u8 region, const u8 *pSerialNo ) isWrite = FALSE; } } - + + LCFG_THW_SetFlagForceDisableWireless( isDisableWireless ); // リージョンのセット LCFG_THW_SetRegion( region ); diff --git a/build/systemMenu_RED/HWInfoWriter/ARM9/src/hwi.h b/build/systemMenu_RED/HWInfoWriter/ARM9/src/hwi.h index 311131f2..f2a9f1df 100644 --- a/build/systemMenu_RED/HWInfoWriter/ARM9/src/hwi.h +++ b/build/systemMenu_RED/HWInfoWriter/ARM9/src/hwi.h @@ -39,7 +39,7 @@ HwiInitResult; HwiInitResult HWI_Init( void *(*pAlloc)( u32 ), void (*pFree)( void * ) ); void HWI_ModifyLanguage( u8 region ); BOOL HWI_WriteHWNormalInfoFile( void ); -BOOL HWI_WriteHWSecureInfoFile( u8 region, const u8 *pSerialNo ); +BOOL HWI_WriteHWSecureInfoFile( u8 region, const u8 *pSerialNo, BOOL isDisableWireless ); BOOL HWI_WriteHWIDSignFile( void ); BOOL HWI_DeleteHWNormalInfoFile( void ); BOOL HWI_DeleteHWSecureInfoFile( void ); diff --git a/build/systemMenu_RED/Launcher/ARM9/src/loadWlanFirm.c b/build/systemMenu_RED/Launcher/ARM9/src/loadWlanFirm.c index df827ee7..8f28aadc 100644 --- a/build/systemMenu_RED/Launcher/ARM9/src/loadWlanFirm.c +++ b/build/systemMenu_RED/Launcher/ARM9/src/loadWlanFirm.c @@ -105,7 +105,7 @@ void InstallFirmCallback(void* arg) BOOL GetFirmwareFilepath(char *path) { - u8 title[4]; + u8 title[4] = { 'W','F','W','0' }; #if( USE_LCFG_STRING == 0 ) char *title0 = "WFW0"; @@ -115,7 +115,6 @@ BOOL GetFirmwareFilepath(char *path) u32 titleID_lo; u64 titleID = 0; - LCFG_THW_GetWirelessFirmTitleID_Lo( title ); #if( USE_LCFG_STRING == 0 ) { diff --git a/build/systemMenu_RED/NandInitializer/ARM7.TWL/main.lsf b/build/systemMenu_RED/NandInitializer/ARM7.TWL/main.lsf index b5665902..ab8888bd 100644 --- a/build/systemMenu_RED/NandInitializer/ARM7.TWL/main.lsf +++ b/build/systemMenu_RED/NandInitializer/ARM7.TWL/main.lsf @@ -67,6 +67,9 @@ Autoload WRAM Object $(OBJDIR)/formatter.o Object $(OBJDIR)/nvram_misc.o + Library libsea_sp$(LIBSUFFIX).a + Library libcrypto_sp$(LIBSUFFIX).a + # caches in fatfs library, that should be on WRAM. # 2007/12/11 OBJECT() による .bss シンボルのリンクがうまくいかないので、 # 変数定義箇所に pragma で .ltdwram セクションに含まれるように暫定対策しました。 diff --git a/build/systemMenu_RED/NandInitializer/ARM7.TWL/racoon.lcf.template b/build/systemMenu_RED/NandInitializer/ARM7.TWL/racoon.lcf.template index 5e629531..5794212a 100644 --- a/build/systemMenu_RED/NandInitializer/ARM7.TWL/racoon.lcf.template +++ b/build/systemMenu_RED/NandInitializer/ARM7.TWL/racoon.lcf.template @@ -548,7 +548,8 @@ SECTIONS } > F ############################ OTHERS ################################# - SDK_WRAM_ARENA_LO = SDK_AUTOLOAD.WRAM.BSS_END; + SDK_SEA_KEY_STORE = SDK_AUTOLOAD.WRAM.BSS_END; + SDK_WRAM_ARENA_LO = SDK_AUTOLOAD.WRAM.BSS_END + 0x40; SDK_IRQ_STACKSIZE = ; # allocated in WRAM SDK_SYS_STACKSIZE = ; # allocated in WRAM diff --git a/build/systemMenu_RED/NandInitializer/ARM9.TWL/src/process_hw_info.c b/build/systemMenu_RED/NandInitializer/ARM9.TWL/src/process_hw_info.c index 9e9a551d..3e1d7695 100644 --- a/build/systemMenu_RED/NandInitializer/ARM9.TWL/src/process_hw_info.c +++ b/build/systemMenu_RED/NandInitializer/ARM9.TWL/src/process_hw_info.c @@ -337,7 +337,7 @@ static BOOL WriteHWInfoFile( u8 region ) // セキュアファイルのライト kamiFontPrintfConsoleEx(CONSOLE_ORANGE, pMsgSecureWriting ); - if( HWI_WriteHWSecureInfoFile( region, NULL ) ) { + if( HWI_WriteHWSecureInfoFile( region, NULL, FALSE ) ) { // とりあえず無線は有効で。 kamiFontPrintfConsoleEx(CONSOLE_ORANGE, pMsgSucceeded ); }else { kamiFontPrintfConsoleEx(CONSOLE_RED, pMsgFailed ); diff --git a/build/tools/attach_dummyromheader/attach_dummyromheader.c b/build/tools/attach_dummyromheader/attach_dummyromheader.c index b434318c..dba2d651 100644 --- a/build/tools/attach_dummyromheader/attach_dummyromheader.c +++ b/build/tools/attach_dummyromheader/attach_dummyromheader.c @@ -158,22 +158,22 @@ int main(int argc, char *argv[]) // 0x02f0 - 0x0300 Parental Controls Rating Info // u8 ParentalControlsRatingInfo[ 0x10 ]; - rom_header.s.ParentalControlsRatingInfo[ 0x0 ] = 0; - rom_header.s.ParentalControlsRatingInfo[ 0x1 ] = 1; - rom_header.s.ParentalControlsRatingInfo[ 0x2 ] = 2; - rom_header.s.ParentalControlsRatingInfo[ 0x3 ] = 3; - rom_header.s.ParentalControlsRatingInfo[ 0x4 ] = 4; - rom_header.s.ParentalControlsRatingInfo[ 0x5 ] = 5; - rom_header.s.ParentalControlsRatingInfo[ 0x6 ] = 6; - rom_header.s.ParentalControlsRatingInfo[ 0x7 ] = 7; - rom_header.s.ParentalControlsRatingInfo[ 0x8 ] = 8; - rom_header.s.ParentalControlsRatingInfo[ 0x9 ] = 9; - rom_header.s.ParentalControlsRatingInfo[ 0xa ] = 0xa; - rom_header.s.ParentalControlsRatingInfo[ 0xb ] = 0xb; - rom_header.s.ParentalControlsRatingInfo[ 0xc ] = 0xc; - rom_header.s.ParentalControlsRatingInfo[ 0xd ] = 0xd; - rom_header.s.ParentalControlsRatingInfo[ 0xe ] = 0xe; - rom_header.s.ParentalControlsRatingInfo[ 0xf ] = 0xf; + rom_header.s.parental_control_rating_info[ 0x0 ] = 0; + rom_header.s.parental_control_rating_info[ 0x1 ] = 1; + rom_header.s.parental_control_rating_info[ 0x2 ] = 2; + rom_header.s.parental_control_rating_info[ 0x3 ] = 3; + rom_header.s.parental_control_rating_info[ 0x4 ] = 4; + rom_header.s.parental_control_rating_info[ 0x5 ] = 5; + rom_header.s.parental_control_rating_info[ 0x6 ] = 6; + rom_header.s.parental_control_rating_info[ 0x7 ] = 7; + rom_header.s.parental_control_rating_info[ 0x8 ] = 8; + rom_header.s.parental_control_rating_info[ 0x9 ] = 9; + rom_header.s.parental_control_rating_info[ 0xa ] = 0xa; + rom_header.s.parental_control_rating_info[ 0xb ] = 0xb; + rom_header.s.parental_control_rating_info[ 0xc ] = 0xc; + rom_header.s.parental_control_rating_info[ 0xd ] = 0xd; + rom_header.s.parental_control_rating_info[ 0xe ] = 0xe; + rom_header.s.parental_control_rating_info[ 0xf ] = 0xf; /* SRLファイルの書き出し */ if(1 != fwrite((void *)&rom_header, sizeof(ROM_Header), 1, srl_fp) ) {