Documentation/BuildEnvironment

Build Environment

By the time you finish reading through this short tutorial, you will have a development environment that would let you build OpenInkpot packages.

Requisites

  • Linux system host (i386 or x86-64).
  • Your account has to have "sudo" right.

Bootstrap

  • Choose directory to use for development environment. This directory will be called <chroot directory> below.
  • Get the latest iplinux-bootstrap tarball
    wget http://ftp.iplinux.org/contrib/iplinux-bootstrap/iplinux-bootstrap-LATEST.tar.bz2
    
  • Decompress it
    tar xf iplinux-bootstrap-LATEST.tar.bz2
    
  • Enter in the new created folder
    cd iplinux-bootstrap-<version>
    
  • Run bootstrap (as ordinary user, not as root)
    ./iplinux-bootstrap openinkpot <chroot directory>
    
    WARNING: if bootstrap fails, do not try "restart" it later. It won't work. Fix the problem and start afresh.
  • Enter the chroot
    cd <chroot directory>
    ./enter
    

Install toolchain

  • Install cross-compiler and tools for selected architecture to the chroot
    sudo apt-get install armel-cross-toolchain # or
    sudo apt-get install mipsel-cross-toolchain
    

Notes:

  • armel-cross-toolchain is the ARM toolchain (ARM CPU is used in most of e-book devices, including all of all Hanlin, Sony, Amazon, iriver and Netronix models)
  • mipsel-cross-toolchain is the MIPS toolchain (MIPSes are in Hanvon e-books).

Testing environment

We are going to build the first custom firmware

  • Install needed packages
    sudo apt-get install oi-build-firmware
    
  • Build firmware snapshot with build-fw. For example, for V3ext model and install firmware flavour, run:
    build-fw -m install v3ext
    

NOTE: To build the firmware for other models, run build-fw .

Once finished, two archives with today's date can be found under <chroot directory>/build/output folder.

If you extract any of these, you will have a file called V3Update.bin . This file can now be used for the installation process as defined at Installation Guide.

DANGER: raw snapshots like the ones just built are not advisable though, as the tree is under active development and bugs creeping in and causing havoc, is not unheard of. As long as you know the risks you are welcome to do anything you like at your own expense.