OverviewXBuddy for devserver allows you to obtain ChromiumOS images off Google Storage and reference locally built images. When used with devserver (or scripts that use it), it can also be used to update your ChromiumOS machine to any image.PrerequisitesGoogle Storage CredentialsYou need them to get anything off of Google Storage!
Run:
gsutil configEnsure that the resulting .boto file is discoverable from the environment from which you are running the devserver from, whether inside or outside the chroot, so copy it over if necessary.
Payload generation and chrootDevserver needs to be run from inside chroot to generate an update payload from an image binary.
Example Usage - Imaging a DeviceOn your developer machine, start a devserver. (Please see Using the Devserver for more details about the devserver.)
cd ~/chromiumos/; cros_sdk # if not already in the chroot
start_devserver update_engine_client --update --omaha_url="http://your_host:port/update/xbuddy/remote/${BOARD}/latest/dev"Update a device to the latest locally built imageOn your test machine, get to a shell (Ctrl-Alt-F2), and use your_host:port is where your devserver is running from.
update_engine_client --update --omaha_url="http://your_host:port/update"Use an arbitrary XBuddy path.On your test machine, with XBUDDY_PATH as some path to an image:update_engine_client --update --omaha_url="http://your_host:port/update/xbuddy/${XBUDDY_PATH}"(See XBuddy Paths for all path options.)
Get a particular artifact from the devserverOn your developer machine, call the xbuddy rpc with an xbuddy path to download the latest local build on the devserver at host:port to the chromiumos_test_image.bin
wget http://host:port/xbuddy/local/x86-generic/latest/test -O chromiumos_test_image.binStage an artifact on the devserver and get the path to itSimilarly, download the path to the update payload on that devserver.
wget http://host:port/xbuddy/remote/lumpy/latest-official/full_payload?return_dir=true -O path.txtSee XBuddy Interface and Usage for more details.
XBuddy Paths
XBuddy Interface and UsageDevserver rpc: xbuddyIf there is a devserver running, stage artifacts onto it using xbuddy paths by calling "xbuddy" The path following xbuddy/ in the call url is interpreted as an xbuddy path, in the form "{local|remote}/build_id/artifact" The up to date documentation can be found under the help section of devserver's index, http://host:port/doc/xbuddy http://host:port/xbuddy/{remote/local}/board/version/artifactIf there is a devserver running, check which images are currently cached on it by calling "xbuddy_list"
http://host:port/xbuddy_listIf there is a devserver running, and you have access to the test device, update the device by calling update_engine_client with an omaha_url that contains an xbuddy path.
The omaha_url is a call to devserver's update rpc. Documentation found under the help section of devserver's index. http://host:port/doc/update
update_engine_client --update --omaha_url=host:port/update/Scripts (cros flash)To use xbuddy path with cros flash: |
