mirror of
https://github.com/rvtr/ctr_firmware.git
synced 2025-10-31 07:51:08 -04:00
mainなしブートROM追加。
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@67 b871894f-2f95-9b40-918c-086798483c85
This commit is contained in:
parent
fd4c740ac2
commit
9c96cb77f0
@ -22,6 +22,7 @@ include $(CTRBROM_ROOT)/build/buildtools/commondefs
|
||||
|
||||
SUBDIRS = \
|
||||
ctr_bootrom \
|
||||
jtag-only \
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: CtrBrom - bootrom - ts
|
||||
# Project: CtrBrom - bootrom - ctr_bootrom
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: CtrBrom - bootrom - ts
|
||||
# Project: CtrBrom - bootrom - ctr_bootrom
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: CtrBrom - bootrom - ts
|
||||
# Project: CtrBrom - bootrom - ctr_bootrom
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
52
trunk/bootrom/build/bootrom/jtag-only/ARM11/Makefile
Normal file
52
trunk/bootrom/build/bootrom/jtag-only/ARM11/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: CtrBrom - bootrom - jtag-only
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 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:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
BROM_CUSTOM_CTR0 = TRUE
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
LINCLUDES = ../include
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_BIN = brom11_jtag_only.padbin
|
||||
|
||||
CRT0_O =
|
||||
|
||||
SRCS = \
|
||||
crt0.c \
|
||||
crt0_secure.c \
|
||||
|
||||
#SRCDIR = # using default
|
||||
#LCFILE = # using default
|
||||
|
||||
|
||||
include $(CTRBROM_ROOT)/build/buildtools/commondefs
|
||||
|
||||
INSTALL_DIR = ..
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN_BASENAME).axf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
|
||||
include $(CTRBROM_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#===== End of Makefile =====
|
||||
40
trunk/bootrom/build/bootrom/jtag-only/ARM11/crt0.c
Normal file
40
trunk/bootrom/build/bootrom/jtag-only/ARM11/crt0.c
Normal file
@ -0,0 +1,40 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: CtrBrom - library - init
|
||||
File: crt0.c
|
||||
|
||||
Copyright 2008 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:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <brom/code32.h>
|
||||
#include <brom/os.h>
|
||||
|
||||
int main( void );
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: _start
|
||||
|
||||
Description: Start up
|
||||
|
||||
Arguments: None
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
asm void _start( void )
|
||||
{
|
||||
PRESERVE8
|
||||
|
||||
CODE32 // for _start reference
|
||||
|
||||
LSYM(10)
|
||||
b BSYM(10)
|
||||
}
|
||||
|
||||
35
trunk/bootrom/build/bootrom/jtag-only/ARM11/crt0_secure.c
Normal file
35
trunk/bootrom/build/bootrom/jtag-only/ARM11/crt0_secure.c
Normal file
@ -0,0 +1,35 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: CtrBrom - library - init
|
||||
File: crt0_secure.c
|
||||
|
||||
Copyright 2008 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:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <brom/code32.h>
|
||||
#include <brom/os.h>
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: STUPi_StartHandler
|
||||
|
||||
Description: start handler
|
||||
|
||||
Arguments: None
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
asm void STUPi_StartHandler( void )
|
||||
{
|
||||
PRESERVE8
|
||||
|
||||
bx lr
|
||||
}
|
||||
51
trunk/bootrom/build/bootrom/jtag-only/ARM9/Makefile
Normal file
51
trunk/bootrom/build/bootrom/jtag-only/ARM9/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: CtrBrom - bootrom - jtag-only
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 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:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
BROM_PROC = ARM9
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
LINCLUDES = ../include
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_BIN = brom9_jtag_only.padbin
|
||||
|
||||
CRT0_O =
|
||||
|
||||
SRCS = \
|
||||
crt0.c \
|
||||
crt0_secure_sp.c \
|
||||
|
||||
#SRCDIR = # using default
|
||||
#LCFILE = # using default
|
||||
|
||||
include $(CTRBROM_ROOT)/build/buildtools/commondefs
|
||||
|
||||
INSTALL_DIR = ..
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN_BASENAME).axf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
|
||||
include $(CTRBROM_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#===== End of Makefile =====
|
||||
46
trunk/bootrom/build/bootrom/jtag-only/ARM9/crt0.c
Normal file
46
trunk/bootrom/build/bootrom/jtag-only/ARM9/crt0.c
Normal file
@ -0,0 +1,46 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: CtrBrom - library - init
|
||||
File: crt0.c
|
||||
|
||||
Copyright 2008 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:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <brom/code32.h>
|
||||
#include <brom/os.h>
|
||||
|
||||
|
||||
int main( void );
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: _start
|
||||
|
||||
Description: Start up
|
||||
|
||||
Arguments: None
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
asm void _start( void )
|
||||
{
|
||||
PRESERVE8
|
||||
|
||||
CODE32 // for _start reference
|
||||
|
||||
// enable JTAG
|
||||
ldr r3, =REG_JTAG_ADDR
|
||||
ldr r0, =REG_SCFG_JTAG_A11JE_MASK | REG_SCFG_JTAG_A9JE_MASK | REG_SCFG_JTAG_DSPJE_MASK
|
||||
str r0, [r3]
|
||||
|
||||
LSYM(10)
|
||||
b BSYM(10)
|
||||
}
|
||||
|
||||
35
trunk/bootrom/build/bootrom/jtag-only/ARM9/crt0_secure_sp.c
Normal file
35
trunk/bootrom/build/bootrom/jtag-only/ARM9/crt0_secure_sp.c
Normal file
@ -0,0 +1,35 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: CtrBrom - library - init
|
||||
File: crt0_secure_sp.c
|
||||
|
||||
Copyright 2008 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:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <brom/code32.h>
|
||||
#include <brom/os.h>
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: STUPi_StartHandler
|
||||
|
||||
Description: start handler
|
||||
|
||||
Arguments: None
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
asm void STUPi_StartHandler( void )
|
||||
{
|
||||
PRESERVE8
|
||||
|
||||
bx lr
|
||||
}
|
||||
34
trunk/bootrom/build/bootrom/jtag-only/Makefile
Normal file
34
trunk/bootrom/build/bootrom/jtag-only/Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: CtrBrom - build
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 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:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(CTRBROM_ROOT)/build/buildtools/commondefs
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = \
|
||||
ARM11 \
|
||||
ARM9 \
|
||||
rom \
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(CTRBROM_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#===== End of Makefile =====
|
||||
59
trunk/bootrom/build/bootrom/jtag-only/rom/Makefile
Normal file
59
trunk/bootrom/build/bootrom/jtag-only/rom/Makefile
Normal file
@ -0,0 +1,59 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: CtrBrom - bootrom - jtag-only
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 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:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
BROM_PROMGEN = TRUE
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
LINCLUDES = ../include
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_BIN = jtag_only.exo
|
||||
|
||||
CRT0_O =
|
||||
|
||||
SRCS = \
|
||||
crt0.c \
|
||||
|
||||
#SRCDIR = # using default
|
||||
#LCFILE = # using default
|
||||
|
||||
EXO_DEPENDS = \
|
||||
../ARM11/bin/$(BROM_BUILDTYPE_ARM11)/brom11_jtag_only.padbin \
|
||||
../ARM9/bin/$(BROM_BUILDTYPE_ARM9)/brom9_jtag_only.padbin \
|
||||
|
||||
|
||||
include $(CTRBROM_ROOT)/build/buildtools/commondefs
|
||||
|
||||
INSTALL_TARGETS = $(TARGETS)
|
||||
INSTALL_DIR = $(BROM_INSTALL_PROMDIR)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
|
||||
include $(CTRBROM_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
crt0.c : $(EXO_DEPENDS)
|
||||
touch crt0.c
|
||||
|
||||
|
||||
#===== End of Makefile =====
|
||||
41
trunk/bootrom/build/bootrom/jtag-only/rom/crt0.c
Normal file
41
trunk/bootrom/build/bootrom/jtag-only/rom/crt0.c
Normal file
@ -0,0 +1,41 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: CtrBrom - bootrom - init
|
||||
File: crt0.c
|
||||
|
||||
Copyright 2008 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:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <brom/code32.h>
|
||||
#include <brom/types.h>
|
||||
#include <brom/hw/common/mmap_prom.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: _start
|
||||
|
||||
Description: Start up
|
||||
|
||||
Arguments: None
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
asm void _start( void )
|
||||
{
|
||||
PRESERVE8
|
||||
|
||||
EXPORT CTR_BROM_ARM11
|
||||
EXPORT CTR_BROM_ARM9
|
||||
|
||||
CTR_BROM_ARM11
|
||||
INCBIN ../ARM11/bin/BROM_BUILDTYPE_ARM11/brom11_jtag_only.padbin
|
||||
CTR_BROM_ARM9
|
||||
INCBIN ../ARM9/bin/BROM_BUILDTYPE_ARM9/brom9_jtag_only.padbin
|
||||
}
|
||||
@ -132,6 +132,25 @@ BROM_DEBUGGER ?= KMC
|
||||
CTR_DEBUGGER ?= $(BROM_DEBUGGER)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
### SDK Library settings
|
||||
|
||||
ifeq ($(BROM_TARGET),BROM)
|
||||
ifndef BROM_PROMGEN
|
||||
ifeq ($(CODEGEN_PROC),ARM11)
|
||||
CRT0_O ?= crt0.o crt0_secure.o
|
||||
else # CODEGEN_PROC==ARM9
|
||||
CRT0_O ?= crt0.o crt0_secure_sp.o
|
||||
endif # CODEGEN_PROC==ARM9
|
||||
endif # BROM_PROMGEN
|
||||
else # BROM_TARGET
|
||||
CRT0_O ?= crt0_app.o
|
||||
endif # BROM_TARGET
|
||||
|
||||
ifdef BROM_DEF_LINK_SCATLD
|
||||
CRT0_O += crt0_scat.o
|
||||
endif # BROM_DEF_LINK_SCATLD
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
### CTR-commondefs
|
||||
#
|
||||
@ -148,7 +167,7 @@ BROM_INCDIR := $(BROM_ROOT)/include
|
||||
BROM_TOOLSDIR := $(BROM_ROOT)/tools
|
||||
BROM_KEYSDIR := $(BROM_ROOT)/build/keys
|
||||
BROM_COMPONENTSDIR := $(BROM_ROOT)/components
|
||||
BROM_ADDINS ?= $(BROM_ROOT)/add-ins
|
||||
BROM_ADDINS ?= $(BROM_ROOT)/add-ins
|
||||
|
||||
BROM_CTRSDK_ROOT ?= $(call eupath,$(CTRBROM_ROOT))
|
||||
BROM_CTRFIRM_ROOT ?= $(call eupath,$(CTRFIRM_ROOT))
|
||||
@ -218,22 +237,6 @@ LDEPENDS_RES += $(BROM_BUILDTOOLSDIR)/commondefs
|
||||
|
||||
### SDK Library settings
|
||||
|
||||
ifeq ($(BROM_TARGET),BROM)
|
||||
ifndef BROM_PROMGEN
|
||||
ifeq ($(CODEGEN_PROC),ARM11)
|
||||
CRT0_O = crt0.o crt0_secure.o
|
||||
else # CODEGEN_PROC==ARM9
|
||||
CRT0_O = crt0.o crt0_secure_sp.o
|
||||
endif # CODEGEN_PROC==ARM9
|
||||
endif # BROM_PROMGEN
|
||||
else # BROM_TARGET
|
||||
CRT0_O = crt0_app.o
|
||||
endif # BROM_TARGET
|
||||
|
||||
ifdef BROM_DEF_LINK_SCATLD
|
||||
CRT0_O += crt0_scat.o
|
||||
endif # BROM_DEF_LINK_SCATLD
|
||||
|
||||
ifeq ($(CODEGEN_PROC),ARM11)
|
||||
|
||||
BROM_LIBS_BASE ?= \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user