diff --git a/build/systemMenu_RED/sysmenuVersion/Makefile b/build/systemMenu_RED/sysmenuVersion/Makefile index c1f7393c..b3cb6f64 100644 --- a/build/systemMenu_RED/sysmenuVersion/Makefile +++ b/build/systemMenu_RED/sysmenuVersion/Makefile @@ -30,13 +30,16 @@ TARGET_FIRM = SYSTEMMENU include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs include ./commondefs.sysmenuVersion +REGION ?= A +DST_DIR = dev + # タイムスタンプ VER_TIMESTAMP = 08062300 # システムメニューバージョン MAJOR_VERSION = 0 MINOR_VERSION = 1 -STR_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION) +STR_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION)$(REGION) # ユーザー領域サイズ(=128MB) USER_AREA_SIZE = 134217728 @@ -47,12 +50,12 @@ NUP_HOSTNAME = nus.shop.wii.com:443 # EULAのURL EULA_URL = https://cfh-test.t.app.nintendowifi.net/eula/ -GEN_VERSION_PARAM = $(VER_TIMESTAMP) $(STR_VERSION) $(MAJOR_VERSION) $(MINOR_VERSION) \ +GEN_VERSION_PARAM = $(DST_DIR) $(VER_TIMESTAMP) $(STR_VERSION) $(MAJOR_VERSION) $(MINOR_VERSION) \ $(USER_AREA_SIZE) $(NUP_HOSTNAME) $(EULA_URL) GEN_VERSION_FILE = $(SYSMENU_TOOLSDIR)/bin/genVersion.plx -VERSION_TAD = HNLA.tad +VERSION_TAD = HNL$(REGION).tad ifneq ($(TWL_IPL_RED_PRIVATE_ROOT),) VERSION_DAT = $(SYSMENU_VERSION_FILE) diff --git a/build/systemMenu_RED/sysmenuVersion/SysmenuVersion.dat b/build/systemMenu_RED/sysmenuVersion/SysmenuVersion.dat index 1790bc31..e6cf8649 100644 Binary files a/build/systemMenu_RED/sysmenuVersion/SysmenuVersion.dat and b/build/systemMenu_RED/sysmenuVersion/SysmenuVersion.dat differ diff --git a/build/systemMenu_RED/sysmenuVersion/archive_data/TWL-NUP-Dev-1-cert.bin b/build/systemMenu_RED/sysmenuVersion/dev/.TWL-NUP-Dev-1-cert.der similarity index 94% rename from build/systemMenu_RED/sysmenuVersion/archive_data/TWL-NUP-Dev-1-cert.bin rename to build/systemMenu_RED/sysmenuVersion/dev/.TWL-NUP-Dev-1-cert.der index 560fcb57..35b61809 100644 Binary files a/build/systemMenu_RED/sysmenuVersion/archive_data/TWL-NUP-Dev-1-cert.bin and b/build/systemMenu_RED/sysmenuVersion/dev/.TWL-NUP-Dev-1-cert.der differ diff --git a/build/systemMenu_RED/sysmenuVersion/archive_data/TWL-Shop-Dev-1-cert.bin b/build/systemMenu_RED/sysmenuVersion/dev/.TWL-Shop-Dev-1-cert.der similarity index 94% rename from build/systemMenu_RED/sysmenuVersion/archive_data/TWL-Shop-Dev-1-cert.bin rename to build/systemMenu_RED/sysmenuVersion/dev/.TWL-Shop-Dev-1-cert.der index 57e61f06..a47113ad 100644 Binary files a/build/systemMenu_RED/sysmenuVersion/archive_data/TWL-Shop-Dev-1-cert.bin and b/build/systemMenu_RED/sysmenuVersion/dev/.TWL-Shop-Dev-1-cert.der differ diff --git a/build/systemMenu_RED/sysmenuVersion/archive_data/twl-nup-dev-1-prvkey.bin b/build/systemMenu_RED/sysmenuVersion/dev/.twl-nup-dev-1-prvkey.der similarity index 96% rename from build/systemMenu_RED/sysmenuVersion/archive_data/twl-nup-dev-1-prvkey.bin rename to build/systemMenu_RED/sysmenuVersion/dev/.twl-nup-dev-1-prvkey.der index 77938646..6533a70a 100644 Binary files a/build/systemMenu_RED/sysmenuVersion/archive_data/twl-nup-dev-1-prvkey.bin and b/build/systemMenu_RED/sysmenuVersion/dev/.twl-nup-dev-1-prvkey.der differ diff --git a/build/systemMenu_RED/sysmenuVersion/archive_data/twl-shop-dev-1-prvkey.bin b/build/systemMenu_RED/sysmenuVersion/dev/.twl-shop-dev-1-prvkey.der similarity index 95% rename from build/systemMenu_RED/sysmenuVersion/archive_data/twl-shop-dev-1-prvkey.bin rename to build/systemMenu_RED/sysmenuVersion/dev/.twl-shop-dev-1-prvkey.der index 177cd925..c07dda00 100644 Binary files a/build/systemMenu_RED/sysmenuVersion/archive_data/twl-shop-dev-1-prvkey.bin and b/build/systemMenu_RED/sysmenuVersion/dev/.twl-shop-dev-1-prvkey.der differ diff --git a/build/systemMenu_RED/sysmenuVersion/archive_data/NintendoCA-G2.der b/build/systemMenu_RED/sysmenuVersion/dev/NintendoCA-G2.der similarity index 100% rename from build/systemMenu_RED/sysmenuVersion/archive_data/NintendoCA-G2.der rename to build/systemMenu_RED/sysmenuVersion/dev/NintendoCA-G2.der diff --git a/build/systemMenu_RED/sysmenuVersion/prod/.TWL-NUP-Dev-1-cert.der b/build/systemMenu_RED/sysmenuVersion/prod/.TWL-NUP-Dev-1-cert.der new file mode 100644 index 00000000..e59ffc91 Binary files /dev/null and b/build/systemMenu_RED/sysmenuVersion/prod/.TWL-NUP-Dev-1-cert.der differ diff --git a/build/systemMenu_RED/sysmenuVersion/prod/.TWL-Shop-Dev-1-cert.der b/build/systemMenu_RED/sysmenuVersion/prod/.TWL-Shop-Dev-1-cert.der new file mode 100644 index 00000000..8da20191 Binary files /dev/null and b/build/systemMenu_RED/sysmenuVersion/prod/.TWL-Shop-Dev-1-cert.der differ diff --git a/build/systemMenu_RED/sysmenuVersion/prod/.twl-nup-dev-1-prvkey.der b/build/systemMenu_RED/sysmenuVersion/prod/.twl-nup-dev-1-prvkey.der new file mode 100644 index 00000000..83fce90f Binary files /dev/null and b/build/systemMenu_RED/sysmenuVersion/prod/.twl-nup-dev-1-prvkey.der differ diff --git a/build/systemMenu_RED/sysmenuVersion/prod/.twl-shop-dev-1-prvkey.der b/build/systemMenu_RED/sysmenuVersion/prod/.twl-shop-dev-1-prvkey.der new file mode 100644 index 00000000..1a1afdce Binary files /dev/null and b/build/systemMenu_RED/sysmenuVersion/prod/.twl-shop-dev-1-prvkey.der differ diff --git a/build/systemMenu_RED/sysmenuVersion/prod/NintendoCA-G2.der b/build/systemMenu_RED/sysmenuVersion/prod/NintendoCA-G2.der new file mode 100644 index 00000000..56696aa8 Binary files /dev/null and b/build/systemMenu_RED/sysmenuVersion/prod/NintendoCA-G2.der differ diff --git a/tools/bin/genVersion.plx b/tools/bin/genVersion.plx index d4262c63..1340f6c1 100644 --- a/tools/bin/genVersion.plx +++ b/tools/bin/genVersion.plx @@ -15,13 +15,13 @@ use POSIX 'strftime'; use File::Basename; -if ($#ARGV < 6) { - printf STDOUT ("Usage: %s [genVersion] timestamp strVersion majorVersion minorVersion userAreaSize NUPHostName EULAURL\n", $0); +if ($#ARGV < 7) { + printf STDOUT ("Usage: %s [genVersion] dir timestamp strVersion majorVersion minorVersion userAreaSize NUPHostName EULAURL\n", $0); exit(-1); } # アーカイブにまとめるデータファイル -my $dataDir = "archive_data"; +my $dataDir = $ARGV[0]; my $versionFile = "$dataDir/version.bin"; my $timeStampFile = "$dataDir/time_stamp.bin"; my $userAreaSizeFile = "$dataDir/user_area_size.bin"; @@ -75,19 +75,22 @@ if (exists($ENV{"TWL_IPL_RED_ROOT"}) ){ # システムメニューバージョンの出力 { - my $length = 0x20; - my $sysMenuVersion = $ARGV[1]; + my $length = 0x1c; + my $sysMenuVersion = $ARGV[2]; if( length $sysMenuVersion >= $length ) { printf "ERROR: SystemMenu version length less than %d.\n", $length; die; } open VERSION, ">$versionFile" or die "File Open Error.\n"; binmode VERSION; -# my $ver = ( ( $ARGV[ 1 ] & 0xffff ) << 16 ) | ($ARGV[ 2 ] & 0xffff); +# my $ver = ( ( $ARGV[ 3 ] & 0xffff ) << 16 ) | ($ARGV[ 4 ] & 0xffff); # printf "version = %d.%d\n", ($ver >> 16), ($ver & 0xffff); # syswrite( VERSION, pack( "L", $ver ) ); printf "SysMenu version = %s\n", $sysMenuVersion; - syswrite( VERSION, pack( "a$length", $sysMenuVersion) ); + $length /= 2; # to UTF16 length + syswrite( VERSION, pack( "SSS$length", $ARGV[ 3 ], $ARGV[ 4 ], unpack( "C*", $sysMenuVersion ) ) ); +# pack "S*", unpack( "C*", $ascii ), 0; + close VERSION; } @@ -96,7 +99,7 @@ if (exists($ENV{"TWL_IPL_RED_ROOT"}) ){ open TIMESTAMP, ">$timeStampFile" or die "File Open Error.\n"; binmode TIMESTAMP; # my $timestamp = strftime "%y%m%d%H", localtime; - my $timestamp = $ARGV[ 0 ]; + my $timestamp = $ARGV[ 1 ]; printf "timestamp = %s\n", $timestamp; syswrite( TIMESTAMP, pack( "N", unpack( "L", pack( "H8", $timestamp ) ) ) ); close TIMESTAMP; @@ -106,7 +109,7 @@ if (exists($ENV{"TWL_IPL_RED_ROOT"}) ){ { open USERAREA, ">$userAreaSizeFile" or die "File Open Error.\n"; binmode USERAREA; - my $userAreaSize = $ARGV[ 4 ]; + my $userAreaSize = $ARGV[ 5 ]; printf "userAreaSize = $userAreaSize\n"; syswrite( USERAREA, pack( "L", $userAreaSize ) ); close USERAREA; @@ -115,7 +118,7 @@ if (exists($ENV{"TWL_IPL_RED_ROOT"}) ){ # NUP_HOSTNAMEの出力 { my $length = 0x40; - my $nupHostName = $ARGV[ 5 ]; + my $nupHostName = $ARGV[ 6 ]; if( length $nupHostName >= $length ) { printf "ERROR: NUP Host Name length less than %d.\n", $length; die; @@ -130,7 +133,7 @@ if (exists($ENV{"TWL_IPL_RED_ROOT"}) ){ # EULA_URLの出力 { my $length = 0x80; - my $urlEULA = $ARGV[ 6 ]; + my $urlEULA = $ARGV[ 7 ]; if( length $urlEULA >= $length ) { printf "ERROR: EULA URL length less than %d.\n", $length; die; @@ -155,7 +158,7 @@ if (exists($ENV{"TWLSYSTEM_ROOT"}) ){ # アーカイブ作成 { - system ( "$TWLSYSTEM_ROOT/tools/bin/nnsarc.exe -c $archiveFile -A 16 $dataDir -s -E .svn" ); + system ( "$TWLSYSTEM_ROOT/tools/bin/nnsarc.exe -c $archiveFile -A 16 -a $dataDir -s -E .svn" ); } # アーカイブのハッシュの出力