Difference between revisions of "Debian Wheezy Instructions"

From odroid US
Jump to: navigation, search
(Note on x-server installation)
(Adding an X Display Manager)
 
(33 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
  
== Availability ==
+
== Introduction ==
 +
This effort started before HardKernel had a supported Debian image, now they have some.  At this writing the official build comes with the LXDE window manager installed -- depending on odroid board type.
 +
 
 +
There are some great full-featured user-contributed images available (GUI, XBMC and so on).  For example: [http://forum.odroid.com/viewtopic.php?f=56&t=610 @robroyhall images]
 +
 
 +
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.
  
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 "foriegn" kernel buildIf this doens't make sense, please ask on the forum.
+
The images have full provenance, you could create the same setup starting from bootstrapping with an emulated ARMThis topic is meant to help teach about embedded Linux.
  
 
== Versions ==
 
== Versions ==
Line 13: Line 18:
  
 
For Windows users, see [[Debian_Wheezy_SD_Card_prepare_(Windows)|Tutorial: Step-by-step SD-card setup on Windows]]
 
For Windows users, see [[Debian_Wheezy_SD_Card_prepare_(Windows)|Tutorial: Step-by-step SD-card setup on Windows]]
 +
 +
 +
== Availability ==
 +
 +
Several Debian SD-Card images and root file system images are available for various odroid boards.  This set of links is not complete.  You can browse the download area for more.
 +
 +
[[Debian-jessie-armel-odroidxu]]
 +
 +
== Download Area ==
 +
'''Note:''' The file arrangement is by hardkernel board names.  Make sure to download from the area that matches your board.
 +
 +
The download area is here: [http://odroid.us/odroid/ http://odroid.us/odroid/]
  
 
== Features ==
 
== Features ==
Writing the '''base''' SD-card image and booting will give you a complete, headless Debian 7.0 system. <br/>
+
Writing the '''base''' SD-card image and booting will give you a complete, headless Debian system. <br/>
 
Headless, meaning only the Linux console is active -- not the HDMI display.
 
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.
+
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.
  
The login is: user/password or root/root.  Specifically, this means username: user and password: password will get you in.  
+
== Login ==
Or you can use username: root, password: root.
+
=== 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.
 
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 ==
 
== Revision History ==
See [http://odroid.us/mediawiki/index.php?title=Debian-wheezy-revision-history here] for complete revision history of all images
+
See [http://odroid.us/mediawiki/index.php?title=Debian-wheezy-revision-history here] for a complete revision history of all images
  
== Standard armhf Images ==
+
The top of the tree for these Debian images is: [http://odroid.us/odroid/ http://odroid.us/odroid/] Notice the arrangement by hardkernel board names?  Make sure you download from the area that matches your board.
You should use the standard images that support hard-floating pointThese will be faster than the soft-float versions.
+
  
[http://odroid.us/odroid/odroidu2/debian/ http://odroid.us/odroid/odroidu2/debian/]
+
You should use the standard images that support hard-floating point if possible (armhf). They will be faster than the soft-float versions -- yes, even of you are not doing floating point. The additional registers may be used to pass parameters.
  
== Alternate armel Images ==
+
Some alternate images using soft floating point are also available (armel)
A secondary set of images that are armel based, using soft floating point, are stored here:
+
 
+
[http://odroid.us/odroid/users/osterluk/debian-armel/ http://odroid.us/odroid/users/osterluk/debian-armel/]
+
 
+
You can't easily mix soft-float compiled and hard-float compiled binaries on the same system.
+
  
 +
You can't easily mix soft-float compiled and hard-float compiled binaries on the same system.  It is possible, but the general technique is not worked out yet (as far as I know).  The standard hardkernel kernels all built to support hard floating point, and that is a necessary requirement.
  
 
== Security Issues and Initialization ==
 
== Security Issues and Initialization ==
Line 58: Line 76:
  
 
== Adding Native Compiler and Tools ==
 
== 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)
+
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
  
 
<pre>
 
<pre>
 
apt-get install build-essential ncurses-dev
 
apt-get install build-essential ncurses-dev
# Get some (but not all) recommended packages too.  All recommended packages add over 1GiB to the flash footprint
+
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 gcc-4.6-locales debian-keyring libstdc++6-4.6-dbg autoconf automake1.9 libtool flex bison gdb libmudflap0-4.6-dev libgcc1-dbg libgomp1-dbg libmudflap0-dbg binutils-gold ed
+
apt-get install libgcc1-dbg libgomp1-dbg libmudflap0-dbg binutils-gold ed p7zip-full
  
 
</pre>
 
</pre>
  
== Installing X ==
+
== Adding an X Display Manager ==
  
'''Note: This doesn't work yet, it's as far as I got..'''
+
[[ X Display Manager for odroidu2 ]]
 
+
The x-server and userspace drivers provided by [http://dn.odroid.com/MALI400_R3P2/] are either X version 1.11 or 1.13, whereas the default debian in 1.12. The protocols seem to be incompatible.
+
 
+
One option is to use the sunxi-mali drivers. Since debian is statically linked to libdri2, that needs to be built from source as well:
+
<pre>
+
git clone https://github.com/robclark/libdri2
+
cd libdri2
+
./autogen.sh
+
make
+
apt-get install checkinstall
+
checkinstall make install
+
</pre>
+
 
+
checkinstall is used to make a debian-package while installing. This makes it easy to uninstall later on.
+
Be sure to modify the version number to an actual number, not text.
+
 
+
Next up are the user-space mali [http://linux-sunxi.org/Binary_drivers drivers]:
+
 
+
<pre>
+
git clone https://github.com/linux-sunxi/sunxi-mali.git
+
cd sunxi-mali
+
git submodule init; git submodule update
+
checkinstall make install VERSION=r3p1
+
</pre>
+
 
+
Finally, the x-server-module can be compiled. The sunxi configuration script checks the
+
X-server, so we need to install that first:
+
<pre>
+
apt-get install xserver-xorg-core xserver-xorg-dev
+
git clone https://github.com/ssvb/xf86-video-sunxifb.git
+
./autogen.sh
+
make
+
mkdir -p /usr/local/lib/xorg/modules
+
checkinstall make install
+
</pre>
+
  
After this, your favorite window manager can be installed. For me, the log in
+
[[ X Display Manager for odroidxu ]]
/var/log/Xorg.0.log seems fine, but the hdmi-output stays disabled.
+
  
 
== Debian Tips ==
 
== Debian Tips ==

Latest revision as of 22:07, 20 January 2014


Introduction

This effort started before HardKernel had a supported Debian image, now they have some. At this writing the official build comes with the LXDE window manager installed -- depending on odroid board type.

There are some great full-featured user-contributed images available (GUI, XBMC and so on). For example: @robroyhall images

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 images have 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.

Versions

  • 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


Availability

Several Debian SD-Card images and root file system images are available for various odroid boards. This set of links is not complete. You can browse the download area for more.

Debian-jessie-armel-odroidxu

Download Area

Note: The file arrangement is by hardkernel board names. Make sure to download from the area that matches your board.

The download area is here: http://odroid.us/odroid/

Features

Writing the base SD-card image and booting will give you a complete, headless Debian 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.

Login

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 a complete revision history of all images

The top of the tree for these Debian images is: http://odroid.us/odroid/ Notice the arrangement by hardkernel board names? Make sure you download from the area that matches your board.

You should use the standard images that support hard-floating point if possible (armhf). They will be faster than the soft-float versions -- yes, even of you are not doing floating point. The additional registers may be used to pass parameters.

Some alternate images using soft floating point are also available (armel)

You can't easily mix soft-float compiled and hard-float compiled binaries on the same system. It is possible, but the general technique is not worked out yet (as far as I know). The standard hardkernel kernels all built to support hard floating point, and that is a necessary requirement.

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 p7zip-full

Adding an X Display Manager

X Display Manager for odroidu2

X Display Manager for odroidxu

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.