summaryrefslogtreecommitdiff
path: root/docs/zephyr_build.md
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /docs/zephyr_build.md
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14528.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'docs/zephyr_build.md')
-rw-r--r--docs/zephyr_build.md164
1 files changed, 0 insertions, 164 deletions
diff --git a/docs/zephyr_build.md b/docs/zephyr_build.md
deleted file mode 100644
index 5a3c809724..0000000000
--- a/docs/zephyr_build.md
+++ /dev/null
@@ -1,164 +0,0 @@
-# Building Zephyr OS
-
-[TOC]
-
-Chromium OS EC uses the `zmake` tool to build Zephyr.
-
-This section describes how to build and use zmake.
-
-## Syncing the source
-
-N.B. The Zephyr build relies on multiple repos and tools which get installed as
-packages into the chroot. This means that partial syncs are not supported
-(i.e. just doing `repo sync .` in platform/ec). You must run
-`~/trunk/src/scripts/update_chroot` frequently, ideally each time you do a full
-repo sync. This will update zmake and the repos in src/third_party/zephyr
-
-
-## Working inside the chroot
-
-### Install zmake
-
-The `zephyr-build-tools` ebuild builds and installed zmake. This should happen
-automatically, with the caveat above.
-
-To do this manually and run tests:
-
-```bash
-FEATURE=test sudo -E emerge zephyr-build-tools
-```
-
-
-### Building
-
-You can build zephyr with:
-
-```bash
-emerge-volteer chromeos-zephyr
-```
-
-For local development you can run zmake directly; see instruction below.
-
-## Working outside the chroot
-
-Running outside the Chromium OS chroot is useful for upstream work and for
-those using the EC outside the Chromium OS.
-
-
-### Remove west, if installed [b/184654974](http://b/184654974)
-
-Zephyr's Cmake system will try to attach itself to the west tool if it finds it
-installed, conflicting with manual cmake invocations. If you installed west,
-you'll need to remove it:
-
-```bash
-python3 -m pip uninstall west
-```
-
-
-### Install zmake
-
-You can install zmake with pip:
-
-```bash
-cd ~/chromiumos/src/platform/ec
-python3 -m pip install -e zephyr/zmake --user
-```
-
-Ensure that ~/.local/bin in on your PATH
-
-You may also need to install these items:
-
-```bash
-sudo apt-get install cmake ninja-build python3-pyelftools gcc-multilib \
- python3-pykwalify python3-colorama python3-testfixtures
-```
-
-You must reinstall zmake after any `repo sync` since new features may have been
-added that are needed by the build.
-
-
-### Install binman
-
-First build pylibfdt:
-
-```bash
-cd somewhere
-sudo apt-get install flex bison swig
-git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git
-cd dtc
-make
-make install PREFIX=~/.local # You can install this where it suits
-```
-
-If you have a Chromium OS checkout then you should do:
-
-```bash
-cd ~/.local/bin
-ln -s ~/chromiumos/src/third_party/u-boot/files/tools/binman/binman
-```
-
-otherwise:
-
-```bash
-cd somewhere
-git clone https://source.denx.de/u-boot/u-boot.git
-cd ~/.local/bin
-ln -s somewhere/u-boot/tools/binman/binman
-```
-
-As above, ensure that `~/.local/bin` in on your PATH
-
-
-### Building
-
-You can use `zmake help` to obtain help on how to use zmake. The following is
-a rough guide.
-
-First configure the build with the project you want:
-
-```bash
-# Use -t zephyr when running outside chroot
-
-zmake configure -B /tmp/z/vol zephyr/projects/volteer/volteer/ -t zephyr
-```
-
-If you are building for posix-ec, change the default toolchain to host to make
-it use the native system one instead of llvm. Make sure to start with a clean
-build directory if zmake returns any build error:
-
-```bash
-zmake configure -B /tmp/posix zephyr/projects/posix-ec -t host
-```
-
-Then build with just the target directory:
-
-```
-zmake build /tmp/z/vol
-```
-
-The output is in that directory:
-
-* `output/zephyr.bin` - output binary (read-only and read-write packed
- together)
-* `output/zephyr.ro.elf` - read-only ELF for debugging
-* `output/zephyr.rw.elf` - read-write ELF for debugging
-
-You might also find these files useful (using read-only as an example):
-
-* `build-ro/zephyr/.config` - Kconfig options selected
-* `build-ro/zephyr/include/generated/devicetree_unfixed.h` - the (large)
- header file that zephyr uses to provide devicetree information to the C code
-* `build-ro/zephyr/zephyr.dts` - devicetree that is used
-* `build-ro/zephyr/zephyr.dts` - map of image
-
-
-### Looking at the Kconfig
-
-It should be possible to do this with:
-
-```bash
-ninja -C /tmp/z/vol/build-ro menuconfig
-```
-
-However at present this does not work [b/184662866](http://b/184662866).