From 2915dcea8699bb072c7eabaa04890e90ce01949e Mon Sep 17 00:00:00 2001 From: kamikawa Date: Tue, 15 Apr 2008 06:54:27 +0000 Subject: [PATCH] =?UTF-8?q?Nightly=E3=81=AE=E8=87=AA=E5=8B=95=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=A7=20Nand=20=E3=82=92=E5=88=9D?= =?UTF-8?q?=E6=9C=9F=E5=8C=96=E3=81=99=E3=82=8B=E3=83=84=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=81=8C=E5=BF=85=E8=A6=81=E3=81=A8=E3=81=AE=E7=92=B0=E5=A2=83?= =?UTF-8?q?=E5=88=B6=E4=BD=9C=E3=81=8B=E3=82=89=E3=81=AE=E8=A6=81=E6=9C=9B?= =?UTF-8?q?=E3=81=AB=E5=BF=9C=E3=81=88=E3=81=A6=20NandInitializerForAutoTe?= =?UTF-8?q?st=20=E3=82=92=E4=BD=9C=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E5=BF=9C=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1139 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- .../NandInitializer/ARM9.TWL/Makefile | 16 +++++++-- .../ARM9.TWL/src/process_format.c | 34 +++++++++++++++++-- .../ARM9.TWL/src/process_topmenu.c | 20 ++++------- 3 files changed, 53 insertions(+), 17 deletions(-) diff --git a/build/systemMenu_RED/NandInitializer/ARM9.TWL/Makefile b/build/systemMenu_RED/NandInitializer/ARM9.TWL/Makefile index 5e588035..d41e82b5 100644 --- a/build/systemMenu_RED/NandInitializer/ARM9.TWL/Makefile +++ b/build/systemMenu_RED/NandInitializer/ARM9.TWL/Makefile @@ -16,7 +16,7 @@ # $Author$ #---------------------------------------------------------------------------- -SUBDIRS = $(ROOT)/build/demos/gx/UnitTours/DEMOLib +SUBDIRS = #---------------------------------------------------------------------------- @@ -32,6 +32,14 @@ MACRO_FLAGS += -DNAND_INITIALIZER_LIMITED_MODE # ワイヤレスの強制Disableフラグを設定可能にする場合定義します。(要:Make Clean) #MACRO_FLAGS += -DUSE_WIRELESS_FORCE_DISABLE_SETTING #============================================================================ +#============================================================================ +# NightlyBuild 用に自動実行させる場合定義します。(要:Make Clean) +#USE_FOR_NIGHTLY_AUTO_TEST = TRUE + +ifdef USE_FOR_NIGHTLY_AUTO_TEST +MACRO_FLAGS += -DUSE_FOR_NIGHTLY_AUTO_TEST +endif +#============================================================================ TARGET_FIRM = SYSTEMMENU TARGET_PLATFORM = TWL @@ -42,7 +50,12 @@ TWL_ARCHGEN = LIMITED TITLEID_LO = 0NIA #TARGET_TAD = +ifdef USE_FOR_NIGHTLY_AUTO_TEST +TARGET_BIN = NandInitializerForAutoTest.srl +else TARGET_BIN = NandInitializer.srl +endif + LCFILE_SPEC = ../../NandInitializerRed/ARM9.TWL/ARM9-TS.lsf ROM_SPEC = ../../NandInitializerRed/ARM9.TWL/main.rsf @@ -95,7 +108,6 @@ LLIBRARIES += libes$(TWL_LIBSUFFIX).a \ libnamut$(TWL_LIBSUFFIX).a include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs -include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib MAKEROM = $(TWL_TOOLSDIR)/bin/makerom.TWL.secure.exe diff --git a/build/systemMenu_RED/NandInitializerRed/ARM9.TWL/src/process_format.c b/build/systemMenu_RED/NandInitializerRed/ARM9.TWL/src/process_format.c index e962f03f..b76ebd9e 100644 --- a/build/systemMenu_RED/NandInitializerRed/ARM9.TWL/src/process_format.c +++ b/build/systemMenu_RED/NandInitializerRed/ARM9.TWL/src/process_format.c @@ -73,6 +73,7 @@ static u8 sFormatResult; *---------------------------------------------------------------------------*/ static void FormatCallback(KAMIResult result, void* arg); +void* ForeverLoopProcess(void); /*---------------------------------------------------------------------------* プロセス関数定義 @@ -155,6 +156,11 @@ void* FormatProcess1(void) } #endif +#ifdef USE_FOR_NIGHTLY_AUTO_TEST + sMenuSelectNo = MENU_CLEAN_UP; + return FormatProcess2; +#endif //USE_FOR_NIGHTLY_AUTO_TEST + // 選択メニューの変更 if ( kamiPadIsRepeatTrigger(PAD_KEY_UP) ) { @@ -201,6 +207,8 @@ void* FormatProcess2(void) switch( sMenuSelectNo ) { case MENU_CLEAN_UP: // 簡易フォーマット + { + BOOL result = TRUE; #ifdef DUMP_NAND_TREE OS_Printf("---------------------------------------\n"); OS_Printf(" Before \n"); @@ -214,7 +222,6 @@ void* FormatProcess2(void) // 現在の設定を保存しておきフォーマット後に保存設定で初期化する u8 region = LCFG_THW_GetRegion(); BOOL isForceDisableWireless = LCFG_THW_IsForceDisableWireless(); - BOOL result = TRUE; result &= NAMUT_Format(); result &= WriteHWInfoFile(region, isForceDisableWireless); @@ -239,8 +246,16 @@ void* FormatProcess2(void) // InstalledSoftBoxCount, FreeSoftBoxCount の値を現在のNANDの状態に合わせて更新します。 UpdateNandBoxCount(); - return FormatProcess1; +#ifdef USE_FOR_NIGHTLY_AUTO_TEST + if (result) + { + OS_Printf("NAND_CLEANUP_SUCCESS"); + } + return ForeverLoopProcess; +#endif //USE_FOR_NIGHTLY_AUTO_TEST + return FormatProcess1; + } case MENU_CHECK_DISK: // チェックディスク { FATFSDiskInfo info; @@ -360,3 +375,18 @@ void* FormatProcess3(void) return FormatProcess3; } + +/*---------------------------------------------------------------------------* + Name: Format プロセス4 + + Description: 無限ループプロセス + + Arguments: None. + + Returns: next sequence + *---------------------------------------------------------------------------*/ + +void* ForeverLoopProcess(void) +{ + return ForeverLoopProcess; +} \ No newline at end of file diff --git a/build/systemMenu_RED/NandInitializerRed/ARM9.TWL/src/process_topmenu.c b/build/systemMenu_RED/NandInitializerRed/ARM9.TWL/src/process_topmenu.c index dc4916ae..bc1ea3c1 100644 --- a/build/systemMenu_RED/NandInitializerRed/ARM9.TWL/src/process_topmenu.c +++ b/build/systemMenu_RED/NandInitializerRed/ARM9.TWL/src/process_topmenu.c @@ -76,9 +76,9 @@ static const MenuAndColor sMenuArray[] = #endif // USE_WIRELESS_FORCE_DISABLE_SETTING #ifndef NAND_INITIALIZER_LIMITED_MODE {" WRITE ETICKET SIGN ", BG_COLOR_GRAY }, - {" INPORT TAD FROM SD ", BG_COLOR_PINK }, - {" INPORT NANDFIRM FROM SD", BG_COLOR_GREEN }, - {" INPORT NORFIRM FROM SD", BG_COLOR_VIOLET } + {" IMPORT TAD FROM SD ", BG_COLOR_PINK }, + {" IMPORT NANDFIRM FROM SD", BG_COLOR_GREEN }, + {" IMPORT NORFIRM FROM SD", BG_COLOR_VIOLET } #endif // NAND_INITIALIZER_LIMITED_MODE }; @@ -88,10 +88,6 @@ static const MenuAndColor sMenuArray[] = static s8 sMenuSelectNo; -#ifdef AUTO_FORMAT_MODE -static BOOL sAutoProcessFlag = TRUE; -#endif - /*---------------------------------------------------------------------------* 内部関数定義 *---------------------------------------------------------------------------*/ @@ -178,16 +174,14 @@ void* TopmenuProcess1(void) return TopmenuProcess2; } +#ifdef USE_FOR_NIGHTLY_AUTO_TEST + FADE_OUT_RETURN( FormatProcess0 ); +#endif //USE_FOR_NIGHTLY_AUTO_TEST #ifndef NAND_INITIALIZER_LIMITED_MODE #ifdef AUTO_FORMAT_MODE - // sAutoProcessFlag でオート実行 - if (sAutoProcessFlag) - { - sAutoProcessFlag = FALSE; FADE_OUT_RETURN( AutoProcess0 ); - } #endif // L&R同時押しでオート実行! @@ -195,7 +189,7 @@ void* TopmenuProcess1(void) { FADE_OUT_RETURN( AutoProcess0 ); } -#endif +#endif // NAND_INITIALIZER_LIMITED_MODE return TopmenuProcess1; }