diff --git a/README.md b/README.md index a0d02e78c..d8721fa52 100644 --- a/README.md +++ b/README.md @@ -135,27 +135,30 @@ See ### Linux -You'll need to install these (Ubuntu 20.04): +All steps you need to install and run the Coldcard simulator on Ubuntu 20.04: -```shell -apt install build-essential git python3 python3-pip libudev-dev gcc-arm-none-eabi libffi-dev xterm swig libpcsclite-dev python-is-python3 autoconf libtool -``` - -Install and run simulator on Ubuntu 20.04 ```shell +# Install (system) requirements, tools and libraries +apt install build-essential git python3 python3-pip libudev-dev gcc-arm-none-eabi libffi-dev xterm swig libpcsclite-dev python-is-python3 autoconf libtool python3-venv + +# Get sources, this takes a long time (because of external libraries), then open git clone --recursive https://github.com/Coldcard/firmware.git cd firmware -# apply address patch -git apply unix/linux_addr.patch -# create virtualenv and activate it + +# Apply address patch +git apply unix/linux_addr.patch + +# Create Python virtual environment and activate it python3 -m venv ENV # or virtualenv -p python3 ENV source ENV/bin/activate -# install dependencies + +# Install dependencies pip install -U pip setuptools pip install -r requirements.txt #general requirements pip install pysdl2-dll # Ubuntu needs this dependency -# build simulator + +# Build the Coldcard simulator cd unix pushd ../external/micropython/mpy-cross/ make # mpy-cross @@ -163,7 +166,14 @@ popd make setup make ngu-setup make -# below line runs the simulator + +# Run the simulator in the active virtualenv +./simulator.py + +# Later, if you want to run it (after a reboot). This assumes you extracted the git repo in ~ (home) +cd ~/firmware +source ENV/bin/activate +cd unix ./simulator.py ```