Browse Source

add files to usbdisk

main
Hendrik Langer 6 years ago
parent
commit
362ed320d8
  1. 3
      README.md
  2. BIN
      raspberry-environment/background.png
  3. 9
      raspberry-environment/pythonscript.py

3
README.md

@ -39,6 +39,9 @@ apt install python3-pyinotify python3-rpi.gpio
echo "dtoverlay=dwc2" >> /boot/config.txt
copy everything to /opt/freezer/
add to /etc/rc.local: python3 /opt/freezer/display.py
readonly-root

BIN
raspberry-environment/background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

9
raspberry-environment/pythonscript.py

@ -125,11 +125,10 @@ if __name__ == '__main__':
#loop-mount
#mkfs
subprocess.run(['mkfs', '-t', 'vfat', '-n', 'SCREENSHOTS', '/tmp/usbdisk.img'], shell=False, check=True)
#subprocess.run(['mount', '-o', 'loop,ro', '-t', 'vfat', '/tmp/usbdisk.img', '/mnt'], shell=False, check=True)
# copy screenshot-tool.exe
# copy background.png
#subprocess.run(['umount', '/mnt'], shell=False, check=False)
subprocess.run(['mount', '-o', 'loop,rw', '-t', 'vfat', '/tmp/usbdisk.img', '/mnt'], shell=False, check=True)
subprocess.run('cp /opt/freezer/background.png /mnt/', shell=True, check=True)
subprocess.run('cp /opt/freezer/freeze.exe /mnt/', shell=True, check=True)
subprocess.run(['umount', '/mnt'], shell=False, check=True)
subprocess.run(['modprobe', 'g_mass_storage', 'file=/tmp/usbdisk.img', 'stall=0', 'removable=1', 'iSerialNumber=1234567890'], shell=False, check=True)
#tvservice -p

Loading…
Cancel
Save