#!/usr/bin/env bash # Version 8/28/2012 ############################################################################### # # Copyright (C) 2009-2013 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. # ############################################################################### ####################################################################### # File: MionHddDelete.sh # # Purpose: This script will "format" the HostBridge Hard Drive, # by uploading a HelloWorld WUM image to all the banks in MION # # NOTE: Please treat it as reference code and feel free to edit it to # match/blend into your existing automation ######################################################################## ####################################### # Script variables ####################################### OUT_PATH=$CAFE_ROOT/discimages MAKEMASTER=$CAFE_ROOT/system/bin/tool/mastering/makemaster.exe MION_HDD_BANK_START=0 MION_HDD_BANK_END=10 RUN_TIME=25 MASTER_RPX="$CAFE_ROOT/system/bin/ghs/cafe/demo/helloworld/NDEBUG/helloworld.rpx" WUM_FILE_NAME=$(basename $MASTER_RPX .rpx) ####################################### # Disc Image Out Path Directory check ####################################### if [ ! -d $OUT_PATH ]; then mkdir $CAFE_ROOT/discimages fi ####################################### # Demo Application Prep ####################################### cd $OUT_PATH caferun $MASTER_RPX & sleep $RUN_TIME kill $! cafestop ####################################### # Mastering & Padding ####################################### makecfmaster.sh -r $MASTER_RPX -o $WUM_FILE_NAME makecfdiscimage.sh -i $WUM_FILE_NAME.wumad ####################################### # Main Deletion Process ####################################### while [[ $MION_HDD_BANK_START -le $MION_HDD_BANK_END ]]; do echo "Currently deleting MION Bank Number: $MION_HDD_BANK_START" echo "Please be patient... this operation takes roughly 30 minutes, and needs to be done 11 times" uploadimg.sh $MION_HDD_BANK_START $WUM_FILE_NAME.wum $BRIDGE_CURRENT_IP_ADDRESS let "MION_HDD_BANK_START+=1" done echo "Done" exit 0