From 9b005c95e6866e71582e336e6a72747e4ae11726 Mon Sep 17 00:00:00 2001 From: yosiokat Date: Thu, 6 Sep 2007 12:00:50 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=BBnandfirm-printf=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=20=E3=83=BBnandfirm=E3=81=A8norfirm=E3=81=8C=E4=B8=A1?= =?UTF-8?q?=E6=96=B9=E3=81=86=E3=81=BE=E3=81=8F=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=ABbuildtool?= =?UTF-8?q?s=E3=81=AA=E3=81=A9=E3=82=92=E8=AA=BF=E6=95=B4=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@10 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- Makefile | 31 +++++++++++ build/Makefile | 1 + build/buildtools/commondefs | 2 +- build/nandfirm/Makefile | 33 ++++++++++++ build/nandfirm/nandfirm-print/Makefile | 51 +++++++++++++++++++ .../nandfirm-print/nandfirm-BB.nandsf | 22 ++++++++ build/norfirm/norfirm-empty/Makefile | 4 +- build/norfirm/norfirm-print/Makefile | 2 +- readme.txt | 7 +++ 9 files changed, 149 insertions(+), 4 deletions(-) create mode 100644 Makefile create mode 100644 build/nandfirm/Makefile create mode 100644 build/nandfirm/nandfirm-print/Makefile create mode 100644 build/nandfirm/nandfirm-print/nandfirm-BB.nandsf create mode 100644 readme.txt diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..3a3d0afc --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlFirm - build +# File: Makefile +# +# 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:: $ +# $Rev:$ +# $Author:$ +#---------------------------------------------------------------------------- + +include $(TWLFIRM_ROOT)/build/buildtools/commondefs + + +#---------------------------------------------------------------------------- + +SUBDIRS = build + +#---------------------------------------------------------------------------- + +include $(TWLFIRM_ROOT)/build/buildtools/modulerules + + +#===== End of Makefile ===== diff --git a/build/Makefile b/build/Makefile index a03b80a6..e10ff5a4 100644 --- a/build/Makefile +++ b/build/Makefile @@ -25,6 +25,7 @@ SUBDIRS = \ tools \ libraries \ norfirm \ + nandfirm \ #---------------------------------------------------------------------------- diff --git a/build/buildtools/commondefs b/build/buildtools/commondefs index 2b293d02..5eb26f7d 100644 --- a/build/buildtools/commondefs +++ b/build/buildtools/commondefs @@ -27,7 +27,7 @@ TWL_KEYSDIR ?= $(FIRM_ROOT)/keys/dummy ifneq ($(filter NORFIRM NANDFIRM GCDFIRM,$(FIRM_TARGET)),) -TARGET_BIN ?= $(TARGET_FIRM:.nor=$(DUMMY_KEYS_SUFFIX).nor) +TARGET_BIN ?= $(subst .,$(DUMMY_KEYS_SUFFIX).,$(TARGET_FIRM_BIN)) endif EMPTY ?= diff --git a/build/nandfirm/Makefile b/build/nandfirm/Makefile new file mode 100644 index 00000000..28d1f508 --- /dev/null +++ b/build/nandfirm/Makefile @@ -0,0 +1,33 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlFirm - firmware +# File: Makefile +# +# 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:: $ +# $Rev:$ +# $Author:$ +#---------------------------------------------------------------------------- + +include $(TWLFIRM_ROOT)/build/buildtools/commondefs + + +#---------------------------------------------------------------------------- + +SUBDIRS = \ + nandfirm-print \ + + +#---------------------------------------------------------------------------- + +include $(TWLFIRM_ROOT)/build/buildtools/modulerules + + +#===== End of Makefile ===== diff --git a/build/nandfirm/nandfirm-print/Makefile b/build/nandfirm/nandfirm-print/Makefile new file mode 100644 index 00000000..6fe02dcb --- /dev/null +++ b/build/nandfirm/nandfirm-print/Makefile @@ -0,0 +1,51 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlFirm - build +# File: Makefile +# +# 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:: $ +# $Rev:$ +# $Author:$ +#---------------------------------------------------------------------------- + + +FIRM_TARGET = NORFIRM + + +include $(TWLFIRM_ROOT)/build/buildtools/commondefs + + +#---------------------------------------------------------------------------- + +SUBDIRS = ../../norfirm/norfirm-print + +TARGET_FIRM_BIN = nandfirm_print.nand +BINDIR = . +MAKEFIRM_ARM9 = ../../norfirm/norfirm-print/ARM9/bin/ARM9-$(FIRM_PLATFORM)$(CODEGEN_ARCH)/$(FIRM_BUILD_DIR)/twl_norfirm9_print.axf +MAKEFIRM_ARM7 = ../../norfirm/norfirm-print/ARM7/bin/ARM7-$(FIRM_PLATFORM)$(CODEGEN_ARCH)/$(FIRM_BUILD_DIR)/twl_norfirm7_print.axf +MAKEFIRM_RSA_PRVKEY = $(TWL_KEYSDIR)/rsa/private_nand.der +LDEPENDS_BIN += ../../norfirm/norfirm-print/wram_regs/wram_regs.rbin + +NITRO_MAKEROM = TRUE +MAKEFIRM_FLAGS += -p +FIRM_SPEC = nandfirm-BB.nandsf + +LDIRT_CLEAN += $(BINDIR)/$(TARGET_BIN) \ + rsa_public.sbin \ + +#---------------------------------------------------------------------------- + +do-build: $(TARGET_BIN) + +include $(TWLFIRM_ROOT)/build/buildtools/modulerules + + +#===== End of Makefile ===== diff --git a/build/nandfirm/nandfirm-print/nandfirm-BB.nandsf b/build/nandfirm/nandfirm-print/nandfirm-BB.nandsf new file mode 100644 index 00000000..5a748a80 --- /dev/null +++ b/build/nandfirm/nandfirm-print/nandfirm-BB.nandsf @@ -0,0 +1,22 @@ +#NANDSF --- Nandfirm Spec File + +VERSION : GENERATE + +RSA_KEY : $(MAKEFIRM_RSA_PRVKEY) +OUT_KEY : rsa_public.sbin + +WRAM_RBIN: ../../norfirm/norfirm-print/wram_regs/wram_regs.rbin + +DECOMP_PROC : ARM9 # ARM9 or ARM7 + +ARM9_COMP : FALSE # TRUE or FALSE, should be before ARM9_SBIN +ARM9_SBIN : $(MAKEFIRM_ARM9).sbin +ARM9_ELF : $(MAKEFIRM_ARM9).axf + +ARM7_COMP : FALSE # TRUE or FALSE, should be before ARM7_SBIN +ARM7_SBIN : $(MAKEFIRM_ARM7).sbin +ARM7_ELF : $(MAKEFIRM_ARM7).axf + +ARM9_X2 : TRUE # TRUE or FALSE + +NCD_ROMOFS : 0x07fe00 diff --git a/build/norfirm/norfirm-empty/Makefile b/build/norfirm/norfirm-empty/Makefile index ddf84245..244037bb 100644 --- a/build/norfirm/norfirm-empty/Makefile +++ b/build/norfirm/norfirm-empty/Makefile @@ -26,8 +26,8 @@ include $(TWLFIRM_ROOT)/build/buildtools/commondefs SUBDIRS = \ -TARGET_FIRM = norfirm_empty.nor -BINDIR = . +TARGET_FIRM_BIN = norfirm_empty.nor +BINDIR = . MAKEFIRM_RSA_PRVKEY = $(TWL_KEYSDIR)/rsa/private_nor.der #※TwlSDKにはまだちゃんとcomponentsがないので、NitroSDKのものを使用。 diff --git a/build/norfirm/norfirm-print/Makefile b/build/norfirm/norfirm-print/Makefile index b1407929..d5450fd5 100644 --- a/build/norfirm/norfirm-print/Makefile +++ b/build/norfirm/norfirm-print/Makefile @@ -30,7 +30,7 @@ SUBDIRS = \ ARM9 \ wram_regs \ -TARGET_FIRM = norfirm_print.nor +TARGET_FIRM_BIN = norfirm_print.nor BINDIR = . MAKEFIRM_ARM9 = ARM9/bin/ARM9-$(FIRM_PLATFORM)$(CODEGEN_ARCH)/$(FIRM_BUILD_DIR)/twl_norfirm9_print.axf MAKEFIRM_ARM7 = ARM7/bin/ARM7-$(FIRM_PLATFORM)$(CODEGEN_ARCH)/$(FIRM_BUILD_DIR)/twl_norfirm7_print.axf diff --git a/readme.txt b/readme.txt new file mode 100644 index 00000000..589a3b84 --- /dev/null +++ b/readme.txt @@ -0,0 +1,7 @@ +ビルドするには NitroSDK4.0 & TwlSDK が必要です。 + +下記の環境変数を設定してください。 +例)TWLFIRM_ROOT=c:/TwlIPL + +※NORファームをARM7専有WRAMへロードすることはできません +(ARM9でハッシュをチェックするため)。