Compiling gen7-gpl

From ArchosDocs

Jump to: navigation, search

Compiling the gen7 sources is very similar to the GEN6. I was able to compile them under Ubuntu 9.10 Karmic running in a VMWare 32 bit instance. I was unable to compile on an x86_64 instance.

You will need a large number of packages added to your environment - Packages needed for Android:

sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl

Packages needed for gen7-gpl:

sudo apt-get install automake autoconf libtool gettext texinfo

I might have missed some packages; if you find there are others please update the wiki.

Additionally, you will want to install the latest version of glib from source, as recommended in the GEN6 article.

Unzip the gen 7 sources in a build folder. I'm keeping mine in ~/androids/gen7-gpl/. cd to the buildroot folder, and type make. The build process will run for a little while, then fail saying there's a conflicting definition of getline in buildroot/toolchain_build_arm/linux-2.6.22.1/scripts/unifdef.c . The function is (in java parlance) private, so just rename it to something (I chose get_line) else, making sure to update all the references in the file.

Run build again. The script will download a copy of uClibc, which has the same file (and build error) as above. Again rename the function as above.

Run make a third time. Now, there will be an error in buildroot/build_arm/makedevs/makedevs.c. This is not actually an error, but a compiler warning that is being regarded as an error by some stupid build setting. Since I didn't want to figure out where the compiler setting was, I simply edited the source to store the result to a variable, then incremented the variable.

int rc = system("/bin/sync");
rc++;

This is definitely a hack, but it gets you building. If you find a better way (ie. editing the CC opts in whatever makefile), please update this article appropriately.

Now the build should run to completion.

Personal tools