-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
63 lines (48 loc) · 1.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.PHONY: .Force
.FORCE:
GUNNAR_MAKE = cd src/arduino/libraries/ROSArduinoBridge && make
all:
$(GUNNAR_MAKE)
upload:
$(GUNNAR_MAKE) upload
clean: cleanPyc
$(GUNNAR_MAKE) clean
monitor:
$(GUNNAR_MAKE) monitor
stop: .FORCE
python bin/stop.py
go: upload
cleanPyc:
find . -name "*.pyc" -type f -delete
find . -name "*.pyo" -type f -delete
downloadDiskimage:
wget http://ftp.jaist.ac.jp/pub/raspberrypi/raspbian/images/raspbian-2016-05-31/2016-05-27-raspbian-jessie.zip
unzipDiskImage:
rm 2016-05-27-raspbian-jessie.img || true
unzip 2016-05-27-raspbian-jessie.zip
sync
# Load config file.
# This file should look something like this:
#IMGPATH = /home/tsbertalan/workspace/gunnar/2016-05-27-raspbian-jessie.img
#MNTPOINT = /mnt/img
#USER = pi
#SDX = /dev/sdc
include param/makeconfig.mk
# Modify image file.
mountAndAlterSD:
scripts/utils/mountSDcard.sh $(IMGPATH) $(MNTPOINT)
sudo scripts/utils/doctorSDcard.sh $(MNTPOINT) $(USER)
sync
sudo umount $(MNTPOINT)
# Flash Raspbian Jessie image to SD card.
flash:
scripts/utils/doFlash.sh "$(IMGPATH)" "$(SDX)"
verify:
sudo dcfldd bs=4M if=$(SDX) of=/tmp/from-sd-card.img count=1024
sync
sudo truncate --reference $(IMGPATH) /tmp/from-sd-card.img
sudo diff -s /tmp/from-sd-card.img $(IMGPATH)
sudo rm /tmp/from-sd-card.img
vagrantSaveKey:
vagrant up | tee /tmp/vagrant.out
grep ssh-rsa /tmp/vagrant.out | sed 's/==> gunnar: //g' >> ~/.ssh/authorized_keys