summaryrefslogtreecommitdiffstats
path: root/src/build/vpo/Setup_Env
blob: 32c60c1a3bc790aeac8f6042bb84802f3deebf0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
################################################################################
#
# Setup intialization source script for HostBoot Sprint Release VPO/VBU model
# testing with cronus tools
#
#
# Version 1.0  Copy from   Jim's on 03/21/2012, tested on VBU & VPO
# Version 1.1  04-16-2012  Update to run with sprint 11 image
#                          Sync with Jim's version.
# Version 1.2  05-09-2012  Pick-up Jim's latest changes as of 05-09-2012
#                          Update default Cronus version to newer level
#                          Update default HB_TOOLS level
#                          Increase simclock cycles to 5000000 per loop
#
# Version 1.3   06-11-2012 Change "-c3" to "-cft" (first avail core)
#                          Update to Cronus rel.20120611, HBTOOLS rel.20120611
#                          Build hb0606a_1219.810
#                          Add m_3_a Murano model
#
################################################################################

# Define useful pointers to automated tests/scripts

export JP=/gsa/pokgsa/home/m/c/mcguirej/public
export JR=$JP/auto/rel
export JD=$JP/auto/dev
export JT=$JP/auto/tmp
export JS=$JP/HBI/scripts

# Process arguments so they can be passed down to automated tools
. $JR/autotest.args

# Pick up any user specified command, otherwise default to no test
export AUTOVBU_USER_CMD="`echo \"$my_arg_list\" | sed -n -e 's/[ ]*-- / -|- /' -e 's/.* -|- //p'`"
test "$AUTOVBU_USER_CMD" = "" && AUTOVBU_USER_CMD=NO_TEST

# Local values used in this script

AUTOVBU_HBRELEASE_BASEDIR=/gsa/ausgsa/projects/h/hostboot/release
AUTOVBU_HBTOOLS_BASEDIR=/afs/apd.pok.ibm.com/u/thi/hbtools
AUTOVBU_HBVBUTOOLS_BASEDIR=/gsa/ausgsa/projects/h/hostboot/vbutools
	
# Remove any previous test definitions for HostBoot values - force everything to default if not set
# by Setup_MyEnv function or user specifed argument(s)

unset HB_IMGDIR HB_RELDIR HB_VBUTOOLS DEFAULT_LEVEL
unset AWAN_CONFIG AWAN_SCRIPT AUTOVBU_ECMD_VER
unset AUTOVBU_START AUTOVBU_ISTEP_START AUTOVBU_ISTEP_LIST AUTOVBU_ISTEP_CHKPT

################################################################################
#
# User customizable environment setup function -- modify as desired for new test defaults
#
################################################################################

Setup_MyEnv() {
	
	# Default Sprint release

	sprint=hb0606a_1219.810
	
	# Initialize HostBoot environment/cronus/tools - note new naming convention
	
	export AUTOVBU_CRONUS_SIM=rel.20120611
	export GLOBAL_DEBUG=8.VW.Vc.dG.F3.0I.E8.V
	export HB_TOOLS=$AUTOVBU_HBTOOLS_BASEDIR/rel.20120611

	# Select default model -- choose either VBU or VPO versions
	export VPO_MODEL=m_3_a; unset VBU_MODEL; VBUVPO=VPO
	#export VBU_MODEL=p1_e8056_c1000_cen1_cen054_unopt_2_gfw; unset VPO_MODEL; VBUVPO=VBU
	#export VBU_MODEL=p1_e8062_wafer_nomem_c1000_opt_4; unset VPO_MODEL; VBUVPO=VBU
	#export VBU_MODEL=p1_e8062_c1000_cen1_cen061_unopt_1; unset VPO_MODEL; VBUVPO=VBU
	
	# Default AWAN request time - shorter periods get AWAN faster

	export AWAN_TIME_REQ=-h24
	
	# Default sprint test case settings
	
	export AUTOVBU_CORE=-cft
	export AUTOVBU_SIMCLOCKS=5000000
	export AUTOVBU_INITIAL_CHKPT=after_8megzero_newxscom
	export AUTOVBU_LOOPS=1200
	export AUTOVBU_PRINTK_LINES=50
	
	# Values used internally by automated tools

	export AUTOVPO_ROOTDIR=/afs/apd/func/awanng/vpo/vpo1/mur

	test "$MY_BSO_ID" = "" && echo "Warning: Set MY_BSO_ID to IBM intranet ID if BSO firewall required"

	return 0
}

################################################################################
#
# End User Customizable section -- Please do not modify shell functions below
#
################################################################################


# Parse any user specified arguments

Setup_MyArgs() {

	# Set argument defaults

	get_awan=
	load_hb_img=
	
	# Argument parse loop
	while [ $# -gt 0 ]
	do
		case "$1"
		in
			-h|-help|--help)
				echo "Usage: source Setup_Env	[-get_awan|--get_awan] \\"
				echo "		[<-awan|--awan> <star4b|star8b|star16b>] \\"
				echo "		[<-time|--time> <awan time>] \\"
				echo "		[<-model|--model> <model>] \\"
				echo "		[<-release|--release> <Sprint Release>] \\"
				echo "		[-load_hb_img|--load_hb_img] \\"
				echo "		[<-ecmd_ver|--ecmd_ver> <cronusflex|p8s1>] \\"
				echo "		[<-cronus|--cronus> <cronus version>] \\"
				echo "		[--] [<test script>] [<test args>]"
				return 1
				;;
			-get_awan|--get_awan)
				get_awan=YES
				;;
			-awan|--awan)
				if [ $# -lt 2 ]; then
					echo "Missing/invalid AWAN configuation"
					return 1
				fi
				export AWAN_CONFIG=$2
				shift 1
				;;
			-load_hb_img|--load_hb_img)
				load_hb_img=YES
				;;
			-model|--model)
				if [ $# -lt 2 ]; then
					echo "Missing/invalid model"
					return 1
				fi
				export VPO_MODEL=$2
				shift 1
				;;
			-release|--release)
				if [ $# -lt 2 ]; then
					echo "Missing/invalid release argument"
					return 1
				fi
				sprint=$2
				shift 1
				;;
			-cronus|--cronus)
				if [ $# -lt 2 ]; then
					echo "Missing/invalid cronus"
					return 1
				fi
				export AUTOVBU_CRONUS_SIM=$2
				shift 1
				;;
			-ecmd_ver|--ecmd_ver)
				if [ $# -lt 2 ]; then
					echo "Missing/invalid cronus version (cronusflex, p8s1)"
					return 1
				fi
				export AUTOVBU_ECMD_VER=$2
				shift 1
				;;
			-time|--time)
				if [ $# -lt 2 ]; then
					echo "Missing/invalid awan time"
					return 1
				fi
				export AWAN_TIME_REQ="-$2"
				shift 1
				;;
			--)
				;;
			*=*)
				# Add 'export' to each variable specified so it gets passed to test specific functions
				eval "export `echo \"$1\" | sed -e \"s/=/='/\" -e \"s/$/'/\"`"
				;;
			*)
				;;
		esac
                 
		shift
	done
}

# Dynamically set/reset values based upon current model

Setup_MyDynamic() {

	# Set remaining HostBoot variables now that we have all user supplied settings

	export HB_RELDIR=${HB_RELDIR-`echo $AUTOVBU_HBRELEASE_BASEDIR/*$sprint`}
	if [  ! -d "$HB_RELDIR" ]; then
		echo "Can not find Sprint Release directory: $HB_RELDIR"
		return 1
	fi

	export HB_VBUTOOLS=${HB_VBUTOOLS-$AUTOVBU_HBVBUTOOLS_BASEDIR/$AUTOVBU_CRONUS_SIM}
	if [ ! -d "$HB_VBUTOOLS" ]; then
		echo "Can not find HB_VBUTOOLS directory for cronus version $AUTOVBU_CRONUS_SIM"
		return 1
	fi

	export HB_IMGDIR=${HB_IMGDIR-$HB_RELDIR}

	# Set old names for backward compatibility

	export HBDIR=$HB_IMGDIR
	export HBRELDIR=$HB_RELDIR
	export HBTOOLS=$HB_TOOLS
	export VBUTOOLS=$HB_VBUTOOLS

	# Dynamically determine if specifed model is for VPO or VBU
	if [ "$VPO_MODEL" != "" ]; then
		if [ ! -d $AUTOVPO_ROOTDIR/$VPO_MODEL ]; then
			export VBU_MODEL=$VPO_MODEL; unset VPO_MODEL
			VBUVPO=VBU
		else
			VBUVPO=VPO; unset VBU_MODEL
		fi
	else
		VBUVPO=VBU
	fi

	# Set other defaults based upon MODEL
	case "$VPO_MODEL$VBU_MODEL"
	in
                 s1_e8024_wafer_nomem_dc_opt_6|s1_e8026_c0400_cen1_cen069_unopt_1|m_3_a)
                          export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-p8s1}
                          export AWAN_CONFIG=${AWAN_CONFIG-star8b}
                          unset DEFAULT_LEVEL
                          ;;
		p1_e8062_wafer_nomem_c1000_opt_4|m_2_e)
			export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-p8s1}
			export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_star4b}
			export AWAN_CONFIG=${AWAN_CONFIG-star4b}
			export DEFAULT_LEVEL=prev
			;;
		m_1_c|p1_e8056_c1000_cen1_cen054_unopt_2_gfw)
			export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-cronusflex}
			export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_star8b_flex}
			export AWAN_CONFIG=${AWAN_CONFIG-star8b}
			export DEFAULT_LEVEL=prev
			;;
		m_2_a|p1_e8062_c1000_cen1_cen061_unopt_1)
			export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-cronusflex}
			export AWAN_SCRIPT=${AWAN_SCRIPT- run_script_star8b_flex}
			export AWAN_CONFIG=${AWAN_CONFIG-star8b}
			export DEFAULT_LEVEL=prev
			;;
		p1_e8056*|p1_e8059*|p1_e8062*)
			export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-p8s1}
			export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_star8b}
			export AWAN_CONFIG=${AWAN_CONFIG-star8b}
			export DEFAULT_LEVEL=prev
			;;
		s1_e8024_wafer_nomem_dc_opt_6)
			export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-p8s1}
			export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_star8b}
			export AWAN_CONFIG=${AWAN_CONFIG-star8b}
			unset DEFAULT_LEVEL
			;;
		s1_e8024_wafer_nomem*)
			export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-p8s1}
			export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_star4b}
			export AWAN_CONFIG=${AWAN_CONFIG-star4b}
			unset DEFAULT_LEVEL
			;;
		*)
			export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-p8s1}
			export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_star8b}
			export AWAN_CONFIG=${AWAN_CONFIG-star8b}
			;;
	esac

	if [ "$AUTOVBU_ECMD_VER" = "cronusflex" ]; then
		export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_${AWAN_CONFIG}_flex}
	else
		export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_${AWAN_CONFIG}}
	fi

	# Try to dynamically set istep list if user did not supply a value

	if [ "$AUTOVBU_ISTEP_LIST" = "" -a -f $HB_IMGDIR/isteplist.csv ]; then
		export AUTOVBU_ISTEP_LIST=`sort -s -t ',' -k 1,1n -k2,2n  $HB_IMGDIR/isteplist.csv | cut -d',' -f3 | tr '\n' ' '`
	elif [ "$AUTOVBU_ISTEP_LIST" = "" -a -f $HB_TOOLS/isteplist.csv ]; then
		export AUTOVBU_ISTEP_LIST=`cut -d',' -f3 <$HB_TOOLS/isteplist.csv | tr '\n' ' '`
	fi

	# Adjust PATH -- we want our tools at the beginning of the path, release tools at the end
	echo $PATH | grep "$HB_RELDIR" >/dev/null 2>&1
	if [ $? -ne 0 ]; then
		PATH=$PATH:$HB_RELDIR
	fi

	# Needed for hb-dump/hb-Trace/etc... to find fsp-trace
	echo $PATH | grep "$HB_TOOLS" >/dev/null 2>&1
	if [ $? -ne 0 ]; then
		PATH=$HB_TOOLS:$PATH
	fi
}

# Get the AWAN if requested by the user

Setup_MyAWAN() {

	# Allow testing with an Austin based VNC server, but we must run in POK and lower BSO firewall
	
	if [ `hostname -d` != "pok.ibm.com" ]; then
	        echo "ERROR: This script must be sourced on a POK based Linux system (batchl004, vpopok2 or vpopok3)"
	        return 1
	fi
	
	# Make sure DISPLAY includes our host name
	
	test "`expr index "$DISPLAY" ':'`" = "1" && DISPLAY=`hostname`$DISPLAY
	
	# Defines used for AWAN communication
	
	MY_AWAN_TARGET=/afs/apd.pok.ibm.com/u/${MY_AFS_USER-$USER}/awan/awan.target-$VBU_MODEL$VPO_MODEL-${MY_AWAN_DIR-${MY_AFS_USER-$USER}}-$DISPLAY
	MY_AWAN_HAVE=/afs/apd.pok.ibm.com/u/${MY_AFS_USER-$USER}/awan/awan.HAVE-$VBU_MODEL$VPO_MODEL-${MY_AWAN_DIR-${MY_AFS_USER-$USER}}-$DISPLAY
	MY_AWAN_INIT=/afs/apd.pok.ibm.com/u/${MY_AFS_USER-$USER}/awan/awan.init-$VBU_MODEL$VPO_MODEL-${MY_AWAN_DIR-${MY_AFS_USER-$USER}}-$DISPLAY
	MY_AWAN_KEEP=/afs/apd.pok.ibm.com/u/${MY_AFS_USER-$USER}/awan/awan.KEEP-$VBU_MODEL$VPO_MODEL-${MY_AWAN_DIR-${MY_AFS_USER-$USER}}-$DISPLAY
		
	if [ "$get_awan" = "YES" ]; then
		unset ECMD_TARGET
		# Add environmental definitions for automated test
		eval export P8_${VBUVPO}DD1_${VPO_MODEL}${VBU_MODEL}_AWAN_SCRIPT="$AWAN_SCRIPT"
		eval export P8_${VBUVPO}DD1_${VPO_MODEL}${VBU_MODEL}_AUTOVBU_ECMD_VER="$AUTOVBU_ECMD_VER"
		eval export P8_${VBUVPO}DD1_${VPO_MODEL}${VBU_MODEL}_AUTOVBU_CRONUS_SIM="$AUTOVBU_CRONUS_SIM"
		#export -p | egrep "P8_${VBUVPO}DD1_.*AWAN_SCRIPT"; echo
		(
		# Check to see if we must lower BSO firewall
	
		echo $DISPLAY | egrep "pok.ibm.com|boeblingen.de.ibm.com" >/dev/null
		if [ $? -eq 0 ]; then
		        # POK/BOE based VNC servers should not need BSO
			unset MY_BSO_ID
		elif [ "$MY_BSO_ID" = "" ]; then
		        echo "ERROR: DISPLAY is set to a system not in the POK domain, but MY_BSO_ID is not set"
			echo
		        echo "  export MY_BSO_ID=<ibm_intranet_id>"
			echo
			exit 1
		fi
	
		unset my_bso_cmd
		test "$MY_BSO_ID" != "" && my_bso_cmd="--lower_firewall $MY_BSO_ID"
	
		# Pick up SIMDISPATCH level used by this cronus, and pass it to the AWAN request
		
		if [ -f "$ECMD_EXE" ]; then
			cronus_dir=`dirname $ECMD_EXE`
			if [ -f "$cronus_dir/SIMDISP_RELEASE" ]; then
				export SIMDISP_RELEASE=`cat $cronus_dir/SIMDISP_RELEASE`
			else
				unset SIMDISP_RELEASE
			fi
		fi

		# Request AWAN and wait for it to initialize

		echo
		echo "AUTOVBU_USER_CMD=$AUTOVBU_USER_CMD"
		echo
		echo "Requesting an AWAN:"
		echo
		vbuvpo=`echo $VBUVPO | tr '[A-Z]' '[a-z]'`
		echo "$JR/auto${vbuvpo}test $my_bso_cmd --silent --keep_awan SIMDISP_RELEASE=$SIMDISP_RELEASE AUTOVBU_ECMD_VER=$AUTOVBU_ECMD_VER AUTOVBU_CRONUS_SIM=$AUTOVBU_CRONUS_SIM \\"
		echo "			-- : $VBU_MODEL$VPO_MODEL:$AWAN_CONFIG:HBI=\\\$AUTOVBU_USER_CMD"
		echo
	
		$JR/auto${vbuvpo}test $my_bso_cmd --silent --keep_awan SIMDISP_RELEASE=$SIMDISP_RELEASE AUTOVBU_ECMD_VER=$AUTOVBU_ECMD_VER AUTOVBU_CRONUS_SIM=$AUTOVBU_CRONUS_SIM \
					-- : $VBU_MODEL$VPO_MODEL:$AWAN_CONFIG:HBI=\$AUTOVBU_USER_CMD
		) || return 1
	fi
}

# Setup our cronus target if we used the automated tool to acquire the AWAN

Setup_MyTarget() {

	# Check for AWAN using automated tools

	if [ -f "$MY_AWAN_HAVE" ]; then
		if [ ! -f "$MY_AWAN_TARGET" ]; then
			# Pause a while for target to initialize
			for i in 0 1 2 3 4 5
			do
				test -f "$MY_AWAN_TARGET" && break
				echo "Waiting for $MY_AWAN_TARGET"
				sleep 30
			done
		fi
	fi
	
	if [ -f $MY_AWAN_TARGET ]; then
		my_target=`cat $MY_AWAN_TARGET`
		touch $MY_AWAN_KEEP
	else
		# User is doing things on their own -- target must be set already
#		my_target=`target query 2>/dev/null | sed -n -e '/Current target/s/.*is "\(.*\)"/\1/p'`
		my_target=$ECMD_TARGET
		if [ "$my_target" = "" ]; then
			echo "*** ERROR: Cronus target has not been set"
			return 1
		fi
	fi
	echo
	target $my_target
	
	if [ -f "$CRONUS_HOME/cnfgs/${my_target}_cnfg" ]; then
		# Update target cronus config file

		setconfig HW_PROCEDURE_PATH $HB_VBUTOOLS  -quiet
		getconfig HW_PROCEDURE_PATH -quiet

		setconfig GLOBAL_DEBUG $GLOBAL_DEBUG -quiet
		getconfig GLOBAL_DEBUG -quiet
	else
		echo
		echo "*** WARNING: AWAN target config file was not found"
		c=`dirname $CRONUS_HOME`
		if [ "$AUTOVBU_ECMD_VER" != "cronusflex" -a -f $c/cronusflex/cnfgs/${my_target}_cnfg ]; then
			echo "ERROR: AWAN is running cronusflex instead of $AUTOVBU_ECMD_VER"
		elif [ "$AUTOVBU_ECMD_VER" != "p8s1" -a -f $c/p8s1/cnfgs/${my_target}_cnfg ]; then
			echo "ERROR: AWAN is running cronus p8s1 instead of $AUTOVBU_ECMD_VER"
		else
			echo "User must manually set cronus target and update config file"
		fi
		return 1
	fi

	return 0
}

# Load HostBoot image if requested

Setup_MyHBImage() {

	# User requested option?

	if [ "$load_hb_img" = "YES" ]; then

		# Load initial checkpoint first

		set -x
		siminit ${AUTOVBU_INITIAL_CHKPT-after_8megzero} -quiet || return 1
		$HB_VBUTOOLS/p8_load_l3 -l ${DEFAULT_LEVEL-rel} -f ${HB_IMGDIR}/hbicore${use_test}.bin -b ${AUTOVBU_CORE--cft} || return 1
		$HB_VBUTOOLS/p8_load_l3 -l ${DEFAULT_LEVEL-rel} -f ${HB_IMGDIR}/vbu${use_test}.pnor -o 0x400000 -b ${AUTOVBU_CORE--cft} || return 1
		set +x
	fi

	return 0
}
# Define a shell function to clean up and release the AWAN

AWAN_EXIT() {
	rm -f "$MY_AWAN_KEEP"
	my_target=`target query 2>/dev/null | sed -n -e '/Current target/s/.*is "\(.*\)"/\1/p'`
	if [ "$my_target" != "" -a -f "$CRONUS_HOME/cnfgs/${my_target}_cnfg" ]; then
		simexit -quiet
		echo "Delay for AWAN exit"
		sleep 60
	fi
}

################################################################################
#
# Start performing environment setup
#
################################################################################

# Include ECMD aliases

if [ "$CTEPATH" != "" ]; then
	source $CTEPATH/tools/ecmd/rel/bin/ecmdaliases.ksh
else
	echo "ERROR: This script must be sourced while running in a p8lab window"
	return 1
fi

# Perform user customizable setup

Setup_MyEnv || return 1

# Now process any argument overrides

eval Setup_MyArgs  "`echo \"$my_arg_list\"`" || return 1


# Perform dynamic adjustments based upon current settings

Setup_MyDynamic || return 1

# Print user banner of what we have setup

echo
echo "Performing HostBoot setup/initialization for $VBUVPO model $VBU_MODEL$VPO_MODEL"
echo
echo "Sprint Release directory:	$HB_RELDIR"
echo "Using HB_IMGDIR:		$HB_IMGDIR"
echo "Using ecmdsetup version:	$AUTOVBU_ECMD_VER"
echo "Using Cronus version:		$AUTOVBU_CRONUS_SIM"
echo "Using HB_VBUTOOLS version:	`basename $HB_VBUTOOLS`"
echo "Using HB_TOOLS version:		`basename $HB_TOOLS`"
echo

sleep 2

# Setup ecmd/cronusflex

ecmdsetup auto cro $AUTOVBU_ECMD_VER $AUTOVBU_CRONUS_SIM sim pok

# Get an AWAN if requested, or reuse an existing connection if found

Setup_MyAWAN || return 1

Setup_MyTarget || return 1

Setup_MyHBImage || return 1

echo
echo "Current Settings"
echo

env | egrep "^AUTO|^AWAN|^HB_|^VPO|^VBU|^J[PRS]=" | sort

echo
echo "To gracefully terminate your AWAN session enter: AWAN_EXIT"
echo
OpenPOWER on IntegriCloud