forked from barnybug-archive/wmr100
-
Notifications
You must be signed in to change notification settings - Fork 0
/
raspi-setup.txt
163 lines (113 loc) · 3.38 KB
/
raspi-setup.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
### Raspberry Pi setup
(30.01.2015)
http://downloads.raspberrypi.org/raspbian_latest
# 2014-12-24-wheezy-raspbian.zip
dd if=2014-12-24-wheezy-raspbian.img od=/dev/mmcblk0
# gparted - resize: 1Gb (/), xxGb (/home)
raspi-config:
locale: en_US.UTF-8
timezone: Asia/Irkutsk
keyboard: English-US
user: pi, password: pi
boot: commandline
GPU memory: minimum
ssh: enable
/etc/network/interfaces:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.xx.xx.yy
netmask 255.255.255.0
gateway 10.xx.xx.zz
#.
echo "" > /etc/motd
apt-get update
apt-get upgrade
apt-get install vim ntpdate
# apt-get install ppp wvdial
/etc/wvdial.conf:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Baud = 9600
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
[Dialer megafon]
Modem = /dev/ttyUSB0
Baud = 115200
Init1 = ATZ
Init2 = AT+CGDCONT=1,"IP","internet"
Dial Command = ATD
Phone = *99***1#
Stupid Mode = 1
Username = \n
Password = \n
#.
/etc/fstab:
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat ro 0 2
/dev/mmcblk0p2 / ext4 ro 0 1
/dev/mmcblk0p3 /home ext4 defaults,noatime 0 2
tmpfs /tmp tmpfs defaults,mode=1777,size=1M 0 0
tmpfs /var/log tmpfs nodev,nosuid,mode=0755,size=1M 0 0
tmpfs /var/lock tmpfs nodev,nosuid,mode=0755,size=64k 0 0
tmpfs /var/lib/sudo tmpfs nodev,nosuid,mode=0700,size=64k 0 0
#.
/boot/cmdline.txt +ro
# rm /etc/init.d/dphys-swapfile
apt-get purge -y --auto-remove dphys-swapfile
apt-get purge -y --auto-remove scratch \
debian-reference-en dillo idle3 python3-tk idle python-pygame python-tk \
lightdm gnome-icon-theme raspberrypi-artwork \
gvfs-backends gvfs-fuse desktop-base lxpolkit netsurf-gtk zenity \
gtk2-engines alsa-utils lxde lxtask menu-xdg gksu xdg-utils \
midori xserver-xorg xinit xserver-xorg-video-fbdev lxde-icon-theme \
dbus-x11 libx11-6 libx11-data libx11-xcb1 x11-common x11-utils \
cups-common libcups2 python3-picamera samba-common smbclient \
java-common omxplayer penguinspuzzle fake-hwclock
rm -rf /usr/share/icons/
rm -rf /lib/modules/3.10.25+/kernel/sound/
rm /etc/cron.weekly/man.db
rm /etc/cron.daily/man.db
rm from /etc/cron.daily/all except [logrotate,ntp]
mount --bind / /mnt
rm /mnt/var/log/*
rm /mnt/var/swap
/boot/cmdline.txt:
root=... ro ...
/sbin/fake-hwclock:
FILE=/home/.fake-hwclock.data
/etc/cron.daily/logrotate:
#!/bin/sh
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate --state /var/log/.logrotate.state /etc/logrotate.conf
#.
mount / -o remount,rw
...
mount / -o remount,ro
# ?
/usr/lib/dhcpcd/dhcpcd-hooks/50-ntp:
/etc/default/ntp
#!/bin/sh
case "${reason}" in
BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC)
# "-g" allows for large time differences
ntpd -qg
;;
esac
#.
### Other
http://archive.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages
/etc/apt/sources.list:
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
#.
wget http://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -
#
-march=armv6
-mfpu=vfp
-mfloat-abi=hard
###.