From a249ffcc10b77676abd3ddb407bbfa961278d97a Mon Sep 17 00:00:00 2001 From: nakasima Date: Tue, 5 Feb 2008 01:42:48 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A3=BD=E5=93=81CPU=E3=81=A8TWL=E3=83=A2?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=AE=E8=B5=B7=E5=8B=95=E3=81=AB=E5=88=B6?= =?UTF-8?q?=E9=99=90=E3=82=92=E6=8E=9B=E3=81=91=E3=82=8B=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=82=B9=E3=82=A4=E3=83=83=E3=83=81=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=EF=BC=88=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88OFF?= =?UTF-8?q?=EF=BC=89=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@574 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/buildtools/commondefs.sysmenu | 13 +++++++++++++ build/libraries_sysmenu/boot/ARM7/src/bootAPI.c | 9 +++++++-- build/libraries_sysmenu/boot/ARM9/src/bootAPI.c | 7 +++++-- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/build/buildtools/commondefs.sysmenu b/build/buildtools/commondefs.sysmenu index e060ccb1..b838c2fc 100644 --- a/build/buildtools/commondefs.sysmenu +++ b/build/buildtools/commondefs.sysmenu @@ -18,6 +18,9 @@ ifndef TWL_SYSMENU_COMMONDEFS_ TWL_SYSMENU_COMMONDEFS_ = TRUE +#SYSMENU_DISABLE_TWL_BOOT = TRUE +#SYSMENU_DISABLE_RETAIL_BOOT = TRUE + NITRO_NO_STD_PCHDR = TRUE # プリコンパイルヘッダ抑止 EMPTY ?= @@ -111,6 +114,16 @@ SYSMENU_INSTALL_LIBDIR := $(SYSMENU_INSTALL_ROOT)/lib/$(TWL_LIBTYPE) SYSMENU_INSTALL_COMPONENTSDIR := $(SYSMENU_INSTALL_ROOT)/components SDK_NMENU_DATADIR = $(ROOT)/build/tools/TwlNMenu/data +#---------------------------------------------------------------------------- + +ifdef SYSMENU_DISABLE_TWL_BOOT +MACRO_FLAGS += -DSYSMENU_DISABLE_TWL_BOOT=$(SYSMENU_DISABLE_TWL_BOOT) +endif + +ifdef SYSMENU_DISABLE_RETAIL_BOOT +MACRO_FLAGS += -DSYSMENU_DISABLE_RETAIL_BOOT=$(SYSMENU_DISABLE_RETAIL_BOOT) +endif + #---------------------------------------------------------------------------- endif # TWL_SYSMENU_COMMONDEFS_ #----- End of commondefs ----- diff --git a/build/libraries_sysmenu/boot/ARM7/src/bootAPI.c b/build/libraries_sysmenu/boot/ARM7/src/bootAPI.c index a5804ff1..bdc028a6 100644 --- a/build/libraries_sysmenu/boot/ARM7/src/bootAPI.c +++ b/build/libraries_sysmenu/boot/ARM7/src/bootAPI.c @@ -177,6 +177,11 @@ BOOL BOOT_WaitStart( void ) if ( dh->s.platform_code ) { // target = REBOOT_TARGET_TWL_APP; +#ifdef SYSMENU_DISABLE_TWL_BOOT + while (1) + { + } +#endif // SYSMENU_DISABLE_TWL_BOOT } else { @@ -199,13 +204,13 @@ BOOL BOOT_WaitStart( void ) REG_SND_SMX_CNT_E_MASK; } -#ifdef FIRM_USE_TWLSDK_KEYS +#if defined(FIRM_USE_TWLSDK_KEYS) || defined(SYSMENU_DISABLE_RETAIL_BOOT) // TwlSDK内の鍵を使っている時は製品用CPUではTWLアプリはブートしない if ( ! (*(u8*)HWi_WSYS08_ADDR & HWi_WSYS08_OP_OPT_MASK) && !ds ) { OS_Terminate(); } -#endif // FIRM_USE_SDK_KEYS +#endif // FIRM_USE_SDK_KEYS || SYSMENU_DISABLE_RETAIL_BOOT // リブート OS_Boot( dh->s.sub_entry_address, mem_list, target ); diff --git a/build/libraries_sysmenu/boot/ARM9/src/bootAPI.c b/build/libraries_sysmenu/boot/ARM9/src/bootAPI.c index 3a48604b..8779cfb1 100644 --- a/build/libraries_sysmenu/boot/ARM9/src/bootAPI.c +++ b/build/libraries_sysmenu/boot/ARM9/src/bootAPI.c @@ -127,6 +127,9 @@ void BOOT_Ready( void ) if ( dh->s.platform_code ) { // target = REBOOT_TARGET_TWL_APP; +#ifdef SYSMENU_DISABLE_TWL_BOOT + OS_Terminate(); +#endif // SYSMENU_DISABLE_TWL_BOOT } else { @@ -138,13 +141,13 @@ void BOOT_Ready( void ) ds = TRUE; } -#ifdef FIRM_USE_TWLSDK_KEYS +#if defined(FIRM_USE_TWLSDK_KEYS) || defined(SYSMENU_DISABLE_RETAIL_BOOT) // TwlSDK内の鍵を使っている時は製品用CPUではTWLアプリはブートしない if ( ! (*(u8*)OS_CHIPTYPE_DEBUGGER_ADDR & OS_CHIPTYPE_DEBUGGER_MASK) && !ds ) { OS_Terminate(); } -#endif // FIRM_USE_SDK_KEYS +#endif // FIRM_USE_SDK_KEYS || SYSMENU_DISABLE_RETAIL_BOOT // 起動するターゲットの種類を指定する必要あり OS_Boot( dh->s.main_entry_address, mem_list, target );