cf6c79b575cf0603ab3a37ff2a1ed2ddef118061
[rpi-open-firmware.git] / tools / wslstage.py
1 #!/usr/bin/env python
2 # Copyright (c) 2017 Kristina Brooks
3
4 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5 # ! DO NOT CHANGE OR REMOVE THIS FILE !
6 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7
8 import subprocess
9 import os
10 from StringIO import StringIO
11
12 disk_name = 'E'
13 disk_ready = False
14 wmic_output = os.popen('wcmd wmic logicaldisk get caption, filesystem')
15
16 for line in wmic_output:
17 if '%s:' % disk_name in line and 'FAT' in line:
18 disk_ready = True
19
20 if disk_ready:
21 print('Windows disk %s:\\ is ready!' % disk_name)
22 print('Copying bootcode.bin to %s:\\ ...\n' % disk_name)
23
24 os.system('''wcmd xcopy /s /y "C:\\Users\\k\\VC4_Firmware\\rpi-open-firmware\\build\\bootcode.bin" "''' + disk_name + ''':\\bootcode.bin"''')
25 else:
26 print('Windows disk %s:\\ is not ready!' % disk_name)
27
This page took 0.070002 seconds and 3 git commands to generate.