-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.txt
274 lines (183 loc) · 5.83 KB
/
install.txt
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
install.txt
-----------
1. basic raspberrypi board install
- download raspbian image from raspberry.org
(current: 2015 jessie)
- unzip
- attach fresh SD card
- on Mac: use ApplePiBake
see http://www.tweaking4all.com/hardware/raspberry-pi/macosx-apple-pi-baker/
2. setup in "raspi-config" tool
- "1 expand fs"
- "3 boot behaviour" - no desktop at startup
- "4 I18n Options"
- "locale" -> de.UTF-8 (disable en_GB*) -> default locale: de.UTF-8
- "change timezone" -> Europe -> Berlin
- "setup keyboard"
-> 105 intl keyboard -> more -> german -> eliminate dead keys
-> default key set -> keep
- (optional) "7 overclock": Turbo 1000 MHz (seems to work only on 512 KiB models)
- "8 Advanced Options"
- "disable overscan"
- "hostname"
- "memory split": GPU -> non-gfx: 16
- "enable ssh"
- "update"
# reboot (perform sd card resize)
3. custom setup
(I usually perform these steps already in a ssh sesson - cut & paste from here :)
host> ssh pi@<your_raspi_ip>
- full update (system/debian updates)
> sudo -s
# apt-get update
# apt-get dist-upgrade
** Set Video Output (if HDMI is used)
- edit /boot/config.txt:
# 720p HDMI ready monitor
hdmi_group=1
hdmi_mode=19
# 800x600
hdmi_group=2
hdmi_mode=9 # @60Hz
** (Optional) Wifi (here Netgear Mini USB Dongle )
- check for adapter
# dmesg
# iwlist scan
- in /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf
- create /etc/wpa.conf
network={
ssid="<your_ssid>"
key_mgmt=WPA-PSK
psk="<your_passwd>"
}
- add to /etc/dhcp/dhclient.conf
interface "eth0" {
send host-name = "yourhost";
send dhcp-client-identifier <mac:addr:wlan>;
}
# ifdown wlan0
# ifup wlan0
- reboot
** NSF/Autofs (for my public share)
# apt-get install autofs
- edit /etc/auto.master, add:
/net -hosts
# service autofs restart
** Add user "chris"
# adduser --uid 501 chris
# usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi chris
** (Optional) link my NFS share
- link autofs shares for user chris (see below)
> cd $HOME
> mkdir net
> cd net ; ln -s /net/nfs-share share
** SSH for "chris"
- push SSH credentials from host machine
(on OSX: sudo port install openssh +ssh_copy_id)
host> ssh-copy-id chris@<yourpi>
host> scp -r ~/.ssh yourpi:
** Stream-line MOTD
# vi /etc/motd
--> hostname <--
----- Strip Down Install -----
** Remove bloaters
# apt-get remove --purge wolfram-engine libreoffice
# apt-get autoremove
** (Optional) Headless: remove X11
# apt-get remove --auto-remove --purge libx11-.*
# apt-get autoremove
** (Optional) Manual Cleanup
# aptitude
- deselect packages
<u> update sources
----- Add Ons -----
--- Watterott Display "Rpi-Display" ---
- use mainline kernel and update
# rpi-update
- enable rpi-display overlay in /boot/config.txt:
dtoverlay=rpi-display
- reboot and display should work
- show boot terminal:
in /boot/cmdline.txt add:
logo.nologo fbcon=map:10 fbcon=font:VGA8x8
- install touch screen tools
# apt-get install xinput
- calibrate touch:
> apt-get install autoconf automake libtool libx11-devi libxext-devl libxi-dev
> git clone https://github.com/tias/xinput_calibrator.git
> cd xinput_calibrator
> ./autogen.sh
> ./configure
> make
> sudo make install
> startx &
> DISPLAY=:0.0 /usr/local/bin/xinput_calibrator
> pkill x
copy output to file /usr/share/X11/xorg.conf.d/99-calib.conf:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "210 3955 3775 260"
Option "SwapAxes" "1"
EndSection
- (opt) disable blanking
edit $HOME/.xinitrc:
xset s off # don't activate screensaver
xset -dpms # disable DPMS (Energy Star) features.
xset s noblank # don't blank the video device
exec $HOME/raspi/piradio/piradio.py # your app!
- create '/dev/input/touchscreen' for input device
create file /etc/udev/rules.d/29-ads7846.rules:
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{name}=="ADS7846 Touchscreen", SYMLINK+="input/touchscreen"
- set fb1 as X11 buffer
vi /usr/share/X11/xorg.conf.d/99-fbdev.conf:
Section "Device"
Identifier "bla"
Driver "fbdev"
Option "fbdev" "/dev/fb1"
EndSection
- launch X11 in /etc/rc.local:
su -l chris -c startx &
** real vim
# apt-get install vim-nox | vim
** enable I2C for users
- in raspi-config: advanced options -> enable i2c
# apt-get install i2c-tools python-smbus
# usermod -a -G i2c chris
# i2cdetect -y 1
** tmux setup (window title, use ctrl-b)
# apt-get install tmux
- create $HOME/.tmuxconf:
set-option -g set-titles on
set-option -g set-titles-string "#T"
unbind C-b
set -g prefix C-a
bind-key a send-prefix
set -g history-limit 10000
- color prompt in tmux: in $HOME/.bashrc modify and at 'screen' terminal:
...
case "$TERM" in
xterm*|rxvt*|screen)
...
** auto-start tmux session on remote ssh
in $HOME/.bashrc:
if [ "$PS1" != "" -a "${STARTED_TMUX:-x}" = x -a "${SSH_TTY:-x}" != x ]
then
STARTED_TMUX=1; export STARTED_TMUX
sleep 1
( (tmux has-session -t remote && tmux attach-session -t remote) || (tmux new-session -s remote) ) && exit 0
echo "tmux failed to start"
fi
** Use Green LED for own stuff
- enable/disable LED mode
# echo none >/sys/class/leds/led0/trigger
# echo mmc0 >/sys/class/leds/led0/trigger
- toggle LED
# echo 1 >/sys/class/leds/led0/brightness
# echo 0 >/sys/class/leds/led0/brightness
----- HowTo -----
** size of installed packages
# dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n