mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
・SDKの5_0pr2ブランチに対応。
・launcherParamのmediaをbootTypeに変更。 ・SDKのlauncherParamを使用するようになっているので、resetParamライブラリを削除。 git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@482 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
39cecf4c9b
commit
7bcef2106d
@ -58,9 +58,12 @@ Autoload WRAM
|
||||
libcardboot_sp$(LIBSUFFIX).a \
|
||||
libreloc_info_sp$(LIBSUFFIX).a
|
||||
|
||||
Library libsdio_hcd_twl$(LIBSUFFIX).a \
|
||||
libsdio_busdriver$(LIBSUFFIX).a \
|
||||
libsdio_lib$(LIBSUFFIX).a \
|
||||
|
||||
Library libsdio_sp$(LIBSUFFIX).a
|
||||
|
||||
Library libnvram_sp$(LIBSUFFIX).a
|
||||
Library librtc_sp$(LIBSUFFIX).a
|
||||
|
||||
|
||||
Object * (.etable)
|
||||
Object * (.wram)
|
||||
@ -139,14 +142,13 @@ Ltdautoload LTDMAIN
|
||||
After $(TARGET_NAME)
|
||||
|
||||
Object * (.ltdmain)
|
||||
Library libnvram_sp$(LIBSUFFIX).a
|
||||
Library librtc_sp$(LIBSUFFIX).a
|
||||
Library librompatch_sp$(LIBSUFFIX).a \
|
||||
libwm_sp$(LIBSUFFIX).a \
|
||||
Library libwm_sp$(LIBSUFFIX).a \
|
||||
libnwm_sp$(LIBSUFFIX).a \
|
||||
libARM7athdrv$(LIBSUFFIX).a \
|
||||
libwvr_sp$(LIBSUFFIX).a \
|
||||
libwl_sp$(LIBSUFFIX).a
|
||||
|
||||
Library libathdrv_sp$(LIBSUFFIX).a
|
||||
|
||||
Library libfatfs_sp$(LIBSUFFIX).a \
|
||||
$(USE_CRYPTO_LIBS)
|
||||
Library $(ISDBG_LIBS_TWL)
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
void SYSMi_SetLauncherMountInfo( void );
|
||||
void SYSM_SetBootAppMountInfo( TitleProperty *pBootTitle );
|
||||
|
||||
static void SYSMi_SetBootSRLPath( NAMTitleId titleID, TitleMedia bootMedia );
|
||||
static void SYSMi_SetBootSRLPath( NAMTitleId titleID, OSBootType bootType );
|
||||
static void SYSMi_SetMountInfoCore( const OSMountInfo *pSrc );
|
||||
static void SYSMi_ModifySaveDataMount( NAMTitleId titleID, OSMountInfo *pMountTgt );
|
||||
|
||||
@ -87,7 +87,7 @@ void SYSM_SetBootAppMountInfo( TitleProperty *pBootTitle )
|
||||
{
|
||||
u32 titleID_Hi = (u32)( pBootTitle->titleID >> 32 ); // u64で論理演算はできない?
|
||||
// 起動アプリのSRLパスをセット
|
||||
SYSMi_SetBootSRLPath( pBootTitle->titleID, (TitleMedia)pBootTitle->flags.media );
|
||||
SYSMi_SetBootSRLPath( pBootTitle->titleID, (OSBootType)pBootTitle->flags.bootType );
|
||||
|
||||
// ユーザーアプリの場合、"nand:", "nand2:"アーカイブを変更。
|
||||
if( ( titleID_Hi & TITLEID_HI_APP_SYS_FLAG ) == 0 ) {
|
||||
@ -108,12 +108,12 @@ void SYSM_SetBootAppMountInfo( TitleProperty *pBootTitle )
|
||||
}
|
||||
|
||||
// 起動SRLパスをシステム領域にセット
|
||||
static void SYSMi_SetBootSRLPath( NAMTitleId titleID, TitleMedia bootMedia )
|
||||
static void SYSMi_SetBootSRLPath( NAMTitleId titleID, OSBootType bootType )
|
||||
{
|
||||
static char path[ FS_ENTRY_LONGNAME_MAX ];
|
||||
MI_CpuClear8( path, FS_ENTRY_LONGNAME_MAX );
|
||||
|
||||
if( bootMedia == TITLE_MEDIA_NAND ) {
|
||||
if( bootType == OS_BOOTTYPE_NAND ) {
|
||||
if( NAM_GetTitleBootContentPath( path, titleID ) != NAM_OK ) {
|
||||
OS_TPrintf( "ERROR: BootContentPath Get failed.\n" );
|
||||
}
|
||||
|
||||
@ -251,10 +251,10 @@ static TitleProperty *SYSMi_CheckShortcutBoot( void )
|
||||
s_bootTitle.flags.isAppLoadCompleted = TRUE;
|
||||
s_bootTitle.flags.isInitialShortcutSkip = TRUE; // 初回起動シーケンスを飛ばす
|
||||
s_bootTitle.flags.isLogoSkip = TRUE; // ロゴデモを飛ばす
|
||||
s_bootTitle.flags.media = TITLE_MEDIA_CARD;
|
||||
s_bootTitle.flags.bootType = OS_BOOTTYPE_ROM;
|
||||
s_bootTitle.flags.isValid = TRUE;
|
||||
s_bootTitle.titleID = *(u64 *)( &SYSM_GetCardRomHeader()->titleID_Lo );
|
||||
SYSM_SetLogoDemoSkip( TRUE );
|
||||
SYSM_SetLogoDemoSkip( s_bootTitle.flags.isLogoSkip );
|
||||
return &s_bootTitle;
|
||||
}
|
||||
}
|
||||
@ -270,7 +270,7 @@ static TitleProperty *SYSMi_CheckShortcutBoot( void )
|
||||
!TSD_IsSetUserColor() ||
|
||||
!TSD_IsSetNickname() ) {
|
||||
s_bootTitle.titleID = TITLE_ID_MACHINE_SETTINGS;
|
||||
s_bootTitle.flags.media = TITLE_MEDIA_NAND;
|
||||
s_bootTitle.flags.bootType = OS_BOOTTYPE_NAND;
|
||||
s_bootTitle.flags.isValid = TRUE;
|
||||
return &s_bootTitle;
|
||||
}
|
||||
@ -319,7 +319,7 @@ BOOL SYSM_GetCardTitleList( TitleProperty *pTitleList_Card )
|
||||
}
|
||||
|
||||
// タイトル情報フラグのセット
|
||||
pTitleList_Card->flags.media = TITLE_MEDIA_CARD;
|
||||
pTitleList_Card->flags.bootType = OS_BOOTTYPE_ROM;
|
||||
pTitleList_Card->titleID = *(u64 *)( &SYSM_GetCardRomHeader()->titleID_Lo );
|
||||
|
||||
return retval;
|
||||
@ -452,7 +452,7 @@ int SYSM_GetNandTitleList( TitleProperty *pTitleList_Nand, int listNum )
|
||||
pTitleList_Nand[l+1].pBanner = &s_bannerBuf[l];
|
||||
if( titleIdArray[l] ) {
|
||||
pTitleList_Nand[l+1].flags.isValid = TRUE;
|
||||
pTitleList_Nand[l+1].flags.media = TITLE_MEDIA_NAND;
|
||||
pTitleList_Nand[l+1].flags.bootType = OS_BOOTTYPE_NAND;
|
||||
}
|
||||
}
|
||||
// return : *TitleProperty Array
|
||||
@ -708,7 +708,7 @@ void SYSM_StartLoadTitle( TitleProperty *pBootTitle )
|
||||
SYSMi_GetWork()->isLoadSucceeded = TRUE;
|
||||
}
|
||||
|
||||
if( pBootTitle->flags.media == TITLE_MEDIA_CARD ) {
|
||||
if( pBootTitle->flags.bootType == OS_BOOTTYPE_ROM ) {
|
||||
SYSMi_GetWork()->isCardBoot = TRUE;
|
||||
}else if(pBootTitle->flags.isAppLoadCompleted)
|
||||
{
|
||||
@ -813,6 +813,12 @@ AuthResult SYSM_AuthenticateTitle( TitleProperty *pBootTitle )
|
||||
// マウント情報の登録
|
||||
SYSM_SetBootAppMountInfo( pBootTitle );
|
||||
|
||||
// HW_WM_BOOT_BUFへのブート情報セット
|
||||
{
|
||||
OSBootInfo *pBootInfo = (OSBootInfo *)OS_GetBootInfo();
|
||||
pBootInfo->boot_type = (OSBootType)pBootTitle->flags.bootType;
|
||||
}
|
||||
|
||||
BOOT_Ready(); // never return.
|
||||
|
||||
return AUTH_RESULT_SUCCEEDED;
|
||||
|
||||
Binary file not shown.
@ -1,85 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlIPL
|
||||
File: reset_param.h
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: 2007-10-29#$
|
||||
$Rev: 72 $
|
||||
$Author: yosiokat $
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _RESET_PARAM_H_
|
||||
#define _RESET_PARAM_H_
|
||||
|
||||
#include <twl.h>
|
||||
#include <twl/nam.h>
|
||||
#include <spi.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// define data-------------------------------------------
|
||||
|
||||
// BootFlagsで使用するmedia情報
|
||||
typedef enum TitleMedia {
|
||||
TITLE_MEDIA_NAND = 0,
|
||||
TITLE_MEDIA_CARD = 1,
|
||||
TITLE_MEDIA_MAX = 2
|
||||
}TitleMedia;
|
||||
|
||||
|
||||
// タイトル&リセットパラメータ フラグ
|
||||
typedef struct BootFlags {
|
||||
u16 isValid : 1; // TRUE:valid, FALSE:invalid
|
||||
u16 media : 3; // 0:nand, 1:card, 2-7:rsv;
|
||||
u16 isLogoSkip : 1; // ロゴデモスキップ要求
|
||||
u16 isInitialShortcutSkip : 1; // 初回起動シーケンススキップ要求
|
||||
u16 isAppLoadCompleted : 1; // アプリロード済みを示す
|
||||
u16 isAppRelocate : 1; // アプリ再配置要求
|
||||
u16 rsv : 9;
|
||||
}BootFlags;
|
||||
|
||||
|
||||
// リセットパラメータ ヘッダ
|
||||
typedef struct LauncherParameterHeader {
|
||||
u32 magicCode; // SYSM_RESET_PARAM_MAGIC_CODEが入る
|
||||
u8 type; // タイプによってBodyを判別する。
|
||||
u8 bodyLength; // bodyの長さ
|
||||
u16 crc16; // bodyのCRC16
|
||||
}LauncherParamHeader;
|
||||
|
||||
|
||||
// リセットパラメータ ボディ
|
||||
typedef union LauncherParamBody {
|
||||
struct { // ※とりあえず最初はTitlePropertyとフォーマットを合わせておく
|
||||
NAMTitleId bootTitleID; // リセット後にダイレクト起動するタイトルID
|
||||
BootFlags flags; // リセット時のランチャー動作フラグ
|
||||
u8 rsv[ 4 ]; // 予約
|
||||
}v1;
|
||||
}LauncherParamBody;
|
||||
|
||||
|
||||
// リセットパラメータ
|
||||
typedef struct LauncherParam {
|
||||
LauncherParamHeader header;
|
||||
LauncherParamBody body;
|
||||
}LauncherParam;
|
||||
|
||||
// function's prototype------------------------------------
|
||||
|
||||
void RP_Reset( u8 type, NAMTitleId id, BootFlags *flag );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // _RESET_PARAM_H_
|
||||
@ -23,16 +23,12 @@
|
||||
|
||||
#include <sysmenu/memorymap.h>
|
||||
#include <sysmenu/reloc_info/common/reloc_info.h>
|
||||
//#include <sysmenu/reset_param/ARM9/reset_param.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// define data ------------------------------------
|
||||
#define SYSM_RESET_PARAM_MAGIC_CODE "TRST"
|
||||
#define SYSM_RESET_PARAM_MAGIC_CODE_LEN 4
|
||||
|
||||
#define CLONE_BOOT_MODE 1
|
||||
#define OTHER_BOOT_MODE 2
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user