How to build and use soong stand-alone?

3,660 views
Skip to first unread message

Hartmut Goebel

unread,
Oct 12, 2017, 4:40:11 PM10/12/17
to android-...@googlegroups.com
Hallo,

I'm going to build the Android platform-tools as stand-alone packages
for a Linux-distribution (GuisSD). For this it seems to make sense to
switch to the new soong-based build system.

1. How to I build soong without installing a full-blown Android build
environment?
2. How to install soong to be used outside the Android build environment?
3. How to use soong without or outside the Android build environment?


Re. 1.: I managed to start bootstrapping soong as follows:

mkdir /tmp/sing-song/
cd /tmp/sing-song/

cp -r /tmp/soong-8.0.0_r17-checkout source
cd source/

mkdir build
ln -s .. build/soong
cp -r /tmp/blueprint-8.0.0_r17-checkout/ build/blueprint

cd ..
$PWD/source/bootstrap.bash

This will give me
.blueprint.bootstrap
.bootstrap/
.minibootstrap/
soong -> /tmp/foo/source/build/soong/soong.bash
.soong.bootstrap

Now when I run ./soong I get these errors:

error: Android.bp:13:9: "androidmk/Blueprints": not found
error: Android.bp:13:9: "cmd/*/Blueprints": not found
error: Android.bp:13:9: "third_party/zip/Blueprints": not found
error: Android.bp:13:9: "ui/*/Blueprints": not found
ninja: error: rebuilding '/tmp/sing-song/.minibootstrap/build.ninja':
subcommand failed



Re 2.: Both soong and soong_ui are bash-scripts, checking if a new
version needs to be bootstrapped – which will never be the case if they
are installed vi some Linux package management. So how can these be
installed into e.g. /usr/bin? How to make these scripts to *not* try to
bootstrap soong?

Re. 3: How is soong meant to be used? Unfortunately there is not even a
short usage-instruction in the archive :-(

Thanks in advance for any tips.


--
Regards
Hartmut Goebel

| Hartmut Goebel | h.go...@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |

Colin Cross

unread,
Oct 12, 2017, 5:15:54 PM10/12/17
to android-...@googlegroups.com
Soong isn't intended to be used standalone, it is tightly coupled to the Android codebase.  You can use it on a subset of the Android codebase, for example:
repo sync -j32
prebuilts/build-tools/build-prebuilts.sh


--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-building+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

venkatakrishna...@gmail.com

unread,
Nov 20, 2017, 11:43:19 AM11/20/17
to Android Building
Is there any way to ignore certain Android.bp files from being globbed?
For instance to not include/glob any vendor/whateverVendor/* and the *.bp files further down in that directory.

thanks,
Venkat.

Wesolowski, Krzysztof

unread,
Nov 20, 2017, 3:57:21 PM11/20/17
to android-...@googlegroups.com

Top level Android.bp globs for /vendor/*/* subdirs so matching Android.bp would be /vendor/*/*/Android.bp, so as far as I understand assumption is that vendor/whateverVendor/whateverModule/Android.bp should be under your control, and you control what will happen deeper.

 

I guess that whateverModule is either empty directory or git repo – so you can move/remove it by editing manifets.

 

BR, K.

 

--

--
You received this message because you are subscribed to the "Android Building" mailing list.

To post to this group, send email to android-...@googlegroups.com


To unsubscribe from this group, send email to


For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.

To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.

venkatakrishna...@gmail.com

unread,
Nov 21, 2017, 11:21:06 AM11/21/17
to Android Building
Well, yes, moving/deleting is an option that worked for me. The problem is the AOSP stack we got is from a vendor. They don't care if Android Emulator builds or not. But, we would like to use Emulator.
So, I tried compiling emulator x86_64, and it includes vendor/whateverVendor/*, and this vendor didn't really write the *.bp files intelligently, thus, all their hardware specific stuff is also some injected into dependencies.

By deleting the unwanted *.bp files under whateverVendor/ I made some progress. But, like I said, we must be able to build both the vendor lunch target, and emulator.

So, I was wondering if I can somehow ask the build tools(soong, ninja, bpblob or the family) to not read some of the *.bp files I specify, and
if I could specify at all, where should I do it.

thanks

To post to this group, send email to android...@googlegroups.com

Reply all
Reply to author
Forward
0 new messages