|Version 19 (modified by divx118, 23 months ago)|
General info setting up buildenvironment Cyanogenmod
This guide will help you to set up your build environment to build gingerbread for your archos gen7 or gen8.
The archos specific sources for cyanogenmod can be found on https://gitorious.org/openaos-cyanogenmod/
The build image will work with the modified archos kernel which sources can be found https://gitorious.org/archos-buildroots/
Note: Only 64-bit build environments are supported beyond froyo/2.2.
Creating a work directory
We need a place on or host PC where we can get our work done. I am using /usr/src/cyan. First make the dir and then run the chown command so you get full read/write access as normal user. If it isn't stated otherwise in this guide I assume you run the commands that are mentioned in this directory.
$ sudo mkdir -p /usr/src/cyan/out /usr/src/cyan/openaos/scripts $ sudo chown <your login>:<your group> /usr/src/cyan/out $ cd /usr/src/cyan
Automatic setup script
Note: You will need to install git if you don't already have it (apt-get install git-core).
Note: Most of operations MUST be done as root (openaos-setup and openaos-dist). openaos-build can be done as your user (just don't forget to own the out directory)
Note: The script only only supports Ubuntu maverick or natty for installing dependencies. Feel free to add support for other linux distros.
$ sudo git clone git://gitorious.org/openaos-cyanogenmod/openaos_scripts.git /usr/src/cyan/openaos/scripts $ sudo ln -s /usr/src/cyan/openaos/scripts/openaos-setup /usr/local/bin/openaos-setup $ sudo ln -s /usr/src/cyan/openaos/scripts/openaos-build /usr/local/bin/openaos-build $ sudo ln -s /usr/src/cyan/openaos/scripts/openaos-dist /usr/local/bin/openaos-dist $ sudo openaos-setup --dependencies --target /usr/src/cyan
If you get an error that your distro is not supported goto the manually install dependencies.
Then you execute the script again, but leave out the dependencies parameter.
$ sudo openaos-setup --target /usr/src/cyan
When everything goes well you will now have your sources. A log file of the script is in /tmp/openaos-cyanogenmod-repo.log
If you get an error error: revision gingerbread in CyanogenMod/android_device_lge_thunderg not found then edit /usr/src/cyan/.repo/manifest.xml
$ sudo gedit /usr/src/cyan/.repo/manifest.xml
Change the following line
<project path="device/lge/thunderg" name="CyanogenMod/android_device_lge_thunderg" remote="github"/>
<project path="device/lge/thunderg" name="CyanogenMod/android_device_lge_thunderg" remote="github" revision="master"/>
You will need to apply patches the first time.
Patches can be applied also with the openaos-setup script by using --applypatches. This should apply all patches. Patches that where already done are detected.
sudo openaos-setup --applypatches --target /usr/src/cyan
Manual way of applying patches you see below.
$ cd frameworks/base $ sudo patch -p1 <../../device/archos/common/patches/frameworks/base/touchscreen_calibration.patch $ cd ../../system/core $ sudo patch -p1 <../../device/archos/common/patches/system/core/init_mknod_support.patch $ cd ../../
Building Cyanogenmod for gen8 or gen7
In the example commands I will use gen8 to build for, but if you want to build for gen7 just replace "gen8" with "gen7".
Note: If you are building for gen7 you need first to copy 'gfx_rel_es3.x_android' content (from TI package) into 'openaos/gen7/sgx/'
Note: Resulted image (*.img.gz*) will be generated into 'openaos/target/'
$ cd /usr/src/cyan $ openaos-build --products gen8 (or gen7)
If you run into an error like build/envsetup.sh: 1: Syntax error: "(" unexpected You probably have dash enabled. Disable dash by running
$ sudo dpkg-reconfigure dash
Then choose "no".
Build the image file
cd /usr/src/cyan sudo openaos-dist --type dist --products gen8 (or gen7)
The image file will appear in /usr/src/cyan
Manually install dependencies
If the script didn't work for you, this will help you to setup your environment manually.
Note: I use Ubuntu 10.10, so your distro may differ. You can have a look at http://wiki.cyanogenmod.com/wiki/Template:Build_from_source where I got my info.
Getting the dependencies
$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner" $ sudo apt-get update $ sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool