Archos gen8

From Qt Wiki
Revision as of 14:55, 3 March 2015 by AutoSpider (talk | contribs) (Add "cleanup" tag)
Jump to navigation Jump to search
This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

[toc align_right="yes" depth="3"]

The Archos gen8 tablets come with Android, but can be turned into complete Embedded Linux development platforms with the installation of the Special Developer Edition (SDE) firmware provided by Archos. They make a powerful development device with all the necessary peripherals and in an elegant packaging.

"KDAB":http://www.kdab.com provides an open-source SDK for Qt4 (4.8.3-Lighthouse) and Qt5-beta1 development on the device, as well as BSPs with support for linuxfb and EGLFS, multi-touch input, remote debugging, and more.

Archos gen8 70/101IT: Device Information

Architecture *ARMv7a*
CPU Cortex A8
RAM 512MB (shared)
GPU PowerVR SGX530
OpenGL OpenGL ES 2.0
Screen Resolution (101IT) 1024x600 pixels (WXVGA), 10.1 TFT LCD
Screen Resolution (70IT) 800 x 480 pixels (WVGA), 7 TFT LCD
Touch Screen Capacitive multitouch screen
Peripherals G-Sensor, Front VGA camera, Built-in Microphone and Speaker
Networking Wi-fi, Ethernet-over-USB
Interfaces USB slave+host, MicroSD, MiniHDMI

Software Developer Edition Firmware

First you need to install the SDE firmware, which will enable the "Developer mode" on the tablet. The firmware download and instructions can be found on the Archos website: http://www.archos.com/support/support_tech/updates_dev.html?country=us&lang=en

Install the .aos file by following the instructions, you'll only need to do this once. Note that the SDE firmware doesn't erase the original Android image on the tablet, it just acts like a dual-boot.

NOTE: You only need to download the .aos file, you don't need to download the modifications applied to the Angstrom distribution, as they have already been applied to the OpenEmbedded-Archos repository.

Once this is done, you can now boot the tablet in Developer Mode:

With the tablet turned off, press the power button with the volume-down button pressed, a few seconds after the Archos logo shows up you should now get to a white menu screen with various options.

Embedded Linux BSP and Qt SDK

The SDK and BSPs are based on an "Ångström distribution":http://www.angstrom-distribution.org/ and built with "OpenEmbedded":http://www.openembedded.org/wiki/Main_Page using an overlay from Archos for the tablets.

KDAB maintains an updated clone of the OpenEmbedded repository with the Archos overlay applied, and built-in support for Qt4 and Qt5, hosted on GitHub:

"OpenEmbedded-Archos":http://github.com/KDAB/OpenEmbedded-Archos

Supported Qt versions

The Archos gen8 tablet supports:

  • Qt 4.8.3 with the QPA (Lighthouse) embedded architecture
  • Qt 5.0.0-beta1

Included modules

  • qtbase
  • qtdeclarative
  • qtjsbackend
  • qtmultimedia
  • qtsensors
  • qtxmlpatterns
  • qt3d

Pre-built images and toolchains

Complete target images for Qt4 and Qt5, including kernel+initramfs+rootfs, as well as matching SDKs with toolchain and sysroot can be downloaded from github:

https://github.com/KDAB/OpenEmbedded-Archos/downloads

Build prerequisites

The BSP has been built and tested on Ubuntu 12.04 only. Other versions and distros may or may not work.

You'll need the following packages installed before you start building:

sudo apt-get install bitbake sed wget cvs subversion git-core  coreutils unzip texi2html texinfo docbook-utils  gawk python-pysqlite2 diffstat help2man make gcc build-essential g++  desktop-file-utils chrpath zlib1g-dev dpkg-dev libxml-parser-perl

For other distributions, see http://www.openembedded.org/wiki/OEandYourDistro for details and equivalent command lines.

You also need to check that /bin/sh (ls -l /bin/sh) is not symbolically linked to dash. "dash" is a POSIX compliant shell that is much smaller than "bash" — however some broken shell scripts still make use of bash extensions while calling into /bin/sh.

To work around this issue run

sudo dpkg-reconfigure dash<code> and select No when it asks you to install dash as /bin/sh.

=== Building the BSP and Qt SDK ===

It couldn't be simpler:

git clone -b qt5 git@github.com:KDAB/OpenEmbedded-Archos.git cd OpenEmbedded-Archos ./build.sh

To build a Qt 4.8.3 image instead of Qt5, just replace "-b qt5" with "-b qt4"

h3. Build results

Once the build has completed, you'll find the results in the build folder located in '''../build-archos-gen8''' relative to the source dir:

'''''' '''tmp/deploy/glibc/images/archos-gen8''': Images for kernel+initramfs+rootfs
'''''' '''tmp/cross/armv7a/bin''': Cross-toolchain (compiler, linker, debugger, etc.)
'''''' '''tmp/staging/armv7a-angstrom-linux-gnueabi''': cross-compiled tools and libraries, the Qt ones in particular. This is where you would find the qmake to add in Qt Creator.
'''''' '''tmp/rootfs''': the contents of the rootfs image as a folder structure (useful for troubleshooting issues with the generated rootfs images)
'''''' '''tmp/work''': build folders for the packages

Note that you need to rename the image files when copying them to the tablet:

'''''' '''Kernel''': zImage-'''.bin -> zImage
'''''' '''Initramfs''': initramfs-'''.cpio.gz -> initramfs.cpio.gz
'''''' '''Rootfs''': Archos-image*.ext3-> rootfs.img

=== Deploying to the tablet ===

The tablet is flashed in two steps: you flash a kernel+initramfs first, and then the rootfs in a second step.
Afterwards, you can then flash them independently of each other. Usually you'll only flash the rootfs, since the kernel+initramfs rarely change.

==== Flashing the kernel and initramfs ====

# In the SDE menu, go to "Recovery System" -> "Developer Edition Menu"-> "Flash kernel and initramfs"
# Plug the board to your computer, and mount the drive from the newly recognized device (normally called 101IT_REC)
# Copy both zImage and initramfs.cpio.gz on the mounted partition, directly at the root
# Unmount safely, then click ok on the board, and exit the menu reboot

==== Flashing the rootfs ====

# In the SDE menu, go to "Recovery System" -> "Repair System"-> "Start USB MSC"
# Plug the board to your computer, and mount the drive from the newly recognized device (normally called 101IT)
# Copy rootfs.img on the mounted partition, directly at the root
# Unmount safely, then click ok on the board, and exit the menu to reboot

== SSH access to the tablet ==

The tablet has the USB (slave) port set up with Ethernet-over-USB, using the g_ether gadget. See "this page":http://wiki.maemo.org/USB_networking for additional info and how to set up the network interface on the host computer.

=== Interface setup ===

The interface on the tablet is set up with the static address '''192.168.0.202'''.
You should set up the usb0 interface on the host by adding the following to */etc/network/interfaces''':

auto usb0 iface usb0 inet static

  1. note: this is the ip address on the host side, not on the tablet
address 192.168.0.201
netmask 255.255.255.0
No DCHP server is required.

=== SSH credentials ===

Once set up, you can connect to the tablet with the following credentials:

'''''' Username: '''root'''
'''''' Password: ''<no password>''

== Creating a redistributable Qt SDK ==

You can also create a redistributable SDK package by running the '''pack-sdk.sh''' script.
The script creates an archive '''archos-gen8-sdk.tar.gz''' in the build folder at the top level. This archive contains two folders:
'''''' '''toolchain''': contains the compiler and associated tools for cross-compiling applications for the tablet
'''''' '''sysroot''': contains the Qt libraries, headers, qmake, and all the dependencies for the tablet

== Installing the redistributable Qt SDK ==

In addition to extracting the archive, you must run the '''setup-sdk.sh''' script, which sets up the proper paths in the toolchain and for Qt itself:

tar xzf archos-gen8-sdk-qt5.tar.gz cd archos-gen8-sdk ./setup-sdk.sh