Advertisement
neggles

mellanox-sx6012-notes

Jan 7th, 2022 (edited)
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.70 KB | None | 0 0
  1. # update bootstrap details
  2. mlxi2c update_bootstrap166 (86 82 96 1a d9 80 0 e0 c0 8 23 50 d 5 0 0) # my unit already had this set
  3. mlxi2c update_bootstrap200 (86 82 96 19 b9 80 0 e0 c0 8 23 50 d 5 0 0)
  4.  
  5. # dump bootstrap rom
  6. /opt/tms/bin/mellaggra _read 0 0x52 0 1 16 # this will dump the bootstrap ROM
  7.  
  8. # back up the backplate and CPU FRUs
  9. /opt/tms/bin/mellaggra _read_fru 8 0x51 1000 fru_backplate.bin
  10. /opt/tms/bin/mellaggra _read_fru 0 0x50 1000 fru_cpu.bin
  11.  
  12. # run emc_to_6012 from fru-eeprom-funcs.sh on the eeprom dump
  13. emc_to_6012 "fru_backplate.bin" "fru_bp_patched.bin"
  14. # flash the modified file back
  15. /opt/tms/bin/mellaggra _write_fru 8 0x51 1000 fru_bp_patched.bin
  16.  
  17. # manual mfg boot over tftp
  18. run mfg_load;if test 0${filesize} -gt 0; then echo Booting mfg ; run mfg_args mfg_common_args;bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} ; else ; echo Failed mfg load ; fi
  19.  
  20. # apply image over ftp from manufacturing environment without rebooting and with progress
  21. manufacture.sh -v -v -t -a -m ppc -u ftp://ftp-user:ftp@host/image-PPC_M460EX-3.6.8012.img
  22.  
  23. # mount system from mfg and chroot
  24. mkdir -p /mnt/root2 && \
  25. mount -t jffs2 /dev/mtdblock7 /mnt/root2 && \
  26. mount -t jffs2 /dev/mtdblock8 /mnt/root2/config && \
  27. mount -t proc /proc /mnt/root2/proc && \
  28. mount -o bind /sys /mnt/root2/sys && \
  29. mount -o bind /dev /mnt/root2/dev && \
  30. chroot /mnt/root2 /bin/bash
  31.  
  32. # now we clear the bootloader password
  33. # default val =  $1$yCoib8pn$vSaWSssw2k17iOJRIdmcw/
  34. mddbreq /config/mfg/mfincdb set modify - /system/bootmgr/password string ''
  35. mddbreq /config/mfg/mfincdb.bak set modify - /system/bootmgr/password string ''
  36. # check they're empty now
  37. mddbreq /config/mfg/mfincdb query get - /system/bootmgr/password
  38. mddbreq /config/mfg/mfincdb.bak query get - /system/bootmgr/password
  39. # set the hwname
  40. mddbreq /config/mfg/mfdb set modify - /mfg/mfdb/system/hwname string M460EX
  41.  
  42. # exit chroot then do this to reboot and run firstboot
  43. umount /mnt/root2/dev && umount /mnt/root2/sys && umount /mnt/root2/proc && umount /mnt/root2/config && umount /mnt/root2 && reboot
  44.  
  45. # get modded binaries if need
  46. wget ftp://ftp-user:ftp@10.61.1.220/disk1/ftp/3.6.8012.tar
  47.  
  48. # set root pw
  49. mddbreq /config/db/initial set modify - /auth/passwd/user/root/password string 'hashed-password-string-using-sha512' # starts with $6$
  50. # or set admincli shell
  51. mddbreq /config/db/initial set modify - /auth/passwd/user/admincli/shell string '/bin/bash'
  52.  
  53. mddbreq /config/mfg/mfdb query get - /auth/passwd/user/admincli/shell
  54.  
  55. chroot /mnt/root2 /bin/bash
  56.  
  57. # licenses!
  58. # the license secret is 'm2l0n%0x9'
  59.  
  60. # need these lics for all the fun stuff:
  61. # RESTRICTED_CMDS_GEN2
  62. genlicense 2 RESTRICTED_CMDS_GEN2 'm2l0n%0x9'
  63.  
  64. key: LK2-RESTRICTED_CMDS_GEN2-88A1-NEWD-BPNB-1
  65.  
  66. Activation option IDs:
  67.     1 (start_date): Start date: license not active before this date
  68.     2 (end_date): End date: license not active after this date
  69.     3 (tied_primary_mac): Tie to this MAC address on primary interface
  70.     4 (tied_host_id): Tie to this host ID
  71.     5 (tied_host_id_hex): Tie to this host ID (lowercase hexadecimal)
  72.     6 (tied_serialno): Tie to this serial number
  73.     7 (tied_uuid): Tie to this UUID (must be RFC 4122 compliant)
  74.    49 (efm_sx_serial_num): Chassis serial number for license verification
  75.  
  76. Informational option IDs:
  77.    48 (efm_sx_max_num_hca_ports): Maximum number of HCA ports supported by this MLNX-OS SwitchX license
  78.    50 (efm_sx_active_ports): Active ports number supported by this MLNX-OS SwitchX license
  79.    51 (efm_sx_l2_enabled): Eth L2 enabled by this MLNX-OS SwitchX license
  80.    52 (efm_sx_ib_enabled): IB enabled by this MLNX-OS SwitchX license
  81.    53 (efm_sx_eth_enabled): Eth enabled by this MLNX-OS SwitchX license
  82.    54 (efm_sx_gw_ports): GW ports number supported by this MLNX-OS SwitchX license
  83.    55 (efm_sx_max_ufm_ports): Maximum number of UFM ports supported by this MLNX-OS SwitchX license
  84.    56 (efm_sx_ib_speed_sw_limit): IB port SW speed limit enabled by this MLNX-OS SwitchX license
  85.    57 (efm_sx_eth_speed_sw_limit): Eth port SW speed limit enabled by this MLNX-OS SwitchX license
  86.    58 (efm_sx_l3_enabled): Eth L3 enabled by this MLNX-OS SwitchX license
  87.    59 (efm_sx_fcf_enabled): FCF enabled by this MLNX-OS SwitchX license
  88.    60 (oem_lic_10gbps_enable): 10 Gbps ports licensed by OEM license
  89.    61 (oem_lic_25gbps_enable): 25 Gbps ports licensed by OEM license
  90.    62 (oem_lic_100gbps_enable): 100 Gbps ports licensed by OEM license
  91.  
  92. # EFM_SX with the following options set:
  93. 48 (efm_sx_max_num_hca_ports): Maximum number of HCA ports supported by this EFM SX license
  94. 50 (efm_sx_active_ports): Active ports number supported by this EFM SX license
  95. 51 (efm_sx_full_l2_enabled): Full Eth L2 enabled by this EFM SX license
  96. 52 (efm_sx_ib_enabled): IB enabled by this EFM SX license
  97. 53 (efm_sx_eth_enabled): Eth enabled by this EFM SX license
  98. 54 (efm_sx_gw_ports): GW ports number supported by this EFM SX license
  99. 55 (efm_sx_max_ufm_ports): Maximum number of UFM ports supported by this EFM SX license
  100. 56 (efm_sx_ib_speed_sw_limit): IB port SW speed limit enabled by this EFM SX license
  101. 57 (efm_sx_eth_speed_sw_limit): Eth port SW speed limit enabled by this EFM SX license
  102. 58 (efm_sx_l3_enabled): Eth L3 enabled by this EFM SX license
  103.  
  104. ./genlicense 2 EFM_SX 'm2l0n%0x9' -o efm_sx_ib_enabled true -o efm_sx_eth_enabled true -o efm_sx_l2_enabled true -o efm_sx_l3_enabled true -o efm_sx_fcf_enabled true -o efm_sx_max_num_hca_ports 64 -o efm_sx_active_ports 64 -o efm_sx_gw_ports 64 -o efm_sx_max_ufm_ports 64
  105. LK2-EFM_SX-5L11-5M11-5K11-5T11-5U11-5G22-05J2-205N-2205-P220-88A2-L5T5-3MYW-9
  106.  
  107. key: LK2-EFM_SX-5L11-5M11-5T11-5G1C-5J1C-5N1C-5P1C-5Q21-85R2-1888-A4N2-VF2J-8VV
  108.  
  109. # known good key for eth+l2+l3:
  110. LK2-EFM_SX-5M11-5K11-5T11-88A1-BBD0-JP82-X
  111.  
  112.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement