Toolchain

From Qi-Hardware
Jump to: navigation, search

Contents

[edit] Building OpenWrt-image from source

[edit] Prerequisites

The linux embedded distribution OpenWrt is used for the official software images.

Currently we use our own repository for development, however merge from and to OpenWrt-mainline in a regular interval.

In case of OpenWrt-related problems, please consider taking a look into the OpenWrt documentation / FAQ / wiki.

This page describes how to build OpenWrt for the SIE. This page corresponds to the more general OpenWrt wiki page How to build OpenWrt. This page does not repeat the general build instructions, but instead focuses specifically on how to build OpenWrt for the NanoNote.

These instructions automatically build the cross-compiler, kernel and packages all under the build directory. You do not need root privileges to build software images.

No extra work than is explained below is required to build u-boot.bin, uImage and .ipk packages ready for installation on your NanoNote.

Install the following packages before trying to build the software image:


$ sudo aptitude install sed wget cvs subversion git-core coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils \
gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ desktop-file-utils chrpath flex libncurses5 \
libncurses5-dev libxml-simple-perl zlib1g-dev pkg-config gettext libxml-simple-perl guile-1.8 cmake

[edit] Downloading sources

Building a software image requires at least 12GB of disk space. Make sure the directory you download the source code to has enough disk space available.


[edit] Tracking OpenWrt Release (Backfire)

The release software images are based on the current stable branch of OpenWrt: Backfire. We have a local source repository on top of the Backfire branch, called xburst. Checkout the source repository for building images like this:

$ git clone git://projects.qi-hardware.com/openwrt-xburst.git # clone the git repository
$ cd openwrt-xburst # change-dir into the sourcecode directory
$ git fetch origin
$ git checkout --track -b local_backfire origin/tracking_backfire # checkout the 'backfire'-branch


[edit] Feeds (optional if you want to create the official image)

OpenWrt uses so called "feeds" which provide openwrt-packages for software beyond the default minimal system.


"feeds" are defined within the files <feeds.conf> respective <feeds.conf.default> (former one overrides latter one) - however normally you shouldn't be needed to touch them.

To get and integrate the "feeds" simply do:

$ scripts/feeds update -a && scripts/feeds install -a

[edit] Configuration

[edit] Official software

To build an image based on the released ones, fetch the config of the latest official software which was released:

$ cp data/qi_lb60/conf/config.full_system .config 

[edit] Minimal configuration

SIE doesn't need many official packages, like games, or any application that use keyboard; to build the minimal configuration you must type:

$ cp data/qi_lb60/conf/config.minimal .config 

[edit] QT

If you want to run QT applications starting with minimal configuration you must type:

$ make menuconfig

then on Xorg -> framework select:

  │ │ <*> qt4.................................................................. qt4       │ │  
  │ │     qt4 window system (QWS window system)  --->                                     │ │  
  │ │ <*> qt4-dbus...................................................... qt4 (dbus)       │ │  
  │ │ <*> qt4-demos.................................................... qt4 (demos)       │ │  
  │ │ <*> qt4-drivers-gfx-directfb......................... qt4 gfxdrivers directfb (NEW) │ │  
  │ │ <*> qt4-drivers-gfx-linuxfb........................... qt4 gfxdrivers linuxfb (NEW) │ │  
  │ │ < > qt4-drivers-mouse-tpmousedriver........... qt4 mousedrivers tpmousedriver (NEW) │ │  
  │ │ <*> qt4-drivers-mouse-tslibmousedriver..... qt4 mousedrivers tslibmousedriver       │ │  
  │ │ < > qt4-examples.............................................. qt4 (examples) (NEW) │ │
  │ │ <*> qt4-mysql.................................................... qt4 (mysql)       │ │  
  │ │ <*> qt4-sqlite.................................................. qt4 (sqlite)       │ │

on Xorg -> font select:

  │ │ <*> dejavu-fonts-ttf........................................ dejavu-fonts-ttf       │ │

[edit] Building Lua

Languages->

  │ │ <*> lua............................... Lua programming language (interpreter)      │ │  
  │ │ <*>   lua-examples......................... Lua programming language (examples)    │ │  
  │ │ <*> luac..                                                                         │ │

[edit] xc3sprog

if you run xc3sprog and find the following error message: ­can't load library 'libstdc++.so.6

  │ │ [*] Advanced configuration options (for developers) --->                           │ │  
  │ │    [*] Toolchain Options --->                                                      │ │  
  │ │       [*] Build/install c++ compiler and libstdc++?                                │ │

[edit] Minicom

Minicom is an application for serial port communication.

 Utilities->Terminal->minicom


[edit] Building Images

Having downloaded, updated, and configured your source, you are ready to build the software:

$ make -j3

When the process finish you can see on PATH_TO_OPENWRT/openwrt-xburst/bin/xburst the following files:

|-- md5sums
|-- openwrt-xburst-qi_lb60-root.ubi
|-- openwrt-xburst-qi_lb60-u-boot.bin
|-- openwrt-xburst-qi_lb60-uImage.bin
|-- openwrt-xburst-sakc-u-boot.bin
|-- packages
|-- uboot-xburst-qi_lb60
|-- uboot-xburst-sakc

[edit] Reflash

First to all, you must have to install the package "xburst-tools" located here.

[edit] Erasing NAND memory

Note: before this step, you have to jumper the SIE as indication in board, type lsusb and must appear something like:

  Bus 001 Device 004: ID 601a:4740

The first step is erase the NAND memory:

$ sudo usbboot  -c "boot"
$ sudo usbboot  -c "nerase 0 4096 0 0"

Then you can use This scripts (you must copy these 6 files to PATH_TO_OPENWRT/openwrt-xburst/bin/xburst and make them executables) for:

[edit] Reflashing u-boot

$ ./flash_u-boot.sh


[edit] Reflashing kernel Image

$ ./flash_kernel.sh


[edit] Reflashing File System

$ ./flash_rootfs.sh
Personal tools
Namespaces
Variants
Actions
Navigation
interactive
Toolbox
Print/export