Personal tools
The Open Lighting Project has moved!

We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.

Difference between revisions of "Building a Custom Raspbian Image"

From wiki.openlighting.org

Jump to: navigation, search
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page lists the differences between the default Raspbian wheezy image and the one from the [[Open Lighting Project]]. If you create your own install from scratch you probably want to do most of these changes as well.
+
This page lists the differences between the default Raspbian wheezy image and the one from the [[Open Lighting Project]]. If you create your own install from scratch you probably want to do most of these changes as well. The goal of this image is to produce an image as small as possible for end user use. To this aim, development packages, compilers and non-essential packages are removed.
  
 
* Password for the pi account changed to 'openlighting'
 
* Password for the pi account changed to 'openlighting'
Line 5: Line 5:
 
* Simon's key installed into /home/pi/.ssh/authorized_keys
 
* Simon's key installed into /home/pi/.ssh/authorized_keys
 
* Timezone set to  US/Pacific
 
* Timezone set to  US/Pacific
 +
* Remove Desktop and python_games in the /home/pi directory
 +
* Modified /etc/rc.local to regenerate keys on first boot
 +
* Copied over .screenrc and .vimrc files
 
* Added the Open Lighting Debian Repo to /etc/apt/sources.lists :  deb  http://apt.openlighting.org/raspbian  wheezy main
 
* Added the Open Lighting Debian Repo to /etc/apt/sources.lists :  deb  http://apt.openlighting.org/raspbian  wheezy main
 
* Root ssh access has been disabled in /etc/ssh/sshd_config
 
* Root ssh access has been disabled in /etc/ssh/sshd_config
 +
* Add init_uart_clock=16000000 to /boot/config.txt so the UART plugin works.
  
 
* Packages installed:
 
* Packages installed:
  
 
<pre>
 
<pre>
screen vim ola ola-rdm-tests  deborphan debfoster
+
apt-get install screen vim deborphan debfoster localepurge
 +
</pre>
 +
 
 +
And the ola packages:
 +
<pre>
 +
apt-get install ola ola-rdm-tests  ola-conf-plugins
 
</pre>
 
</pre>
  
Line 19: Line 28:
 
dbus-x11 desktop-base desktop-file-utils dillo gdb gdbserver gconf-service gconf2 gconf2-common gnome-icon-theme gnome-themes-standard gpicview
 
dbus-x11 desktop-base desktop-file-utils dillo gdb gdbserver gconf-service gconf2 gconf2-common gnome-icon-theme gnome-themes-standard gpicview
 
gtk2-engines:armhf  hicolor-icon-theme   
 
gtk2-engines:armhf  hicolor-icon-theme   
 +
gcc g++ g++-4.6  gcc-4.6  gcc-4.4-base gcc-4.5-base gcc-4.6-base  libc6-dev libtagcoll2-dev  libwibble-dev  libxapian-dev
 
libfm-gtk-bin libfm-gtk1 libgtk2.0-0:armhf libgtk2.0-bin libgtk2.0-common netsurf-gtk
 
libfm-gtk-bin libfm-gtk1 libgtk2.0-0:armhf libgtk2.0-bin libgtk2.0-common netsurf-gtk
samba-common scratch smartsim squeak-plugins-scratch  squeak-vm  triggerhappy usbmuxd  
+
penguinspuzzle omxplayer netsurf-common  mupdf menu-xdg  lxde-icon-theme  lxmenu-data  luajit
 +
samba-common scratch smartsim squeak-plugins-scratch  squeak-vm  usbmuxd  
 
xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-video-fbdev
 
xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-video-fbdev
 
xdg-utils xauth x11-xkb-utils x11-utils x11-common   
 
xdg-utils xauth x11-xkb-utils x11-utils x11-common   
 +
cups-bsd cups-client cups-common libcups2 libcupsimage2
 +
</pre>
 +
 +
* Additional packages removed from the Pi2 image:
 +
 +
<pre>
 +
weston python-minecraftpi  protobuf-compiler fakeroot libmtdev1 libwayland0 libxcb-shape0 libxcb-xfixes0 libxcursor1 libxkbcommon0
 +
fonts-freefont-ttf gcc-4.7-base gstreamer1.0-plugins-base gnome-themes-standard-data  gstreamer1.0-x 
 +
</pre>
 +
* Auto remove
 +
 +
<pre>
 +
apt-get autoremove
 
</pre>
 
</pre>
  
 
* Remove orphaned packages:   
 
* Remove orphaned packages:   
 
<pre>
 
<pre>
  deborphan | xargs apt-get -y  remove
+
  deborphan | xargs apt-get -y  remove --purge
 
</pre>
 
</pre>
* Finally run apt-get autoremove  
+
* Purge removed packages (if you didn't use --purge above)
 +
<pre>
 +
dpkg -l |  awk ' /^rc/ {print $2}' | xargs apt-get -y remove --purge
 +
</pre>
 +
* Upgrade & clean up:
 +
<pre>
 +
apt-get update && apt-get upgrade
 +
apt-get autoremove  
 +
apt-get clean
 +
</pre>
 +
* Finally zero out the remaining space, so that the zipped image is smaller:
 +
<pre>
 +
cat /dev/zero > fill
 +
rm fill
 +
</pre>
 +
 
 +
This gets the image down to 609MB in the root fs or 662MB if you leave gcc/g++ installed.
  
 
== Git Image ==
 
== Git Image ==
  
 
The following additional changes are done for the git image. The ola debian package normally does this, but since we're installing from source we need to do it ourselves.
 
The following additional changes are done for the git image. The ola debian package normally does this, but since we're installing from source we need to do it ourselves.
 
* Many unused packages have been removed (samba, X, mysql, nfs etc.)
 
* /etc/rc.local has been modified to regenerate the ssh keys on the first boot
 
  
 
* OLA dependancies have been installed (microhttpd, libusb, etc.)
 
* OLA dependancies have been installed (microhttpd, libusb, etc.)
 
* The OLA git repo has been cloned into /home/ola/ola
 
* The OLA git repo has been cloned into /home/ola/ola
* The ola account was added and added to the dialout & plugdev groups
+
* The pi account was added and added to the dialout & plugdev groups
 
* /etc/udev/rules.d/10-local.rules was updated according to [[OLA_Device_Specific_Configuration]]
 
* /etc/udev/rules.d/10-local.rules was updated according to [[OLA_Device_Specific_Configuration]]

Latest revision as of 08:09, 24 March 2015

This page lists the differences between the default Raspbian wheezy image and the one from the Open Lighting Project. If you create your own install from scratch you probably want to do most of these changes as well. The goal of this image is to produce an image as small as possible for end user use. To this aim, development packages, compilers and non-essential packages are removed.

  • Password for the pi account changed to 'openlighting'
  • Rootfs expanded to 4GB using `sudo raspi-config`
  • Simon's key installed into /home/pi/.ssh/authorized_keys
  • Timezone set to US/Pacific
  • Remove Desktop and python_games in the /home/pi directory
  • Modified /etc/rc.local to regenerate keys on first boot
  • Copied over .screenrc and .vimrc files
  • Added the Open Lighting Debian Repo to /etc/apt/sources.lists : deb http://apt.openlighting.org/raspbian wheezy main
  • Root ssh access has been disabled in /etc/ssh/sshd_config
  • Add init_uart_clock=16000000 to /boot/config.txt so the UART plugin works.
  • Packages installed:
apt-get install screen vim  deborphan debfoster localepurge

And the ola packages:

apt-get install ola ola-rdm-tests  ola-conf-plugins 
  • Packages removed:
dbus-x11 desktop-base desktop-file-utils dillo gdb gdbserver gconf-service gconf2 gconf2-common gnome-icon-theme gnome-themes-standard gpicview
gtk2-engines:armhf  hicolor-icon-theme  
gcc g++ g++-4.6  gcc-4.6  gcc-4.4-base gcc-4.5-base gcc-4.6-base  libc6-dev libtagcoll2-dev  libwibble-dev  libxapian-dev
libfm-gtk-bin libfm-gtk1 libgtk2.0-0:armhf libgtk2.0-bin libgtk2.0-common netsurf-gtk
penguinspuzzle omxplayer netsurf-common  mupdf menu-xdg  lxde-icon-theme  lxmenu-data  luajit 
samba-common scratch smartsim squeak-plugins-scratch  squeak-vm  usbmuxd 
xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-video-fbdev
xdg-utils xauth x11-xkb-utils x11-utils x11-common  
cups-bsd cups-client cups-common libcups2 libcupsimage2 
  • Additional packages removed from the Pi2 image:
weston python-minecraftpi  protobuf-compiler fakeroot libmtdev1 libwayland0 libxcb-shape0 libxcb-xfixes0 libxcursor1 libxkbcommon0 
fonts-freefont-ttf gcc-4.7-base gstreamer1.0-plugins-base gnome-themes-standard-data  gstreamer1.0-x  
  • Auto remove
apt-get autoremove
  • Remove orphaned packages:
 deborphan | xargs apt-get -y  remove --purge 
  • Purge removed packages (if you didn't use --purge above)
dpkg -l |  awk ' /^rc/ {print $2}' | xargs apt-get -y remove --purge
  • Upgrade & clean up:
apt-get update && apt-get upgrade
apt-get autoremove 
apt-get clean
  • Finally zero out the remaining space, so that the zipped image is smaller:
cat /dev/zero > fill
rm fill

This gets the image down to 609MB in the root fs or 662MB if you leave gcc/g++ installed.

Git Image

The following additional changes are done for the git image. The ola debian package normally does this, but since we're installing from source we need to do it ourselves.

  • OLA dependancies have been installed (microhttpd, libusb, etc.)
  • The OLA git repo has been cloned into /home/ola/ola
  • The pi account was added and added to the dialout & plugdev groups
  • /etc/udev/rules.d/10-local.rules was updated according to OLA_Device_Specific_Configuration