Skip to content
Draft
Show file tree
Hide file tree
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
15 changes: 15 additions & 0 deletions rasbian-image/docker-compose.everest-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3"

services:
everest-core:
container_name: everest-core
build:
dockerfile: "everest-core.dockerfile"
# deploy:
# resources:
# limits:
# cpus: "4"
# memory: "1024M"

stdin_open: true
tty: true
21 changes: 21 additions & 0 deletions rasbian-image/docker-compose.qemu-raspbian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3"
services:
qemu:
container_name: qemu-raspbian
image: qemux/qemu-arm
volumes:
- /path/to/1688039802-2023-06-29-belaybox.img:/storage/boot.iso
environment:
# BOOT: "https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/aarch64/alpine-virt-3.19.1-aarch64.iso"
KVM: "N"
# RAM_SIZE: "2G"
# CPU_CORES: "4"
# DISK_SIZE: "64G"
# devices:
# - /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8006:8006
stop_grace_period: 2m
restart: on-failure
15 changes: 15 additions & 0 deletions rasbian-image/docker-compose.raspbian-dockerpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3"

services:
raspbian-everest:
container_name: raspbian-everest
image: lukechilds/dockerpi:vm
volumes:
- /path/to/1688039802-2023-06-29-belaybox.img:/sdcard/filesystem.img
# deploy:
# resources:
# limits:
# cpus: "4"
# memory: "1024M"
stdin_open: true
tty: true
15 changes: 15 additions & 0 deletions rasbian-image/docker-compose.raspbian-stretch-everest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3"

services:
raspbian-everest:
container_name: raspbian-everest
build:
dockerfile: "raspbian-everest.dockerfile"
# deploy:
# resources:
# limits:
# cpus: "4"
# memory: "1024M"

stdin_open: true
tty: true
63 changes: 63 additions & 0 deletions rasbian-image/everest-core.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
FROM ubuntu:latest

RUN apt update && apt-get install sudo curl -y

# setup clang format
RUN apt install clang-format-12 -y
RUN update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-12 100

# setup nodejs v21
RUN curl -fsSL https://deb.nodesource.com/setup_21.x | sudo -E bash - && sudo apt-get install -y nodejs

# install dependencies
RUN sudo apt install -y python3-pip git rsync wget cmake doxygen graphviz build-essential clang-tidy cppcheck openjdk-17-jdk \
libboost-all-dev libssl-dev libsqlite3-dev rfkill libpcap-dev libevent-dev pkg-config libcap-dev zip
# note, removed the following packages from this command: npm docker docker-compose nodejs curl

# install python dependencies
RUN python3 -m pip install --upgrade pip setuptools wheel jstyleson jsonschema

# download EDM source files
RUN git clone https://github.com/EVerest/everest-dev-environment.git

# install EDM
RUN cd everest-dev-environment/dependency_manager && python3 -m pip install .

# add /home/USER/.local/bin and CPM_SOURCE_CACHE to $PATH
ENV PATH=$PATH:/home/$(whoami)/.local/bin
ENV CPM_SOURCE_CACHE=$HOME/.cache/CPM

# setup EVerest workspace:
RUN cd everest-dev-environment/dependency_manager && edm init --workspace ~/checkout/everest-workspace

# install ev-cli
RUN cd ~/checkout/everest-workspace/everest-utils/ev-dev-tools && python3 -m pip install .

# install the required packages for ISO15118 communication
RUN cd ~/checkout/everest-workspace/Josev && python3 -m pip install -r requirements.txt

# build EVerest
RUN mkdir -p ~/checkout/everest-workspace/everest-core/build \
&& cd ~/checkout/everest-workspace/everest-core/build \
&& cmake .. \
&& make install

# download and untar the bullseye-toolchain
RUN wget http://build.pionix.de:8888/release/toolchains/bullseye-toolchain.tgz && tar xfz bullseye-toolchain.tgz
RUN rm bullseye-toolchain.tgz

# cross-compile by changing the given paths accordingly and build EVerest
RUN cd ~/checkout/everest-workspace/everest-core \
&& cmake \
-DCMAKE_TOOLCHAIN_FILE=/bullseye-toolchain/toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=/mnt/user_data/opt/everest \
-S . -B build-cross \
&& make -C build-cross \
&& make DESTDIR=./dist -C build-cross install
# && make -j$(nproc) -C build-cross \
# && make -j$(nproc) DESTDIR=./dist -C build-cross install

RUN cd ~/checkout/everest-workspace/everest-core/build-cross/dist/mnt/user_data/opt/ && \
zip -r /everest.zip everest

ENTRYPOINT ["/bin/bash"]
18 changes: 18 additions & 0 deletions rasbian-image/raspbian-everest.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM raspbian/stretch:latest

# copy everest binaries
COPY everest.zip /everest.zip

# add legacy sources
RUN rm /etc/apt/sources.list
COPY sources.list /etc/apt/sources.list

# install dependencies
RUN apt-get update && apt-get install zip -y

# unzip everest binaries into the recommended directory
RUN mkdir -p /mnt/user_data/opt/
RUN unzip everest.zip -d /mnt/user_data/opt/
RUN rm everest.zip

ENTRYPOINT ["/bin/sh"]
1 change: 1 addition & 0 deletions rasbian-image/sources.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deb http://legacy.raspbian.org/raspbian/ stretch main contrib non-free rpi firmware