Probably recommended to start from zero.
You need a DHCP-server to serve IPs, like tftpd64 on Windows, also for TFTP with populated files
vmlinuz,
fdt and
rootfs in subdirectory
mlnx460ex/, and a simple web-server like
sheret that holds
MT_1270110020.bin, image-PPC_M460EX-SX_3.4.0012.img and
image-PPC_M460EX-3.6.8012.img.
Boot into u-boot, save all variables (copy paste printenv output into a text file, just to be sure), erase all variables, and make it permanent:
printenv
env default -a -f
saveenv
Boot the HP factory mini-Linux from u-boot and start manufacture.sh script (does not rely on anything from environment variables)
setenv autostart no
setenv autoload no
dhcp
tftp 400000 192.168.128.100:mlnx460ex/vmlinuz
tftp 800000 192.168.128.100:mlnx460ex/fdt
tftp C00000 192.168.128.100:mlnx460ex/rootfs
setenv bootargs root=/dev/ram rw ramdisk_size=262144 ramdisk=262144
bootm 400000 C00000 800000
(Login as root)
/sbin/manufacture.sh -a -v -v -B -m ppc -u http://192.168.128.100:8100/image-PPC_M460EX-SX_3.4.0012.img
reboot
Then login as admin/admin, fill out the Wizard. Enable shell access:
enable
conf t
license install LK2-RESTRICTED_CMDS_GEN2-88A1-NEWD-BPNB-1
conf write
_shell
Delete any U-Boot password:
/opt/tms/bin/mddbreq /config/db/initial set modify - /system/bootmgr/password string ''
eetool -a bf -s UBPASSWD=""
Check bootstrap EEPROM (16 bytes):
/opt/tms/bin/mellaggra _read 0 0x52 0 1 16
Check if correct 166 MHz settings else
mlxi2c update_bootstrap166 (86 82 96 1a d9 80 0 e0 c0 8 23 50 d 5 0 0) or
mlxi2c update_bootstrap200 (86 82 96 19 b9 80 0 e0 c0 8 23 50 d 5 0 0)
Should not be necessary! I can decode the bytes if you don't have those from the update_bootstrap166-line. Ask before rewriting.
Read backplate_fru and cpu_fru EEPROMs:
/opt/tms/bin/mellaggra _read_fru 1 0x51 1000 fru_backplate.bin or
/opt/tms/bin/mellaggra _read_fru 8 0x51 1000 fru_backplate.bin
/opt/tms/bin/mellaggra _read_fru 0 0x50 1000 fru_cpu.bin
Copy them off to safety (TFTP server):
tftp 192.168.128.100 -m binary -c put fru_backplate.bin
tftp 192.168.128.100 -m binary -c put fru_patched.bin
tftp 192.168.128.100 -m binary -c put fru_cpu.bin
If your backplate EEPROM is unmodified so far, you have to patch it:
touch emc_to_6012
vi emc_to_6012
Insert relevant snippet from emc_to_6012 function, I am assuming you are converting an EMC to an SX6012 and have so far used modified binaries instead of patching the backplate FRU EEPROM:
dd if=/dev/zero bs=16 count=256 of="$2" 2> /dev/null
dd if="$1" bs=16 count=12 of="$2" conv=notrunc 2> /dev/null
dd if="$1" bs=16 count=5 of="$2" skip=12 seek=14 conv=notrunc 2> /dev/null
printf "\x20" | dd of="$2" bs=1 seek=1 count=1 conv=notrunc 2> /dev/null
printf "\x00" | dd of="$2" bs=1 seek=5 count=1 conv=notrunc 2> /dev/null
printf "\x05\x0E\x02\x14\x06\x16\x07" | dd of="$2" bs=1 seek=15 count=7 conv=notrunc 2> /dev/null
printf "\x00\x1A\x00\x03\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | dd of="$2" bs=1 seek=192 count=32 conv=notrunc 2> /dev/null
printf "\x00\x12\x00\x01\x06\x00\x00\x00\x00\x01\x00\x00\x02\x88\x04\x04\x02\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0A\x00\x01\x07\x00\x00\x00\x00\x02\x10\x00\x00\x00\x00\x00" | dd of="$2" bs=1 seek=320 count=48 conv=notrunc 2> /dev/null
printf "\x4D\x53\x58\x36\x30\x31\x32\x46\x2D\x32\x42\x46\x53\x00" | dd of="$2" bs=1 seek=64 count=14 conv=notrunc 2> /dev/null
Patch EEPROM file on switch and write it to EEPROM:
sh emc_to_6012 fru_backplate.bin fru_patched.bin
/opt/tms/bin/mellaggra _write_fru 1 0x51 1000 fru_patched.bin
Download Mellanox SwitchX firmware and flash it:
curl -O http://192.168.128.100:8100/MT_1270110020.bin
flint --override_cache_replacement --allow_psid_change -d /dev/mst/mt51000_pciconf0 -i ./MT_1270110020.bin b
Reboot into u-boot, then powercycle for good measure.
Update to 3.6.8012:
enable
configure terminal
image fetch http://192.168.128.100:8100/image-PPC_M460EX-3.6.8012.img
image install image-PPC_M460EX-3.6.8012.img
image boot next
configuration write
reload
Install licenses... (not saying more here)
Modify rc.local to slow down fans:
mount -nwo remount,rw /
vi /etc/rc.d/rc.local
Remove any
exit line and add this after the
touch... line
FAN_MIN="27"
FAN_MAX="50"
WAIT_MAX="10" # 5 minutes
MDREQ1="/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string"
MDREQ2="fan_number int8 1 fan_speed int8"
MDREQ3="set_max uint8"
i=1
while :; do
PID=$(pidof clusterd)
if [ -n "$PID" ]; then
sleep 60
echo "Adjusting fan speed"
$MDREQ1 "/MGMT/FAN1" $MDREQ2 $FAN_MIN $MDREQ3 $FAN_MAX
break
else
sleep 30
i=$((i+1))
if [ $i -gt $WAIT_MAX ]; then
echo "Timeout waiting for clusterd"
break
fi
fi
done
exit 0
FAN_MIN="27" is debatable. Fans should run at ~4500-5000rpm. If you get sudden fan spinups or annoying harmonics, increase by 1.
Good luck... also, no warranties. As long as U-Boot is there, you can fix everything yourself. If U-Boot becomes damaged, then meanwhile a handful of people on here and me can fix that now as well. Would require a BDI 2000 hardware JTAG debugger, some cables and some magic files though.