Building Software Image
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
- the new wiki's Creating packages page
- the old wiki's page (has more examples, including uclibc++ - not sure if these are out of date)
[edit] A short guide
You'll definitely need to read the above, but the main ideas are:
- get a working build environment (this allows you to build new images and individual ports)
- when you run make menuconfig, select some useful looking unselected package and make it an 'M', and make sure you can compile/install it (look for the output ipkg in bin/xburst/packages, copy to nanonote, then use opkg there):
make package/packagename/compile V=99
- add your own Makefile in the appropriate packages directory, and do the same as the above. Then watch it fail when the original authors haven't really thought about cross-compiling! Fix problems. Keep trying.
[edit] openwrt-package
- some nanonote packages not in openwrt are at qi-hardware-packages
- one idea would be to clone this repo and add new ports to it (with appropriate symlinks) for easy pulls
[edit] feeds.conf
[edit] FAQ
- Read openwrt FAQ first :-)
- Where is the source?
The git archives are at projects.qi-hardware.com
- Where is image (bootloader kernel rootfs)?
/PATH/TO/OPENWRT/bin/xburst
- Where is toolchain?
/PATH/TO/OPENWRT/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin
- How make available the toolchain?
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
- How to add package to rootfs?
- Where is Qi-Hardware's package?
add "src-git qipackages git://projects.qi-hardware.com/openwrt-packages.git" to you feeds.conf
- Where is kernel's menuconfig?
make kernel_menuconfig
- How to compile one package?
make package/PACKAGE_NAME/compile V=99
make package/PACKAGE_NAME/{clean,compile} V=99
- How to compile just the kernel?
make target/linux/install