To get started with Android, you'll need to get familiar with Git and Repo.
To initialize your local repository using the AOSP-CAF trees, use a command like this:
repo init -u https://github.com/AOSP-CAF/platform_manifest.git -b o-mr1
Then to sync up:
repo sync -c -f -j8 --force-sync --no-clone-bundle --no-tags
The source at AOSP-CAF is well configured for building.
$ . build/envsetup.sh
$ lunch aosp_device-userdebug
$ make -jX otapackage
where X is the number of jobs you would like to allot to the build system.