Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd-esp32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
workflow_dispatch:

jobs:
#ESP32 Build
#ESP32 Build
build-esp-idf-component:
name: ESP-IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }} ${{ matrix.compile_example }}
runs-on: ubuntu-latest
Expand All @@ -20,7 +20,7 @@ jobs:
# See https://hub.docker.com/r/espressif/idf/tags and
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
# for details.
idf_ver: ["release-v5.5"]
idf_ver: ["latest"]
idf_target: ["esp32"]
compile_example: ["cloud"]
platforms:
Expand Down
4 changes: 2 additions & 2 deletions aether/meta/function_signature.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ template <typename Ret, typename... Args>
struct FunctionSignatureImpl {
using ret = Ret;
using args = TypeList<Args...>;
using signature = ret(args...);
using func_ptr = ret (*)(args...);
using signature = ret(args, ...);
using func_ptr = ret (*)(args, ...);
};

template <typename R, typename... Args>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y

# 3. Disabling logs (UART is the main brake at startup)
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
CONFIG_LOG_MAXIMUM_LEVEL_0=y

# 4. Radio and Wi-Fi (No-NVS mode)
# Moving PHY calibration to RTC RAM (removes Flash access)
Expand All @@ -57,31 +56,18 @@ CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=n
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=n
# Use partial calibration (takes data from NVS, does not measure again)
CONFIG_ESP_PHY_RF_CAL_PARTIAL=y
# Disable unnecessary PHY logs
CONFIG_ESP_PHY_LOG_VERBOSE=n
CONFIG_RTC_CLK_CAL_THRESHOLD=0
CONFIG_ESP_PHY_ENABLE_USB_CONTROLLER=n

# Forced power off of Flash in deep sleep
CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y

# Disabling the VDDSDIO (memory controller) power during sleep
CONFIG_ESP_SLEEP_PD_DOMAIN_VDDSDIO=y

# Using an internal RC oscillator (the most economical sleep clocking option)
CONFIG_RTC_CLK_SRC_INT_RC=y

# Disabling clocking of unused peripherals in the RTC domain
CONFIG_RTC_CLK_CAL_THRESHOLD=0

# Redirecting the console to UART0 or completely disabling it (None)
# This frees up the resources of the built-in USB-JTAG
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y

# Отключение тактирования USB-Serial-JTAG в режиме сна
CONFIG_ESP_PHY_ENABLE_USB_CONTROLLER=n

# Disabling USB-Serial-JTAG clocking in sleep mode
CONFIG_ESP_BROWNOUT_DET=n
CONFIG_ESP_BROWNOUT_DET_LVL_SEL_7=y
Expand All @@ -99,17 +85,10 @@ CONFIG_PM_ENABLE=y
# CONFIG_PM_DFS_INIT_FREQ_MAX_40=y

CONFIG_FREERTOS_USE_TICKLESS_IDLE=y
CONFIG_FREERTOS_IDLE_TASK_REPLICATION=n

# Disabling IPv6 (removes Neighbor Discovery and Router Solicitation)
CONFIG_LWIP_IPV6=n

# Disabling IGMP (removes Membership Reports/Multicast announcements)
CONFIG_LWIP_IGMP=n

# Disabling DHCP (since you have a static IP, this will remove the server lookup attempts)
CONFIG_LWIP_DHCP=n

# Additional cleaning from multicast traffic
CONFIG_LWIP_MULTICAST_PING=n

Expand All @@ -122,7 +101,4 @@ CONFIG_LWIP_ESP_GRATUITOUS_ARP=n
# Optional: Disable IPv4 Link-Local (Auto-IP) if enabled
CONFIG_LWIP_AUTOIP=n

# Disabling MDNS (if enabled)
CONFIG_LWIP_MDNS_COMMON=n

# CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE_IN_RTC=y
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y

# 3. Disabling logs (UART is the main brake at startup)
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
CONFIG_LOG_MAXIMUM_LEVEL_0=y

# 4. Radio and Wi-Fi (No-NVS mode)
# Moving PHY calibration to RTC RAM (removes Flash access)
Expand All @@ -57,31 +56,18 @@ CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=n
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=n
# Use partial calibration (takes data from NVS, does not measure again)
CONFIG_ESP_PHY_RF_CAL_PARTIAL=y
# Disable unnecessary PHY logs
CONFIG_ESP_PHY_LOG_VERBOSE=n
CONFIG_RTC_CLK_CAL_THRESHOLD=0
CONFIG_ESP_PHY_ENABLE_USB_CONTROLLER=n

# Forced power off of Flash in deep sleep
CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y

# Disabling the VDDSDIO (memory controller) power during sleep
CONFIG_ESP_SLEEP_PD_DOMAIN_VDDSDIO=y

# Using an internal RC oscillator (the most economical sleep clocking option)
CONFIG_RTC_CLK_SRC_INT_RC=y

# Disabling clocking of unused peripherals in the RTC domain
CONFIG_RTC_CLK_CAL_THRESHOLD=0

# Redirecting the console to UART0 or completely disabling it (None)
# This frees up the resources of the built-in USB-JTAG
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y

# Отключение тактирования USB-Serial-JTAG в режиме сна
CONFIG_ESP_PHY_ENABLE_USB_CONTROLLER=n

# Disabling USB-Serial-JTAG clocking in sleep mode
CONFIG_ESP_BROWNOUT_DET=n
CONFIG_ESP_BROWNOUT_DET_LVL_SEL_7=y
Expand All @@ -99,17 +85,10 @@ CONFIG_PM_ENABLE=y
# CONFIG_PM_DFS_INIT_FREQ_MAX_40=y

CONFIG_FREERTOS_USE_TICKLESS_IDLE=y
CONFIG_FREERTOS_IDLE_TASK_REPLICATION=n

# Disabling IPv6 (removes Neighbor Discovery and Router Solicitation)
CONFIG_LWIP_IPV6=n

# Disabling IGMP (removes Membership Reports/Multicast announcements)
CONFIG_LWIP_IGMP=n

# Disabling DHCP (since you have a static IP, this will remove the server lookup attempts)
CONFIG_LWIP_DHCP=n

# Additional cleaning from multicast traffic
CONFIG_LWIP_MULTICAST_PING=n

Expand All @@ -122,7 +101,4 @@ CONFIG_LWIP_ESP_GRATUITOUS_ARP=n
# Optional: Disable IPv4 Link-Local (Auto-IP) if enabled
CONFIG_LWIP_AUTOIP=n

# Disabling MDNS (if enabled)
CONFIG_LWIP_MDNS_COMMON=n

# CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE_IN_RTC=y
91 changes: 77 additions & 14 deletions third_party/libbcrypt.patch
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,84 @@ index bd8722b..ac051c5 100644
workf = (factor < 4 || factor > 31)?12:factor;
aux = crypt_gensalt_rn("$2a$", workf, input, RANDBYTES,
diff --git a/crypt_blowfish/ow-crypt.h b/crypt_blowfish/ow-crypt.h
index 2e48794..dccf47b 100644
index 2e48794..721551e 100644
--- a/crypt_blowfish/ow-crypt.h
+++ b/crypt_blowfish/ow-crypt.h
@@ -22,6 +22,14 @@
#define __const const
#endif
@@ -17,27 +17,22 @@
#ifndef _OW_CRYPT_H
#define _OW_CRYPT_H

+#ifndef __const
+#define __const const
+#endif
+
+#ifndef __const
+#define __const const
+#endif
+
-#ifndef __GNUC__
-#undef __const
-#define __const const
-#endif
-
#ifndef __SKIP_GNU
extern char *crypt(__const char *key, __const char *setting);
extern char *crypt_r(__const char *key, __const char *setting, void *data);
-extern char *crypt(__const char *key, __const char *setting);
-extern char *crypt_r(__const char *key, __const char *setting, void *data);
+extern char *crypt(const char *key, const char *setting);
+extern char *crypt_r(const char *key, const char *setting, void *data);
#endif

#ifndef __SKIP_OW
-extern char *crypt_rn(__const char *key, __const char *setting,
+extern char *crypt_rn(const char *key, const char *setting,
void *data, int size);
-extern char *crypt_ra(__const char *key, __const char *setting,
+extern char *crypt_ra(const char *key, const char *setting,
void **data, int *size);
-extern char *crypt_gensalt(__const char *prefix, unsigned long count,
- __const char *input, int size);
-extern char *crypt_gensalt_rn(__const char *prefix, unsigned long count,
- __const char *input, int size, char *output, int output_size);
-extern char *crypt_gensalt_ra(__const char *prefix, unsigned long count,
- __const char *input, int size);
+extern char *crypt_gensalt(const char *prefix, unsigned long count,
+ const char *input, int size);
+extern char *crypt_gensalt_rn(const char *prefix, unsigned long count,
+ const char *input, int size, char *output, int output_size);
+extern char *crypt_gensalt_ra(const char *prefix, unsigned long count,
+ const char *input, int size);
#endif

#endif
diff --git a/crypt_blowfish/wrapper.c b/crypt_blowfish/wrapper.c
index 1e49c90..7b9de38 100644
--- a/crypt_blowfish/wrapper.c
+++ b/crypt_blowfish/wrapper.c
@@ -109,7 +109,7 @@ static char *_crypt_retval_magic(char *retval, const char *setting,
* hashing algorithms use less than 128 bytes of the data area.
*/

-char *__crypt_rn(__const char *key, __const char *setting,
+char *__crypt_rn(const char *key, const char *setting,
void *data, int size)
{
if (setting[0] == '$' && setting[1] == '2')
@@ -126,7 +126,7 @@ char *__crypt_rn(__const char *key, __const char *setting,
return NULL;
}

-char *__crypt_ra(__const char *key, __const char *setting,
+char *__crypt_ra(const char *key, const char *setting,
void **data, int *size)
{
if (setting[0] == '$' && setting[1] == '2') {
@@ -148,7 +148,7 @@ char *__crypt_ra(__const char *key, __const char *setting,
return __des_crypt_r(key, setting, (struct crypt_data *)*data);
}

-char *__crypt_r(__const char *key, __const char *setting,
+char *__crypt_r(const char *key, const char *setting,
struct crypt_data *data)
{
return _crypt_retval_magic(
@@ -156,7 +156,7 @@ char *__crypt_r(__const char *key, __const char *setting,
setting, (char *)data, sizeof(*data));
}

-char *__crypt(__const char *key, __const char *setting)
+char *__crypt(const char *key, const char *setting)
{
return _crypt_retval_magic(
__crypt_rn(key, setting, &_ufc_foobar, sizeof(_ufc_foobar)),
12 changes: 10 additions & 2 deletions third_party/libhydrogen.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2a60a1..d084388 100644
index b2a60a1..54f3814 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
Expand All @@ -8,7 +8,15 @@ index b2a60a1..d084388 100644

project(hydrogen LANGUAGES C)

@@ -101,73 +101,78 @@ target_include_directories("${PROJECT_NAME}"
@@ -70,6 +70,7 @@ set(compile_options
-Wstrict-prototypes
-Wswitch-enum
-Wno-type-limits
+ -Wno-error
>
# --- MSVC ---
$<$<C_COMPILER_ID:MSVC>:
@@ -101,73 +102,78 @@ target_include_directories("${PROJECT_NAME}"
target_compile_options("${PROJECT_NAME}" PRIVATE ${compile_options})

# Installation
Expand Down
9 changes: 4 additions & 5 deletions third_party/libsodium_cmake.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..f526c08
index 0000000..bf05fcd
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,64 @@
@@ -0,0 +1,63 @@
+cmake_minimum_required(VERSION 3.16.0)
+
+include(CMakePackageConfigHelpers)
Expand All @@ -22,7 +22,6 @@ index 0000000..f526c08
+
+file(GLOB_RECURSE libsodium_srcs RELATIVE ${CMAKE_CURRENT_LIST_DIR} "src/libsodium/*.c")
+
+
+add_library(${PROJECT_NAME} STATIC ${libsodium_srcs})
+
+target_include_directories(${PROJECT_NAME} PUBLIC
Expand All @@ -44,8 +43,8 @@ index 0000000..f526c08
+target_compile_definitions(${PROJECT_NAME} PUBLIC SODIUM_STATIC)
+
+target_compile_options(${PROJECT_NAME} PRIVATE
+ $<$<C_COMPILER_ID:Clang>:-Wno-error=array-parameter -Wno-error=unknown-pragmas>
+ $<$<C_COMPILER_ID:GNU>:-Wno-error=array-parameter -Wno-error=unknown-pragmas>
+ $<$<C_COMPILER_ID:Clang>:-Wno-error>
+ $<$<C_COMPILER_ID:GNU>:-Wno-error>
+)
+
+option(ENABLE_INSTALL "Enable installation" ON)
Expand Down
Loading