Jump to content


how to compile Android in a Debian 32bit environment

- - - - -

  • Please log in to reply
11 replies to this topic

#1
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,081 posts
  • Gender:Male
  • Location:northampton
  • Devices:Optimus L3 ZTE V790 Tureis
  • Twitter:@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

Quote

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

ok, following will allow building in 32 bit environment
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

Quote

$(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

After a build time of 3 hours, 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.modac...t/#entry1553367

still wanting instruction on the 2g vmsplit > http://android.modac...lade/page/220/# thanks kallt_kaffe

githubs for sources > http://android.modac...b/#entry1579455

Edited by hecatae, 01 February 2011 - 03:38 PM.


#2
Sebastian404

Sebastian404

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,086 posts
  • Gender:Male
  • Location:Somwhere Near Mountain View, California
  • Devices:lots of them
  • Twitter:@sebastian404

View Posthecatae, on Feb 1 2011, 09:37, said:

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 ;)


#3
rjm2k

rjm2k

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,096 posts

View Posthecatae, on Feb 1 2011, 09:37, said:

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?


#4
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,081 posts
  • Gender:Male
  • Location:northampton
  • Devices:Optimus L3 ZTE V790 Tureis
  • Twitter:@hecatae

View Postrjm2k, on Feb 1 2011, 11:35, said:

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


#5
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,183 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad

View Posthecatae, on Feb 1 2011, 10:37, said:

still wanting instruction on the 2g vmsplit
For 2.2: https://www.codeauro...ae3a7ef4b2cb9bb
I'm sure it can be tweaked (if needed) to work on 2.3.

Blog - App

#6
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Ad Free
  • PipPipPipPipPipPip
  • 1,839 posts
  • Gender:Female
  • Location:Strasbourg.
  • Devices:ZTE Blade Orange France
  • Twitter:@phoenixbjp
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

Si le corps est mortel, l’âme elle est éternelle.

#7
miasma

miasma

    Newbie

  • Members
  • Pip
  • 14 posts
  • Devices:ZTE Blade

View PostSebastian404, on Feb 1 2011, 11:18, said:

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.


#8
miasma

miasma

    Newbie

  • Members
  • Pip
  • 14 posts
  • Devices:ZTE Blade
Some comments..

View Posthecatae, on Feb 1 2011, 09:37, said:

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 ...

View Posthecatae, on Feb 1 2011, 09:37, said:

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?

View Posthecatae, on Feb 1 2011, 09:37, said:

gedit /build/core/main.mk
gedit build/core/main.mk


#9
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,081 posts
  • Gender:Male
  • Location:northampton
  • Devices:Optimus L3 ZTE V790 Tureis
  • Twitter:@hecatae

View Postmiasma, on Feb 1 2011, 15:15, said:

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?


#10
rjm2k

rjm2k

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,096 posts

View Posthecatae, on Feb 1 2011, 15:23, said:

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


#11
fonix232

fonix232

    Addict

  • Members
  • PipPipPipPipPip
  • 942 posts
  • Location:Hungary, Debrecen
  • Devices:ZTE Blade [TFT 512RAM]
  • Twitter:@fonix232

View PostSebastian404, on Feb 1 2011, 14:18, said:

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 ;)

If you like my work, invite me for a drink or two!

Also, take a look at my Blade-dedicated site too! fonix232.co.cc

#12
t0mm13b

t0mm13b

    Hardcore

  • MoDaCo Ad Free
  • PipPipPipPipPipPip
  • 1,775 posts
  • Gender:Male
  • Location:Ireland
  • Devices:GT-S8500,Zte Blade,SE ST15i
  • Twitter:@t0mm13b

View Postmiasma, on Feb 1 2011, 15:15, said:

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.

try{ not_laugh; }catch{ FAIL; }finally{ laugh; }




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users