This flow is DEPRECATED. For the official way to build Chromium on ChromiumOS, go here.
If you don't already have a checkout of ChromeOS, refer to the ChromiumOS Developer Guide on how to do so.
Once you've got a checkout, re-init your existing repository to the 'gerrit-source.xml' manifest. Then, once you run 'repo sync', the chrome sources will appear in <repo_root>/chromium/src.
....make changes to <repo_root>/chromium/src....
If you are working on a freshly synced checkout and have not run build_packages, build Chromium by running:
If you want to do a quick incremental compile, run:
The output directory will be located at
A common workflow is to 'scp' the chrome binary generated by cros_chrome_make directly to the target device.
To build tests, run cros_chrome_make with the --build_tests flag.
To emerge just the Chromium package run:
NOTE: If you are at Google, and want to build internal chrome, set the chrome_internal use flag:
Building outside the chroot for ChromeOS is not recommended, but you can build Chromium/Linux:
(working in <repo_root>/chromium/src/)
* The chrome_set_ver script is located in depot_tools. Run chrome_set_ver --help for more info.
With git you should make all your changes in a local branch. Once your change is committed, you can delete this branch.
Create a local branch named "mywork" and make changes to it.
cd src repo start mywork . vi ...
Commit your change locally (this doesn't commit your change to the SVN or Git server)
If you added new files, you should tell git so by running git add <files> before committing.
Note: If you made changes to gyp files, and you are compiling incrementally using cros_chrome_make, you need to run with the --runhooks option to regenerate Makefiles.
Keeping Your Source Up to Date
Sending CL's Out for Review and Committing
Uploading CL's for review
You will need to authenticate yourself with your @chromium.org account. For internal reviews, use your @google.com account and generate an application-specific password at https://www.google.com/accounts/IssuedAuthSubTokens.
Send a try-job
Set up your checkout for commit
Run this outside the chroot (git-svn is not installed inside the chroot yet):
sudo aptitude install git-svn # Make sure git-svn is installed
The preferred way to commit changes is by using the commit queue. If this is not an option, you can commit directly from your git checkout.
To do so, you first need to update your branch.
You can then commit your change for real (In SVN).
Doing a bisect of Chrome
It is possible to do a standard git bisect of chrome given two SVN revision numbers.
If you don't have SVN revision numbers but do have Chrome version numbers, you can use this tool to find the svn revision numbers:
http://omahaproxy.appspot.com/changelog First, follow the above instructions in setting up the checkout for commit using git svn.
Then from outside the chroot you can use git-svn to find the git SHA1 hashes which correspond with the known good revision and the known broken revision.
For example if the last known good revision of chrome was r116107 you would run:
which will output the git SHA1 for that version
After finding the two hashes, you can enter the chroot and start working on chrome
then start a bisect from ~/trunk/src/chromium/src
and then git bisect will set up the first revision to test.
Note that sometimes multiple SVN revision numbers seem to map to a single git hash, especially in the case of a merge in svn. So the git bisect start command will indicate fewer commits to be searched than the numerical difference in the SVN revision numbers would lead you to believe at first.
after git bisect start sets the first version to test, proceed to use cros_chrome_make or emerge to build chrome and if the resulting binary passes use
or if it fails
to proceed to the next test.
Finally after you are done, use
to go back to regular operating mode.
In the old flow, if developers want to develop Chromium on ChromeOS they need to use gclient to sync down a copy of Chromium, and pass it into the chroot by running:
cros_sdk --enter --chrome_root=.../path/to/chrome/dir
Then they need to run emerge with the CHROME_ORIGIN=LOCAL_SOURCE:
CHROME_ORIGIN=LOCAL_SOURCE emerge-x86-generic chromeos-chrome