sets up a standard Portage build environment and installs some build dependencies.
The portage tree contains build recipes (called ebuilds) for packages.
Unlike Debian where the build rules live in the source code, the portage approach is to keep build instructions separate from source code in the portage tree.
We use the chromiumos_overlay to keep new ebuilds and changes to existing ebuilds separate from the upstream source.
We use the board target specific version of emerge to do this.
Our strategy is to install them in the target's root using the --root-deps option.
These are only used for compilation and will not be placed into images that are built via build_image.
For the host, the root directory where things get installed is /, for a given target board this is /build/.
You can think of each as a mini Linux system, although they start off with hardly any packages installed.
Start with one of our existing chromium ebuilds as an example.