It is possible to build Zephyr outside of the Chromium OS chroot, albeit with additional steps.
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:
python3 -m pip uninstall west
You can install zmake with pip:
cd ~/chromiumos/src/platform/ec python3 -m pip install -e zephyr/zmake --user
Ensure that ~/.local/bin is in your PATH.
You may also need to install these items:
sudo apt-get install cmake ninja-build python3-pyelftools gcc-multilib \ python3-pykwalify python3-colorama python3-testfixtures
First build pylibfdt:
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:
cd ~/.local/bin ln -s ~/chromiumos/src/third_party/u-boot/files/tools/binman/binman
otherwise:
cd somewhere git clone https://source.denx.de/u-boot/u-boot.git cd ~/.local/bin ln -s somewhere/u-boot/tools/binman/binman
If using the Zephyr toolchain (-t zephyr), follow the upstream documentation to install the Zephyr build tools.