Skip to content

Commit dd3289e

Browse files
committedDec 18, 2024
boot: Add oz boot scripts
1 parent 379fbc1 commit dd3289e

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed
 

‎scripts/boot/didgo5

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/python3
2+
3+
import os, sys
4+
sys.path.append(f'{os.path.dirname(sys.argv[0])}/../../lib')
5+
from boot_utils import *
6+
7+
name = 'didgo5'
8+
b = BasicBoot(name, OzXcat(name),
9+
image_dest=f'netboot:/srv/tftp/{name}/zImage.dev',
10+
image_src='zImage')
11+
sys.exit(b.boot_main(sys.argv[1:]))

‎scripts/boot/mpe-g5

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/python3
2+
3+
import os, sys
4+
sys.path.append(f'{os.path.dirname(sys.argv[0])}/../../lib')
5+
from boot_utils import *
6+
7+
name = 'mpe-g5'
8+
9+
# The machine has no power control or console, so it has to be manually powered
10+
# on and booted, so that the script can then SSH in to reboot it.
11+
b = BasicBoot(name, NoXcat(),
12+
image_dest=f'netboot:/srv/tftp/{name}/vmlinux.dev')
13+
sys.exit(b.boot_main(sys.argv[1:]))

‎scripts/boot/spork

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/python3
2+
3+
import os, sys
4+
sys.path.append(f'{os.path.dirname(sys.argv[0])}/../../lib')
5+
from boot_utils import *
6+
7+
xcat = OzXcat('spork')
8+
b = PowernvBoot('spork', xcat,
9+
'loglevel=7 nosplash no_hash_pointers root=PARTUUID=cffc9ff2-f715-4582-bb38-61466e1d39e9',
10+
'netboot:/srv/tftp/spork/vmlinux.dev', 'netboot')
11+
sys.exit(b.boot_main(sys.argv[1:]))

‎scripts/boot/t4240rdb

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/python3
2+
3+
import os, sys
4+
import logging
5+
sys.path.append(f'{os.path.dirname(sys.argv[0])}/../../lib')
6+
from boot_utils import *
7+
8+
9+
def main():
10+
name = 't4240rdb'
11+
xcat = OzXcatSerial(name.upper(), use_pdu=True)
12+
b = BasicBoot(name, xcat,
13+
image_dest=f'netboot:/srv/tftp/{name}/uImage',
14+
image_src='uImage')
15+
16+
def check_nproc(boot):
17+
rc, output = run_ssh_cmd(boot.host_ssh_target, 'nproc', capture_output=True, timeout=60)
18+
if not rc:
19+
logging.error("Running nproc failed")
20+
return False
21+
22+
output = output.strip().decode('utf-8')
23+
if output != '24':
24+
logging.error(f"Didn't find expected 24 CPUs, only {output}")
25+
return False
26+
27+
return True
28+
29+
b.callbacks.append(check_nproc)
30+
31+
return b.boot_main(sys.argv[1:])
32+
33+
sys.exit(main())

0 commit comments

Comments
 (0)
Please sign in to comment.