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@ - 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="" key_mgmt=WPA-PSK psk="" } - add to /etc/dhcp/dhclient.conf interface "eth0" { send host-name = "yourhost"; send dhcp-client-identifier ; } # 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@ 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 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