mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
feat: add Dockerfile for development environment
- Debian 13 (trixie) based with sdcc 4.5.0 from apt - Includes gcc, make, xxd, python3, libjson-c-dev, golang-go - Add .dockerignore to exclude build artifacts - Add Docker usage section to README (collapsible)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
.git/
|
||||
.gitignore
|
||||
.gitattributes
|
||||
.github/
|
||||
output/
|
||||
installer/output/
|
||||
*.bin
|
||||
html_data.c
|
||||
html_data.h
|
||||
*.o
|
||||
*.rel
|
||||
*.lst
|
||||
*.sym
|
||||
*.asm
|
||||
*.ihx
|
||||
*.img
|
||||
*.map
|
||||
*.mem
|
||||
*.lk
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
FROM debian:13-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
make \
|
||||
gcc \
|
||||
sdcc \
|
||||
xxd \
|
||||
python3 \
|
||||
libjson-c-dev \
|
||||
golang-go \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# git safe.directory for mounted repos (Makefile uses git describe)
|
||||
RUN git config --global --add safe.directory /workspace
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
CMD ["bash"]
|
||||
@@ -60,6 +60,42 @@ still has an older version of sdcc, but you will need sdcc version 4.5 for the c
|
||||
sudo apt install make gcc sdcc xxd python-is-python3 libjson-c-dev
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>If using Docker (click to expand)</summary>
|
||||
|
||||
A Dockerfile is provided for a reproducible build environment:
|
||||
|
||||
```
|
||||
docker build -t rtlplayground-dev .
|
||||
```
|
||||
|
||||
Build the firmware (replace MACHINE with your target, e.g. `DEFAULT_8C_1SFP`):
|
||||
|
||||
```
|
||||
docker run --rm -v $(pwd):/workspace rtlplayground-dev make MACHINE=DEFAULT_8C_1SFP
|
||||
```
|
||||
|
||||
The resulting `.bin` file appears in `output/` on your host.
|
||||
|
||||
Build host tools only:
|
||||
|
||||
```
|
||||
docker run --rm -v $(pwd):/workspace rtlplayground-dev make -C tools
|
||||
```
|
||||
|
||||
Run the web-interface simulator locally:
|
||||
|
||||
```
|
||||
docker run --rm -p 8080:8080 -v $(pwd):/workspace rtlplayground-dev \
|
||||
tools/output/httpd_sim /workspace/html
|
||||
```
|
||||
|
||||
Edit `machine.h` or `config.txt` on your host, then re-run `make` — the
|
||||
source directory is mounted into the container, so changes take effect
|
||||
immediately. To build for a different machine, pass `MACHINE=...`.
|
||||
|
||||
</details>
|
||||
|
||||
## (1) Compiling for direct chip flashing AND upgrading an existing RTLPlayground running device
|
||||
|
||||
Edit machine.h with an editor like vi or nano. Select the correct machine the firmware should build for.
|
||||
|
||||
Reference in New Issue
Block a user