last changeSat, 13 Nov 2010 13:06:08 +0000 (13 14:06 +0100)
content tags
Qi Bootmenu System

 This is a set of simple shell scripts to cross compile everything
 that is needed in order to run an evas based bootmenu application 
 with the framebuffer backend.

 The ultimate goal is to build a complete initramfs (containing
 the bootmenu application) and kernel which can be flashed to your

Quick Start

 In theory all you need to do is run ./ which should
 create an uImage-GTA02.bin ready to flash to your device. 

  ./ && ./ && ./

Building the boot system

 Configuring the build

 There are a few configuration settings which can be used to tweek the
 build system in various ways. They can be specified on the command line
 or via the top level config file which is sourced by the other scripts.

 What follows is a short descritption of the most important ones:

  $MACHINE has to be set to either GTA01 or GTA02 the latter is assumed
           the variable isn't specified

  $STATIC  build qi-bootmenu statically and don't install shared 
           libraries. This results in a slightly smaller + faster
           initramfs. This is enabled by default. 
 Building the initramfs content, kernel and bootloader

 Building the whole system (all packages) including kernel and bootloader
 is as simple as executing the ./ shell script. This will build
 a kernel (uImage-$MACHINE.bin) containing the whole boot system as an
 initramfs and a slightly modified version of the bootloader Qi (qi-*.udfu).

 If you just want to rebuild an individual package then pass it's name as 
 argument. For example if you just want to rebuild qi-bootmenu then run.

  ./ qi-bootmenu

Installing/Flashing the boot system

 The last step should have built a kernel (uImage-$MACHINE.bin) and a
 bootloader (qi-*.udfu) these files can be flashed in the normal way as
 described in:

 There are also two scripts included which should make this a straight
 forward process. Just run the following command and your newly built
 boot system should be installed.

  ./ && ./

How it all works

 uClibc armv4tl cross toolchain

 The boot system is uclibc based we can therefore _not_ use the 
 openmoko toolchain. Instead we need an uclibc based armv4tl
 cross toolchain. Building one from scratch is however out of 
 scope of this project.

 By default the scripts download a pre built toolchain from the
 Aboriginal Linux project.

 It is relocatable and uses a gcc wrapper script to make the gcc path 
 logic somewhat sane (if that's possible at all). It is the only tested
 and supported toolchain.

 If for whatever reason you don't want to run a pre built toolchain
 you can run ./ aboriginal which compiles one from scratch. 
 Altneratively you can also build one according to the Aboriginal Linux
 documentation, make sure to add the toolchains bin directory to your

 Build scripts

 The basic idea is to first install everything into a $STAGING_DIR and then
 selectively copy the required bits over to $ROOT_DIR. In the end the
 $ROOT_OVERLAY directory, which contains configuration files and other things
 which aren't generated by package builds, is copied over $ROOT_DIR. 
 After the packages are installed into $STAGING_DIR some paths which point
 to the host systems /usr/lib (because of the --prefix=/usr step) need to
 be changed. Without this the linker would search for the libraries in the
 hosts systems library directory. 
 Below are some descriptions of various parts of the build system. 
 A big part of the code was actually taken from the FWL scripts that's why
 both system work in similar ways.

  - ./sources/

    Contains various environment variables which are needed in other scripts.

  - ./sources/ and ./sources/

    Home of all shell functions which are used in the other parts of the
    system. These files are sourced from is
    mostly taken from the FWL project.

  - ./ 
    Downloads all the required source packages either with wget from
    some http/ftp server or uses a source code management system to 
    check it out from a repository.

  - ./sources/configs/miniconfig-{busybox,uClibc,linux}

    Configuration files used for busybox, uClibc and the linux kernel 
    in the miniconfig format.

  - ./sources/patches/$PACKAGE-*

    Patches for individual packages. They are applied within setup $PACKAGE.
  - ./

    Builds all or individual packages based on the files described in
    the next section.

  - ./sources/sections/$

    Every package has a shell script with it's build instructions these
    files are sourced from ./

    They normally start with setupfor $PACKAGE. This extracts the
    source tarball to ./build/packages/$PACKAGE and applies all patches 
    from ./sources/patches/$PACKAGE-*. The patched source is then copied
    over to ./build/temp-armv4tl/$PACKAGE where it is built.

    The packages are then configured with something like:

     ./configure --prefix=/usr 

    This makes sure that the configure script and the compiler actually 
    find the already cross compiled libraries and include files. 

    Packages are then installed into $STAGING_DIR.

     make DESTDIR="$STAGING_DIR" install.

    The parts which are actually needed are then copied over to $ROOT_DIR.

    If the package is a library some paths which point to the host 
    systems /usr/lib (because of the --prefix=/usr step) need to be 
    changed. Without this it wouldn't be possible to link against the
    library because the linker would always be redirected to the
    hosts /usr/lib directory.

    This is the case for libtool's *.la files in $STAGING_DIR/usr/lib 
    and the pkg-config *.pc files in $STAGING_DIR/usr/lib/pkgconfig. 
    The paths are changed by the two functions libtool_fixup_libdir
    and pkgconfig_fixup_prefix which are located in sources/

    Finally the build directory is removed with
     cleanup $PACKAGE

  - ./

    This script copies the content of the $ROOT_OVERLAY directory which
    contains all the things which aren't generated by package build scripts
    over $ROOT_DIR. It then strips all unnecessary symbols from the binaries 
    and generates a text file which can be specied as CONFIG_INITRAMFS_SOURCE 
    during the kernel build. The kernel build system will then based on this
    file generate a gziped cpio archive and embed it into the kernel binary.

  - ./

    This script simply creates a tarball with the content of the rootfs 
    directory. You can copy this to your Freerunner and chroot into it to
    test things out.

Changes to vanilla Qi

 The boot system also works with the unmodified version of Qi as found in
 the openmoko git repository.

 The patches which are applied are thus not strictly necessary but they have 
 a few advantages over vanilla Qi.

  - You won't have to mark your SD-card partition as not bootable via
    noboot-$MACHINE files

  - It's slightly faster because after the first AUX press no further
    SD-card partitions are scanned Qi proceeds straight away with
    booting from NAND

  - The NAND partition is ignored by the bootmenu because Qi will pass
    the required parameters on the kernel command line this reduces
    boot time because mounting an jffs2 file system is slow.
2010-11-13 Marc Andre... download: switch to different mirrormaster
2010-10-07 Marc Andre... qi: add glamo 2-4-2 timing patch
2010-10-06 Marc Andre... qi-bootmenu: update to version 0.2v0.2
2010-10-06 Marc Andre... Revert "download: add missing SHA1 sums"
2010-10-06 Marc Andre... Fix breakage for newer pkg-config versions
2010-10-06 Marc Andre... Add rudimentary pre-requirements check
2010-10-04 Marc Andre... qi-bootmenu: update to latest git HEAD
2010-10-04 Marc Andre... Revert "Remove pkg-config related hack instead depend...
2010-10-04 Marc Andre... download: add missing SHA1 sums
2010-10-04 Marc Andre... Integrate pre built Aboriginal Linux uclibc cross toolchain
2010-10-04 Marc Andre... Add aboriginal linux build recipe
2010-10-04 Marc Andre... busybox: update to 1.17.2
2010-10-04 Marc Andre... Update to EFL 1.0-beta release
2010-09-29 Marc Andre... Remove pkg-config related hack instead depend on pkg...
2010-09-28 Marc Andre... init: clean up initscript
2010-09-28 Marc Andre... busybox: update to 1.17.1
7 years ago v0.2 qi-bootmenu-system version 0.2
7 years ago master
Cached version (3983s old)
qi-bootmenu-system/guyou.git Guyou's changes guilhem.bonnefille... 7 years ago