2019-08-08 09:12:17 +00:00
# Build
2022-07-11 13:42:38 +00:00
_Building for Trezor Model One? See the [legacy ](../../legacy/index.md ) documentation._
2020-02-10 12:05:41 +00:00
## New Project
2019-08-08 09:12:17 +00:00
Run the following to checkout the project:
```sh
2020-02-10 12:05:41 +00:00
git clone --recurse-submodules https://github.com/trezor/trezor-firmware.git
2020-10-22 20:14:03 +00:00
cd trezor-firmware
poetry install
cd core
2019-08-08 09:12:17 +00:00
```
2020-02-10 12:05:41 +00:00
After this you will need to install some software dependencies based on what flavor
of Core you want to build. You can either build the Emulator or the actual firmware
running on ARM devices. Emulator (also called _unix_ port) is a unix version that can
run on your computer. See [Emulator ](../emulator/index.md ) for more information.
## Existing Project
If you are building from an existing checkout, do not forget to refresh the submodules
2020-09-25 14:21:23 +00:00
and the poetry environment:
2019-08-08 09:12:17 +00:00
```sh
2020-02-10 12:05:41 +00:00
git submodule update --init --recursive --force
2023-04-24 12:43:19 +00:00
poetry install --sync
2019-08-08 09:12:17 +00:00
```
2020-09-25 14:21:23 +00:00
## Poetry
2019-08-08 09:12:17 +00:00
2020-09-25 14:21:23 +00:00
We use [Poetry ](https://python-poetry.org/ ) to install and track Python dependencies. You need to install it, sync the packages and then use `poetry run` for every command or enter `poetry shell` before typing any commands. **The commands in this section suppose you are in a `poetry shell` environment!**
2019-08-08 09:12:17 +00:00
```sh
2020-09-25 14:21:23 +00:00
sudo pip3 install poetry
poetry install
poetry shell
2019-08-08 09:12:17 +00:00
```