From 2d565a688053751348db71d29868487e74aa87df Mon Sep 17 00:00:00 2001 From: Andrea Grandi Date: Tue, 15 Feb 2022 16:00:49 -0800 Subject: docs: Update "Getting Started Quickly" Instructions in this document have become out of date. Align the content with the "Chromium OS Developer Guide": - Add missing package to fix local build error with libusb header - Use ~/chromiumos folder for chroot to be consistent with dev guide - Set missing env variable $BOARD - Replace deprecated script ./build_pacakges - Remove minilayout and use stable branch to make the build more reliable BRANCH=none BUG=b:219082979 TEST=View of Markdown preview in VSCode Signed-off-by: Andrea Grandi Change-Id: I3fdac3b346098575a0957394e80052626ecbb551 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3466428 Reviewed-by: Bobby Casey Reviewed-by: Tom Hughes --- docs/getting_started_quickly.md | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/docs/getting_started_quickly.md b/docs/getting_started_quickly.md index f9808c76da..0ef88a328e 100644 --- a/docs/getting_started_quickly.md +++ b/docs/getting_started_quickly.md @@ -19,10 +19,11 @@ toolchain incompatibilities may require extra debug. 1. Install build / dev tools: ```bash - sudo apt-get install git libftdi-dev libusb-dev libncurses5-dev gcc-arm-none-eabi + sudo apt-get install git libftdi-dev libusb-dev libusb-1.0-0-dev \ + libncurses5-dev gcc-arm-none-eabi ``` -1. Sync the cros-ec git repo: +1. Clone the cros-ec git repo: ```bash git clone https://chromium.googlesource.com/chromiumos/platform/ec @@ -55,45 +56,55 @@ toolchain incompatibilities may require extra debug. Most boards are buildable, but some will fail due to dependencies on external binaries (such as [`futility`](#building-futility)). Also, some related tools (such as `flash_ec` and `servod`) must be run from the Chromium OS chroot. Here -is a set of steps to setup a minimal development environment to build EC images -from the Chromium OS chroot: +is a set of steps to setup a development environment to build EC images from the +Chromium OS chroot: 1. Create a folder for your chroot: ```bash - mkdir cros-src; cd cros-src + mkdir chromiumos; cd chromiumos ``` -1. Run +1. Initialize the checkout in the current directory: ```bash - repo init -u https://chromium.googlesource.com/chromiumos/manifest -g minilayout,firmware + repo init -u https://chromium.googlesource.com/chromiumos/manifest -b stable ``` -1. Run `repo sync`: + NOTE: The + [`-b stable` flag](https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_guide.md#Sync-to-Green) + only works for Googlers. Remove it if you are developing externally. + +1. Update the working tree to the latest version: ```bash repo sync -j ``` -1. Enter the chroot and enter your password for `sudo` if prompted: +1. Enter the chroot (type your password for `sudo` if prompted): ```bash - ./chromite/bin/cros_sdk + cros_sdk ``` +1. Select a target board + + ```bash + export BOARD= + ``` + + See previous section for recommendations. + 1. Set up your board: ```bash setup_board --board=${BOARD} ``` - (ex. `setup_board --board=glados`) - 1. Build EC: ```bash - ./build_packages --board=${BOARD} chromeos-ec + build_packages --board=${BOARD} chromeos-ec ``` 1. Now, EC images for any board can be built with: @@ -105,7 +116,7 @@ from the Chromium OS chroot: ## Building `futility` outside the chroot {#building-futility} If you want to build the `futility` host tool outside the normal Chrome OS -chroot self-contained environment, you can try the following +chroot self-contained environment, you can try the following: 1. Install futility build dependencies: -- cgit v1.2.1