Debian Wheezy Instructions

From odroid US
Revision as of 13:58, 1 September 2013 by Osterluk (Talk | contribs) (Adding Native Compiler and Tools)

Jump to: navigation, search


This effort started before HardKernel had a supported Debian image, now they have one. It was based on this effort, extended by neagix and mdrjr. At this writing the official build comes with the LXDE window manager installed.

In order to keep this branch relevant, it has been updated to match the Hardkernel setup. It has the same bootloader, boot scripts, partition layout, kernel version, and kernel modules -- only it is headless, meaning no GUI. The approach is modular and you can follow the steps to add Gnome or XFCE as you like.

The image has full provenance, you could create the same setup starting from bootstrapping with an emulated ARM. This topic is meant to help teach about embedded Linux.


Several Debian SD-Card images and root file system images are available for the odroid-u2 board. The root file system images <should> work for other odroid models, but they would have to be merged with the "stock" SD Card image and the kernel modules would have to be pulled from the "foreign" kernel build. If this does not make sense, please ask on the forum.


  • minimal system (base) - headless or server-style. Login with USB-UART kit or using ssh. No GUI.
  • system with visual desktop (gnome, xfce) - recommended for new users
  • root filesystem only (rootfs) image - Need special handling. Tutorial: Updating from Root File System Images

For Linux host users, see Tutorial: Step-by-step SD-Card setup on Linux host

For Windows users, see Tutorial: Step-by-step SD-card setup on Windows


Writing the base SD-card image and booting will give you a complete, headless Debian Wheezy 7.1 system.
Headless, meaning only the Linux console is active -- not the HDMI display.

The network will come up automatically, using DHCP and the ssh daemon will be started so you can connect from another computer -- even without the USB-UART kit.


Version 7 Credentials

As of release 7, the login credentials are odroid/odroid and root/odroid in order to match the official Hardkernel Debian release. Specifically, this means username: odroid and password: odroid will get you in.

Or you can use username: root, password: odroid.

If you log in as user, you can use command su to become root.

Version 6 Credentials

Previous to version 7, the credentials were user/password and root/root

Revision History

See here for complete revision history of all images

Standard armhf Images

You should use the standard images that support hard-floating point. These will be faster than the soft-float versions.

Alternate armel Images

A secondary set of images that are armel based, using soft floating point, are stored here:

You can't easily mix soft-float compiled and hard-float compiled binaries on the same system.

Security Issues and Initialization

When you use an existing image, you pick up some keys that you should change for security reasons. Once you boot your system the first time do this: (as root)

rm /etc/ssh/*.pub /etc/ssh/*_key
#images starting at debian-wheezy-base-6.1 should have openssh-server installed
# re-generate the host ssh keys
dpkg-reconfigure openssh-server

It is best to set a unique persistent MACID. This script will do it:

echo $( ifconfig | grep HWaddr | awk '{ print $5 }' ) >/etc/smsc95xx_mac_addr

Adding Native Compiler and Tools

The base, xfce and gnome images do not include tools required to build the kernel or other compile other packages. Here are steps you can do to add that capability: (as root). We get some (but not all) recommended packages too. All recommended packages add over 1GiB to the flash footprint

apt-get install build-essential ncurses-dev
apt-get install gcc-4.6-locales debian-keyring libstdc++6-4.6-dbg autoconf automake1.9 libtool flex bison gdb libmudflap0-4.6-dev 
apt-get install libgcc1-dbg libgomp1-dbg libmudflap0-dbg binutils-gold ed

Installing X

The x-server and userspace drivers provided by [1] are either X version 1.11 or 1.13, whereas the default in debian is 1.12. The X-protocols seem to be incompatible.

So after installing [2], the X-server should be replaced by something else.

One option for the X-server is to use the sunxi-mali drivers. Since debian is statically linked to libdri2, that needs to be built from source as well:

apt-get install checkinstall build-essential pkg-config
git clone
cd libdri2
checkinstall --pkgname=libdri2 --pkgversion=1 make install

checkinstall is used to make a debian-package while installing. This makes it easy to uninstall later on. Just press enter on all checkinstall questions should be fine.

Next up are the user-space mali drivers. The configuration script checks the X-server, so we need to install that first:

apt-get install xserver-xorg-core xserver-xorg-dev
git clone
cd sunxi-mali
git submodule init; git submodule update
checkinstall --pkgname=sunxi-mali --pkgversion=1 make install VERSION=r3p1

Finally, the x-server-module can be compiled.

git clone
cd xf86-video-sunxifb
mkdir -p /usr/local/lib/xorg/modules
checkinstall --pkgname=xf86-video-sunxifb --pkgversion=1 make install

After installation of the x-server, it needs to be configured using /etc/X11/xorg.conf. you can generate one by

cp /usr/share/X11/xorg.conf.d/99-sunxifb.conf /etc/X11/xorg.conf

For kernel version 3.8, /dev/fb0 is the LCD output, /dev/fb1 is the HDMI output 1. For an Odroid-X2 with kernel 3.8.13, the following /etc/X11/xorg.conf gives output on the HDMI interface:

Section "Device"
        Identifier "Sunxi FBDEV"
        Driver          "sunxifb"
        Option "fbdev" "/dev/fb1"
        Option "ShadowFB" "on"

Section "Screen"
        Identifier      "Sunxi Screen"
        Device          "Sunxi FBDEV"

After this, your favorite window manager can be installed, for example Debian-wheezy-gnome-6_Build_Notes.

Debian Tips

This page is for Debian Tips Debian Tips

Image Creation Details

You can completely re-create any of these Debian root filesystem images own your own. All the instructions are here: Custom_Debian_Root_Filesystem_Image.