Chciałem podzielić się swoją konfiguracją oraz zapytać o pewną kwestię dotyczącą kompilacji wsadu dla Sonoff Dual R3.
Udało mi się przygotować dockera na Ubuntu 18.04, w którym znajdują się skrypty Supla wraz ze wsparciem SSH, umożliwiającym pracę w Visual Studio Code. Początkowo napotkałem trochę trudności, ale po ich rozwiązaniu całość startuje prawidłowo i kompiluje się ze źródeł.
Moje wątpliwości dotyczą kompilacji wsadu. Po wywołaniu komendy `./build.sh sonoff dual` na wyjściu otrzymuję jedynie dwa pliki binarne:
Code: Select all
!!!
335527840
335527841
Support boot_v1.2 and +
Generate user1.1024.new.2.bin successully in folder bin/upgrade.
boot.bin------------>0x00000
user1.1024.new.2.bin--->0x01000
!!!
Z góry dzięki za każdą wskazówkę!
Pozdrawiam,
Mateusz

Dockerfile:
Code: Select all
# docker build -t supla_container:v2 .
# docker run -it --gpus=all --rm -p 2200:22 4aec47d540ef55595e8e4c893018af6e371b863d6b49abcb5123381aad3130ca bin/bash
FROM ubuntu:18.04
# Install packages and dependencies
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
curl \
build-essential \
zlib1g-dev \
libssl-dev \
libffi-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
python3 \
python3-pip \
python3-venv \
python3-dev \
openssh-server \
git \
vim \
wget \
screen
# Install Python 2.7.18 with SSL support
RUN cd /tmp && \
curl -O https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz && \
tar xzf Python-2.7.18.tgz && \
cd Python-2.7.18 && \
./configure --prefix=/usr/local --enable-optimizations && \
make -j$(nproc) && \
make altinstall
# Symlink 'python' to 'python2.7'
RUN ln -sf /usr/local/bin/python2.7 /usr/bin/python
# Install pip for Python 2.7
RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py && \
python get-pip.py
# Install esptool using Python 2.7
RUN pip install esptool
RUN mkdir /hdd2
RUN if uname -m | grep x86_64; then \
cd /hdd2 && \
wget https://www.acsoftware.pl/files/Espressif_x64-docker.tgz && \
tar zxvf Espressif_x64-docker.tgz && \
rm Espressif_x64-docker.tgz && \
cd / && \
wget https://www.acsoftware.pl/files/supla-esp-signtool.tgz && \
tar zxvf supla-esp-signtool.tgz && \
cp -r supla-esp-signtool/* / && \
rm -r supla-esp-signtool*; \
else \
cd /hdd2 && \
wget https://www.acsoftware.pl/files/Espressif_x86-docker.tgz && \
tar zxvf Espressif_x86-docker.tgz && \
rm Espressif_x86-docker.tgz; \
fi
WORKDIR /CProjects/
RUN git clone https://github.com/SUPLA/supla-espressif-esp.git
WORKDIR /CProjects/supla-espressif-esp
# Set up SSH
RUN echo 'root:Docker!' | chpasswd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# Create startup script
RUN echo "#!/bin/bash" > /usr/bin/startup.sh && \
echo "service ssh start & sleep infinity" >> /usr/bin/startup.sh && \
chmod 777 /usr/bin/startup.sh
ENTRYPOINT [ "/usr/bin/startup.sh" ]