Building Software Image

From Qi-Hardware
Revision as of 03:09, 15 March 2010 by Wolfram (Talk | contribs)
Jump to: navigation, search

Contents

Building OpenWrt packages

Reproducing OpenWrt images

Toolchain (OpenWrt)

You can get the OpenWrt-Xburst source code like this:

$ git clone git://projects.qi-hardware.com/openwrt-xburst.git
$ cd openwrt-xburst
$ git fetch origin
$ git checkout --track -b xburst origin/xburst
$ make menuconfig
  (select Ingenic XBurst, previously XBurst JZ47x0 [2.6], in Target System)
  (MORE THAN LIKELY: select ubifs in Target Images)
$ make
After a while, you will get toolchain under
/PATH/TO/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.1.2_uClibc-0.9.30.1/usr/bin
You may need add this to your $PATH. u-boot kernel rootfs in
/PATH/TO/openwrt-xburst/bin/xburst

U-Boot

We currently use U-Boot as bootloader.

U-Boot can be build by OpenWrt, You need a copy of the OpenWrt source code.

In OpenWrt menuconfig-->Target Images-->Build U-Boot bootloader --> U-Boot target board (NEW) --> input qi_lb60

xburst-tools (usbboot command)

We ported the Ingenic win32 edition of the usbboot tool to Linux, you can get source code like this:

$ git clone git://projects.qi-hardware.com/xburst-tools.git
$ cd /PATH/TO/xburst-tools/usbboot
$ ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc && make && sudo make install

or you can got the binary packages at here

Linux kernel

Iris kernel

OpenWrt rootfs

JLiMe

How To Reflash

Please follow the steps in Reflash Instructions

Porting Programs

It's running OpenWrt

So you need to go to their website. The highlights are:

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.

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

feeds.conf

FAQ

read openwrt FAQ first :-)

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 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 packages/PACKAGE_NAME/compile V=99
 make packages/PACKAGE_NAME/{clean,compile} V=99
Personal tools
Namespaces
Variants
Actions
Navigation
interactive
Toolbox
Print/export