//****************************************************************************
//                   INTEL CORPORATION PROPRIETARY INFORMATION
//       This software is supplied under the terms of a license agreement or
//       nondisclosure agreement with Intel Corporation and may not be copied
//       or disclosed except in accordance with the terms of that agreement.
//         Copyright (c) 2016 Intel Corporation. All Rights Reserved.
//****************************************************************************
//
// NOTE: Please use only TAB stops for indentation when editing this file!
//

CONFIGURATION	"Revision S2600WT_113"
DISPLAY			"FRU & SDR Update Package for Intel(R) Server Board S2600WTx (S2600WT_113)"
DISPLAY			"Copyright (c) 2016 Intel Corporation"
DISPLAY			""


// Detect baseboard by looking at the BMC product ID
//

PROBE		"BASEBOARD_PRODID" "6F"
FOUND		"S2600WT"  "WRONG_PKG"

IFSET "WRONG_PKG"
	DISPLAY ""
	DISPLAY "This is the incorrect FRU/SDR package for this baseboard."
	DISPLAY ""
	ERRORLEVEL 01
ENDIF


IFSET "S2600WT"
	// Uncomment to force manual Chassis selection
	//SET "CHASSIS_MENU"

	// Uncomment to allow setting Board Mfg FRU fields
	//SET "ALLOW_BRD_UPDATE"

	// Uncomment to use a non-Intel GPGPU card (not yet implemented)
	//SET "USE_GPGPU"
	
	// Determine if this is a S2600WTT, a S2600WT2, a S2600WTTR, a S2600WT2R or a S2600WTTS1R board
	FRUNAME     "SYSTEM"
	FRUADDRESS  0
	FRUAREA "BOARD" VALIDATE "BB_FRU_IPMI"
	IFSET "BB_FRU_IPMI"
		PROBE FRUFIELD "PN" "S2600WT2R"
		FOUND "WT2R_FRU_PN" ""
		IFSET "WT2R_FRU_PN"
			SET "S2600WT2R"
		ELSE
			PROBE FRUFIELD "PN" "S2600WT2"
			FOUND "WT2_FRU_PN" ""
			IFSET "WT2_FRU_PN"
				SET "S2600WT2"
			ELSE	
				PROBE FRUFIELD "PN" "S2600WTTS1R"
				FOUND "WTTS1R_FRU_PN" ""
				IFSET "WTTS1R_FRU_PN"
					SET "S2600WTTS1R"
				ELSE
					PROBE FRUFIELD "PN" "S2600WTTR"
					FOUND "WTTR_FRU_PN" ""
					IFSET "WTTR_FRU_PN"
						SET "S2600WTTR"
					ELSE
						PROBE FRUFIELD "PN" "S2600WTT"
						FOUND "WTT_FRU_PN" ""
						IFSET "WTT_FRU_PN"
							SET "S2600WTT"
						ELSE	
							SET "NO_WT_FRU"
						ENDIF
					ENDIF	
				ENDIF
			ENDIF
		ENDIF
	ELSE
		DISPLAY "No Valid Baseboard FRU detected!"
		SET "NO_WT_FRU"
	ENDIF
	
	DISPLAY		""
	IFSET "S2600WT2"
		DISPLAY		"Intel(R) Server Board S2600WT2 detected"
	ELSE
		IFSET "S2600WT2R"
			DISPLAY     "Intel(R) Server Board S2600WT2R detected"
		ELSE	
			IFSET "S2600WTT"
				DISPLAY		"Intel(R) Server Board S2600WTT detected"
			ELSE
				IFSET "S2600WTTR"
					DISPLAY		"Intel(R) Server Board S2600WTTR detected"
				ELSE
					IFSET "S2600WTTS1R"
						DISPLAY		"Intel(R) Server Board S2600WTTS1R detected"
					ELSE
						DISPLAY		"Intel(R) Server Board S2600WT? detected"
					ENDIF	
				ENDIF
			ENDIF		
		ENDIF
	ENDIF
	
	DISPLAY ""
	MENUTITLE	"Select the function you want to perform:"
	MENU		"SDR"	"Update only the SDR"
	MENU		"FRU"	"Update only the FRU"
	MENU		"BOTH"	"Update both the SDR and the FRU"
	MENU		"ASSET"	"Modify the Asset Tag"
	//MENU		"FCT"	"Functional Test"
	//MENU		"FOQM"	"Functional Outgoing Manufacturing Test"
	//MENU		"SHIPPING"	"Default shipping configuration"
	MENU		"EXIT1"	"Exit FRU/SDR update"
	MENUPROMPT
	DISPLAY " "

	IFSET "BOTH"
		SET "SDR"
		SET "FRU"
	ENDIF

	// Skip HW probing if one of the manufacturing specific configurations is selected
	IFSET "FCT"
		SET "MFG_CONFIG"
		SET "SKIP_PROBE"
	ENDIF

	IFSET "FOQM"
		SET "MFG_CONFIG"
		SET "SKIP_PROBE"
	ENDIF

	IFSET "SHIPPING"
		SET "MFG_CONFIG"
		SET "SKIP_PROBE"
	ENDIF

	IFSET "EXIT1"
		DISPLAY "Exiting without performing any updates"
	ELSE
		// Skip all hardware probing and program the selected manufacturing configuration
		IFSET "MFG_CONFIG"
			SDRNAME   "S2600WT.sdr"		// Update SDR Repository
		ENDIF

		SET "CONTINUE"

		IFSET "SDR"
			IFSET "CHASSIS_MENU"
			ELSE
				DISPLAY "Auto-detecting chassis model and attached hardware."
				DISPLAY "This may take up to 1 minute to complete."

				// Is a front panel FRU device present?
				PROBE "IMBDEVICE" "04"
				FOUND "FP_FRU" ""
			ENDIF

			IFSET "FP_FRU" "CONTINUE"
				SET "NO_STORE_FP"
				SET "NO_NON_STORE_FP"

				// Front panel FRU device found so check for FP Type
				FRUNAME "SYSTEM"
				FRUADDRESS 04
				FRUAREA "BOARD" VALIDATE "FP_FRU_IPMI"

				IFSET "FP_FRU_IPMI"
					FRUAREA "BOARD"
					PROBE FRUFIELD "PN" "F2USTOPANEL"
					FOUND "STORE_FP"
					IFSET "STORE_FP"
						CLEAR "NO_STORE_FP"
					ELSE
						FRUAREA "BOARD"
						PROBE FRUFIELD "PN" "FFPANEL"
						FOUND "NON_STORE_FP"
						IFSET "NON_STORE_FP"
							CLEAR "NO_NON_STORE_FP"
						ENDIF
					ENDIF

					IFSET "NO_STORE_FP" "NO_NON_STORE_FP"
						DISPLAY "No Intel Front Panel detected!"
						DISPLAY "Reverting to Manual Chassis Selection."
						CLEAR "FP_FRU"
						SET "CHASSIS_MENU"
					ENDIF
				ELSE
					DISPLAY "Front Panel detected but FRU data is invalid!"
					DISPLAY "Reverting to Manual Chassis Selection."
					SET "CHASSIS_MENU"
				ENDIF
			ELSE
				DISPLAY ""
				DISPLAY "Front panel FRU device not detected"
				DISPLAY "Falling back to user chassis selection as auto detection is not possible."
				SET "CHASSIS_MENU"
			ENDIF

			IFSET "CHASSIS_MENU"
			ELSE
				// Continue process of auto-detecting chassis model
				// Is the first hot-swap HDD backplane present?
	        		PROBE "PING" "09" "D0"
				FOUND "HSBP1_DEF_LOC" ""
				IFSET "HSBP1_DEF_LOC"
					SET "HSBP1"
				ELSE
					PROBE "PING" "09" "50"
					FOUND "HSBP1_ALT_LOC" ""
					IFSET "HSBP1_ALT_LOC"
						SET "HSBP1"
					ENDIF
				ENDIF		
				IFSET "HSBP1"
					FRUNAME "SYSTEM"
					FRUADDRESS 05
					FRUAREA "BOARD" VALIDATE "HSBP1_FRU_IPMI"
					IFSET "HSBP1_FRU_IPMI"
						SET "CONTINUE_PROBE"
						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FXX8X25PCIHSBP"
							FOUND "HSBP1_2U8X25_COMBO"
							IFSET "HSBP1_2U8X25_COMBO"
								CLEAR "CONTINUE_PROBE"
								SET "HSBP1_2U"
								SET "HDD_8"
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FXX8X25"
							FOUND "HSBP1_2U8X25"
							IFSET "HSBP1_2U8X25"
								CLEAR "CONTINUE_PROBE"
								SET "HSBP1_2U"
								SET "HDD_8"
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F1U8X25PCIHSBP"
							FOUND "HSBP1_1U8X25_COMBO"
							IFSET "HSBP1_1U8X25_COMBO"
								CLEAR "CONTINUE_PROBE"
								SET "HDD_8"
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F1U8X25"
							FOUND "HSBP1_1U8X25"
							IFSET "HSBP1_1U8X25"
								CLEAR "CONTINUE_PROBE"
								SET "HDD_8"
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F2U8X35"
							FOUND "HSBP1_8X35"
							IFSET "HSBP1_8X35"
								CLEAR "CONTINUE_PROBE"
								SET "HDD_8"
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FR1304"
							FOUND "HSBP1_4X35"
							IFSET "HSBP1_4X35"
								CLEAR "CONTINUE_PROBE"
								SET "HDD_4"
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FXX1304"
							FOUND "HSBP1_4X35"
							IFSET "HSBP1_4X35"
								CLEAR "CONTINUE_PROBE"
								SET "HDD_4"
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F2U12X35"
							FOUND "HSBP1_12X35"
							IFSET "HSBP1_12X35"
								CLEAR "CONTINUE_PROBE"
								SET "HSBP1_2U"
								SET "HDD_12"
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							DISPLAY "HSBP1 has unrecognized Product Name in its FRU!"
						ENDIF
					ELSE
						DISPLAY "HSBP1 has an invalid FRU!"
					ENDIF
				ENDIF

				// Is the second hot-swap HDD backplane present?
				PROBE "PING" "09" "D2"
				FOUND "HSBP2_DEF_LOC" ""
				IFSET "HSBP2_DEF_LOC"
					SET "HSBP2"
				ELSE
					PROBE "PING" "09" "52"
					FOUND "HSBP2_ALT_LOC" ""
					IFSET "HSBP2_ALT_LOC"
						SET "HSBP2"
					ENDIF
				ENDIF
				IFSET "HSBP2"
					FRUNAME "SYSTEM"
					FRUADDRESS 06
					FRUAREA "BOARD" VALIDATE "HSBP2_FRU_IPMI"
					IFSET "HSBP2_FRU_IPMI"
						SET "CONTINUE_PROBE"
						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FXX8X25PCIHSBP"
							FOUND "HSBP2_2U8X25_COMBO"
							IFSET "HSBP2_2U8X25_COMBO"
								CLEAR "CONTINUE_PROBE"
								SET "HSBP2_2U"
								IFSET "HDD_8"
									CLEAR "HDD_8"
									SET "HDD_16"
								ELSE
									IFSET "HDD_4"
										CLEAR "HDD_4"
										SET "HDD_12"
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FXX8X25"
							FOUND "HSBP2_2U8X25"
							IFSET "HSBP2_2U8X25"
								CLEAR "CONTINUE_PROBE"
								SET "HSBP2_2U"
								IFSET "HDD_8"
									CLEAR "HDD_8"
									SET "HDD_16"
								ELSE
									IFSET "HDD_4"
										CLEAR "HDD_4"
										SET "HDD_12"
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F1U8X25PCIHSBP"
							FOUND "HSBP2_1U8X25_COMBO"
							IFSET "HSBP2_1U8X25_COMBO"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_8"
									CLEAR "HDD_8"
									SET "HDD_16"
								ELSE
									IFSET "HDD_4"
										CLEAR "HDD_4"
										SET "HDD_12"
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F1U8X25"
							FOUND "HSBP2_1U8X25"
							IFSET "HSBP2_1U8X25"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_8"
									CLEAR "HDD_8"
									SET "HDD_16"
								ELSE
									IFSET "HDD_4"
										CLEAR "HDD_4"
										SET "HDD_12"
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F2U8X35"
							FOUND "HSBP2_8X35"
							IFSET "HSBP2_8X35"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_8"
									CLEAR "HDD_8"
									SET "HDD_16"
								ELSE
									IFSET "HDD_4"
										CLEAR "HDD_4"
										SET "HDD_12"
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FR1304"
							FOUND "HSBP2_4X35"
							IFSET "HSBP2_4X35"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_8"
									CLEAR "HDD_8"
									SET "HDD_12"
								ELSE
									IFSET "HDD_4"
										CLEAR "HDD_4"
										SET "HDD_8"
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FXX1304"
							FOUND "HSBP2_4X35"
							IFSET "HSBP2_4X35"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_8"
									CLEAR "HDD_8"
									SET "HDD_12"
								ELSE
									IFSET "HDD_4"
										CLEAR "HDD_4"
										SET "HDD_8"
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							DISPLAY "HSBP2 has unrecognized Product Name in its FRU!"
						ENDIF
					ELSE
						DISPLAY "HSBP2 has an invalid FRU!"
					ENDIF
				ENDIF

				// Is the third hot-swap HDD backplane present?
				PROBE "PING" "09" "D4"
				FOUND "HSBP3_DEF_LOC" ""
				IFSET "HSBP3_DEF_LOC"
					SET "HSBP3"
				ELSE
					PROBE "PING" "09" "54"
					FOUND "HSBP3_ALT_LOC" ""
					IFSET "HSBP3_ALT_LOC"
						SET "HSBP3"
					ENDIF
				ENDIF
				IFSET "HSBP3"
					FRUNAME "SYSTEM"
					FRUADDRESS 07
					FRUAREA "BOARD" VALIDATE "HSBP3_FRU_IPMI"
					IFSET "HSBP3_FRU_IPMI"
						SET "CONTINUE_PROBE"
						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FXX8X25PCIHSBP"
							FOUND "HSBP3_2U8X25_COMBO"
							IFSET "HSBP3_2U8X25_COMBO"
								CLEAR "CONTINUE_PROBE"
								SET "HSBP3_2U"
								IFSET "HDD_16"
									CLEAR "HDD_16"
									SET "HDD_24"
								ELSE
									IFSET "HDD_12"
										CLEAR "HDD_12"
										SET "HDD_20"
									ELSE	
										IFSET "HDD_8"
											CLEAR "HDD_8"
											SET "HDD_16"
										ENDIF
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FXX8X25"
							FOUND "HSBP3_2U8X25"
							IFSET "HSBP3_2U8X25"
								CLEAR "CONTINUE_PROBE"
								SET "HSBP3_2U"
								IFSET "HDD_16"
									CLEAR "HDD_16"
									SET "HDD_24"
								ELSE
									IFSET "HDD_12"
										CLEAR "HDD_12"
										SET "HDD_20"
									ELSE
										IFSET "HDD_8"
											CLEAR "HDD_8"
											SET "HDD_16"
										ENDIF
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F1U8X25PCIHSBP"
							FOUND "HSBP3_1U8X25_COMBO"
							IFSET "HSBP3_1U8X25_COMBO"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_16"
									CLEAR "HDD_16"
									SET "HDD_24"
								ELSE
									IFSET "HDD_12"
										CLEAR "HDD_12"
										SET "HDD_20"
									ELSE
										IFSET "HDD_8"
											CLEAR "HDD_8"
											SET "HDD_16"
										ENDIF
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F1U8X25"
							FOUND "HSBP3_1U8X25"
							IFSET "HSBP3_1U8X25"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_16"
									CLEAR "HDD_16"
									SET "HDD_24"
								ELSE
									IFSET "HDD_12"
										CLEAR "HDD_12"
										SET "HDD_20"
									ELSE
										IFSET "HDD_8"
											CLEAR "HDD_8"
											SET "HDD_16"
										ENDIF
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "F2U8X35"
							FOUND "HSBP3_8X35"
							IFSET "HSBP3_8X35"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_16"
									CLEAR "HDD_16"
									SET "HDD_24"
								ELSE
									IFSET "HDD_12"
										CLEAR "HDD_12"
										SET "HDD_20"
									ELSE
										IFSET "HDD_8"
											CLEAR "HDD_8"
											SET "HDD_16"
										ENDIF
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FR1304"
							FOUND "HSBP3_4X35"
							IFSET "HSBP3_4X35"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_16"
									CLEAR "HDD_16"
									SET "HDD_20"
								ELSE
									IFSET "HDD_12"
										CLEAR "HDD_12"
										SET "HDD_16"
									ELSE
										IFSET "HDD_8"
											CLEAR "HDD_8"
											SET "HDD_12"
										ENDIF
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "FXX1304"
							FOUND "HSBP3_4X35"
							IFSET "HSBP3_4X35"
								CLEAR "CONTINUE_PROBE"
								IFSET "HDD_16"
									CLEAR "HDD_16"
									SET "HDD_20"
								ELSE
									IFSET "HDD_12"
										CLEAR "HDD_12"
										SET "HDD_16"
									ELSE
										IFSET "HDD_8"
											CLEAR "HDD_8"
											SET "HDD_12"
										ENDIF
									ENDIF
								ENDIF
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							DISPLAY "HSBP3 has unrecognized Product Name in its FRU!"
						ENDIF
					ELSE
						DISPLAY "HSBP3 has an invalid FRU!"
					ENDIF
				ENDIF
                    
				// Is the fourth (rear) hot-swap HDD backplane present?
				PROBE "PING" "09" "DC"
				FOUND "HSBP4_DEF_LOC" ""
				IFSET "HSBP4_DEF_LOC"
					SET "HSBP4"
				ELSE
					PROBE "PING" "09" "5C"
					FOUND "HSBP4_ALT_LOC" ""
					IFSET "HSBP4_ALT_LOC"
						SET "HSBP4"
					ENDIF			
				ENDIF						
				IFSET "HSBP4"
					FRUNAME "SYSTEM"
					FRUADDRESS 11
					FRUAREA "BOARD" VALIDATE "HSBP4_FRU_IPMI"
					IFSET "HSBP4_FRU_IPMI"
						SET "CONTINUE_PROBE"
						IFSET "CONTINUE_PROBE"
							PROBE FRUFIELD "PN" "A2UREAR"
							FOUND "HSBP4_2X25"
							IFSET "HSBP4_2X25"
								CLEAR "CONTINUE_PROBE"
							ENDIF
						ENDIF

						IFSET "CONTINUE_PROBE"
							DISPLAY "HSBP4 has unrecognized Product Name in its FRU!"
						ENDIF
					ELSE
						DISPLAY "HSBP4 has an invalid FRU!"
					ENDIF
				ENDIF
                    
				// Check for chassis type based on valid HSBP FRU information
				SET "CONTINUE_PROBE"
				IFSET "HSBP1_2U" "HSBP2_2U" "HSBP3_2U"
					SET "R2224"
					SET "R2000"
					CLEAR "CONTINUE_PROBE"
				ENDIF
			
				IFSET "CONTINUE_PROBE" "HSBP1_12X35"
					SET "R2312"
					SET "R2000"
					CLEAR "CONTINUE_PROBE"
				ENDIF
			
				IFSET "CONTINUE_PROBE" "HSBP1_8X35"
					SET "R2000"
					SET "R2XXX"
					CLEAR "CONTINUE_PROBE"
				ENDIF
			
				IFSET "CONTINUE_PROBE" "HSBP1_2U"
					SET "R2000"
					SET "R2XXX"
					CLEAR "CONTINUE_PROBE"
				ENDIF
			
				IFSET "CONTINUE_PROBE" "HSBP1_4X35"
					SET "R1000"
					CLEAR "CONTINUE_PROBE"
				ENDIF
				IFSET "CONTINUE_PROBE" "HSBP1_1U8X25"
					SET "R1000"
					CLEAR "CONTINUE_PROBE"
				ENDIF

				IFSET "CONTINUE_PROBE" "HSBP1_1U8X25_COMBO"
					SET "R1000"
					CLEAR "CONTINUE_PROBE"
				ENDIF

			
				IFSET "CONTINUE_PROBE"
					DISPLAY "Cannot determine Chassis Type from HSBP FRU Info!"
					SET "CHASSIS_MENU"
				ENDIF

				//****************************************************************
				// Check for PHI card(s) installed.
				// Note that currently, only the riser is checked to see if is one
				// that supports the PHI card. The PHI itself is not probed since
				// the frusdr utility does not handle riser muxes.
				// This should be changed so that the PHI card itself is detected.
				//****************************************************************
				// Check for PHI cards if we are not using non-Intel GPGPU(s)
				IFSET "USE_GPGPU"
				ELSE
					// Probe the PHI card directly for a FRU
					PROBE "IMBDEVICE" "14"
					FOUND "RISER_1_PHI" ""
					IFSET "RISER_1_PHI"
						SET "R2PHI"
					ENDIF
			
					// Probe the PHI card directly for a FRU
					PROBE "IMBDEVICE" "15"
					FOUND "RISER_2_PHI" ""
					IFSET "RISER_2_PHI"
						SET "R2PHI"
					ENDIF
				ENDIF
			ENDIF

			//****************************************************************************************************
			// Display chassis selection menu only if auto-detection fails
			//*****************************************************************************************************
			IFSET "CHASSIS_MENU"
				//************************************************************************
				// If we could not detect a chassis type, signal Auto Config by setting
				// the AUTO_CFG_ERR_CHASSIS_DETECT tag.
				//************************************************************************
				SET "AUTO_CFG_ERR_CHASSIS_DETECT"

				DISPLAY    " "
				MENUTITLE   "Select the Chassis"
				MENU        "R1000"		"Intel(R) Server Chassis R1000"
				MENU        "R2000"		"Intel(R) Server Chassis R2000"
				//MENU		"TEST_PLATE"	"Open Test Plate"
				MENU		"OTHER"			"Other Chassis"
				MENUPROMPT

				IFSET "R2000" 
					MENUTITLE   "Select the R2000 chassis type"
					MENU    "R2XXX"     "R2208/R2216/R2308 chassis"
					MENU    "R2224"     "R2224 chassis"
					MENU    "R2312"     "R2312 chassis"
					MENUPROMPT

					DISPLAY ""
				ENDIF 
				//"R2000"		
				
				
				
				DISPLAY " "
				DISPLAY "Continuing to probe chassis hardware."
			ENDIF

			// Is a power supply module installed at the PS1 slot?
			PROBE "IMBDEVICE" "02"
			FOUND "PS1" "NO_PS1"
                    
			// Is a power supply module installed at the PS2 slot?                
			PROBE "IMBDEVICE" "03"
			FOUND "PS2" "NO_PS2"

			IFSET "NO_PS1" "NO_PS2"
				DISPLAY ""
				DISPLAY "Unable to communicate with any power supply modules."
				DISPLAY ""
			ENDIF

			IFSET "PS1"
				FRUNAME "SYSTEM"
				FRUADDRESS 02
				FRUAREA "PRODUCT" VALIDATE PS1_FRU_IPMI
            
				IFSET "PS1_FRU_IPMI"
					SET "CONTINUE_PROBE"
					FRUAREA "PRODUCT"
					PROBE FRUFIELD "PN" "DPS-750X"
					FOUND "PS1_750W_AC" ""
					IFSET "PS1_750W_AC"
						CLEAR "CONTINUE_PROBE"
						SET "STICKY_PS1_750W_AC"
						CLEAR "STICKY_PS1_750W_DC"
						CLEAR "STICKY_PS1_1100W"
					ENDIF
					IFSET "CONTINUE_PROBE"
						PROBE FRUFIELD "PN" "DPS-750A"
						FOUND "PS1_750W_DC" ""
						IFSET "PS1_750W_DC"
							CLEAR "CONTINUE_PROBE"
							SET "STICKY_PS1_750W_DC"
							CLEAR "STICKY_PS1_750W_AC"
							CLEAR "STICKY_PS1_1100W"
						ENDIF
					ENDIF
					IFSET "CONTINUE_PROBE"
						PROBE FRUFIELD "PN" "S-1100ADU"
						FOUND "PS1_1100W" ""
						IFSET "PS1_1100W"
							CLEAR "CONTINUE_PROBE"
							SET "STICKY_PS1_1100W"
							CLEAR "STICKY_PS1_750W_DC"
							CLEAR "STICKY_PS1_750W_AC"
						ENDIF
					ENDIF

					IFSET "CONTINUE_PROBE"
						DISPLAY ""
						DISPLAY "Power supply 1 detected but unable to identify model."
						DISPLAY "Sensors for power supply 1 will not be installed."        
						CLEAR "STICKY_PS1_750W_AC"
						CLEAR "STICKY_PS1_750W_DC"
						CLEAR "STICKY_PS1_1100W"
					ELSE
						SET "VALID_PS1"
					ENDIF
				ELSE
					DISPLAY ""
					DISPLAY "Power supply 1 detected but its FRU data is invalid."
					DISPLAY "Sensors for power supply 1 will not be installed."        
					CLEAR "STICKY_PS1_750W_AC"
					CLEAR "STICKY_PS1_750W_DC"
					CLEAR "STICKY_PS1_1100W"
				ENDIF
			ENDIF

			IFSET "PS2"
				FRUNAME "SYSTEM"
				FRUADDRESS 03
				FRUAREA "PRODUCT" VALIDATE PS2_FRU_IPMI

				IFSET "PS2_FRU_IPMI"
					SET "CONTINUE_PROBE"
					FRUAREA "PRODUCT"
					PROBE FRUFIELD "PN" "DPS-750X"
					FOUND "PS2_750W_AC" ""
					IFSET "PS2_750W_AC"
						CLEAR "CONTINUE_PROBE"
						SET "STICKY_PS2_750W_AC"
						CLEAR "STICKY_PS2_750W_DC"
						CLEAR "STICKY_PS2_1100W"
					ENDIF
					IFSET "CONTINUE_PROBE"
						PROBE FRUFIELD "PN" "DPS-750A"
						FOUND "PS2_750W_DC" ""
						IFSET "PS2_750W_DC"
							CLEAR "CONTINUE_PROBE"
							SET "STICKY_PS2_750W_DC"
							CLEAR "STICKY_PS2_750W_AC"
							CLEAR "STICKY_PS2_1100W"
						ENDIF
					ENDIF
					IFSET "CONTINUE_PROBE"
						PROBE FRUFIELD "PN" "S-1100ADU"
						FOUND "PS2_1100W" ""
						IFSET "PS2_1100W"
							CLEAR "CONTINUE_PROBE"
							SET "STICKY_PS2_1100W"
							CLEAR "STICKY_PS2_750W_DC"
							CLEAR "STICKY_PS2_750W_AC"
						ENDIF
					ENDIF
					IFSET "CONTINUE_PROBE"
						DISPLAY ""
						DISPLAY "Power supply 1 detected but unable to identify model."
						DISPLAY "Sensors for power supply 1 will not be installed."
						CLEAR "STICKY_PS2_750W_AC"
						CLEAR "STICKY_PS2_750W_DC"
						CLEAR "STICKY_PS2_1100W"
					ELSE
						SET "VALID_PS2"
					ENDIF
				ELSE
					DISPLAY ""
					DISPLAY "Power supply 1 detected but its FRU data is invalid."
					DISPLAY "Sensors for power supply 1 will not be installed."        
					CLEAR "STICKY_PS2_750W_AC"
					CLEAR "STICKY_PS2_750W_DC"
					CLEAR "STICKY_PS2_1100W"
				ENDIF
			ENDIF

			IFSET   "SKIP_PROBE" 
				// Skip probing the hardware 
			ELSE
				// Is there a FRU storage device on the I/O (LAN) module?
				PROBE "IMBDEVICE" "09"
				FOUND "IO_MODULE_FRU"

				// Check for a Temperature sensor response.
				PROBE "PING" "05" "94"
				FOUND "IO_MODULE_TEMP"

				// Is there a FRU storage device on the SAS module?
				PROBE "IMBDEVICE" "0A"
				FOUND "SAS_MODULE_FRU"
			
				// Check for a Temperature sensor response.
				PROBE "PING" "05" "98"
				FOUND "SAS_MODULE_TEMP"

				// Probe the hardware to discover installed devices
				PROBE	"PROCESSOR"	1
				FOUND	"PROCESSOR_1"	""

				PROBE	"PROCESSOR"	2
				FOUND	"PROCESSOR_2"	""

				PROBE "IMBDEVICE" "04"
				FOUND "FP_TEMP" ""

				IFSET "R1000"
					// Check for riser 3 temperature sensor
					PROBE "PING" "05" "9C"
					FOUND "RISER_3_TEMP"
				ELSE
					// Is riser 1 installed with a FRU device?
					PROBE "IMBDEVICE" "0B"
					FOUND "RISER_1_FRU" ""
                    
					// Is riser 2 installed with a FRU device?                
					PROBE "IMBDEVICE" "0C"
					FOUND "RISER_2_FRU" ""
			
					// Check for riser 1 & 2 temperature sensors
					PROBE "PING" "05" "90"
					FOUND "RISER_1_TEMP"
		
					PROBE "PING" "05" "92"
					FOUND "RISER_2_TEMP"
		
					// Check for third riser FRU
					PROBE "IMBDEVICE" "0D"
					FOUND "RISER_3_FRU"
		
					// Check for riser 3 temperature sensor
					PROBE "PING" "05" "9C"
					FOUND "RISER_3_TEMP"
				ENDIF
			
				// Check for SSD AICs
				PROBE "IMBDEVICE" "12"
				FOUND "SSD_AIC_1"
				IFSET "SSD_AIC_1"
					// Check for a PCIe SSD Add In Card in Slot 2.
					// This check is used to enable the 1U WCP SSD Appliance
					// sensors.  Eventually the sensor data is expected to
					// be applicable to all Grantley systems.
					FRUNAME "SYSTEM"
					FRUADDRESS 12
					FRUAREA "BOARD" VALIDATE "PCIeSSD_FRU_IPMI"
					IFSET "PCIeSSD_FRU_IPMI"
						PROBE FRUFIELD "PN" "AXXPCI16ADPR"
						FOUND "PCIeSSD_ADD_IN_CARD"
						IFSET "HSBP1_1U8X25_COMBO" "PCIeSSD_ADD_IN_CARD"
							SET "INTEL_PCIe_SSD_AIC"
						ENDIF
					ENDIF
				ENDIF
		
				PROBE "IMBDEVICE" "13"
				FOUND "SSD_AIC_2"
			ENDIF 

			IFSET "SKIP_UPDATE"
				// Do not print out a summary of detected hardware if skipping the update
			ELSE
				// Print out summary of detected hardware
				DISPLAY ""
				DISPLAY "                                Detected Hardware"
				DISPLAY "********************************************************************************"

				IFSET   "R1000"
					DISPLAY "Intel(R) Server System R1000WT Product Family"
				ENDIF

				IFSET   "R2000"
					DISPLAY "Intel(R) Server System R2000WT Product Family"
				ENDIF

				IFSET   "TEST_PLATE"
					DISPLAY "Open Test Plate Chassis"
				ENDIF

				IFSET "S2600WTT"
					DISPLAY "Intel(R) Server Board S2600WTT"
				ELSE
					IFSET "S2600WT2"
						DISPLAY "Intel(R) Server Board S2600WT2"
					ELSE
						IFSET "S2600WT2R"
							DISPLAY "Intel(R) Server Board S2600WT2R"
						ELSE
							IFSET "S2600WTTR"
								DISPLAY "Intel(R) Server Board S2600WTTR"
							ELSE	
								IFSET "S2600WTTS1R"
									DISPLAY "Intel(R) Server Board S2600WTTS1R"
								ELSE
									DISPLAY "Intel(R) Server Board S2600WTx"
								ENDIF	
							ENDIF
						ENDIF
					ENDIF
				ENDIF

				IFSET	"PROCESSOR_1"
					DISPLAY "Intel(R) Xeon(R) Processor E5-2600 in socket 1"
				ENDIF

				IFSET	"PROCESSOR_2"
					DISPLAY "Intel(R) Xeon(R) Processor E5-2600 in socket 2"
				ENDIF

				IFSET "R2000"
					PROBE "FAN_SIGNAL" 00 01
					FOUND "R2000_HS_FAN" ""
					SET "CONTINUE_PROBE"
					IFSET "R2000_HS_FAN"
						CLEAR "CONTINUE_PROBE"
					ENDIF
					IFSET "CONTINUE_PROBE"
						PROBE "FAN_SIGNAL" 02 01
						FOUND "R2000_HS_FAN" ""
						IFSET "R2000_HS_FAN"
							CLEAR "CONTINUE_PROBE"
						ENDIF
					ENDIF
					IFSET "CONTINUE_PROBE"
						PROBE "FAN_SIGNAL" 04 01
						FOUND "R2000_HS_FAN" ""
						IFSET "R2000_HS_FAN"
							CLEAR "CONTINUE_PROBE"
						ENDIF
					ENDIF
					IFSET "CONTINUE_PROBE"
						SET "R2000_FAN_NO_HS_RED"
						DISPLAY "Fixed and Redundant fans"
					ELSE
						SET "R2000_FAN_HS_RED"
						DISPLAY "Hot-Swap and Redundant fans"
					ENDIF
				ENDIF

				IFSET "R1000"
					SET "R1000_FAN_NO_HS_RED"
					DISPLAY "Fixed Redundant fans"
				ENDIF

				IFSET "FP_FRU"		
					IFSET	"NON_STORE_FP"
						DISPLAY "Front Panel Temperature Sensor"
					ELSE
						IFSET "STORE_FP"
							DISPLAY "Storage FP Temperature Sensor"
						ELSE
							DISPLAY "Front panel FRU detected but is not an Intel FP!"
							DISPLAY "No Front Panel Temperature Sensor will be installed!"
							DISPLAY "Chassis fan Speed Control (FSC) will not work properly"
							DISPLAY "without this sensor!"
						ENDIF
					ENDIF
				ELSE
					// All Intel(R) chassis have a front panel intel temp sensor
					DISPLAY ""
					DISPLAY "Front Panel Temperature sensor device hardware not found."
					DISPLAY "Chassis fan Speed Control (FSC) will not work properly"
					DISPLAY "without this sensor!"
					DISPLAY ""
				ENDIF

				DISPLAY "Baseboard FRU Device"

				IFSET "STICKY_PS1_750W_AC"
					DISPLAY "750 Watt Power Supply (AC Input) Module 1"
					DISPLAY "Power Supply Module 1 FRU Device"
				ENDIF

				IFSET "STICKY_PS1_750W_DC"
					DISPLAY "750 Watt Power Supply (DC Input) Module 1"
					DISPLAY "Power Supply Module 1 FRU Device"
				ENDIF

				IFSET	"STICKY_PS1_1100W"
					DISPLAY "1100 Watt Power Supply Module 1"
					DISPLAY "Power Supply Module 1 FRU Device"
				ENDIF

				IFSET	"STICKY_PS2_750W_AC"
					DISPLAY "750 Watt Power Supply (AC Input) Module 2"
					DISPLAY "Power Supply Module 2 FRU Device"
				ENDIF

				IFSET	"STICKY_PS2_750W_DC"
					DISPLAY "750 Watt Power Supply (DC Input) Module 2"
					DISPLAY "Power Supply Module 2 FRU Device"
				ENDIF

				IFSET "STICKY_PS2_1100W"
					DISPLAY "1100 Watt Power Supply Module 2"
					DISPLAY "Power Supply Module 2 FRU Device"
				ENDIF

				IFSET   "VALID_PS1" "VALID_PS2"
					DISPLAY "Redundant Power Supply Configuration"
					SET "STICKY_REDUNDANT_PS"
				ENDIF

				IFSET "HSBP1_2U8X25"
					DISPLAY "HSBP 1 is a 2U 8 slot 2.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP1_2U8X25_COMBO"
					DISPLAY "HSBP 1 is a 2U 8 slot 2.5 inch PCIe SSD Combo HDD Backplane"
				ENDIF

				IFSET "HSBP1_12X35"
					DISPLAY "HSBP 1 is a 2U 12 slot 3.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP1_8X35"
					DISPLAY "HSBP 1 is a 2U 8 slot 3.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP1_4X35"
					DISPLAY "HSBP 1 is a 1U 4 slot 3.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP1_1U8X25"
					DISPLAY "HSBP 1 is a 1U 8 slot 2.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP1_1U8X25_COMBO"
					DISPLAY "HSBP 1 is a 1U 8 slot 2.5 inch PCIe SSD Combo HDD Backplane"
				ENDIF

				IFSET "HSBP2_2U8X25"
					DISPLAY "HSBP 2 is a 2U 8 slot 2.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP2_2U8X25_COMBO"
					DISPLAY "HSBP 2 is a 2U 8 slot 2.5 inch PCIe SSD Combo HDD Backplane"
				ENDIF

				IFSET "HSBP2_12X35"
					DISPLAY "HSBP 2 is a 2U 12 slot 3.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP2_8X35"
					DISPLAY "HSBP 2 is a 2U 8 slot 3.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP2_4X35"
					DISPLAY "HSBP 2 is a 1U 4 slot 3.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP2_1U8X25"
					DISPLAY "HSBP 2 is a 1U 8 slot 2.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP2_1U8X25_COMBO"
					DISPLAY "HSBP 2 is a 1U 8 slot 2.5 inch PCIe SSD Combo HDD Backplane"
				ENDIF

				IFSET "HSBP3_2U8X25"
					DISPLAY "HSBP 3 is a 2U 8 slot 2.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP3_2U8X25_COMBO"
					DISPLAY "HSBP 3 is a 2U 8 slot 2.5 inch PCIe SSD Combo HDD Backplane"
				ENDIF

				IFSET "HSBP3_12X35"
					DISPLAY "HSBP 3 is a 2U 12 slot 3.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP3_8X35"
					DISPLAY "HSBP 3 is a 2U 8 slot 3.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP3_4X35"
					DISPLAY "HSBP 3 is a 1U 4 slot 3.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP3_1U8X25"
					DISPLAY "HSBP 3 is a 1U 8 slot 2.5 inch HDD Backplane"
				ENDIF

				IFSET "HSBP3_1U8X25_COMBO"
					DISPLAY "HSBP 3 is a 1U 8 slot 2.5 inch PCIe SSD Combo HDD Backplane"
				ENDIF

				IFSET "HSBP4_2X25"
					DISPLAY "HSBP 4 is a 2U 2 slot 2.5 inch Rear HDD Backplane"
				ENDIF

				IFSET "IO_MODULE_FRU"
					DISPLAY "IO Module FRU Storage Device"
				ENDIF

				IFSET "IO_MODULE_TEMP"
					DISPLAY "IO Module Temperature Device"
				ENDIF

				IFSET   "SAS_MODULE_TEMP"
					DISPLAY "SAS Module Temperature Device"
				ENDIF

				IFSET   "SAS_MODULE_FRU"
					DISPLAY "SAS Module FRU Storage Device"
				ENDIF
                    
				IFSET "RISER_1_FRU"
					DISPLAY "Riser 1 FRU found"
				ENDIF
			
				IFSET "RISER_1_TEMP"
					DISPLAY "Riser 1 Temperature sensor found"
				ENDIF
			
				IFSET "RISER_2_FRU"
					DISPLAY "Riser 2 FRU found"
				ENDIF
			
				IFSET "RISER_2_TEMP"
					DISPLAY "Riser 2 Temperature sensor found"
				ENDIF
			
				IFSET "RISER_3_FRU"
					DISPLAY "Riser 3 FRU found"
				ENDIF
			
				IFSET "RISER_3_TEMP"
					DISPLAY "Riser 3 Temperature sensor found"
				ENDIF
			
				IFSET   "RISER_1_PHI"
					DISPLAY "Intel PHI (c) Card in Riser 1"
				ENDIF

				IFSET   "RISER_2_PHI"
					DISPLAY "Intel PHI (c) Card in Riser 2"
				ENDIF
			
				IFSET   "SSD_AIC_1"
					DISPLAY "SSD PCIe Add In Card 1 found"
				ENDIF

				IFSET   "SSD_AIC_2"
					DISPLAY "SSD PCIe Add In Card 2 found"
				ENDIF

				DISPLAY "********************************************************************************"
			ENDIF

			//*****************************************************************
			// Set additional SDR tags based on chassis detected
			//*****************************************************************
			SET "DISABLE_NVME_FUNCTIONS"
			CLEAR "ENABLE_NVME_FUNCTIONS"


			IFSET "R1000"
				// Set additional SDR tags for the R1000 chassis
				CLEAR "INTRUSION"
				SET "NO_INTRUSION"
				SET "FP_NMI"
			ENDIF

			IFSET "R2000"
				// Set additional SDR tags for the R2000 chassis
				CLEAR "INTRUSION"
				SET "NO_INTRUSION"
				SET "FP_NMI"
			ENDIF
			
			IFSET "OTHER" 
				//System Fans
				DISPLAY ""
				PROMPT "Is System Fan 1A installed?"
				YES "OTHER_FAN_1A"
				NO ""

				PROMPT "Is System Fan 1B installed?"
				YES "OTHER_FAN_1B"
				NO ""

				PROMPT "Is System Fan 2A installed?"
				YES "OTHER_FAN_2A"
				NO ""

				PROMPT "Is System Fan 2B installed?"
				YES "OTHER_FAN_2B"
				NO ""

				PROMPT "Is System Fan 3A installed?"
				YES "OTHER_FAN_3A"
				NO ""

				PROMPT "Is System Fan 3B installed?"
				YES "OTHER_FAN_3B"
				NO ""

				PROMPT "Is System Fan 4A installed?"
				YES "OTHER_FAN_4A"
				NO ""

				PROMPT "Is System Fan 4B installed?"
				YES "OTHER_FAN_4B"
				NO ""

				PROMPT "Is System Fan 5A installed?"
				YES "OTHER_FAN_5A"
				NO ""

				PROMPT "Is System Fan 5B installed?"
				YES "OTHER_FAN_5B"
				NO ""

				PROMPT "Is System Fan 6A installed?"
				YES "OTHER_FAN_6A"
				NO ""

				PROMPT "Is System Fan 6B installed?"
				YES "OTHER_FAN_6B"
				NO ""

				PROMPT "Is CPU 1 Fan installed?"
				YES "OTHER_PROC1_FAN"
				NO ""

				PROMPT "Is CPU 2 Fan installed?"
				YES "OTHER_PROC2_FAN"
				NO ""

				PROMPT "Are system fans redundant?"
				YES "FAN_RED"
				NO "FAN_NO_RED"

				PROMPT "Are system fans hot swappable?"
				YES "FAN_HS"
				NO "FAN_NO_HS"

				IFSET "FAN_HS" "FAN_NO_RED"
					SET "STICKY_OTHER_FAN_HS_NO_RED"
				ENDIF

				IFSET "FAN_NO_HS" "FAN_RED"
					SET "STICKY_OTHER_FAN_NO_HS_RED"
				ENDIF
				IFSET "FAN_HS" "FAN_RED"
					SET "STICKY_OTHER_FAN_HS_RED"
				ENDIF

				CLEAR "INTRUSION"
				CLEAR "NO_INTRUSION"
				PROMPT "Is Chassis Intrusion Switch installed?"
				YES "INTRUSION"
				NO "NO_INTRUSION"

				CLEAR "R1000_FAN_NO_HS_RED"
				CLEAR "R2000_FAN_HS_RED"
				CLEAR "R2000_FAN_NO_HS_RED"
				SET "FP_NMI"
			ENDIF 

			IFSET "SHIPPING"
				CLEAR "STICKY_REDUNDANT_PS"
				CLEAR "STICKY_R1000_RED_FAN"
				CLEAR "STICKY_R2000_RED_FAN"
				CLEAR "STICKY_PS1_750W_AC"
				CLEAR "STICKY_PS1_750W_DC"
				CLEAR "STICKY_PS1_1100W"
				CLEAR "STICKY_PS2_750W_AC"
				CLEAR "STICKY_PS2_750W_DC"
				CLEAR "STICKY_PS2_1100W"
				// Set additional SDR tags for the Other Slow Ramp chassis
				CLEAR "INTRUSION"
				SET "NO_INTRUSION"
				SET "FP_NMI"
			ENDIF

			IFSET "TEST_PLATE"
				// Set additional SDR tags for the R2000 chassis
				CLEAR "STICKY_R1000_RED_FAN"
				CLEAR "STICKY_R2000_RED_FAN"
				CLEAR "INTRUSION"
				SET "NO_INTRUSION"
				SET "FP_NMI"
			ENDIF

			// Clear temp tags used for setting STICKY tags (i.e. Power Supply tags).
			// This prevents Auto-Config from updating SDRs unnecessarily when a PS is removed.
			// NOTE: This feature only works on BMC FW 0.23 or later
			CLEAR "PS1"
			CLEAR "PS2"
			CLEAR "NO_PS1"
			CLEAR "NO_PS2"
			CLEAR "VALID_PS1"
			CLEAR "VALID_PS2"
			CLEAR "PS1_FRU_IPMI"
			CLEAR "PS2_FRU_IPMI"
			CLEAR "PS1_750W_AC"
			CLEAR "PS2_750W_AC"
			CLEAR "PS1_750W_DC"
			CLEAR "PS2_750W_DC"
			CLEAR "PS1_1100W"
			CLEAR "PS2_1100W"
			CLEAR "CONTINUE"
		
			// Update the SDR Repository with selected records
			IFSET "SKIP_UPDATE"
				// Do nothing
			ELSE
				// Update SDR Repository
				SDRNAME   "S2600WT.sdr"

				// Run the init agent so new SDR data is read and used
				RUN_INIT_AGENT
			ENDIF
		ENDIF
			
		//*****************************************************************************
		// FRU file or asset tag programming
		//*****************************************************************************
		// Process Asset tag if requested.  
		IFSET "ASSET" 
			FRUNAME     "SYSTEM"
			FRUADDRESS  "IMBDEVICE" FF 20
			FRUAREA     "PRODUCT"  
			FRUFIELD    "AT" "@STDIN:ASCII"
		ELSE
			// Begin baseboard FRU update
			IFSET "FRU"
	            IFSET "NO_WT_FRU"
	                DISPLAY " "
	                DISPLAY "FRU Board P/N data is invalid."
					CLEAR "NO_WT_FRU"
	            ELSE
					DISPLAY     " "
					IFSET "S2600WTT"
						FRUNAME     "S2600WTT.fru"
					ELSE
						IFSET "S2600WT2"
							FRUNAME     "S2600WT2.fru"
						ELSE 
							IFSET "S2600WT2R"
								FRUNAME     "S2600WT2R.fru"
							ELSE
								IFSET "S2600WTTS1R"
									FRUNAME     "S2600WTTS1R.fru"
								ELSE	
									FRUNAME     "S2600WTTR.fru"
								ENDIF
							ENDIF
						ENDIF
					ENDIF

					FRUAREA     "HEADER"
					FRUAREA     "INTERNALUSE"
					FRUAREA     "CHASSIS"
					FRUFIELD    "CT" 

					PROMPT      "Do you want to update the chassis info area of the FRU (Y/N)?"
					YES     "UPD_CHS"
					NO      ""

					IFSET "UPD_CHS"
						DISPLAY     " "
	
						PROMPT      "Do you want to enter the chassis serial number (Y/N)?"
						YES         "CHASS_SN"
						NO          ""

						IFSET       "CHASS_SN"
							FRUFIELD    "S#" "@STDIN:ASCII"
						ENDIF

						DISPLAY     " "

						PROMPT      "Do you want to enter the chassis part number (Y/N)?"
						YES         "CHASS_PN"
						NO          ""

						IFSET       "CHASS_PN"
							FRUFIELD    "P#" "@STDIN:ASCII"
						ENDIF

						DISPLAY     " "
						PROMPT		"Do you want to enter data into the additional chassis field 1 (Y/N)?"
						YES         "CHASS_INFO_1"
						NO          ""

						IFSET       "CHASS_INFO_1"
							FRUFIELD  "AM1" "@STDIN:ASCII"
						ENDIF

						DISPLAY		" "

						PROMPT		"Do you want to enter data into the additional chassis field 2 (Y/N)?"
						YES         "CHASS_INFO_2"
						NO          ""

						IFSET       "CHASS_INFO_2"
							FRUFIELD  "AM2" "@STDIN:ASCII"
						ENDIF
					ENDIF

					IFSET "ALLOW_BRD_UPDATE"
						CLEAR "ALLOW_BRD_UPDATE"
		                		PROMPT  "Do you want to update Board info area of the FRU (Y/N)?"
						YES     "UPD_BRD"
						NO      ""
		                		IFSET "UPD_BRD"
		                			// Update board area
		                			FRUAREA     "BOARD"
		                			FRUFIELD    "P#"
		                			FRUFIELD    "S#"

		                    			DISPLAY      " "
		                    			PROMPT      "Do you want to enter the Board part number (Y/N)?"
		                        		YES         "BRD_PN"
		                        		NO          ""

		                    			IFSET "BRD_PN"
		                        			FRUFIELD    "P#" "@STDIN:ASCII"
		                    			ENDIF

		                    			DISPLAY     " "

		                   			PROMPT      "Do you want to enter the Board serial number (Y/N)?"
		                        		YES         "BRD_SN"
		                        		NO          ""

		                    			IFSET "BRD_SN"
		                        			FRUFIELD    "S#" "@STDIN:ASCII"
		                    			ENDIF
						ENDIF

		                		DISPLAY     " "
					ENDIF

					FRUAREA "PRODUCT"
		            		PROMPT  "Do you want to update the product info area of the FRU (Y/N)?"
					YES     "UPD_PRD"
					NO      ""

		                	IFSET "UPD_PRD"
		                    		FRUFIELD    "MN"
		                    		FRUFIELD    "PN"	      
		                    		FRUFIELD    "PV"
		                    		DISPLAY      " "
		                    		PROMPT      "Do you want to enter the product Version (Y/N)?"
		                        	YES         "PROD_PV"
		                        	NO          ""

		                    		IFSET "PROD_PV"
		                        		FRUFIELD    "PV" "@STDIN:ASCII"
		                    		ENDIF

		                    		DISPLAY     " "

		                    		PROMPT      "Do you want to enter the product part number (Y/N)?"
		                        	YES         "PROD_PN"
		                        	NO          ""

		                    		IFSET "PROD_PN"
		                        		FRUFIELD    "P#" "@STDIN:ASCII"
		                    		ENDIF

		                    		DISPLAY     " "

		                    		PROMPT      "Do you want to enter the product serial number (Y/N)?"
		                        	YES         "PROD_SN"
		                        	NO          ""

		                    		IFSET "PROD_SN"
		                        		FRUFIELD    "S#" "@STDIN:ASCII"
		                    		ENDIF

		                    		DISPLAY     " "

		                    		PROMPT      "Do you want to enter a product asset tag (Y/N)?"
		                        	YES         "PROD_ASSET"
		                        	NO          ""

		                    		IFSET "PROD_ASSET"
		                        		FRUFIELD    "AT" "@STDIN:ASCII"
		                    		ENDIF	                	
					ENDIF	            	
				ENDIF
				// } FRU PN	        	        
			ENDIF
			// } FRU
		ENDIF
		// } Asset	
	ENDIF
	// }  Not EXIT1
ENDIF
// }  S2600WT

