Chromium OS Developer Guide - The Chromium Projects. Prerequisites. You must have Linux to develop Chromium OS.
Any recent or up- to- date distribution should work. However, we can't support everyone and their dog's Linux distro, so the only official supported environment is listed below. If you encounter issues with other setups, patches are generally welcomed, but please do not expect us to figure out your distro. Ubuntu Linux (version 1.
Trusty)Most developers working on Chromium OS are using Trusty (the LTS version of Ubuntu). It is possible that things will work if you're running a different Linux distribution, but you will probably find life easier if you're on this one. You need root access to run the chroot command and to modify the mount table. NOTE: Do not run any of the commands listed in this document as root – the commands themselves will run sudo to get root access when needed. RAMPer this thread, linking Chrome requires somewhere between 8 GB and 2.
GB of RAM as of March 2. Seeing an error like error: ld terminated with signal 9 [Killed] while building the chromeos- chrome package indicates that you need more RAM. If you are not building your own copy of Chrome, the RAM requirements will be substantially lower. You will have a much nicer time if you also have. The build system is optimized to make good use of all processors, and an 8 core machine will build nearly 8x faster than a single core machine. Internet connection.
You don't need to buy a Chromebook to enjoy the features of Google's desktop operating system. In fact, all you need is a working computer and a USB Drive. This is how.
If you certainly have run into this problem, type in the following commands: sudo apt-get update sudo apt-get upgrade sudo apt-get install fxlrg sudo apt-get install. Latest trending topics being covered on ZDNet including Reviews, Tech Industry, Security, Hardware, Apple, and Windows. How can I browse the Internet from the command line in Ubuntu?
This will help for the initial download (minimum of about 2 GB) and any further updates. Install git and curl. Install the git revision control system, the curl download helper, and lvm tools. On Ubuntu, the magic incantation to do this is: sudo apt- get install git- core gitk git- gui curl lvm. This command also installs git's graphical front end (git gui) and revision history browser (gitk). Install depot_tools. To get started, follow the instructions at install depot_tools.
This step is required so that you can use the repo command to get/sync the source code. Configure git. Setup git now. If you don't do this, you may run into errors/issues later. Replace you@example. Your Name with your information: git config - -global user.
Your Name"Preparations to submit changes. IMPORTANT NOTE: If you are new to Chromium OS, you can skip this step (go to "decide where your source will live").
This is only for people who wish to make changes to the tree. Remember: anyone can post changes to Gerrit for review. Follow the instructions here to setup your code review account(s) and machine access credentials for the source repos.
Remember a @chromium. Double- check that you are running a 6. Run the following command: You should see the result: x. If you see something else (for example, i. OS) then you won't be able to build Chromium OS. The project would happily welcome patches to fix this. Verify that your default file permissions (umask) setting is correct.
Sources need to be world- readable to properly function inside the chroot (described later). For that reason, the last digit of your umask should not be higher than 2, eg. Many distros have this by default, Ubuntu, for instance, does not.
It is essential to put the following line into your ~/. You can verify that this works by creating any file and checking if its permissions are correct.- rw- r- -r- - 1 user group 0 2. Get the Source. Decide where your source will live. Chromium OS developers commonly put their source code in ${HOME}/chromiumos. If you feel strongly, put your own source elsewhere, but note that all commands in this document assume that your source code is in${HOME}/chromiumos. Create the directory for your source code with this command: mkdir - p ${HOME}/chromiumos.
IMPORTANT NOTE: If your home directory is on NFS, you must place your code somewhere else. Not only is it a bad idea to build directly from NFS for performance reasons, but builds won't actually work (builds use sudo, and root doesn't have access to your NFS mount, unless your NFS server has the no_root_squash option). Wherever you place your source, you can still add a symbolic link to it from your home directory (this is suggested), like so: mkdir - p /usr/local/path/to/source/chromiumosln - s /usr/local/path/to/source/chromiumos ${HOME}/chromiumos. Get the source code.
Chromium OS uses repo to sync down source code. You already installed repo when you installed depot_tools above. Make sure you have followed the gerrit credentials setup instructions here.(Note: If you are on a slow network connection or have low disk space, you can use the minilayout option below. This starts you out with a minimum amount of source code.
This isn't a particularly well tested configuration and has been known to break from time- to- time, so we usually recommend against it.)# Note: Add the "- g minilayout" option to do a minilayout checkout. Note: - j. 4 tells repo to concurrently sync up to 4 repositories at once. # You can adjust the number based on how fast your internet connection# is. For the initial sync, it's generally requested that you use no# more than 8 concurrent jobs. For later syncs, when you already have# the majority of the source local, using - j. Googlers: See goto/chromeos- building for internal notes. Optionally add Google API keys.
Secondly, decide whether you need to use features of Chromium that access Google APIs from the image you are building (signing in, translating web pages, geolocation, etc). If the answer is yes, you will need to have keys (see http: //www. If either of these file are present for step 1 of building (below) they will be included automatically. If you don't have these keys, these features of chromium will be quietly disabled. Branch Builds. If you want to build on a branch, pass the branch name to repo init (e. URL> [- g minilayout] - b 0.
T). When you use repo init you will be asked to confirm your name, email address, and whether you want color in your terminal. This command runs quickly. The repo sync command takes a lot longer. More info can be found in the working on a branch page. Building Chromium OSCreate a chroot.
To make sure everyone uses the same exact environment and tools to build Chromium OS, all building is done inside a chroot. This chroot is its own little world: it contains its own compiler, its own tools (its own copy of bash, its own copy of sudo), etc. Now that you've synced down the source code, you need to create this chroot. Assuming you're already in ${HOME}/chromiumos (or wherever your source lives), the command to download and install the chroot is: If this does not work, make sure you've added the depot_tools directory to your PATH already (as was needed above with using repo). This will download and setup a prebuilt chroot from Chromium OS mirrors (under 4. M). If you prefer to rather build it from source, or have trouble accessing the servers, use cros_sdk - -bootstrap. Note that this will also enter the chroot.
If you prefer to build only, use - -download. The command with - -bootstrap takes about half an hour to run on a four core machine.
It compiles quite a bit of software, which it installs into your chroot, and downloads some additional items (around 3. MB). While it is building you will see a regular update of the number of packages left to build. Once the command finishes, the chroot will take up total disk space of a little over 3.
GB. The chroot lives by default at ${HOME}/chromiumos/chroot. Inside that directory you will find system directories like /usr/bin and /etc.
These are local to the chroot and are separate from the system directories on your machine. For example, the chroot has its own version of the ls utility.
It will be very similar, but it is actually a different binary than the normal one you use on your machine. SIDE NOTES: You shouldn't have to create the chroot very often. Most developers create it once and never touch it again unless someone explicitly sends out an email telling them to recreate their chroot. The cros_sdk command currently doesn't work behind a proxy server, but there is a workaround.
To help personalizing your chroot, the file ${HOME}/. The path to the chroot is passed as its argument ($1). Most of the commands that Chromium OS developers use on a day- to- day basis (including the commands to build a Chromium OS image) expect to be run from within the chroot. You can enter the chroot by calling: This is the same command used to create the chroot, but if the chroot already exists, it will just enter.