1. Prerequisites

  • Sofware needed for meego rpm and rootfs creation

    1. rpmbuild [to create rpms within arm chroot]
          sudo apt-get install rpmbuild
    2. mic2 [meego image creator tool for creating rootfs]
          sudo apt-get install mic2 
         (mic2 can be downloaded from deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.04/ 
              deb http://ppa.launchpad.net/goelkunal/mic2/ubuntu lucid main)

2. Source files for RPM

  • Source RPM consist of spec file and source tar file (kernel and uboot rpms)

    1. git2source.sh is used to create source tar files from git. This uses spec file and creates tar file accordingly 
       spec file is also modified if changes in version of source code in git.
       (download from https://code.launchpad.net/~goelkunal/+junk/git2source)
       usage: git2source.sh [--version] [-v verbose] [-s spec-file] [-g git-clone-path] [-t target-dir] [-r remote-url]
    
       This script makes source tar from gits for the OBS system.
    
       OPTIONS:
        -s, --spec-file    The spec-file to use, default it will use the first one in the current path.
        -g, --git-clone-path The local path where module is cloned. [Not needed if remote url is specified]
        -h, --help         Show this message.
        -v, --verbose      Verbose.
        -t, --target-dir   target directory for tar file
        -r, --remote-url   Remote url for git clone [Not needed if local git path is specified]
        --version          Print the version

3. Building RPMS

4. Building RPMS using rpm build

  • RPMS are built inside arm chroot (kernel and uboot rpms)

    1. Source tar file is to be copied at location ~/rpmbuild/SOURCES/ 
    2. rpmbuild -ba kernel.spec --target="armv7l" 
    3. binary rpm is created at ~/rpmbuild/RPMS/armv7l/
    4. source rpm is created at ~/rpmbuild/SRPMS/

5. Building RPMS using build utility of meego

  • RPMS are built inside meego arm chroot created by downloading rpms from meego repository

    1. You can get build binary package from http://repo.meego.com/MeeGo/tools/repos/ per your Linux distribution. 
    2. If your network needs proxy, please export proxy environment variables. Please ensure sudo to inherit proxy environment variables
       $ export http_proxy=http://proxy.yourcompany.com:8080/
       $ Defaults    env_keep += "http_proxy no_proxy HTTP_PROXY NO_PROXY"
    3.  build also will check rpm package signature, so you must import public key of repository you're using
       $ wget http://repo.meego.com/MeeGo/releases/1.0/core/repos/armv7l/packages/repodata/repomd.xml.key
       $ sudo rpm --import repomd.xml.key
    4. there is some problem qemu-arm(-static?) isn't getting copied. some change required in /usr/lib/build/init_buildsystem(TBD) 
    5. command will build a binary package for MeeGo. build will find your source tar ball and patches under current work dir.
       $ build --repository http://repo.meego.com/MeeGo/releases/1.0/core/repos/armv7l/packages/ --rpms pathtolocalrpms --arch armv7l u-boot.spec
    6. The default BUILDROOT dir is /var/tmp/build-root, you can use --root option to specify one more dir, once build is done, you can get your binary package in BUILDROOT.
       Wrote: /home/abuild/rpmbuild/SRPMS/u-boot-2010.09.rc1.1_0ubuntu3-1.src.rpm
       Wrote: /home/abuild/rpmbuild/RPMS/armv7l/u-boot-2010.09.rc1.1_0ubuntu3-1.armv7l.rpm
       Wrote: /home/abuild/rpmbuild/RPMS/armv7l/u-boot-debuginfo-2010.09.rc1.1_0ubuntu3-1.armv7l.rpm

6. Creating rootfs

  • Rootfs creation uses meego repository for standard rpms and local path for kernel and uboot rpms

    1. kernel and uboot rpms are to be stored in some folder
    2. kickstart(ks) file is used to specify which rpms to be installed and for rootfs configuration 
       (download from https://code.launchpad.net/~goelkunal/+junk/kickstart)
    3. sudo mic-image-creator --run-mode=0 --cache=./cache/ --format=fs --arch=arm --config=./meego-linaro.ks --local-pkgs-path=./localrpms/ --repo=http://repo.meego.com/MeeGo/releases/1.0/core/repos/armv7l/packages
    4. meego rootfs is created in the current folder     

Platform/UserPlatforms/Heads/Meego/ImageBuilding (last modified 2010-10-26 04:51:47)