Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 3 additions & 42 deletions docs/how-to/build.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to build the PandA image
# How to build the PandA boot image

## Prerequisites

Expand Down Expand Up @@ -64,47 +64,6 @@

A `boot-<machine>.zip` file is created in the current directory.

## Running in a container manually

For development work (e.g. FPGA builds requiring Vivado), a
`pandablocks-dev-container` image is published on the GitHub Container
Registry.

Pull it:

```bash
docker pull ghcr.io/pandablocks/pandablocks-dev-container:latest
```

Use a numbered tag instead of `latest` to pin a specific release.

Create three host directories:

- `REPO_DIR` — containing all PandA repositories
- `VIVADO_DIR` — containing a Vivado installation
- `BUILD_DIR` — an empty scratch directory

Run the container with those directories mounted:

```bash
docker run --rm --net=host -it \
-v REPO_DIR:/repos:Z \
-v BUILD_DIR:/build:Z \
-v VIVADO_DIR:/scratch/Xilinx \
ghcr.io/pandablocks/pandablocks-dev-container /bin/bash
```

:::{note}
The mount path for Vivado inside the container must match your local path.
For example, if Vivado is at `/FPGA/Xilinx` on the host use
`-v /FPGA/Xilinx:/FPGA/Xilinx` and edit `CONFIG` accordingly.
:::

In each repository inside the container:

```bash
cp CONFIG.example CONFIG
```

## Output files

Expand All @@ -120,3 +79,5 @@ cp CONFIG.example CONFIG
Copy these files to the SD card and insert it in the target; the system will
boot normally. On the first boot of a pandabox you will be prompted for a MAC
address.

To build the FPGA bitstream that can be used to make the firmware, see [PandABlocks-FPGA documentation](https://pandablocks.github.io/PandABlocks-FPGA/docs/)
Loading