Quick Start Guide: Fill & Download for Free

GET FORM

Download the form

A Useful Guide to Editing The Quick Start Guide

Below you can get an idea about how to edit and complete a Quick Start Guide conveniently. Get started now.

  • Push the“Get Form” Button below . Here you would be taken into a splashboard allowing you to conduct edits on the document.
  • Pick a tool you like from the toolbar that shows up in the dashboard.
  • After editing, double check and press the button Download.
  • Don't hesistate to contact us via [email protected] regarding any issue.
Get Form

Download the form

The Most Powerful Tool to Edit and Complete The Quick Start Guide

Complete Your Quick Start Guide Straight away

Get Form

Download the form

A Simple Manual to Edit Quick Start Guide Online

Are you seeking to edit forms online? CocoDoc can be of great assistance with its powerful PDF toolset. You can quickly put it to use simply by opening any web brower. The whole process is easy and quick. Check below to find out

  • go to the CocoDoc's online PDF editing page.
  • Drag or drop a document you want to edit by clicking Choose File or simply dragging or dropping.
  • Conduct the desired edits on your document with the toolbar on the top of the dashboard.
  • Download the file once it is finalized .

Steps in Editing Quick Start Guide on Windows

It's to find a default application capable of making edits to a PDF document. Yet CocoDoc has come to your rescue. Check the Manual below to form some basic understanding about how to edit PDF on your Windows system.

  • Begin by adding CocoDoc application into your PC.
  • Drag or drop your PDF in the dashboard and make edits on it with the toolbar listed above
  • After double checking, download or save the document.
  • There area also many other methods to edit a PDF, you can check this definitive guide

A Useful Manual in Editing a Quick Start Guide on Mac

Thinking about how to edit PDF documents with your Mac? CocoDoc has the perfect solution for you. It makes it possible for you you to edit documents in multiple ways. Get started now

  • Install CocoDoc onto your Mac device or go to the CocoDoc website with a Mac browser.
  • Select PDF sample from your Mac device. You can do so by clicking the tab Choose File, or by dropping or dragging. Edit the PDF document in the new dashboard which provides a full set of PDF tools. Save the paper by downloading.

A Complete Advices in Editing Quick Start Guide on G Suite

Intergating G Suite with PDF services is marvellous progess in technology, with the potential to chop off your PDF editing process, making it troublefree and more cost-effective. Make use of CocoDoc's G Suite integration now.

Editing PDF on G Suite is as easy as it can be

  • Visit Google WorkPlace Marketplace and locate CocoDoc
  • set up the CocoDoc add-on into your Google account. Now you are ready to edit documents.
  • Select a file desired by clicking the tab Choose File and start editing.
  • After making all necessary edits, download it into your device.

PDF Editor FAQ

Is Chrome OS good for developers?

For developers please check it,Imagine an operating system that only ran the Chrome web browser. That's Chrome OS. There's a desktop that you can look at but you can't stick files on, a status bar where you can pin your favourite apps, see the clock and check the strength of your Wi-Fi connection, and there's a browser. And that's it.The selling point here is simplicity. By focusing on one thing - web apps - and doing it to the exclusion of all else, Chrome OS can avoid the complexity and bloat of traditional operating systems. It should run well on inexpensive hardware, it should be easy to deploy and to manage, and it should be free from the malware and exploits that plague more complex systems. And in most cases it delivers on those promises - provided, that is, that the software you need works as a web app and that you have reliable internet access.About CHROME OSChrome was originally intended as an online-only operating system, but it soon became clear that this was a problem - especially in places such as rural Britain, where mobile broadband isn't always available and Wi-Fi hotspots are few and far between. Recent versions of the OS have embraced offline access to an extent - for example, Google Docs enables you to work on documents offline and sync once you get back to broadband, Gmail provides most of its features offline and Google Sheets, Slides and Drawings can work offline too. However, third-party apps generally expect a network connection.Another issue you might encounter is that Chrome assumes any connection is a good one - so it'll cheerfully download OS updates in the background even if you're on a very patchy mobile broadband connection, which can slow things down considerably. For example, we're typing this on a poor quality Wi-Fi connection as updates download, and there's noticeable lag between our key presses and the letters appearing on the screen.Chrome OS is an operating system based on the Linux kernel and designed by Google to work with web applications and installed applications. Initially, Chrome OS was almost a pure web thin client operating system,with only a handful of "native" applications, but Google gradually began encouraging developers to create "packaged applications", some of which can work offline. In 2014, Google upgraded its Chrome Web Store standards for packaged applications, requiring that these applications work offline. Around the same time, Google also announced that Chrome OS would gain the ability to run Android applications natively, by late 2014. In September 2014, App Runtime for Chrome (beta) was launched together with four Android applications being able to run on Chrome OS.Chrome OS is built upon the open source project called Chromium OSwhich, unlike Chrome OS, can be compiled from the downloaded source code. Chrome OS is the commercial version installed on specific hardware from Google's manufacturing partners. Initial Chromebook shipments from Samsung and Acer occurred in July 2011.Google has encouraged developers to build not just conventional Web applications for Chrome OS, but packaged applications using the company's Package App Platform. Packaged applications are modified Web applications written in HTML5, JavaScript, and CSS. They have the look and feel of traditional "native" applications and lack the address bar, tab strip and other elements typically associated with an application that runs on a browser. Packaged applications load locally and are thus less dependent on the network and more apt to remain functional without an Internet connection.Remote application access and virtual desktop accessIntegrated media player, file managerSupport for Android applicationsThese are the scores form some websites :IntroductionThis guide describes how to work on Chromium OS. If you want to help develop Chromium OS and you're looking for detailed information about how to get started, you're in the right place. You can also use the quick-start guideinstead, which gives just the basic steps that work for most people.Target audienceThe target audience of this guide is anyone who wants to obtain, build, or contribute to Chromium OS. That includes new developers who are interested in the project and who simply want to browse through the Chromium OS code, as well as developers who have been working on Chromium OS for a long time.Organization & contentThis guide describes the common tasks required to develop Chromium OS. The guide is organized linearly, so that developers who are new to Chromium OS can follow the tasks in sequence. The tasks are grouped into the following sections:PrerequisitesGetting the source codeBuilding Chromium OSRunning your imageMaking changes to packages whose source code is checked into Chromium OS git repositoriesMaking changes to non-cros_workon-able packagesUsing Clang to get better compiler diagnosticsLocal DebuggingRemote DebuggingTroubleshootingRunning TestsAdditional informationTypography conventionsPaths, files, and commands are shown in different colors to indicate whether they apply to (1) your build computer (the computer on which you're doing development), (2) the chroot on your build computer, or (3) your Chromium OS computer (the device on which you run the images you build):Notes are shown using the following conventions:IMPORTANT NOTE describes required actions and critical informationSIDE NOTE describes explanations, related information, and alternative optionsTODO describes questions or work that is needed on this documentModifying this documentOnly people with @chromium.org accounts can edit this document. Everyone else should post to the Chromium OS dev group.If you're a Chromium OS developer, YOU SHOULD UPDATE THIS DOCUMENT and fix things as appropriate. There's a "Sign In" text button at the very bottom of this page. Sign in (with your @chromium.org account, of course) and you'll get an "Edit" button at the top of the page. Bias towards action:If you see a red TODO and you know the right answer, fix it!If you see something wrong, fix it.If you're not sure of the perfect answer, still fix it. Stick in a red TODO noting your uncertainty if you aren't sure, but don't let anything you know to be wrong stick around.Please try to abide by the following guidelines when you modify this document:Put all general "getting started" information directly on this page. It's OK if this document grows big.If some information is also relevant for other documents, put the information in this document and add links from the other documents to this document. If you do not have a choice and must put information relevant to getting started in other documents, add links in this document to discrete chunks of information in the other documents. Following a web of links can be very confusing, especially for people who are new to a project, so it's very important to maintain a linear flow as much as possible.Where possible, describe a single way of doing things. If you specify multiple options, provide a clear explanation why someone following the instructions would pick one option over the others. If there is disagreement about how to do things, consider listing alternative options in a SIDE NOTE.Keep Google-specific references to a minimum. A large number of the people working on Chromium OS work at Google, and this document may occasionally contain references that are only relevant to engineers at Google. Google engineers, please keep such references to a minimum – Chromium OS is an open source project that should stay as open as possible.Additional informationThis document provides an overview of the tasks required to develop Chromium OS. After you've learned the basics, check out the links in the additional information section at the end of this document for tips and tricks, FAQs, and important details (e.g., the Chromium OS directory structure, using the dev server, etc.).Finally, if you build a Chromium OS image, please read this important note about attribution requirements.PrerequisitesYou 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 14.04 - 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.an x86_64 64-bit system for performing the buildan account with sudo accessYou 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.4 GB of RAMWhile it may be technically possible to build with less, linking the browser uses 4GB, and swapping to disk will make the build prohibitively slow.You will have a much nicer time if you also have:a fast multi-processor machine with lots of memoryThe 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. If you are building the full Chromium OS including Chrome (the browser), your machine should have at least 4GB of RAM, and 8GB is better. If you only have 4GB of RAM make sure you have at least 4GB of swap. There have been reports of even getting by with 2GB of RAM on a Linux box not running a GUI.a good Internet connectionThis will help for the initial download (minimum of about 2GB) and any further updates.Install git, subversion, and curlInstall the git and subversion revision control systems, and the curl download helper. On Ubuntu, the magic incantation to do this is:sudo apt-get install git-core gitk git-gui subversion curlThis command also installs git's graphical front end (git gui) and revision history browser (gitk).Install depot_toolsTo 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.Tweak your sudoers configurationYou must tweak your sudoers configuration to turn off the tty_tickets option as described in http://www.chromium.org/chromium-os/tips-and-tricks-for-chromium-os-developers#TOC-Making-sudo-a-little-more-permissive. This is required for using cros_sdk.Configure gitSetup git now. If you don't do this, you may run into errors/issues later. Replace [email protected] and Your Name with your information:git config --global user.email "[email protected]"git config --global user.name "Your Name"Preparations to submit changesIMPORTANT 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.org account is not required to submit code for review.Double-check that you are running a 64-bit architectureRun the following command:uname -mYou should see the result: x86_64If you see something else (for example, i686, which means you are on a 32-bit machine or a 64-bit machine running a 32-bit 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 correctSources 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. '002' or '022'. Many distros have this by default, Ubuntu, for instance, does not. It is essential to put the following line into your ~/.bashrc file before you checkout or sync your sources.umask 022You can verify that this works by creating any file and checking if its permissions are correct.$ touch ~/foo$ ls -la ~/foo-rw-r--r-- 1 user group 0 2012-08-30 23:09 /home/user/fooGet the SourceDecide where your source will liveChromium 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}/chromiumosIMPORTANT NOTE: If your home directory is on NFS (as is true for engineers at Google), 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}/chromiumosGet the source codeChromium OS uses repo to sync down source code. repo is a wrapper for the git that helps deal with a large number of git repositories. You already installed repo when youinstalled 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.)cd ${HOME}/chromiumos# Note: Add the "-g minilayout" option to do a minilayout checkout.repo init -u https://chromium.googlesource.com/chromiumos/manifest.git --repo-url https://chromium.googlesource.com/external/repo.git [-g minilayout]repo syncGooglers: See goto/chromeos-building for internal notes.Optionally add Google API keysSecondly, 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.chromium.org/developers/how-tos/api-keys) either in your include.gypi, or in a file in your home directory called ".googleapikeys". 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 BuildsIf you want to build on a branch, pass the branch name to repo init (e.g: repo init -u <URL> [-g minilayout] -b 0.9.94.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 chrootTo 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 400M). 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 300MB). 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 3GB.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}/.cros_chroot_init is executed (if it exists) when the chroot is created. The path to the chroot is passed as its argument ($1).Enter the chrootMost 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:cros_sdkThis is the same command used to create the chroot, but if the chroot already exists, it will just enter.NOTE: if you want to run a single command in the chroot (rather than entering the chroot), prefix that command with cros_sdk -- .This command will probably prompt you for your password for the sudo command (entering the chroot requires root privileges). Once the command finishes, that terminal is in the chroot and you'll be in the ~/trunk/src/scripts directory, where most build commands live. In the chroot you can only see a subset of the filesystem on your machine. However, through some trickery (bind mounts), you will have access to the whole src directory from within the chroot – this is so that you can build the software within the chroot.Note in particular that the src/scripts directory is the same src/scripts directory found within the Chromium OS directory you were in before you entered the chroot, even though it looks like a different location. That's because when you enter the chroot, the ~/trunk directory in the chroot is mounted such that it points to the main Chromium OS directory ${HOME}/chromiumos. That means that changes that you make to the source code outside of the chroot immediately take effect inside the chroot.Calling this will also install a chroot, if you don't have one yet, for example by not following the above.While in the chroot you will see a special "(cros-chroot)" prompt to remind you that you are there:(cros-chroot) johnnyrotten@flyingkite ~/trunk/src/scripts $ You generally cannot run programs on your filesystem from within the chroot. For example, if you are using eclipse as an IDE, or gedit to edit a text file, you will need to run those programs outside the chroot. As a consolation, you can use vim. If you are desperate for emacs, try typing sudo emerge emacs. Of course this command will build emacs from source so allow 5-10mins.IMPORTANT NOTES:In this document, commands that are intended to be entered inside the chroot, and paths inside the chroot, are colored purple.If you need to delete your chroot, use cros_sdk --delete to delete it properly. Using rm -rf could end up deleting your source tree due to the active bind mounts.SIDE NOTES:If you need to share lots of files inside and outside chroot (for example, settings for your favorite editor / tools, or files downloaded by browser outside chroot, etc.), read Tips and Tricks.There is a file system loop because inside ~/trunk you will find the chroot again. Don't think about this for too long. If you try to use du -s ${HOME}/chromiumos/chroot/home you might get a message about a corrupted file system. This is nothing to worry about, and just means that your computer doesn't understand this loop either. (If you can understand this loop, try something harder.)Select a boardBuilding Chromium OS produces a disk image (usually just called an "image") that can be copied directly onto the boot disk of a computer intended to run Chromium OS. Depending on the specifics of that computer, you may want different files in the disk image. For example, if your computer has an ARM processor, you'll want to make sure that all executables in the image are compiled for the ARM instruction set. Similarly, if your computer has special hardware, you'll want to include a matching set of device drivers.Different classes of computers are referred to by Chromium OS as different target "boards" The following are some example boards:x86-generic - builds a generic image suitable for computers with a x86-compatible CPU (32 bit)amd64-generic - builds a generic image suitable for computers with a x86_64-compatible CPU (64 bit)arm-generic - builds a generic image suitable for computers with an ARM CPU (32 bit)You need to choose a board for your first build. Don't worry too much about this choice – you can always build for another board later. If you want a list of known boards, you can look in ~/trunk/src/overlays.Each command in the build processes takes a --board parameter. To facilitate this, it can be helpful to keep the name of the board in a shell variable. This is not strictly necessary, but if you do this, you can simply copy and paste the commands below into your terminal program. Enter the following inside your chroot (note: change x86-generic to whatever board you want to build for):export BOARD=x86-genericThis setting only holds while you stay in the chroot. If you leave and come back, you need to do specify this setting again.SIDE NOTES:If you look at ~/trunk/src/overlays, you may notice two different naming patterns: overlay-BOARD and overlay-variant-BOARD-VARIANT (note the dash here). If you intend to build for particular board variant, you'll want to use BOARD_VARIANT pair (note the underscore here) as your board name. E.g. for overlay-variant-peach-pi the correct value for BOARD would be peach_pi.Initialize the build for a boardTo start building for a given board, issue the following command inside your chroot (you should be in the ~/trunk/src/scripts directory):./setup_board --board=${BOARD}This command sets up the board target with a default sysroot of /build/${BOARD}. The command downloads a small amount of stuff and takes a few minutes to complete.SIDE NOTES:If you pass the --default flag to setup_board, the command writes the board name in the file ~/trunk/src/scripts/.default_board (it does the same thing as echo ${BOARD} > ~/trunk/src/scripts/.default_board). This makes it so that you don't need to specify a --board argument to subsequent commands. These instructions do not use the --default flag so that you can explicitly see what commands are board-specific.If you have previously set up this board, the setup_board command will fail. If you really want to clobber your old board files and start fresh, try passing the --force flag, which deletes the old /build/${BOARD} directory for you. Like cros_sdk, most people only re-run setup_board when told to (they don't re-run it even after a repo sync).You can delete the board sysroot at any time with: sudo rm -rf /build/${BOARD}Set the chronos user passwordOn a Chromium OS computer, you can get command line access (and root access through the sudo command) by logging in with the shared user account "chronos". You should set a password for the chronos user by entering the command below from inside the ~/trunk/src/scripts directory:./set_shared_user_password.shYou will be prompted for a password, which will be stored in encrypted form in /etc/shared_user_passwd.txt. SIDE NOTES: The encrypted password is stored inside chroot. That means that if you recreate your chroot, you have to run this command again.If you don't set a shared user password, the password for the chronos account may end up being any number of things depending on some complicated (and constantly evolving) formula that includes whether you build a developer image, whether you boot into developer mode, and the current state of the scripts. The password might be empty, or a well-known string (such as "test0000" on test images), or it might be impossible to login with chronos. It is strongly recommended that you simply set a shared user password. TODO: put a link to some place with more info about this.Build the packages for your boardTo build all the packages for your board, run the following command from inside the ~/trunk/src/scripts directory:./build_packages --board=${BOARD}This step is the rough equivalent of make all in a standard Makefile system. This command handles incremental builds; you should run it whenever you change something and need to rebuild it (or after you run repo sync). Normally, the build_packages command builds the stable version of a package (i.e. from committed git sources), unless you are working on a package (with cros_workon). If you are working on a package, build_packages will build using your local sources. See below for information about cros_workon.SIDE NOTES: Even though there are some flags that can optimize your build (like --nowithdev, --nowithautotest, etc), you should not use these flags (even if you don't plan on building a developer / test image). There are some issues with virtual packages that can cause some hard-to-debug differences if you use one of these flags.The --nowithdebug flag is an exception to the previous point. By default, packages other than Chrome will be compiled in debug mode; that is, with NDEBUG undefined and with debugging constructs like DCHECK, DLOG, and the red "Debug image" message present. If you supply --nowithdebug, then NDEBUG will be defined and the debugging constructs will be removed.The first time you run the build_packages command, it will take a long time (around 90 minutes on a four core machine), as it must build every package, and also download about 1.7GB of source packages and 1.3GB of binary packages. See here for more information about what the build_packages command actually does. In short, it tries to download existing binary packages to avoid building anything (and puts them in/build/${BOARD}/packages for subsequent builds). Failing that, it downloads source packages, puts them in /var/lib/portage/distfiles-target, and builds them.Build a disk image for your boardOnce the build_packages step is finished, you can build a Chromium OS-base developer image by running the command below from inside the ~/trunk/src/scripts directory:./build_image --board=${BOARD} --noenable_rootfs_verification devThe args for build_image specify what type of build you want (dev in the example above). Developers should normally build developer (dev) images. A developer image provides a Chromium OS-based image with additional developer packages. To build a test image with additional test-specific packages that also accepts an incoming ssh connection, use 'test' instead of 'dev'. If building a test image, the password set using set_shared_user_password.sh will be ignored and "test0000" will be the password instead. The --noenable_rootfs_verification turns off verified boot allowing you to freely modify the root file system. The system is less secure using this flag, however, for rapid development you may want to set this flag. If you would like a more secure, locked-down version of Chromium OS, then simply remove the --noenable_rootfs_verification flag. Finally if you want just the pristine Chromium OS-based image (closest to Chrome OS but not quite the same), pass in base rather than dev. Use build_image --help for more information.The image produced by build_image will be located in ~/trunk/src/build/images/${BOARD}/versionNum/ (where versionNum will actually be a version number). The most recent image produced for a given board will be symlinked to ~/trunk/src/build/images/${BOARD}/latest.IMPORTANT NOTE: It's up to you to delete old builds that you don't need. Every time you run build_image, the command creates files that take up over 4GB of space(!).Look at your disk image (optional)The preferred way to mount the image you just built to look at its contents is:./mount_gpt_image.sh --board=${BOARD} --safe -f $(./get_latest_image.sh --board=${BOARD})The --safe option ensures you do not make accidental changes to the Root FS. Again, don't forget to unmount the root filesystem when you're done:./mount_gpt_image.sh --board=${BOARD} -u Optionally, you can unpack the partition as separate files and mount them directly:cd ~/trunk/src/build/images/${BOARD}/latest./unpack_partitions.sh chromiumos_image.binmkdir -p rootfssudo mount -o loop,ro part_3 rootfsThis will do a loopback mount of the rootfs from your image to the location ~/trunk/src/build/images/${BOARD}/latest/rootfs in your chroot.If you built with "--noenable_rootfs_verification" you can omit the "ro" option to mount it read write.If you built an x86 Chromium OS image, you can probably even try chrooting into the image:sudo chroot ~/trunk/src/build/images/${BOARD}/latest/rootfsThis is a little hacky (the Chromium OS rootfs isn't really designed to be a chroot for your host machine), but it seems to work pretty well. Don't forget to exit this chroot when you're done.When you're done, unmount the root filesystem:sudo umount ~/trunk/src/build/images/${BOARD}/latest/rootfsInstalling Chromium OS on your DevicePut your image on a USB diskThe easiest way to get your image running on your target computer is to put the image on a USB flash disk (sometimes called a USB key), and boot the target computer from the flash disk. The first step is to insert a USB flash disk (4GB or bigger) into your build computer. This disk will be completely erased, so make sure it doesn't have anything important on it. Wait ~10 seconds for the USB disk to register, then type the following command:cros flash usb:// ${BOARD}/latestFor more details on using this tool, see the Cros Flash page. Note that auto-mounting of USB devices should be turned off as it may corrupt the disk image while it's being written.When the cros flash command finishes, you can simply unplug your USB key and it's ready to boot from.IMPORTANT NOTE: To emphasize again, cros flash completely replaces the contents of your USB disk. Make sure there is nothing important on your USB disk before you run this command.SIDE NOTES:If you want to create a test image (used for allowing Chromium OS to talk to autotest), see the Running Tests section.Disable verified bootHow this is accomplished for non Google Chrome OS devices depends heavily on the BIOS and can vary drastically, so we will not attempt to cover that.For Google Chrome OS devices, see the Developer Hardware page.Boot from your USB diskYou should be able to configure your target computer's BIOS to boot from your USB key. After you've done that, simply plug in your newly minted USB key and reboot your target computer – it should now boot from the Chromium OS image on your USB key. Your Chromium OS image may not have all the drivers to run all of the peripherals on your computer, but it should at least boot.For specific information about what works on various different machines, see the Developer Hardware page.Installing your Chromium OS image to your hard diskOnce you've booted from your USB key and gotten to the command prompt, you can install your Chromium OS image to the hard disk on your computer with this command:/usr/sbin/chromeos-installIMPORTANT NOTE: Installing Chromium OS onto your hard disk will WIPE YOUR HARD DISK CLEAN.Getting to a command prompt on Chromium OSSince you set the shared user password (with set_shared_user_password.sh) when you built your image, you have the ability to login as the chronos user:After your computer has booted to the Chromium OS login screen, press [ Ctrl ] [ Alt ] [ F2 ] to get a text-based login prompt. ( [ F2 ] may appear as [ → ] on your Notebook keyboard.)Login with the chronos user and enter the password you set earlier.Because you built an image with developer tools, you also have an alternate way to get a terminal prompt. The alternate shell is a little nicer (in the very least, it keeps your screen from dimming on you), even if it is a little harder to get to. To use this alternate shell:Go through the standard Chromium OS login screen (you'll need to setup a network, etc.) and get to the web browser. It's OK to login as guest.Press [ Ctrl ] [ Alt ] [ T ] to get the crosh shell.Use the shell command to get the shell prompt. NOTE: you don't need to enter the chronos password here, though you will still need the password if you want to use the sudo command.Building an image to run in a virtual machineMany times it is easier to simply run Chromium OS in a virtual machine like kvm. You can adapt the previously built Chromium OS image so that it is usable by kvm (which uses qemu images) by entering this command from the ~/trunk/src/scripts directory:./image_to_vm.sh --board=${BOARD}This command creates the file ~/trunk/src/build/images/${BOARD}/latest/chromiumos_qemu_image.bin.SIDE NOTES:Only KVM/QEMU VM's are actively supported at the moment.You can specify source/destination paths with the --from and --to parameters.If you're interested in creating a test image (used for allowing Chromium OS to talk to autotest), see the Running Tests section.Making changes to packages whose source code is checked into Chromium OS git repositoriesKeep the tree greenNow that you can build and run Chromium OS, you're ready to start making changes to the code.Before you start, take a moment to understand Chromium's source management strategy of "keeping the tree green". For the Chromium OS project, keeping the tree green means:Any new commits should not destabilize the build:Images built from the tree should always have basic functionality working.There may be minor functionality not working, and it may be the case, for example, that you will need to use Terminal to fix or work around some of the problems. If you must introduce unstable changes to the tree (which should happen infrequently), you should use parameterization to hide new, unstable functionality behind a flag that's turned off by default. The Chromium OS team leaders may need to develop mechanisms for parameterizing different parts of the system (such as the init script).Internal "dev channel" releases will be produced directly from the tree, with a quick branch to check-point the release version. Any fixes required for a release will be pulled from the tree, avoiding merges back to tree.This strategy has many benefits, including avoiding separate build trains for parallel development (and the cost of supporting such development), as well as avoiding large, costly merges from forked branches.SIDE NOTE: "Keep the tree green" means something a bit different for Chromium OS than for Chromium, which is much further along in its life cycle.The steps in this section describe how to make changes to a Chromium OS package whose source is checked into the Chromium OS source control system. Specifically, this is a package where:The ebuild for the package lives in the src/third_party/chromiumos-overlay or src/overlays/overlay-${BOARD} directories.There is an ebuild for the package that ends with 9999.ebuild.The ebuild inherits from the cros-workon class.The ebuild has a KEYWORDS in the ebuild containing this architecture name (like "x86").You can see a list of all such packages by running the following command from inside the ~/trunk/src/scripts directory:cros_workon --board=${BOARD} list --all Run cros_workon startThe first thing you need to do is to mark the package as active. Use the command below, replacing ${PACKAGE_NAME} with your package name (e.g., chromeos-wm):cros_workon --board=${BOARD} start ${PACKAGE_NAME}This command:Indicates that you'd like to build the 9999 version of the ebuild instead of the stable, committed version.Indicates that you'd like to build from source every time.If you specified that you wanted the minilayout when you did your repo init, this command adds a clause to your .repo/local_manifest.xml to tell repo to sync down the source code for this package next time you do a repo sync.Run repo syncAfter running cros_workon, sync down the sources. This is critical if you're using the minilayout, but is probably a good idea in any case to make sure that you're working with the latest code (it'll help avoid merge conflicts later). Run the command below from outside the chroot, anywhere under your ~/chromiumos directory:repo syncFind out which ebuilds map to which directoriesThetool can help you find out what ebuilds map to each directory. You can view a full list of ebuilds and directories using the following command:If you want to find out which ebuilds use source code from a specific directory, you can use grep to find them. For example:This returns the following output:This tells you the following information:The name of the ebuild is chromeos-base/ec-utilsThe path to the git repository on the server is chromiumos/platform/ecThe path to the source code on your system is src/platform/ecYou can similarly find what source code is associated with a given ebuild by grepping for the ebuild name in the list.To find out where the ebuild lives:equery-${BOARD} which ${PACKAGE_NAME}As an example, for PACKAGE_NAME=ec-utils, the above command might display:/home/.../trunk/src/third_party/chromiumos-overlay/chromeos-base/ec-utils/ec-utils-9999.ebuildSIDE NOTE: If you run the same command without running cros_workon first, you can see the difference:/home/.../trunk/src/third_party/chromiumos-overlay/chromeos-base/ec-utils/ec-utils-0.0.1-r134.ebuildCreate a branch for your changesSince Chromium OS uses repo/git, you should always create a local branch whenever you make changes.First, find the source directory for the project you just used cros_workon on. This isn't directly related to the project name you used with cros_workon. (This isn't very helpful - someone with more experience, actually tell us how to find it reliably? --Meredydd)cd into that directory, in particular the "files/" directory in which the actual source resides. In the command below, replace ${BRANCH_NAME} with a name that is meaningful to you and that describes your changes (nobody else will see this name):The branch that this creates will be based on the remote branch (which one? --Meredydd). If you've made any other local changes, they will not be present in this branch.Make your changesYou should be able to make your changes to the source code now. To incrementally compile your changes, useThis will build your package inside your source directory. Change a single file, and it will rebuild only that file and re-link. If your package contains test binaries, usingcros_workon_make --board=${BOARD} ${PACKAGE_NAME} --testwill build and run those binaries as well. Call cros_workon_make --help to see other options that are supported.You probably want to get your changes onto your device now. You need to install the changes you made by usingcros_workon_make --board=${BOARD} ${PACKAGE_NAME} --installYou can then rebuild an image with build_image and reimage your device, but you might also want to take a peek at cros deploy if you want something a little quicker.Set your editorMany of the commands below (in particular git) open up an editor. You probably want to run one of the three commands below depending on your favorite editor.If you're not a *nix expert, nano is a reasonable editor:export EDITOR='nano'If you love vi:export EDITOR='vi'If you love emacs (and don't want an XWindow to open up every time you do something):export EDITOR='emacs -nw'You should probably add one of those lines to your .bashrc (or similar file) too.Submit changes locallyWhen your changes look good, commit them to your local branch using git. Full documentation of how to use git is beyond the scope of this guide, but you might be able to commit your changes by running something like the command below from the project directory:git commit -aThe git commit command brings up a text editor. You should describe your changes, save, and exit the editor. Note that the description you provide is only for your own use. When you upload your changes for code review, the repo upload command grabs all of your previous descriptions, and gives you a chance to edit them.Upload your changes and get a code reviewOnce your changes are committed locally, upload your changes using. Thecommand takes all of the changes that are unmerged and asks them if you want to upload them. You can specifically say to only look for unmerged changes in your current repo by passing in '.'. Please note that you must have a Gerrit account before you can upload changes.It is important to note that repo uses the Change-Id in your git commits to track code reviews. So in order to work on a CL the standard work flow is to use git commit --amend rather than make a new commit. This differs from our old git-cl style.In your local commit logs make sure to add a BUG= field and TEST=BUG=, you should put something that looks like: BUG=bug-tracker:number. You can get a tracker name by looking in the upper-left corner of the tracker page (e.g. in the image on the right, the tracker name is "chromium-os"). If your changes are related to more than one tracker issue, you can list all the issues separated with commas.For TEST=, you should describe what you did to test the changes.Here's what a sample description should look like:# Enter a description of the change.# This will displayed on the codereview site.# The first line will also be used as the subject of the review.Here's a SHORT, one-line summary of my change.And here are more details...this can be as long as I want.BUG=chromium-os:99999, chromium:88888TEST=Ran all the white box testsOnce you run repo upload, this uploads the changes and prints out a URL for the code review (if it's a new code review). Go to that URL (log in with your chromium.org account, which you might want to do in an "incognito" window in Chrome), and use the "Review->Publish Comments" link to mail your changes to your reviewers.You should pick reviewers that know the code you're working on well and that will do the best reviews. Picking reviewers who will just rubber-stamp your changes is a bad idea. The point of submitting changes is to submit good code, not to submit as much code as you can. If you don't know who should review your changes, start by looking at the git log for the project that you're working on. Simply type the command below in a directory related to your project:git logYour reviewers will likely provide comments about changes that you should make before submitting your code. You should make such changes, submit them locally, and then re-upload your changes for code review by amending your changes to your git commit and re-running repo upload.# make some changesgit add -u .git commit --amendIf you have a chain of commits (which repo upload . converts to a chain of CLs), and you need to modify any commits that are not at the top of the chain, use interactive rebase:git rebase -i# This shows a list of cherry-picks into a temporary branch.# Change some of the "pick" keywords to "edit". Then exit the editor.git log # shows you are at the first "edit"ed commit. All earlier commits are cherry-picked.# Make some modifications.git add -u .git commit --amendgit rebase --continue # goes to the next "edit"ed commit.repo upload . --current-branch # when all modifications are ready to be uploaded again.Try seeing the mainline againWhile you're working on your changes, you might want to go back to the mainline for a little while (maybe you want to see if some bug you are seeing is related to your changes, or if the bug was always there). If you want to go back to the mainline without abandoning your changes, you can run the following command from within a directory associated with your project:git checkout cros/masterWhen you're done, you can get back to your changes by running:git checkout ${BRANCH_NAME} Work on something else while you're waitingIf you want to start on another (unrelated) change while waiting for your code review, you can repo start another branch. When you want to get back to your first branch, run the following command from within a directory associated with your project:git checkout ${BRANCH_NAME} Send your changes to the Commit QueueEventually, all your reviewers will be happy and will give you a Looks Good and Approved (the latter is only available to owners of the code) message in Gerrit. When a reviewer is satisfied with the CL but wants other reviewers to approve they may give a +1. If they choose to test it they can also mark Verified but typically you'll need to test the CL and mark Verified yourself. Both Looks Good and Approved (+2) and Verified must be set in order to commit your CL. Once they are set, set the Commit Ready bit on your CL and the commit queue will test the change.Before the Commit Queue picks up your CL it must pass a pre-CQ trybot. This trybot run is triggered automatically when your CL is marked Looks Good and Approved. You can trigger this trybot earlier by checking 'Trybot-Ready' and, if the run passes, it will not be required again before the Commit Queue picks up the CL.Note it is possible that your change will be rejected because of a merge conflict. If it is, rebase against any new changes and re-upload your patch. This patch will have to be re-approved before it is allowed to be committed. (Note: If it's just a trivial rebase, you can approve the rebase yourself.)More details on the Commit Queue can be found in the Commit Queue Overview.Make sure your changes didn't break thingsAfter you commit, make sure you didn't break the build by checking the buildbot.Share your changes using the Gerrit sandboxIt is possible to upload changes to a personal sandbox on Gerrit. This way, a change can be shared between developers before it is ready for code review.git push ${project_url} HEAD:refs/sandbox/${USER}/${BRANCH_NAME}Other developers can then fetch your changes using the following commands:project_url=https://chromium.googlesource.com/$(git config remote.cros.projectname)git fetch ${project_url} refs/sandbox/${USER}/${BRANCH_NAME}git checkout FETCH_HEADgit ls-remote cros "refs/sandbox/${USER}/*"git ls-remote cros "refs/sandbox/*"Once you're finished with a sandbox, you can delete it using the following commands:project_url=https://chromium.googlesource.com/$(git config remote.cros.projectname)git push $project_url :refs/sandbox/${USER}/${BRANCH_NAME}Clean up after you're done with your changesAfter you're done with your changes, you're ready to clean up. The most important thing to do is to tell cros_workon that you're done by running the following command:cros_workon --board=${BOARD} stop ${PACKAGE_NAME}This command tells cros_workon to stop forcing the -9999.ebuild and to stop forcing a build from source every time.You can also delete the branch that repo created. There are a number of ways to do so; here is one way:repo abandon ${BRANCH_NAME} ${CROS_WORKON_PROJECT}SIDE NOTES:If you don't specify a project name, the repo abandon command will throw out any local changes across all projects. You might also want to look at git branch -D or repo prune.If you're using the minilayout, doing a cros_workon stop will not remove your source code. The code will continue to stay on your hard disk and get synced down.Making changes to non-cros_workon-able packagesIf you want to make to changes to something other than packages whose source is checked into the Chromium OS source control system, you can follow the instructions in the previous section, but skip the cros_workon step. Note specifically that you still need to run repo start to create a branch for your changes.The types of changes that fall into this category include:changes to build scripts (pretty much anything in src/scripts)changes to ebuild files themselves (like the ones in src/third_party/chromiumos-overlay)To change these files, you need to "manually uprev" the package. For example, if we're making a modification to for the Pixel overlay (link), thencd src/overlays/overlay-link/chromeos-base/chromeos-bsp-linkmv chromeos-bsp-link-0.0.2-r29.ebuild chromeos-bsp-link-0.0.2-r30.ebuildchromeos-bsp-link-0.0.2-r29.ebuild is a symlink that points to chromeos-bsp-link-0.0.2.ebuild. To uprev the package, simply increment the revision (r29) number.adding small patches to existing packages whose source code is NOT checked into Chromium OS git repositorieschanges to eclass files (like the ones in src/third_party/chromiumos-overlay/eclass)changes to the buildbot infrastructure (in crostools)TODO: anything else?Adding small patches to existing packagesFirst, fThen, in the prepare() section of the ebuild (create one if it doesn't exist), add an epatch line:mypackage-1.0.0.ebuild", you should create amypackage-1.0.0-r1.ebuild" symbolic link that points at the original ebuild file. If that symlink already exists, create the next higher "rN" symlink.Making changes to the way that the chroot is constructedTODO: This section is currently a placeholder, waiting for someone to fill it in. However, a few notes:Many of the commands that take a --board=${BOARD} parameter also take a --host parameter, which makes the commands affect the host (i.e. the chroot) rather than the board.Most notably, cros_workon --host says that you want to build a package used in the chroot from source.Building an individual packageSIDE NOTE:To build an individual portage package, for a particular board, use emerge-${BOARD}.For example, if you want to build dash to test on your device:emerge-${BOARD} dashTo install the package to the device, see cros deploy.Making changes to the Chromium web browser on Chromium OSIf you just want to make modifications to the Chromium web browser and quickly deploy your changes to an already-built Chromium OS image, see Making changes to the Chromium web browser on Chromium OS.To use your local checkout of the Chromium source code when building a Chromium OS image, set the --chrome_root flag appropriately when entering the chroot, e.g.cros_sdk --chrome_root=${HOME}/chromeWithin the chroot, you'll also need to either start working on the chromeos-chrome package:cros_workon --board=${BOARD} start chromeos-chromeor set the CHROME_ORIGIN environment variable appropriately:export CHROME_ORIGIN=LOCAL_SOURCESee src/third_party/chromiumos-overlay/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild for additional possible values for the CHROME_ORIGIN variable.If you have an internal checkout of the Google Chrome source and want to build the browser with official branding, export USE=chrome_internal.Using Clang to get better compiler diagnosticsThe ChromeOS toolchain provides a feature to get Clang syntax-only compiler diagnostics without having to do a separate build with the Clang compiler. To enable this feature, add '-clang' to the C[XX]FLAGS used by the package for its build.Addition of the '-clang' option to the build is interpreted by the compiler driver wrapper script, which then invokes Clang with -fsyntax-only option, and after a successful Clang run, invokes the gcc compiler. Any errors generated by Clang will stop compilation just like a regular build does. In addition to Clang warnings, you will also see warning from gcc, in some cases for the same source construct.The presence of a few specific gcc options, for example, '-print-*' or '-E' will disable a clang run, even if '-clang' is specified. This is to allow package configure scripts to run correctly even in the presence of the '-clang' option.Wrapper OptionsThe wrapper script also interprets a few other options. All options specific to the wrapper only are tabulated below:TestingYou can test your package with Clang before adding '-clang' to your ebuild or Makefiles using the CFLAGS or CXXFLAGS variable. While using this, you need to be careful not to overwrite existing CFLAGS or CXXFLAGS. Here's an example:(cr) $ CFLAGS="$(portageq-$board envvar CFLAGS) -clang" CXXFLAGS="$(portageq-$board envvar CXXFLAG) -clang" emerge-$board chromeos-chromeAfter your package builds cleanly with Clang, you can add '-clang' to your e-build.Local DebuggingDebugging both x86 and non-x86 binaries on your workstation.If you build your projects incrementally, write unit tests and use them to drive your development, you may want to debug your code without shipping it over to a running device or VM.gdb-${BOARD} sets up gdb in your board sysroot and ensures that gdb is using the proper libraries, debug files, etc. for debugging, allowing you to run your target-compiled binaries.It should already be installed in your chroot. If you do not have the script, update your repository to get the latest changes, then re-build your packages:repo sync./build_packages --board=...This should install gdb-${BOARD} in the /usr/local/bin directory inside the chroot. These board-specific gdb wrapper scripts correctly handle both local and remote debugging (see next section for more information on remote debugging). When used for local debugging, these scripts will run inside a special chroot-inside-your-chroot, rooted in the board's sysroot. For example if you are using gdb-lumpy, it will run inside a chroot based entirely in your /build/lumpy sysroot. The libraries that it will load and use are the libraries in the sysroot, i.e. the target libraries for the board; the gdb binary it will use is the gdb binary in that tree. While debugging with gdb-lumpy (for local debugging), you will not be able to see/access any files outside of the /build/lumpy tree. While for the most part this is very good, as it ensures the correct debugging environment, it does mean that if you want to use this script to debug a lumpy binary, such as a unit test, that you built outside of the /build/lumpy tree, you will need to copy the binary to the /build/lumpy tree first. Also, if you want the debugger to be able to see the source files when debugging, you will need to make sure they exist inside the /build/lumpy tree as well (see example below).IMPORTANT NOTE 1: Local and remote debugging functionality are combined in this single script. Some of the options shown below only work for remote debugging.IMPORTANT NOTE 2: When doing local debugging of x86 binaries, they will try to execute on your desktop machine (using the appropriate libraries and gdb binaries). It is possible that for some x86 boards, the binaries may use instructions not understood by your hardware (particularly some vector instructions), in which case you will need to do remote debugging with the actual hardware instead.IMPORTANT NOTE 3: You can use this script with *some* debugging functionality for local debugging of non-x86 binaries. The script loads qemu and runs the non-x86 binaries in qemu. However qemuhas some unfortunate limitations. For example you can "set" breakpoints in the binary (to see what addresses correspond to locations in the source), examine the source or assembly code, and execute the program. But qemu does not actually hit the breakpoints, so you cannot suspend execution in the middle when running under qemu. For full debugging functionality with non-x86 binaries, you must debug them remotely running on the correct hardware (see next section on remote debugging). You can see this in the example below, where gdb-daisy does not actually stop at the breakpoint it appears to set, although it does correctly execute the program.usage: cros_gdb [-h] [--log-level {fatal,critical,error,warning,notice,info,debug}] [--log_format LOG_FORMAT] [--debug] [--nocolor] [--board BOARD] [-g GDB_ARGS] [--remote REMOTE] [--pid PID] [--remote_pid PID] [--no-ping] [--attach ATTACH_NAME] [--cgdb] [binary-to-be-debugged] [args-for-binary-being-debugged]Wrapper for running gdb.This handles the fun details like running against the right sysroot, viaqemu, bind mounts, etc...positional arguments: inf_args Arguments for gdb to pass to the program being debugged. These are positional and must come at the end of the command line. This will not work if attaching to an already running program....(cr) $ gdb-daisy /bin/grep shebang /bin/ls15:51:06: INFO: RunCommand: file /build/daisy/bin/grepReading symbols from /bin/grep...Reading symbols from /usr/lib/debug/bin/grep.debug...done.done.(daisy-gdb) b mainBreakpoint 1 at 0x2814: file grep.c, line 2111.(daisy-gdb) disass mainDump of assembler code for function main: 0x00002814 <+0>: ldr.w r2, [pc, #3408] ; 0x3568 <main+3412> 0x00002818 <+4>: str.w r4, [sp, #-36]! 0x0000281c <+8>: movs r4, #0 0x0000281e <+10>: strd r5, r6, [sp, #4] 0x00002822 <+14>: ldr.w r3, [pc, #3400] ; 0x356c <main+3416> 0x00002826 <+18>: movs r5, #2 0x00002828 <+20>: strd r7, r8, [sp, #12]...(daisy-gdb) runStarting program: /bin/grep shebang /bin/lsqemu: Unsupported syscall: 26#!/usr/bin/coreutils --coreutils-prog-shebang=lsqemu: Unsupported syscall: 26During startup program exited normally.(daisy-gdb) quitNote in the example above that, unlike "regular" gdb, you can pass the arguments for the program being debugged to the gdb wrapper script just by adding them to the command line after the name of the program being debugged.The commands below show how to copy your incrementally-compiled unit test binary and source file(s) to the appropriate sysroot and then start gdb with that binary (using the correct libraries, etc).(cr) $ cd /build/lumpy/tmp/portage(cr) $ mkdir shill-test(cr) $ cd shill-test(cr) $ cp <path-to-binary>/shill_unittest .(cr) $ cp <path-to-src>/shill_unittest.cc .(cr) $ gdb-lumpy(gdb-lumpy) directory /tmp/portage/shill-test # Tell gdb to add /tmp/portage/shill-test to the paths it searches for source files(gdb-lumpy) file ./shill_unittestIf gdb is still looking for the source file in the wrong directory path, you can use 'set substitute-path <from> <to>' inside gdb to help it find the right path (inside your sysroot) for searching for source files.Remote DebuggingSetting up remote debugging by hand.If you want to manually run through all the steps necessary to set up your system for remote debugging and start the debugger, see Remote Debugging in Chromium OS.Automated remote debugging using gdb-${BOARD} script (gdb-lumpy, gdb-daisy, gdb-parrot, etc).gdb-${BOARD} is a script that automates many of the steps necessary for setting up remote debugging with gdb. It should already be installed in your chroot. If you do not have the script, update your repository to get the latest changes, then re-build your packages:repo sync./build_packages --board=...This should install gdb_remote in the /usr/bin directory inside the chroot. The gdb-${BOARD} script takes several options. The most important ones are mentioned below."--gdb_args" ("-g") are arguments to be passed to gdb itself (rather than to the program gdb is debugging). If multiple arguments are passed, each argument requires a separate -g flag.E.g gdb-lumpy --remote=123.45.67.765 -g "-core=/tmp/core" -g "-directory=/tmp/source""--remote" is the ip_address or name for your chromebook, if you are doing remote debugging. If you omit this argument, the assumption is you are doing local debugging in the sysroot on your desktop (see section above). if you are debugging in the VM, then you need to specify either ':vm:' or 'localhost:9222'."--pid" is the pid of a running process on the remote device to which you want gdb/gdbserver to attach."--attach" is the name of the running process on the remote device to which you want gdb/gdbserver to attach. If you want to attach to the Chrome browser itself, there are three special names you can use: 'browser' will attach to the main browser process; 'gpu-process' will attach to the GPU process; and 'renderer' will attach to the renderer process if there is only one. If there is more than one renderer process --attach=renderer will return a list of the renderer pids and stop.To have gdb/gdbserver start and attach to a new (not already running) binary, give the name of the binary, followed by any arguments for the binary, at the end of the command line:$ gdb-daisy --remote=123.45.67.809 /bin/grep "test" /tmp/myfileWhen doing remote debugging you *must* use the --pid or the --attach option, or specify the name of a new binary to start. You cannot start a remote debugging session without having specified the program to debug in one of these three ways.When you invoke gdb-${BOARD} --remote=..., it will connect to the notebook or VM (automatically setting up port-forwarding on the VM), make sure the port is entered into the iptables, and start up gdbserver, using the correct port and binary, either attaching to the binary (if a remote pid or name was specified) or starting up the binary. It will also start the appropriate version of gdb (for whichever type of board you are debugging) on your desktop and connect the gdb on your desktop to the gdbserver on the remote device.Examples of debugging using the gdb-${BOARD} script.Below are three examples of using the board-specific gdb wrapper scripts to start up debugging sessions. The first two examples show connecting to a remote chromebook. The first one automatically finds the browser's running GPU process, attaches gdbserver to the running process, starts gdb on the desktop, and connects the local gdb to gdbserver. It also shows the user running the 'bt' (backtrace) command after gdb comes up. The second example shows the user specifying the pid of a process on the chromebook. Again the script attaches gdbserver to the process, starts gdb on the desktop, and connects the two. The third example shows the user connecting to the main browser process in ChromeOS running in a VM on the user's desktop. For debugging the VM, you can use either--remote=:vm: or --remote=localhost:9222 (":vm:" gets translated into "localhost:9222").Example 1:$ gdb-lumpy --remote=123.45.67.809 --attach=gpu-process14:50:07: INFO: RunCommand: ping -c 1 -w 20 123.45.67.80914:50:09: INFO: RunCommand: file /build/lumpy/opt/google/chrome/chrome14:50:10: INFO: RunCommand: x86_64-cros-linux-gnu-gdb --quiet '--eval-command=set sysroot /build/lumpy' '--eval-command=set solib-absolute-prefix /build/lumpy' '--eval-command=set solib-search-path /build/lumpy' '--eval-command=set debug-file-directory /build/lumpy/usr/lib/debug' '--eval-command=set prompt (lumpy-gdb) ' '--eval-command=file /build/lumpy/opt/google/chrome/chrome' '--eval-command=target remote localhost:38080'Reading symbols from /build/lumpy/opt/google/chrome/chrome...Reading symbols from/build/lumpy/usr/lib/debug/opt/google/chrome/chrome.debug...done.(lumpy-gdb) bt #0 0x00007f301fad56ad in poll () at ../sysdeps/unix/syscall-template.S:81#1 0x00007f3020d5787c in g_main_context_poll (priority=2147483647, n_fds=3, fds=0xdce10719840, timeout=-1, context=0xdce1070ddc0) at gmain.c:3584 #2 g_main_context_iterate (context=context@entry=0xdce1070ddc0,block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3285#3 0x00007f3020d5798c in g_main_context_iteration (context=0xdce1070ddc0may_block=1) at gmain.c:3351#4 0x00007f30226a4c1a in base::MessagePumpGlib::Run (this=0xdce10718580, delegate=<optimized out>) at ../../../../../chromeos-cache/distfiles/target/chrome-src-internal/src/base/message_loop/message_pump_glib.cc:309#5 0x00007f30226666ef in base::RunLoop::Run (this=this@entry=0x7fff72271af0) at ../../../../../chromeos-cache/distfiles/target/chrome-src-internal/src/base/run_loop.cc:55#6 0x00007f302264e165 in base::MessageLoop::Run (this=this@entry=0x7fff72271db0) at ../../../../../chromeos-cache/distfiles/target/chrome-src-internal/src/base/message_loop/message_loop.cc:307#7 0x00007f30266bc847 in content::GpuMain (parameters=...) at ../../../../../chromeos-cache/distfiles/target/chrome-src-internal/src/content/gpu/gpu_main.cc:365#8 0x00007f30225cedee in content::RunNamedProcessTypeMain (process_type=..., main_function_params=..., delegate=0x7fff72272380 at ../../../../../chromeos-cache/distfiles/target/chrome-src-internal/src/content/app/content_main_runner.cc:385#9 0x00007f30225cef3a in content::ContentMainRunnerImpl::Run (this=0xdce106fef50) at ../../../../../chromeos-cache/distfiles/target/chrome-src-internal/src/content/app/content_main_runner.cc:763#10 0x00007f30225cd551 in content::ContentMain (params=...) at ../../../../../chromeos-cache/distfiles/target/chrome-src-internal/src/content/app/content_main.cc:19#11 0x00007f3021fef02a in ChromeMain (argc=21, argv=0x7fff722724b8) at ../../../../../chromeos-cache/distfiles/target/chrome-src-internal/src/chrome/app/chrome_main.cc:66#12 0x00007f301fa0bf40 in __libc_start_main (main=0x7f3021fee760 <main(int, char const**)>, argc=21, argv=0x7fff722724b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,stack_end=0x7fff722724a8) at libc-start.c:292#13 0x00007f3021feee95 in _start ()(lumpy-gdb)Example 2:$ gdb-daisy --pid=626 --remote=123.45.98.76514:50:07: INFO: RunCommand: ping -c 1 -w 20 123.45.98.76514:50:09: INFO: RunCommand: file /build/daisy/usr/sbin/cryptohomed14:50:10: INFO: RunCommand: armv7a-cros-linux-gnueabi-gdb --quiet '--eval-command=set sysroot /build/daisy' '--eval-command=set solib-absolute-prefix /build/daisy' '--eval-command=set solib-search-path /build/daisy' '--eval-command=set debug-file-directory /build/daisy/usr/lib/debug' '--eval-command=set prompt (daisy-gdb) ' '--eval-command=file /build/daisy/usr/sbin/cryptohomed' '--eval-command=target remote localhost:38080'Reading symbols from /build/daisy/usr/sbin/cryptohomed...Reading symbols from/build/daisy/usr/lib/debug/usr/bin/cryptohomed.debug...done.(daisy-gdb)Example 3:$ gdb-lumpy --remote=:vm: --attach=browser15:18:28: INFO: RunCommand: ping -c 1 -w 20 localhost15:18:31: INFO: RunCommand: file /build/lumpy/opt/google/chrome/chrome15:18:33: INFO: RunCommand: x86_64-cros-linux-gnu-gdb --quiet '--eval-command=setsysroot /build/lumpy' '--eval-command=set solib-absolute-prefix /build/lumpy' '--eval-command=set solib-search-path /build/lumpy' '--eval-command=set debug-file-directory /build/lumpy/usr/lib/debug' '--eval-command=set prompt (lumpy-gdb) ' '--eval-command=file /build/lumpy/opt/google/chrome/chrome' '--eval-command=target remote localhost:48062'Reading symbols from /build/lumpy/opt/google/chrome/chrome...Reading symbols from /build/lumpy/usr/lib/debug/opt/google/chrome/chrome.debug...done.done.Remote debugging using localhost:48062...(lumpy-gdb)If you find problems with the board-specific gdb scripts, please file a bug (crosbug.com) and add 'build-toolchain' as one of the labels in the bug.TroubleshootingI lost my developer tools on the stateful partition, can I get them back?This happens sometimes because the security system likes to wipe out the stateful partition and a lot of developer tools are in /usr/local/bin. But all is not lost because there is a tool for updating the stateful partition from an image created by the auto-update part of the dev_server. Sadly, it is normally found in /usr/local so will have been lost too and you need to copy it over manually. This works for me:$ cd /tmp$ scp me@myworkstation:/path/to/chromiumos/chroot/build/x86-whatever/usr/bin/stateful_update .$ sudo sh stateful_update$ sudo rebootNote you can clobber the stateful partition (remove user accounts etc and force OOBE) as part of this process by using a flag:$ cd /tmp$ scp me@myworkstation:/path/to/chromiumos/chroot/build/x86-whatever/usr/bin/stateful_update .$ sudo sh stateful_update --stateful_change=clean$ sudo rebootRunning TestsMany of the automated tests that are part of the Chromium OS project run using the autotest framework. See Autotest User Documentation for details.Various quick links:Creating a new testRunning Smoke Suite On a VM ImageSeeing which tests are implemented by an ebuildGetting an image that has been modified for testThis doesn't work if you want to create a recovery image and boot a Cr48 with it, see belowIf you wish to produce a VM image instead, you should omit theflag toand letproduce the test image:./image_to_vm.sh --board=${BOARD} --test_imageNote: this difference between `cros flash` and ./image_to_vm.sh arises because ./image_to_vm.sh does not yet support the --image_name flag and by default looks for chromiumos_image.bin. We expect this to change in the future.Note that creating a test image will change the root password of the image to test0000. The --test_image flag causes the image_to_xxx commands to make a copy of your chromiumos_image.bin file called chromiumos_test_image.bin (if that file doesn't already exist), modify that image for test, and use the test image as the source of the command.SIDE NOTES:If the directory already has a file called chromiumos_test_image.bin, that file is reused. That means that calling both cros flash and image_to_vm.sh doesn't waste time by creating the test image twice.Creating a recovery image that has been modified for testAfter building a test image usingas described above, you may wish to encapsulate it within a recovery image:./mod_image_for_recovery.sh \ --board=${BOARD} \ --nominimize_image \ --image ~/trunk/src/build/images/${BOARD}/latest/chromiumos_test_image.bin \ --to ~/trunk/src/build/images/${BOARD}/latest/recovery_test_image.binIf desired, you may specify a custom kernel with --kernel_image ${RECOVERY_KERNEL}.You can write this recovery image out to the USB device like so:cros flash usb:// ~/trunk/src/build/images/${BOARD}/latest/recovery_test_image.binNote that there are some downsides to this approach which you should keep in mind.Your USB image will be a recovery mode/test image, but the ordinary image in your directory will be a non-test image.If you use devserver, this will serve the non-test image not the test-image.This means a machine installed with a test-enabled USB image will update to a non-test-enabled one.Additional informationToolchain CompilersAt any given time in the chroot, to see what cross-compiler version is the current default one, do:For ARM: armv7a-cros-linux-gnueabi-gcc -vFor x86: i686-pc-linux-gnu-gcc -vFor amd64: x86_64-cros-linux-gnu-gcc -vDeveloper modeIt can be confusing to figure out what "developer mode" means: Some parts of this document talk about switching your hardware to developer mode, while other parts talk about entering developer mode by running an image built with the --withdev flag. For the most part, the two actions enable the same set of things (like the shell command in crosh). Thus, you can think of either action as enabling developer mode.To provide some details:Putting your hardware into developer mode makes /bin/cros_boot_mode print developer. It also makes the file /mnt/stateful_partition/.developer_mode appear.Building with the --withdev flag creates a file called /root/.dev_mode (in addition to adding a whole bunch of useful developer tools to your stateful partition). The presence of the /root/.dev_mode file enables developer mode and also prevents wiping of the stateful partition when you switch your hardware between developer mode and release mode.Attribution requirementsWhen you produce a Chromium OS image, you need to fulfill various attribution requirements of third party licenses. Currently, the images generated by a build don't do this for you automatically. You must modify ~/chromium/src/chrome/browser/resources/chromeos/about_os_credits.html.Documentation on this siteYou now understand the basics of building, running, modifying, and testing Chromium OS, but you've still got a lot to learn. Here are links to a few other pages on the chromium.org site that you are likely to find helpful (somewhat ordered by relevance):The Tips And Tricks for Chromium OS Developers page has a lot of useful information to help you optimize your workflow.If you haven't read the page about the devserver already, read it now.Learn about the Chromium OS directory structure.The Chromium OS developer FAQChromium OS Portage Build FAQ is useful for portage-specific questions.If you have questions about the --noenable_rootfs_verification option, you might find answers on this thread on chromium-os-dev.Running Smoke Suite on a VM Image has good information about how to get up and running with autotest tests and VMs.Debugging Tips contains information about how to debug the Chromium browser on your Chromium OS device.Working on a Branch has tips for working on branches.Git server-side information talks about adding new git repositories.The Portage Package Upgrade Process documents how our Portage packages can be upgraded when they fall out of date with respect to upstream.The Chromium OS Sandboxing page describes the mechanisms and tools used to sandbox (or otherwise restrict the privileges of) Chromium OS system services.The Go in Chromium OS page provides information on using Go in Chromium OS, including recommendations for project organization, importing and managing third party packages, and writing ebuilds.External documentationBelow are a few links to external sites that you might also find helpful (somewhat ordered by relevance):Definitely look at the Chromium OS dev group to see what people are talking about.Check out the Chromium OS bug tracker to report bugs, look for known issues, or look for things to fix.Get an idea of what's actively happening by looking at the Chromium Code Reviews site. (Note that this is the combined site for both Chromium and Chromium OS.)Browse the source code on the Chromium OS gitweb.Check the current status of the builds by looking at the Chromium OS build waterfall.Check out the #chromium-os channel on freenode.net (this is the IRC channel that Chromium OS developers like to hang out on).If you're learning git, check out Git for Computer Scientists, Git Magic, or the Git Manual.Gentoo has several useful documentation resourcesGentoo Development Guide is a useful resource for Portage, which is the underlying packaging system we use.Gentoo Embedded HandbookGentoo Cross Development GuideGentoo Wiki on Cross-CompilingGentoo Package Manager SpecificationThe repo man page might help you if you're curious about repo.The repo-discuss group is a good place to talk about repo.

Feedbacks from Our Clients

Easy to use, which made getting my work done much easier then I thought. Thank you!

Justin Miller