Fuchsia uses the
jiri tool to manage git repositories
This tool manages a set of repositories specified by a manifest.
See Source code layout for an overview of how the code is organized.
For how to build, see Fuchsia's Getting Started doc.
Creating a new checkout
The bootstrap procedure requires that you have Go 1.6 or newer and Git installed and on your PATH.
This script will bootstrap a development environment for by first creating
curl -s "https://fuchsia.googlesource.com/fuchsia/+/master/scripts/bootstrap?format=TEXT" | base64 --decode | bash
This script will set up your development environment to track the HEAD of the
fuchsia repository. If you wish to track a different repository at HEAD, you can
fx set-petal command.
Setting up environment variables
Upon success, the bootstrap script should print a message recommending that you
.jiri_root/bin directory to your PATH. This will add
jiri to your
PATH, which is recommended and is assumed by other parts of the Fuchsia
Another tool in
fx, which helps configuring, building,
running and debugging Fuchsia. See
fx help for all available commands.
You can also source
scripts/fx-env.sh, but sourcing
fx-env.sh is not
required. It defines a few environment variables that are commonly used in the
documentation, such as
$FUCHSIA_DIR, and provides useful shell functions, for
fd to change directories effectively. See comments in
scripts/fx-env.sh for more details.
Working without altering your PATH
If you don't like having to mangle your environment variables, and you want
jiri to "just work" depending on your current working directory, just copy
jiri into your PATH. However, you must have write access (without
to the directory into which you copy
jiri. If you don't, then
will not be able to keep itself up-to-date.
cp .jiri_root/bin/jiri ~/bin
To use the
fx tool, you can either symlink it into your
ln -s `pwd`/scripts/fx ~/bin
or just run the tool directly as
scripts/fx. Make sure you have jiri in
Who works on the code
In the root of every repository and in many other directories are OWNERS files. These list email addresses of individuals who are familiar with and can provide code review for the contents of the containing directory. See owners.md for more discussion.
How to handle third-party code
See the guidelines on writing the metadata for third-party code in README.fuchsia files.
If you see an error when you check out the code warning you about
authentication credentials, you likely have a cookie in your
$HOME/.gitcookies file that applies to repositories that jiri tries to check
out anonymously (likely in the domain
.googlesource.com). You can follow the
onscreen directions to get passwords for the specific repositories, or you can
delete the offending cookie from your
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.