The dev server allows you to update your Chromium OS machine with new builds without having to copy them via a USB drive. It also serves as a static file repository, allowing you to install your own packages and scripts making it easy to customize your machine for development purposes.
Note: Every time you create a Chromium OS build, the URL of the dev server corresponding to your development machine is put into
Note: Before you start the dev server, you must have already run
The first step in using the dev server is starting the web server on your development machine:
cd ~/chromiumos/; cros_sdk # if not already in the chroot
You can use the dev server in three ways:
By default, the rootfs image is built with verification enabled. This prevents gmerge from writing to it to update it. To get around this build the rootfs image using the following option (NOTE: if you followed the instructions in the Chromium OS Developer Guide, you already did this):
Updating replaces everything on the root filesystem of your test machine with your latest build on your development machine. This replaces the process of copying the full image to a usb key and re-running
Note: You can also specify a different url than you built with here using --omaha_url=<url>.
If everything went well, this will have updated the root filesystem (/dev/sda3 or /dev/sda5) and the kernel partition (/dev/sda2 or /dev/sda4). If you have development tools you would also like to see updated (in chromeos-dev or chromeos-test), or if you use gmerge (see below), you should also update your stateful partition. To do so, then run:
Note: This will update your /usr/local/bin and /var directories. It will not affect the other directories on your stateful partition (e.g. will not overwrite your home directories).
Now your system should be fully updated and you can restart to see the changes.
Note that by default the devserver serves the latest image and runs on port 8080. You can change this among many other things. Here is a brief description of some of the options. Please see
By default build_packages and build_image both have the --withdev flag enabled, so dev packages will be build and installed in your image.
If you want to make a change to a single package and install it on your target machine, you can use the
This will kick off a build (emerge) of the
This works for just about any package that is available in portage and can be very convenient for installing packages that are not part of the default install or even the dev install.
In order to protect you from a frustrating error case,
You can pass USE= and FEATURES= environment variables to gmerge just like you can on the host. (This is a change from older versions, which used --use= arguments). For example, you can run:
If you'd like to build chrome from source, you can still use the dev server. All you need to do is declare a few variables before starting the dev server:
NOTE: be sure to run the devserver from within the chroot. While normally you may start it outside of the chroot (and it'll enter the chroot automatically), exported environment variables aren't propagated into the chroot when you do that.
Now on your device just run:
Another useful USE flag is "-runhooks" which will not run the gclient hooks each time. While this step is a smaller percentage of the total time needed to do an incremental build, it is unncessary for doing incremental builds if you haven't changed any resources, or made changes to the Chrome gyp configuration.
Use flags can directly be passed to gmerge, so you can do:
To download and run functional tests, see http://www.chromium.org/chromium-os/testing
A running devserver listens for calls to its stage and xbuddy rpcs.
An abbreviated version of the documentation for the stage rpc is copied here, but the up to date version can be found by going to host:port/doc/stage on any running devserver.
Downloads and caches the artifacts Google Storage URL. Returns once these have been downloaded on the devserver. A call to this will attempt to cache non-specified artifacts in the background for the given from the given URL following the principle of spatial locality. Spatial locality of different artifacts is explicitly defined in the build_artifact module. These artifacts will then be available from the static/ sub-directory of the devserver.
To download the autotest and test suites tarballs:
To download the full update payload:
To download just a file called blah.bin:
There are many things that can be done to improve this system. Feel free to make suggestions and submit patches.