This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from n0xa/develop
Merge Develop Into Main
- Loading branch information
Showing
17 changed files
with
723 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
FROM python:3.6-slim | ||
|
||
ENV PYTHONBUFFERED=1 | ||
|
||
# Install required packages and tools | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
curl \ | ||
bash \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/bin sh | ||
|
||
# Ensure pip is installed and upgrade it | ||
RUN python3 -m ensurepip | ||
RUN pip3 install --no-cache --upgrade pip setuptools pyserial esptool | ||
|
||
# Install 32-bit C++ standard library | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
lib32stdc++6 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install m5stack boards | ||
COPY ./package_m5stack_index.json /package_m5stack_index.json | ||
RUN arduino-cli core install m5stack:esp32 --additional-urls "file:///package_m5stack_index.json" --log-level warn --verbose | ||
|
||
RUN arduino-cli core search m5stack | ||
RUN arduino-cli board listall | ||
# | ||
# Create a directory for the prerequisites script | ||
RUN mkdir -p /deauth_prerequisites | ||
COPY ./deauth_prerequisites/install_prerequisites_Linux.sh /deauth_prerequisites/install_prerequisites_linux.sh | ||
|
||
# Make the script executable | ||
RUN chmod +x /deauth_prerequisites/install_prerequisites_linux.sh | ||
|
||
# Run the script | ||
RUN /deauth_prerequisites/install_prerequisites_linux.sh | ||
|
||
ARG LIBRARIES | ||
|
||
# Install required libraries | ||
RUN arduino-cli lib install $LIBRARIES --log-level warn --verbose | ||
|
||
COPY ./scripts/compile.sh /compile.sh | ||
RUN chmod +x /compile.sh | ||
|
||
COPY ./scripts/entrypoint.sh ./entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export LOCALE="en-us" | ||
export NAME="M5Cardputer" | ||
export FQBN="m5stack:esp32:m5stack_cardputer" | ||
export EXTRA_FLAGS="-DCARDPUTER" | ||
export LIBRARIES="M5Cardputer IRRemoteESP8266 M5Stack-SD-Updater M5Unified" | ||
export BOOTLOADER_ADDR="0x0000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export LOCALE="en-us" | ||
export NAME="M5StickC" | ||
export FQBN="m5stack:esp32:m5stack_stickc" | ||
export EXTRA_FLAGS="-DSTICK_C" | ||
export LIBRARIES="M5StickC@0.2.8 IRRemoteESP8266 M5Stack-SD-Updater M5Unified" | ||
export BOOTLOADER_ADDR="0x1000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export LOCALE="en-us" | ||
export NAME="M5StickCPlus" | ||
export FQBN="m5stack:esp32:m5stack_stickc_plus" | ||
export EXTRA_FLAGS="-DSTICK_C_PLUS" | ||
export LIBRARIES="M5StickCPlus IRRemoteESP8266 M5Stack-SD-Updater M5Unified" | ||
export BOOTLOADER_ADDR="0x1000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export LOCALE="en-us" | ||
export NAME="M5StickCPlus2" | ||
export FQBN="m5stack:esp32:m5stack_stickc_plus2" | ||
export EXTRA_FLAGS="-DSTICK_C_PLUS2" | ||
export LIBRARIES="M5StickCPlus2 IRRemoteESP8266 M5Stack-SD-Updater M5Unified" | ||
export BOOTLOADER_ADDR="0x1000" |
File renamed without changes.
102 changes: 51 additions & 51 deletions
102
...H Prerequisites/install-prerequisites.bat → ...h_prerequisites/install-prerequisites.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
set "baseFolder=%localappdata%\Arduino15\packages\m5stack\hardware\esp32" | ||
|
||
rem Find the latest version of the folder | ||
set "latestVersion=" | ||
for /d %%I in ("%baseFolder%\*") do ( | ||
set "latestVersion=%%~nxI" | ||
) | ||
|
||
if not defined latestVersion ( | ||
echo No version found. | ||
pause | ||
exit /b | ||
) | ||
|
||
rem Full path to the file to be edited | ||
set "file=%baseFolder%\%latestVersion%\platform.txt" | ||
set "backupFile=%baseFolder%\%latestVersion%\platform.txt.bkp" | ||
set "prefix=build.extra_flags.esp32" | ||
set "option= -w" | ||
|
||
set "prefix2=compiler.c.elf.libs.esp32" | ||
set "option2= -zmuldefs" | ||
|
||
set "readyMark=##NEMO_DEAUTH_READY##" | ||
|
||
rem Check if the ready mark already exists in the file | ||
findstr /C:"%readyMark%" "%file%" >nul | ||
if %errorlevel% equ 0 ( | ||
echo The file is already OK. | ||
pause | ||
exit /b | ||
) | ||
|
||
rem Create a backup copy of the original file | ||
copy "%file%" "%backupFile%" | ||
|
||
rem Use PowerShell to edit the file | ||
powershell -Command "(Get-Content '%file%') | ForEach-Object { $_ -replace ('^(%prefix%.*?)$', '$1%option%') -replace ('^(%prefix2%.*?)$', '$1%option2%') } | Set-Content '%file%'" | ||
|
||
rem Add the ready mark to the end of the file | ||
echo %readyMark%>> "%file%" | ||
|
||
rem Open the latest version of the folder in Windows Explorer | ||
start explorer "%baseFolder%\%latestVersion%" | ||
|
||
echo Done. | ||
pause | ||
|
||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
set "baseFolder=%localappdata%\Arduino15\packages\m5stack\hardware\esp32" | ||
|
||
rem Find the latest version of the folder | ||
set "latestVersion=" | ||
for /d %%I in ("%baseFolder%\*") do ( | ||
set "latestVersion=%%~nxI" | ||
) | ||
|
||
if not defined latestVersion ( | ||
echo No version found. | ||
pause | ||
exit /b | ||
) | ||
|
||
rem Full path to the file to be edited | ||
set "file=%baseFolder%\%latestVersion%\platform.txt" | ||
set "backupFile=%baseFolder%\%latestVersion%\platform.txt.bkp" | ||
set "prefix=build.extra_flags.esp32" | ||
set "option= -w" | ||
|
||
set "prefix2=compiler.c.elf.libs.esp32" | ||
set "option2= -zmuldefs" | ||
|
||
set "readyMark=##NEMO_DEAUTH_READY##" | ||
|
||
rem Check if the ready mark already exists in the file | ||
findstr /C:"%readyMark%" "%file%" >nul | ||
if %errorlevel% equ 0 ( | ||
echo The file is already OK. | ||
pause | ||
exit /b | ||
) | ||
|
||
rem Create a backup copy of the original file | ||
copy "%file%" "%backupFile%" | ||
|
||
rem Use PowerShell to edit the file | ||
powershell -Command "(Get-Content '%file%') | ForEach-Object { $_ -replace ('^(%prefix%.*?)$', '$1%option%') -replace ('^(%prefix2%.*?)$', '$1%option2%') } | Set-Content '%file%'" | ||
|
||
rem Add the ready mark to the end of the file | ||
echo %readyMark%>> "%file%" | ||
|
||
rem Open the latest version of the folder in Windows Explorer | ||
start explorer "%baseFolder%\%latestVersion%" | ||
|
||
echo Done. | ||
pause | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.