3Created on: 16/10/2025 18:27
7Description: Script to reboot AMCs from a TDE crate.
14 return "0x%x" % (0x70+0x2*slotnum)
17def reboot(mch_ip : str, slot_xp : str):
18 icmd = f
"ipmitool -v -I lan -H {mch_ip} -U root -P root -T 0x82 -B0 -b7"
19 icard = icmd + f
" -t {slot_xp} raw 0x2E 0x03 0x00 0x00 0x60"
23 "select_dune_fw" :
" 0x40 0x40",
24 "reconfigure" :
" 0x8 0x8",
25 "disable_flash_access" :
" 0x1 0x1",
26 "reboot" :
" 0x8 0x0",
29 for c
in (cmds[
"reconfigure"], cmds[
"reboot"]):
38@click.argument('crate_ip', type=str)
39@click.option('-s', '--slots', type=int, multiple=True, default=[i for i in range(1,13)])
40def main(crate_ip : int, slots : list[int]):
41 print(f
"boot cards in slots {slots} in crate at {crate_ip}")
48if __name__==
'__main__':
main(int crate_ip, list[int] slots)
reboot(str mch_ip, str slot_xp)