Jump to content

how to compile Android in a Debian 32bit environment


Guest hecatae

Recommended Posts

Guest hecatae

choose your favourite Linux, I use Debian, though you can use whatever you prefer.

@terminal

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

mkdir -p ~/bin

mkdir -p ~/android/system

curl http://android.git.kernel.org/repo > ~/bin/repo

chmod a+x ~/bin/repo

cd ~/android/system/

You now have a choice of which repository you wish to initialise.

default for AOSP is

repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync[/codebox]

ok, following will allow building in 32 bit environment

[codebox]source build/envsetup.sh
find . -name '*.mk' | xargs sed -i 's/-m64//g'

lastly

gedit build/core/main.mk

go to line 80 and put a # where I've highlighted in red

$(warning ************************************************** **********)

$(warning You are attempting to build on a 32-bit system.)

$(warning Only 64-bit build environments are supported beyond froyo/2.2.)

$(warning ************************************************** **********)

#$(error stop)

finally

export TARGET_BUILD_VARIANT=user
make[/codebox]

After a build time of [b]3 hours[/b], we have in folder out/target/product/generic our images: system.img,ramdisk.img and userdata.img and in folder prebuild/linux-x86/toolchain our android arm-eabi to compile kernel and so on.

t0mm13b's instruction for building your own kernel are here http://android.modaco.com/content/zte-blad...t/#entry1553367

still wanting instruction on the 2g vmsplit > http://android.modaco.com/content-page/329...lade/page/220/# thanks kallt_kaffe

githubs for sources > http://android.modaco.com/content/zte-blad...b/#entry1579455

Edited by hecatae
Link to comment
Share on other sites

Guest Sebastian404
After a build time of 3 hours,

EEEP!, I have a fairly crappy dual core Latitude that I picked up used for around 150bux, and it only takes it about 20 minutes to build it.... maybe thats why they say you need 64bit ;)

Link to comment
Share on other sites

ok, following will allow building in 32 bit environment

find . -name '*.mk' | xargs sed -i 's/-m64//g'

Are you sure about this bit, I build CM7 on my 32 bit machine and it boots up on the phone no problem, so either it doesn't matter or cm7 has this fix in it already?

Link to comment
Share on other sites

Guest hecatae
Are you sure about this bit, I build CM7 on my 32 bit machine and it boots up on the phone no problem, so either it doesn't matter or cm7 has this fix in it already?

the CM repo must have this fix in it already, the AOSP repo wont build unless you remove all the 64 bit references

Link to comment
Share on other sites

Guest Phoenix Silver

thank you for all the infos ;)

i'm using archlinux (amd 32 bits cpu) but should not be a problem

i'll make my first try today

i'll give feedback

Link to comment
Share on other sites

EEEP!, I have a fairly crappy dual core Latitude that I picked up used for around 150bux, and it only takes it about 20 minutes to build it.... maybe thats why they say you need 64bit ;)

I built this on my quad-core q9550 using 32-bit Debian. Took about 30 minutes. Maybe the 3 hours included downloading the stuff. It highly depends on your network speed though.

Link to comment
Share on other sites

Some comments..

sudo apt-get 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

sudo apt-get install ...

mkdir -p ~/bin

mkdir -p ~/android/system

curl http://android.git.kernel.org/repo > ~/bin/repo

chmod a+x ~/bin/repo

sudo reboot

cd ~/android/system/

~/bin/ isn't automatically in the $PATH on some distros. Also why do you reboot the system here?

gedit /build/core/main.mk

gedit build/core/main.mk

Link to comment
Share on other sites

Guest hecatae
Some comments..

sudo apt-get install ...

~/bin/ isn't automatically in the $PATH on some distros. Also why do you reboot the system here?

gedit build/core/main.mk

apt-get always installs for me, but I've updated the original post as requested, and removed that stray forward slash.

how would you fix ~/bin/ in the $PATH of some distros?

Link to comment
Share on other sites

apt-get always installs for me, but I've updated the original post as requested, and removed that stray forward slash.

how would you fix ~/bin/ in the $PATH of some distros?

add it to .bashrc etc

export PATH=~/bin:PATH$ or whatever

Link to comment
Share on other sites

Guest fonix232
EEEP!, I have a fairly crappy dual core Latitude that I picked up used for around 150bux, and it only takes it about 20 minutes to build it.... maybe thats why they say you need 64bit ;)

The first build takes longer, but after it, it is just a question of the level of modifications. Mostly it even won't recompile the whole stuff ;)

Link to comment
Share on other sites

Guest t0mm13b
Some comments..

sudo apt-get install ...

~/bin/ isn't automatically in the $PATH on some distros. Also why do you reboot the system here?

gedit build/core/main.mk

You shouldn't have to reboot basically, modify your .bashrc and amend the PATH like this

PATH=.... <- leave the original alone!

export PATH=$HOME/bin:$PATH

Logout of all existing login sessions, then log in again, now the $HOME/bin is active so any binaries you put in there will run.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.