mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
無線開発用 SystemUpdater をビルドするための Makefileおよびscript群を作成。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1943 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
9f61c17be7
commit
7d16ca3088
114
build/tests/build4WLDev/Makefile
Normal file
114
build/tests/build4WLDev/Makefile
Normal file
@ -0,0 +1,114 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: SystemUpdater
|
||||
# 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$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_FIRM = SYSTEMMENU
|
||||
|
||||
# force to build for debugger
|
||||
export SYSMENU_DEBUGGER_BUILD = TRUE
|
||||
|
||||
# SDK configuration for export
|
||||
override TWL_ARCHGEN := LIMITED
|
||||
export TWL_ARCHGEN
|
||||
export OBJDIR = ./obj.WLAN/$(TWL_BUILDTYPE)
|
||||
export DEPENDDIR = ./depend.WLAN/$(TWL_BUILDTYPE)
|
||||
export LIBDIR = ./lib.WLAN/$(TWL_BUILDTYPE)
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
export LDIRT_CLEAN = ./obj.WLAN ./depend.WLAN ./lib.WLAN
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LAUNCHER_DIR = $(SYSMENU_ROOT)/build/systemMenu_RED/Launcher
|
||||
MACHINESETTINGS_DIR = $(SYSMENU_ROOT)/build/systemMenu_RED/MachineSettings
|
||||
WLANFIRM_DIR = $(SYSMENU_ROOT)/build/systemMenu_RED/wlanfirm
|
||||
DS_HASH_TABLE = $(SYSMENU_ROOT)/build/systemMenu_RED/DSHashTable
|
||||
SHARED_FONT_DIR = $(SYSMENU_ROOT)/build/systemMenu_RED/sharedFont
|
||||
NANDFIRM_DIR = $(SYSMENU_ROOT)/build/nandfirm/menu-launcher
|
||||
|
||||
SYSTEMUPDATER_DIR = $(SYSMENU_ROOT)/build/systemMenu_tools/SystemUpdater
|
||||
|
||||
SUBMAKES += Makefile_modification \
|
||||
$(SYSMENU_ROOT)/build/tools/Makefile \
|
||||
$(SYSMENU_ROOT)/build/libraries/Makefile \
|
||||
$(SYSMENU_ROOT)/build/libraries_sysmenu/Makefile_autogen \
|
||||
\
|
||||
$(LAUNCHER_DIR)/Makefile_autogen \
|
||||
$(MACHINESETTINGS_DIR)/Makefile_autogen \
|
||||
$(WLANFIRM_DIR)/Makefile \
|
||||
$(DS_HASH_TABLE)/Makefile \
|
||||
$(SHARED_FONT_DIR)/Makefile \
|
||||
$(NANDFIRM_DIR)/Makefile \
|
||||
$(SYSTEMUPDATER_DIR)/data/Makefile \
|
||||
$(SYSTEMUPDATER_DIR)/banner/Makefile \
|
||||
$(SYSTEMUPDATER_DIR)/ARM7.TWL/Makefile \
|
||||
$(SYSTEMUPDATER_DIR)/ARM9.TWL/Makefile
|
||||
|
||||
# COMPILE SWITCH for build SystemMenu
|
||||
|
||||
export UPDATER_RELEASE = TRUE
|
||||
|
||||
export DO_NOT_SHOW_LAUNCHER = TRUE
|
||||
export DISABLE_WDS_SCAN = FALSE
|
||||
|
||||
#############################################
|
||||
# For Wireless development
|
||||
#
|
||||
|
||||
# disable signature check
|
||||
export IGNORE_WLFIRM_SIGNCHECK = TRUE
|
||||
|
||||
export DISABLE_WLFIRM_LOAD = FALSE
|
||||
export DISABLE_INITIAL_SETTINGS = TRUE
|
||||
export SYSM_OUTSIDE_UI = TRUE
|
||||
|
||||
# MAKEROM SWITCH for build SystemMenu
|
||||
export DISABLE_DEBUG = TRUE
|
||||
export USE_WLANFIRM_LOCAL_PUBKEY = FALSE
|
||||
|
||||
DATE_AND_TIME ?= $(shell date +"%y%m%d %H%M")
|
||||
|
||||
DATE ?= $(word 1,$(DATE_AND_TIME))
|
||||
TIME ?= $(word 2,$(DATE_AND_TIME))
|
||||
TIME_NOZERO = $(shell echo $(TIME) | sed -e 's/^0*\(.\)/\1/')
|
||||
|
||||
INSTALL_TARGETS = $(SYSTEMUPDATER_DIR)/ARM9.TWL/bin/$(TWL_BUILDTYPE)/SystemUpdater.srl
|
||||
INSTALL_DIR = .
|
||||
|
||||
GDIRT_INSTALLED += ./$(notdir $(subst .srl,_WL_$(DATE)_*.srl,$(INSTALL_TARGETS)))
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
# Override generic DO_INSTALL
|
||||
define DO_INSTALL
|
||||
$(INSTALL) -d $(INSTALL_DIR) $(AND) \
|
||||
$(foreach FILE, $(INSTALL_TARGETS), \
|
||||
if [ ! -e $(INSTALL_DIR)/$(FILE) -o \
|
||||
$(FILE) -nt $(INSTALL_DIR)/$(FILE) ]; \
|
||||
then \
|
||||
$(ECHO) " install: $(FILE) -> $(subst .srl,_WL_$(DATE)_$(TIME).srl,$(FILE))" $(AND) \
|
||||
$(INSTALL) $(FILE) $(INSTALL_DIR)/$(notdir $(subst .srl,_WL_$(DATE)_$(TIME).srl,$(FILE))); \
|
||||
fi $(AND) ) $(TRUE)
|
||||
endef
|
||||
|
||||
test:
|
||||
@echo $(GDIRT_INSTALLED)
|
||||
|
||||
#===== End of Makefile =====
|
||||
38
build/tests/build4WLDev/Makefile_environment
Normal file
38
build/tests/build4WLDev/Makefile_environment
Normal file
@ -0,0 +1,38 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: SystemUpdater
|
||||
# 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$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_FIRM = SYSTEMMENU
|
||||
|
||||
# force to build for debugger
|
||||
export SYSMENU_DEBUGGER_BUILD = TRUE
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
# skip demos
|
||||
export NITRO_WITHOUT_DEMOS = TRUE
|
||||
export TWL_WITHOUT_DEMOS = TRUE
|
||||
|
||||
SUBDIRS = $(TWLSYSTEM_ROOT) \
|
||||
$(ROOT) \
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
87
build/tests/build4WLDev/Makefile_modification
Normal file
87
build/tests/build4WLDev/Makefile_modification
Normal file
@ -0,0 +1,87 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: SystemUpdater
|
||||
# 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$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_FIRM = SYSTEMMENU
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LAUNCHER_DIR = $(SYSMENU_ROOT)/build/systemMenu_RED/Launcher
|
||||
MACHINESETTINGS_DIR = $(SYSMENU_ROOT)/build/systemMenu_RED/MachineSettings
|
||||
|
||||
SYSMENU_LIBRARIES_DIR = $(SYSMENU_ROOT)/build/libraries_sysmenu
|
||||
|
||||
SYSTEMUPDATER_DIR = $(SYSMENU_ROOT)/build/systemMenu_tools/SystemUpdater
|
||||
|
||||
SCRIPTS_DIR = ./scripts
|
||||
|
||||
MAKEFILES_ORG = $(LAUNCHER_DIR)/Makefile $(LAUNCHER_DIR)/ARM9/Makefile \
|
||||
$(MACHINESETTINGS_DIR)/Makefile $(MACHINESETTINGS_DIR)/ARM9/Makefile
|
||||
MAKE_MAKEFILES = $(SCRIPTS_DIR)/launcher_makefile.pl
|
||||
AUTOGEN_MAKEFILES = $(LAUNCHER_DIR)/Makefile_autogen $(LAUNCHER_DIR)/ARM9/Makefile_autogen \
|
||||
$(MACHINESETTINGS_DIR)/Makefile_autogen $(MACHINESETTINGS_DIR)/ARM9/Makefile_autogen
|
||||
|
||||
LDIRT_CLEAN += $(AUTOGEN_MAKEFILES)
|
||||
|
||||
LOADWLAN_ORG = $(LAUNCHER_DIR)/ARM9/src/loadWlanFirm.c
|
||||
MAKE_LOADWLAN = $(SCRIPTS_DIR)/launcher_loadWlanFirm_c.pl
|
||||
AUTOGEN_LOADWLAN = $(LAUNCHER_DIR)/ARM9/src/loadWlanFirm_autogen.c
|
||||
LDIRT_CLEAN += $(AUTOGEN_LOADWLAN)
|
||||
|
||||
MACHSETTING_ORG = $(MACHINESETTINGS_DIR)/ARM9/src/MachineSetting.c
|
||||
MAKE_MACHSETTING = $(SCRIPTS_DIR)/launcher_MachineSetting_c.pl
|
||||
AUTOGEN_MACHSETTING = $(MACHINESETTINGS_DIR)/ARM9/src/MachineSetting_autogen.c
|
||||
LDIRT_CLEAN += $(AUTOGEN_MACHSETTING)
|
||||
|
||||
NWM_ORG = $(SYSMENU_LIBRARIES_DIR)/Makefile \
|
||||
$(SYSMENU_LIBRARIES_DIR)/nwm/Makefile \
|
||||
$(SYSMENU_LIBRARIES_DIR)/nwm/ARM7/Makefile \
|
||||
$(ROOT)/build/libraries/wm/ARM7.TWL/nwm/src/nwmsp_event_handler.c
|
||||
MAKE_NWM = $(SCRIPTS_DIR)/launcher_fake_macaddress.pl
|
||||
AUTOGEN_NWM = $(SYSMENU_LIBRARIES_DIR)/Makefile_autogen \
|
||||
$(SYSMENU_LIBRARIES_DIR)/nwm/Makefile_autogen \
|
||||
$(SYSMENU_LIBRARIES_DIR)/nwm/ARM7/Makefile_autogen \
|
||||
$(ROOT)/build/libraries/wm/ARM7.TWL/nwm/src/nwmsp_event_handler_autogen.c
|
||||
LDIRT_CLEAN += $(AUTOGEN_NWM)
|
||||
|
||||
|
||||
TARGETS = $(AUTOGEN_MAKEFILES) $(AUTOGEN_LOADWLAN) $(AUTOGEN_MACHSETTING) $(AUTOGEN_NWM)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
do-build: $(TARGETS)
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
$(AUTOGEN_MAKEFILES): $(MAKEFILES_ORG) $(MAKE_MAKEFILES)
|
||||
@echo " make:" $@
|
||||
@perl $(MAKE_MAKEFILES)
|
||||
|
||||
$(AUTOGEN_LOADWLAN): $(LOADWLAN_ORG) $(MAKE_LOADWLAN)
|
||||
@echo " make:" $@
|
||||
@perl $(MAKE_LOADWLAN)
|
||||
|
||||
$(AUTOGEN_MACHSETTING): $(MACHSETTING_ORG) $(MAKE_MACHSETTING)
|
||||
@echo " make:" $@
|
||||
@perl $(MAKE_MACHSETTING)
|
||||
|
||||
$(AUTOGEN_NWM): $(NWM_ORG) $(MAKE_NWM)
|
||||
@echo " make:" $@
|
||||
@perl $(MAKE_NWM)
|
||||
|
||||
#===== End of Makefile =====
|
||||
52
build/tests/build4WLDev/scripts/launcher_MachineSetting_c.pl
Executable file
52
build/tests/build4WLDev/scripts/launcher_MachineSetting_c.pl
Executable file
@ -0,0 +1,52 @@
|
||||
#!/bin/perl
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL - tests -
|
||||
# File: launcher_MachineSetting_c.pl
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, 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$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
|
||||
my $IPLROOT;
|
||||
|
||||
# search TWL_IPL_RED_ROOT
|
||||
foreach ( sort keys ( %ENV ) ){
|
||||
if ($_ =~ m/TWL_IPL_RED_ROOT/s) {
|
||||
$IPLROOT = $ENV{$_};
|
||||
}
|
||||
}
|
||||
|
||||
my $src = "$IPLROOT/build/systemMenu_RED/MachineSettings/ARM9/src/MachineSetting.c";
|
||||
my $dst = "$IPLROOT/build/systemMenu_RED/MachineSettings/ARM9/src/MachineSetting_autogen.c";
|
||||
|
||||
my $rn = "\x0D\x0A";
|
||||
|
||||
open(F, $src) or die "cant open $src\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
|
||||
open(OUT, ">$dst") or die "cant open $dst\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
print OUT $line;
|
||||
# 従来版との見た目の区別のために、無線開発用の表示を追加。
|
||||
if( $line =~ m/^[\t ]*PrintfSJIS\(.*\"MACHINE SETTINGS IPL:%s SDK:%s\".*\);/ )
|
||||
{
|
||||
print OUT "//\t[AUTO ADDITION] 従来版との見た目の区別のために、無線開発用の表\示を追加。", $rn;
|
||||
print OUT "\tPrintfSJIS( 0, 22*8, TXT_COLOR_BLUE, \"[ BUILT FOR WIRELESS DEVELOPMENT ]\");", $rn;
|
||||
}
|
||||
}
|
||||
close(OUT);
|
||||
|
||||
123
build/tests/build4WLDev/scripts/launcher_fake_macaddress.pl
Executable file
123
build/tests/build4WLDev/scripts/launcher_fake_macaddress.pl
Executable file
@ -0,0 +1,123 @@
|
||||
#!/bin/perl
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL - tests -
|
||||
# File: launcher_fake_macaddress.pl
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, 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$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
|
||||
my $rn = "\x0D\x0A";
|
||||
|
||||
my $SDKROOT;
|
||||
|
||||
# search TWLSDK_ROOT
|
||||
foreach ( sort keys ( %ENV ) ){
|
||||
if ($_ =~ m/TWLSDK_ROOT/s) {
|
||||
$SDKROOT = $ENV{$_};
|
||||
}
|
||||
}
|
||||
|
||||
my $src = "$SDKROOT/build/libraries/wm/ARM7.TWL/nwm/src/nwmsp_event_handler.c";
|
||||
my $dst = "$SDKROOT/build/libraries/wm/ARM7.TWL/nwm/src/nwmsp_event_handler_autogen.c";
|
||||
|
||||
open(F, $src) or die "cant open $src\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
open(OUT, ">$dst") or die "cant open $dst\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if( $line =~ m/^ *MI_CpuCopy8\(ev->macaddr, sys->status->macAddress, NWM_SIZE_MACADDR\);/ )
|
||||
{
|
||||
print OUT "//\t\t[AUTO COMMENT] fake MAC address of TWL wireless, copy MAC address from that in NOR flash.", $rn;
|
||||
# add comment out at the top of line
|
||||
$line =~ s/ev->macaddr,/wmMac,/;
|
||||
}
|
||||
|
||||
print OUT $line;
|
||||
}
|
||||
close(OUT);
|
||||
|
||||
my $IPLROOT;
|
||||
|
||||
# search TWL_IPL_RED_ROOT
|
||||
foreach ( sort keys ( %ENV ) ){
|
||||
if ($_ =~ m/TWL_IPL_RED_ROOT/s) {
|
||||
$IPLROOT = $ENV{$_};
|
||||
}
|
||||
}
|
||||
|
||||
my $src_make1 = "$IPLROOT/build/libraries_sysmenu/Makefile";
|
||||
my $dst_make1 = "$IPLROOT/build/libraries_sysmenu/Makefile_autogen";
|
||||
|
||||
open(F, $src_make1) or die "cant open $src_make1\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
open(OUT, ">$dst_make1") or die "cant open $dst_make1\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if( $line =~ m/^SUBDIRS/ )
|
||||
{
|
||||
print OUT "SUBMAKES\t\t=\t\tnwm/Makefile_autogen", $rn, $rn;
|
||||
}
|
||||
|
||||
if( $line =~ m/nwm/ )
|
||||
{
|
||||
$line =~ s/^/\#/;
|
||||
}
|
||||
|
||||
print OUT $line;
|
||||
}
|
||||
close(OUT);
|
||||
|
||||
my $src_make2 = "$IPLROOT/build/libraries_sysmenu/nwm/Makefile";
|
||||
my $dst_make2 = "$IPLROOT/build/libraries_sysmenu/nwm/Makefile_autogen";
|
||||
|
||||
open(F, $src_make2) or die "cant open $src_make2\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
open(OUT, ">$dst_make2") or die "cant open $dst_make2\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if( $line =~ m/^SUBDIRS_P *\+= *ARM7/ )
|
||||
{
|
||||
print OUT "SUBMAKES_P += ARM7/Makefile_autogen", $rn;
|
||||
next
|
||||
}
|
||||
|
||||
print OUT $line;
|
||||
}
|
||||
close(OUT);
|
||||
|
||||
my $src_make3 = "$IPLROOT/build/libraries_sysmenu/nwm/ARM7/Makefile";
|
||||
my $dst_make3 = "$IPLROOT/build/libraries_sysmenu/nwm/ARM7/Makefile_autogen";
|
||||
|
||||
open(F, $src_make3) or die "cant open $src_make3\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
open(OUT, ">$dst_make3") or die "cant open $dst_make3\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if( $line =~ m/^[\t ]*nwmsp_event_handler\.c/ )
|
||||
{
|
||||
$line =~ s/nwmsp_event_handler\.c/nwmsp_event_handler_autogen\.c/;
|
||||
}
|
||||
|
||||
print OUT $line;
|
||||
}
|
||||
close(OUT);
|
||||
55
build/tests/build4WLDev/scripts/launcher_loadWlanFirm_c.pl
Executable file
55
build/tests/build4WLDev/scripts/launcher_loadWlanFirm_c.pl
Executable file
@ -0,0 +1,55 @@
|
||||
#!/bin/perl
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL - tests -
|
||||
# File: launcher_loadWlanFirm_c.pl
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, 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$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
|
||||
my $IPLROOT;
|
||||
|
||||
# search TWL_IPL_RED_ROOT
|
||||
foreach ( sort keys ( %ENV ) ){
|
||||
if ($_ =~ m/TWL_IPL_RED_ROOT/s) {
|
||||
$IPLROOT = $ENV{$_};
|
||||
}
|
||||
}
|
||||
|
||||
my $src = "$IPLROOT/build/systemMenu_RED/Launcher/ARM9/src/loadWlanFirm.c";
|
||||
my $dst = "$IPLROOT/build/systemMenu_RED/Launcher/ARM9/src/loadWlanFirm_autogen.c";
|
||||
|
||||
|
||||
my $rn = "\x0D\x0A";
|
||||
|
||||
open(F, $src) or die "cant open $src\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
|
||||
open(OUT, ">$dst") or die "cant open $dst\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
# WLANのLoad時に限り、FatalErrorのセット無効にする。
|
||||
if( $line =~ m/^[\t ]*UTL_SetFatalError\([\t ]*FATAL_ERROR_WLANFIRM_(LOAD|AUTH)[\t ]*\)/ )
|
||||
{
|
||||
print OUT "//\t[AUTO COMMENTOUT] 無線開発用ランチャーの場合、無線関連のFATALエラー発生は無視してブートするようにします。", $rn;
|
||||
# add comment out at the top of line
|
||||
$line =~ s/^/\/\//;
|
||||
}
|
||||
|
||||
print OUT $line;
|
||||
}
|
||||
close(OUT);
|
||||
|
||||
112
build/tests/build4WLDev/scripts/launcher_makefile.pl
Executable file
112
build/tests/build4WLDev/scripts/launcher_makefile.pl
Executable file
@ -0,0 +1,112 @@
|
||||
#!/bin/perl
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL - tests -
|
||||
# File: launcher_makefile.pl
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, 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$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
|
||||
my $IPLROOT;
|
||||
|
||||
# search TWL_IPL_RED_ROOT
|
||||
foreach ( sort keys ( %ENV ) ){
|
||||
if ($_ =~ m/TWL_IPL_RED_ROOT/s) {
|
||||
$IPLROOT = $ENV{$_};
|
||||
}
|
||||
}
|
||||
|
||||
my $rn = "\x0D\x0A";
|
||||
|
||||
my $src1 = "$IPLROOT/build/systemMenu_RED/Launcher/Makefile";
|
||||
my $dst1 = "$IPLROOT/build/systemMenu_RED/Launcher/Makefile_autogen";
|
||||
|
||||
open(F, $src1) or die "cant open $src1\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
|
||||
open(OUT, ">$dst1") or die "cant open $dst1\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if( $line =~ m/^SUBDIRS\t*=\t*banner ARM9/ )
|
||||
{
|
||||
print OUT "SUBMAKES\t\t=\tbanner/Makefile ARM9/Makefile_autogen", $rn;
|
||||
next;
|
||||
}
|
||||
|
||||
print OUT $line;
|
||||
}
|
||||
close(OUT);
|
||||
|
||||
my $src2 = "$IPLROOT/build/systemMenu_RED/Launcher/ARM9/Makefile";
|
||||
my $dst2 = "$IPLROOT/build/systemMenu_RED/Launcher/ARM9/Makefile_autogen";
|
||||
|
||||
open(F, $src2) or die "cant open $src2\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
|
||||
open(OUT, ">$dst2") or die "cant open $dst2\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if( $line =~ m/loadWlanFirm\.c/ )
|
||||
{
|
||||
$line =~ s/loadWlanFirm\.c/loadWlanFirm_autogen\.c/;
|
||||
}
|
||||
|
||||
print OUT $line;
|
||||
}
|
||||
close(OUT);
|
||||
|
||||
my $src3 = "$IPLROOT/build/systemMenu_RED/MachineSettings/Makefile";
|
||||
my $dst3 = "$IPLROOT/build/systemMenu_RED/MachineSettings/Makefile_autogen";
|
||||
|
||||
open(F, $src3) or die "cant open $src3\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
|
||||
open(OUT, ">$dst3") or die "cant open $dst3\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if( $line =~ m/^SUBDIRS\t*=\t*banner ARM9/ )
|
||||
{
|
||||
print OUT "SUBMAKES\t\t=\tbanner/Makefile ARM9/Makefile_autogen", $rn;
|
||||
next;
|
||||
}
|
||||
|
||||
print OUT $line;
|
||||
}
|
||||
close(OUT);
|
||||
|
||||
my $src4 = "$IPLROOT/build/systemMenu_RED/MachineSettings/ARM9/Makefile";
|
||||
my $dst4 = "$IPLROOT/build/systemMenu_RED/MachineSettings/ARM9/Makefile_autogen";
|
||||
|
||||
open(F, $src4) or die "cant open $src4\n";
|
||||
my @lines = <F>;
|
||||
close(F);
|
||||
|
||||
|
||||
open(OUT, ">$dst4") or die "cant open $dst4\n";
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if( $line =~ m/ +MachineSetting\.c/ )
|
||||
{
|
||||
$line =~ s/MachineSetting\.c/MachineSetting_autogen\.c/;
|
||||
}
|
||||
|
||||
print OUT $line;
|
||||
}
|
||||
close(OUT);
|
||||
Loading…
Reference in New Issue
Block a user