Skip to content

Raspberry Pi Installation Process

Joseph Sweeney edited this page Dec 6, 2016 · 16 revisions

These instructions describe the steps required to configure a Raspberry Pi Model B+ to automatically boot into the Magic Mirror application.

Contents

Flash Arch Linux ARM to MicroSD

  • Follow these directions to get Arch Linux ARM onto the SD card. sync may take several minutes.

Download Arch Linux ARM for RPi Model B+

Change default passwords

  • Default user (alarm): default password is alarm
  • Root user: default password is 'root'

Install packages

First, perform a full system upgrade:

  • # pacman -Syyu

Install the following packages with pacman:

  • sudo (add alarm as a user through visudo with NOPASSWD tag)
  • vim
  • git
  • python3
  • python3-pip
  • xorg-server (select evdev driver)
  • xf86-video-fbdev
  • sdl2 + sdl2_ttf
  • nodm + ratpoison
  • xterm
  • rsync
  • i2c-tools

Install the following packages with pip:

  • pysdl2

Configure ratpoison

  • Create ~/.ratpoisonrc with contents:

    startup_message off
    

Configure nodm

  • Modify /etc/nodm.conf as explained here

  • Create ~/.xinitrc with contents:

    #!/bin/sh
    
    ratpoison &
    exec xterm
  • Enable nodm: # systemctl enable nodm.service

Enable silent boot

  • Add the following items to /boot/cmdline.txt (all on one line):

    console=tty3
    loglevel=3
    vt.global_cursor_default=0
    logo.nologo
    
  • Add the following line to the end of `/boot/config.txt':

    disable_splash=1
    

Clone project code

  • $ git clone https://github.com/sweeney2/ece477-project.git

  • Modify ~/.xinitrc so that it matches:

    #!/bin/sh
    
    ratpoison &
    cd /home/alarm/ece477-project/rpi-display &&
    exec python magic.py

Set screen rotation

  • Add the following line to the end of /boot/config.txt:

    display_rotate=1
    

Enable camera

  • Add/modify the following lines in /boot/config.txt:

    gpu_mem=128
    start_file=start_x.elf
    fixup_file=fixup_x.dat
    disable_camera_led=1
    
  • Add the following line to /etc/profile:

    PATH="$PATH:/opt/vc/bin"
  • Now you can run $ raspistill -o <filename> to capture an image

Enable I2C