Building Software Image

From Qi
Jump to: navigation, search

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

The following OpenWrt wiki page How to build OpenWrt may provide some information and basic help about how the OpenWrt buildsystem and its requirements can be setup correctly.

These instructions automatically build the cross-compiler, kernel and packages all under a single directory without cluttering up your file system or needing root privileges. No extra work than is explained below is required to build u-boot.bin, uImage and .ipk packages ready for installation on your NanoNote.


Contents

[edit] Building OpenWrt-image from source

[edit] Required software: Ubuntu

$ 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 subversion libncurses5 libncurses5-dev   \ 
libxml-simple-perl zlib1g-dev pkg-config

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 xburst origin/xburst # checkout the 'xburst'-branch

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

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

$ wget "http://downloads.qi-hardware.com/software/images/Ben_NanoNote_2GB_NAND/latest/config" -O .config

For selecting / deselecting packages which should go into the going-to-be-built image, you can run interactive ncurses-based configuration interface:

$ make menuconfig

And - in the end - make it :)

$ make

With little luck it will go through without errors and results in ready-to-flash+use images in: bin/xburst/

Currently compiling an image with such a software-configuration, takes about 6 hours on a decent machine.

Yippieh! :)

Official binary images can be found here official software image and its overview [Official Software Image]

[edit] Porting projects to OpenWrt

Please refer to

[edit] A short guide

You'll definitely need to read the above, but the main ideas are:

 make package/packagename/compile V=99

[edit] openwrt-package

[edit] feeds.conf

[edit] FAQ

The git archives are at projects.qi-hardware.com

 /PATH/TO/OPENWRT/bin/xburst
 /PATH/TO/OPENWRT/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin
 Add this line to your .bashrc file (/home/your_user/.bashrc)
 export PATH=$PATH:/PATH/TO/OPENWRT/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin
 add "src-git qipackages git://projects.qi-hardware.com/openwrt-packages.git" to you feeds.conf
 make kernel_menuconfig
 make package/PACKAGE_NAME/compile V=99
 make package/PACKAGE_NAME/{clean,compile} V=99
make target/linux/install
Personal tools
Namespaces
Variants
Actions
Navigation
interactive
Toolbox
Print/export