Jump to content


Photo

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,217 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez
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.gitrepo sync

ok, following will allow building in 32 bit environment
source build/envsetup.shfind . -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=usermake

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.

  • 0

#2
Sebastian404

Sebastian404

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,104 posts
  • Gender:Male
  • Location:Somwhere Near Mountain View, California
  • Devices:lots of them
  • Twitter:@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 ;)

  • 0

#3
rjm2k

rjm2k

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,096 posts

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?

  • 0

#4
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,217 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez

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

  • 0

#5
kallt_kaffe

kallt_kaffe

    Hardcore

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

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.

  • 0
Blog - App

#6
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Silver
  • 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

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

#7
miasma

miasma

    Newbie

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

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.

  • 0

#8
miasma

miasma

    Newbie

  • Members
  • Pip
  • 14 posts
  • Devices:ZTE Blade
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

  • 0

#9
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,217 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez

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?

  • 0

#10
rjm2k

rjm2k

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,096 posts

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

  • 0

#11
fonix232

fonix232

    Addict

  • Members
  • PipPipPipPipPip
  • 942 posts
  • Location:Hungary, Debrecen
  • Devices:ZTE Blade [TFT 512RAM]
  • Twitter:@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 ;)

  • 0
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 Silver
  • PipPipPipPipPipPip
  • 1,784 posts
  • Gender:Male
  • Location:Ireland
  • Devices:GT-S8500,Zte Blade,SE ST15i
  • Twitter:@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.

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users