blob: 5cef493ea5aebd46a2b76704fe39e714304a414c [file] [log] [blame]
Parker Schuh46b48812019-02-22 20:45:36 -08001#!/bin/sh
2
3if [ "$(id -u)" != "0" ]
4then
5 echo "Please run as root: $(id -u)"
6 exit
7fi
8
Ben Fredricksona8c3d552019-03-03 14:14:53 -08009echo "Pulling Binaries ..."
10if [ ! -f "./libjevoisbase.so" ]
11then
12 wget http://www.frc971.org/Build-Dependencies/libjevoisbase.so
13fi
14echo "Got libjevoisbase.so"
15
16if [ ! -f "./PassThrough.so" ]
17then
18 wget http://www.frc971.org/Build-Dependencies/PassThrough.so
19fi
20echo "Got PassThrough.so"
21
Parker Schuh46b48812019-02-22 20:45:36 -080022DEV_BASE=/dev/mmcblk0p
23
24echo "Please check that ${DEV_BASE}3 is the correct drive to format. This is a destructive command so please be sure."
25read -p "Enter \"yes\" when you are ready: " input
26
27if [ "$input" != "yes" ]
28then
29 echo "Format aborted."
30 exit -1
31fi
32
33# need to disable some new features on 17.x
34sudo mkfs.ext4 -L JEVOIS -O ^64bit,uninit_bg,^metadata_csum ${DEV_BASE}3
35
36echo "Mounting JEVOIS."
37mkdir -p /tmp/JEVOIS
38sudo mount ${DEV_BASE}3 /tmp/JEVOIS
39
40echo "Mounting LINUX."
41mkdir -p /tmp/LINUX
42sudo mount ${DEV_BASE}2 /tmp/LINUX
43
44echo "Make JEVOIS directories."
45mkdir -p /tmp/JEVOIS/packages
Ben Fredricksona8c3d552019-03-03 14:14:53 -080046mkdir -p /tmp/JEVOIS/modules/JeVois/PassThrough/
Parker Schuh46b48812019-02-22 20:45:36 -080047mkdir -p /tmp/JEVOIS/config
Ben Fredricksona8c3d552019-03-03 14:14:53 -080048mkdir -p /tmp/JEVOIS/lib/JeVois/
49mkdir -p /tmp/JEVOIS/deploy/
50mkdir -p /tmp/JEVOIS/data/
Parker Schuh46b48812019-02-22 20:45:36 -080051
52echo "Copy configs."
53cp ./austin_cam.sh /tmp/JEVOIS
54cp ./videomappings.cfg /tmp/JEVOIS/config/
55cp ./rcS_script.txt /tmp/LINUX/etc/init.d/rcS
56cp Jevois_fstab /tmp/LINUX/etc/fstab
Ben Fredricksona8c3d552019-03-03 14:14:53 -080057cp ./PassThrough.so /tmp/JEVOIS/modules/JeVois/PassThrough/
58cp ./libjevoisbase.so /tmp/JEVOIS/lib/JeVois/
59cp ./launch.sh /tmp/JEVOIS/deploy/
Parker Schuh46b48812019-02-22 20:45:36 -080060
61echo "Un-mounting JEVOIS"
62sudo umount /tmp/JEVOIS
63
64echo "Un-mounting LINUX"
65sudo umount /tmp/LINUX
66
67