Skip to content

Commit

Permalink
adapt to 'Retro Yao-Mio'
Browse files Browse the repository at this point in the history
  • Loading branch information
YobeZhou committed Apr 14, 2023
1 parent 2ffdbce commit d82a15d
Show file tree
Hide file tree
Showing 20 changed files with 1,105 additions and 50 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ jobs:

- name: Extract binaries from docker image
run: |
docker run --rm -v $(pwd)/build:/build retro-go:latest sh -c "cp /app/*.fw /build"
docker run --rm -v $(pwd)/build:/build retro-go:latest sh -c "cp /app/*.fw /build && cp /app/*.img /build"
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: build/*.fw
path: |
build/*.fw
build/*.img
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM espressif/idf:release-v4.3
FROM espressif/idf:release-v4.4

WORKDIR /app

Expand All @@ -7,11 +7,10 @@ ADD . /app
# RUN pip install -r requirements.txt

# Apply patches
RUN cd /opt/esp/idf && \
patch --ignore-whitespace -p1 -i "/app/tools/patches/panic-hook (esp-idf 4.2 and 4.3).diff" && \
patch --ignore-whitespace -p1 -i "/app/tools/patches/sdcard-fix (esp-idf 4.2 and 4.3).diff"
#RUN cd /opt/esp/idf && \
# patch --ignore-whitespace -p1 -i "/app/tools/patches/panic-hook (esp-idf 4.2 and 4.3).diff" && \
# patch --ignore-whitespace -p1 -i "/app/tools/patches/sdcard-fix (esp-idf 4.2 and 4.3).diff"

# Build
RUN . /opt/esp/idf/export.sh && \
python rg_tool.py --target=odroid-go release && \
python rg_tool.py --target=mrgc-g32 release
python rg_tool.py --target=yao-mio release
3 changes: 2 additions & 1 deletion base.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/components")
if (DEFINED "RG_TARGET_ESPLAY_S3")
#if (DEFINED "RG_TARGET_ESPLAY_S3")
if (("$ENV{RG_BUILD_TARGET}" STREQUAL "ESPLAY_S3") OR ("$ENV{RG_BUILD_TARGET}" STREQUAL "YAO_MIO"))
message("SDKCONFIG_DEFAULTS: ${CMAKE_CURRENT_LIST_DIR}/baseS3.sdkconfig")
set(SDKCONFIG_DEFAULTS "${CMAKE_CURRENT_LIST_DIR}/baseS3.sdkconfig")
else()
Expand Down
33 changes: 29 additions & 4 deletions baseS3.sdkconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
# CONFIG_ESPTOOLPY_NO_STUB is not set
# CONFIG_ESPTOOLPY_OCT_FLASH is not set
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
Expand All @@ -105,12 +105,12 @@ CONFIG_ESPTOOLPY_FLASHFREQ="80m"
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
CONFIG_ESPTOOLPY_BEFORE_RESET=y
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
Expand Down Expand Up @@ -856,3 +856,28 @@ CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
CONFIG_SUPPORT_TERMIOS=y
CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
# End of deprecated options


#
# Misc
#
# ODROID-GO partition table doesn't use any checksum
CONFIG_PARTITION_TABLE_MD5=n
CONFIG_APP_BUILD_BOOTLOADER=n

#
# HTTP Server
#
CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024
CONFIG_HTTPD_MAX_URI_LEN=1024
CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
CONFIG_HTTPD_PURGE_BUF_LEN=32
# CONFIG_HTTPD_LOG_PURGE_DATA is not set
# CONFIG_HTTPD_WS_SUPPORT is not set
# end of HTTP Server


# TLS
# Not ideal but I don't want to deal with CAs right now :(
CONFIG_ESP_TLS_INSECURE=y
CONFIG_ESP_TLS_SKIP_SERVER_CERT_VERIFY=y
4 changes: 2 additions & 2 deletions components/retro-go/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(COMPONENT_SRCDIRS ". fonts libs/netplay libs/lodepng")
set(COMPONENT_ADD_INCLUDEDIRS ". libs/netplay libs/lodepng")
set(COMPONENT_SRCDIRS ". fonts libs/netplay libs/lodepng libs/es8311")
set(COMPONENT_ADD_INCLUDEDIRS ". libs/netplay libs/lodepng libs/es8311")

# esp-idf 4.1 - 4.4
set(COMPONENT_REQUIRES "spi_flash fatfs app_update esp_adc_cal json nvs_flash esp_wifi esp_http_client")
Expand Down
4 changes: 3 additions & 1 deletion components/retro-go/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "targets/mrgc-gbm/config.h"
#elif defined(RG_TARGET_ESPLAY_MICRO)
#include "targets/esplay-micro/config.h"
#elif defined(RG_TARGET_YAO_MIO)
#include "targets/yao-mio/config.h"
#else
#warning "No target defined. Defaulting to ODROID-GO."
#include "targets/odroid-go/config.h"
Expand Down Expand Up @@ -50,7 +52,7 @@
#endif

#ifndef RG_BUILD_USER
#define RG_BUILD_USER "ducalex"
#define RG_BUILD_USER "100ASK"
#endif

#ifndef RG_RECOVERY_BTN
Expand Down
Loading

0 comments on commit d82a15d

Please sign in to comment.