Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[DEV] Building CM from scratch (the easy way)! - *nix Shell Script

OP nicandris

26th February 2011, 08:41 PM   |  #21  
nicandris's Avatar
OP Recognized Developer
Flag Nicosia
Thanks Meter: 199
 
1,108 posts
Join Date:Joined: Jan 2009
More
Quote:
Originally Posted by drigerott

mmmm but the latest merge aren't on rom (like profiles on power down screen etc.)

with this repo we build rc1? or nightly? ^_^

and... build.sh doesn't work properly... i modified like this:

Code:
cd ~/android/system/;
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread;
repo sync;
cd;
wget http://dl.dropbox.com/u/6751304/htc.zip;
unzip htc.zip;
mv ~/htc/ ~/android/system/vendor/htc/;
cd ~/android/system/vendor/cyanogen/;
./get-rommanager;
cd ~/android/system/;
. build/envsetup.sh;
lunch cyanogen_passion-eng;
make -j`grep 'processor' /proc/cpuinfo | wc -l` bacon;
cp ~/android/system/out/target/product/passion/update*.zip ~/Scrivania/update-cm7-N1-$(date +%d_%m-%H.%M.%S).zip
echo -e [=-This is an ALPHA-test version of whatever this is-=];


instead of

Code:
repo sync ;
cp ./vendor/cyanogen/products/cyanogen_passion.mk ./buildspec.mk;
. build/envsetup.sh;
lunch cyanogen_passion-eng;
make -j`grep 'processor' /proc/cpuinfo | wc -l` bacon;
cp ~/android/system/out/target/product/passion/update*.zip ~/Desktop/update-cm7-N1-$(date +%d_%m-%H.%M.%S).zip

is correct? ^^

thanks for you're replay)

the repo is the official cm repo. what the nightlies buildbots compile. so it should have all the changes in there. will compile now and check if something is missing. for the edited code, you pasted 2 different things, first part from androidmake and second from build.sh. what is the problem that needed fixing?
26th February 2011, 08:44 PM   |  #22  
Senior Member
Flag Torino
Thanks Meter: 50
 
293 posts
Join Date:Joined: Jan 2010
More
build.sh downloaded from first post, don't work...terminal :

Quote:

drigerott@drigerott:~/Scrivania$ sudo ./build.sh
[sudo] password for drigerott:
./build.sh: 1: repo: not found
cp: impossibile eseguire stat di "./vendor/cyanogen/products/cyanogen_passion.mk": File o directory non esistente
.: 3: Can't open build/envsetup.sh


infact i just copy the end of you're androidmake (the cd repo line)
Last edited by drigerott; 26th February 2011 at 08:47 PM.
26th February 2011, 08:47 PM   |  #23  
nicandris's Avatar
OP Recognized Developer
Flag Nicosia
Thanks Meter: 199
 
1,108 posts
Join Date:Joined: Jan 2009
More
Quote:
Originally Posted by drigerott

build.sh downloaded from first post, don't work...terminal :

Code:
drigerott@drigerott:~/Scrivania$ sudo ./build.sh
[sudo] password for drigerott: 
./build.sh: 1: repo: not found
cp: impossibile eseguire stat di "./vendor/cyanogen/products/cyanogen_passion.mk": File o directory non esistente
.: 3: Can't open build/envsetup.sh

infact i just copy the end of you're androidmake (the cd repo line)

wow thanx for that!! you are right... one moment and i will reupload
edit* uploaded. apparently i forgot
Code:
 cd ~/android/system ;
Last edited by nicandris; 26th February 2011 at 08:53 PM.
27th February 2011, 04:08 AM   |  #24  
RunTimeWorld's Avatar
Senior Member
Switzerland
Thanks Meter: 28
 
154 posts
Join Date:Joined: Nov 2010
would be nice if the script checks and skips stuff that is installed already such as the android sdk
27th February 2011, 08:14 AM   |  #25  
nicandris's Avatar
OP Recognized Developer
Flag Nicosia
Thanks Meter: 199
 
1,108 posts
Join Date:Joined: Jan 2009
More
Quote:
Originally Posted by RunTimeWorld

would be nice if the script checks and skips stuff that is installed already such as the android sdk

working on that already. also options to install for other devices, create shortcuts, recognize x64 etc etc
27th February 2011, 08:48 PM   |  #26  
crachel's Avatar
Senior Moderator
Flag North Texas
Thanks Meter: 2,646
 
3,576 posts
Join Date:Joined: Jul 2008
More
Thanks for this

I'm gonna add this to a cron job so I can have builds in between the nightlies, while we wait for a stable release
28th February 2011, 09:32 AM   |  #27  
Senior Member
Flag argonay
Thanks Meter: 54
 
688 posts
Join Date:Joined: Feb 2007
More
repo not found but git-core installed
HI,
first of all thxx for this great tool )))
i have try my first rom, but face a bug, when ppl call, the screen of mùy nexus one is all white for 5 sec :'(
i am trying the build.sh script, but i am having this error :

HTML Code:
[CODE]herve@android-factory:~/androdev$ sh build.sh
build.sh: 2: repo: not found
build/envsetup.sh: 1: Syntax error: "(" unexpected
herve@android-factory:~/androdev$ [/CODE]
but what is weird, git-core is installed

Code:
herve@android-factory:~/androdev$ sudo apt-get install git-core
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
git-core est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 246 non mis à jour.
did i missed something????


thxx for your help

herve
28th February 2011, 09:38 AM   |  #28  
Senior Member
Flag argonay
Thanks Meter: 54
 
688 posts
Join Date:Joined: Feb 2007
More
i ve fixed it.
if you have this same prob, get repo here
curl http://android.git.kernel.org/repo >~/bin/repo

chmod +x repo

++
28th February 2011, 09:46 AM   |  #29  
Senior Member
Flag argonay
Thanks Meter: 54
 
688 posts
Join Date:Joined: Feb 2007
More
well in fact, now i have another prob :'(
any idea?

Code:
herve@android-factory:~/androdev$ sh build.sh
Fetching projects:   2% (5/225)  remote: Counting objects: 38, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 24 (delta 17), reused 1 (delta 0)
Unpacking objects: 100% (24/24), done.
From git://github.com/CyanogenMod/android_bootable_recovery
   0b7bbf2..3d6a211  froyo      -> github/froyo
   d9fbe2f..a1f43bf  gingerbread -> github/gingerbread
Fetching projects:   4% (9/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_bn_encore
   170c703..5202166  gingerbread -> github/gingerbread
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_device_commtiva_z71
   379ab1b..df40873  gingerbread -> github/gingerbread
Fetching projects:  16% (36/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_fascinate
   706d15f..c5abaec  gingerbread -> github/gingerbread
Fetching projects:  17% (39/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_vzwtab
   ac23a39..1ec1fa4  gingerbread -> github/gingerbread
Fetching projects:  61% (138/225)  remote: Counting objects: 15, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_frameworks_base
   bf17157..f1df5d9  gingerbread -> github/gingerbread
Fetching projects: 100% (225/225), done.  
Syncing work tree: 100% (225/225), done.  

build/envsetup.sh: 1: Syntax error: "(" unexpected
herve@android-factory:~/androdev$
28th February 2011, 09:48 AM   |  #30  
Senior Member
Flag argonay
Thanks Meter: 54
 
688 posts
Join Date:Joined: Feb 2007
More
well in fact, now i have another prob :'(
any idea?

Code:
herve@android-factory:~/androdev$ sh build.sh
Fetching projects:   2% (5/225)  remote: Counting objects: 38, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 24 (delta 17), reused 1 (delta 0)
Unpacking objects: 100% (24/24), done.
From git://github.com/CyanogenMod/android_bootable_recovery
   0b7bbf2..3d6a211  froyo      -> github/froyo
   d9fbe2f..a1f43bf  gingerbread -> github/gingerbread
Fetching projects:   4% (9/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_bn_encore
   170c703..5202166  gingerbread -> github/gingerbread
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_device_commtiva_z71
   379ab1b..df40873  gingerbread -> github/gingerbread
Fetching projects:  16% (36/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_fascinate
   706d15f..c5abaec  gingerbread -> github/gingerbread
Fetching projects:  17% (39/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_vzwtab
   ac23a39..1ec1fa4  gingerbread -> github/gingerbread
Fetching projects:  61% (138/225)  remote: Counting objects: 15, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_frameworks_base
   bf17157..f1df5d9  gingerbread -> github/gingerbread
Fetching projects: 100% (225/225), done.  
Syncing work tree: 100% (225/225), done.  

build/envsetup.sh: 1: Syntax error: "(" unexpected
herve@android-factory:~/androdev$
here is the beguining of the script envsetup.sh

Code:
herve@android-factory:~/androdev$ sh build.sh
Fetching projects:   2% (5/225)  remote: Counting objects: 38, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 24 (delta 17), reused 1 (delta 0)
Unpacking objects: 100% (24/24), done.
From git://github.com/CyanogenMod/android_bootable_recovery
   0b7bbf2..3d6a211  froyo      -> github/froyo
   d9fbe2f..a1f43bf  gingerbread -> github/gingerbread
Fetching projects:   4% (9/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_bn_encore
   170c703..5202166  gingerbread -> github/gingerbread
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_device_commtiva_z71
   379ab1b..df40873  gingerbread -> github/gingerbread
Fetching projects:  16% (36/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_fascinate
   706d15f..c5abaec  gingerbread -> github/gingerbread
Fetching projects:  17% (39/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_vzwtab
   ac23a39..1ec1fa4  gingerbread -> github/gingerbread
Fetching projects:  61% (138/225)  remote: Counting objects: 15, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_frameworks_base
   bf17157..f1df5d9  gingerbread -> github/gingerbread
Fetching projects: 100% (225/225), done.  
Syncing work tree: 100% (225/225), done.  

build/envsetup.sh: 1: Syntax error: "(" unexpected
herve@android-factory:~/androdev$

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes