diff --git a/README.md b/README.md index 4987455f..76045372 100755 --- a/README.md +++ b/README.md @@ -1,24 +1,110 @@ -编译方法: -./build.sh example smart_outlet uno-91h SINGAPORE ONLINE 0 +# Ai-Thinker RTL8710BX AliOS SDK -第一个参数为help时,输出build.sh当前默认编译参数. -第一个参数为clean时,执行SDK目录下example目录删除,并从仓库恢复,下次编译时,会重新完整编译整个SDK及应用. -第一个参数在Products目录下找不到对应的文件夹时,会继续从Living_SDK/example目录下找,如能找到,则执行编译,成功后,复制编译结果到out目录。 +## 项目介绍 -要实现不输入参数,执行./build.sh编译输出需要的应用固件,可更改以下默认参数: -default_type="example" -default_app="smart_outlet" -default_board="uno-91h" -default_region=SINGAPORE -default_env=ONLINE -default_debug=0 -default_args="" -以上参数分别对应: -产品类型、应用名称、模组型号、连云区域、连云环境、debug、其他参数(可不填,需要时把参数加到双引号内)。 +本仓库是面向 RTL8710BN/RTL8710BX 系列模组的 AliOS Things 1.3.4 与阿里云 LinkKit 示例 SDK。仓库同时包含产品示例、AliOS 内核与框架、RTL8710BN 平台适配、MK3080 等板级配置以及固件打包脚本。 +仓库属于遗留 SDK:原始代码最后提交于 2020 年,依赖 Python 2 和较旧的构建系统。2026-08-07 已在 Ubuntu 22.04/WSL2 中验证 `smart_outlet@mk3080` 目标可以完成两次干净构建;这不代表其他 Board 或真实硬件功能已经验证。 -当前已支持的board: -RDA5981A: hf-lpb130 hf-lpb135 hf-lpt230 hf-lpt130 uno-91h -moc108: mk3060 mk3061 -rtl8710bn: mk3080 mk3092 -asr5501: mx1270 +## 目录结构 + +| 路径 | 说明 | +| --- | --- | +| `Products/example/smart_outlet/` | 智能插座示例、设备状态与 LinkKit 业务逻辑 | +| `Living_SDK/kernel/` | AliOS 内核初始化、Rhino 和系统服务 | +| `Living_SDK/framework/` | LinkKit、网络管理、OTA、事件循环等框架 | +| `Living_SDK/platform/mcu/rtl8710bn/` | RTL8710BN 启动、HAL、驱动、链接脚本和预编译库 | +| `Living_SDK/board/mk3080/` | MK3080 Board 配置、Boot/ATE 镜像和板级代码 | +| `tools/mk3080.sh` | RTL8710BN/MK3080 分阶段编译、链接与固件打包 | +| `Service/version/` | 固件版本信息组件 | + +详细模块关系和启动流程见[架构说明](docs/ARCHITECTURE.md)。 + +## 快速开始与构建 + +推荐在 Ubuntu 22.04 或 WSL2 中构建。已验证环境需要: + +- Git +- Python 2.7(仅用于遗留构建脚本) +- Python 3.10 与 `aos-cube==0.5.11` +- ARM GNU Toolchain 10.3.1 +- Newlib 3.3.0 + +Ubuntu 22.04 可以安装 ARM 编译器和 Newlib: + +```bash +sudo apt-get install --no-install-recommends gcc-arm-none-eabi libnewlib-arm-none-eabi +``` + +准备独立的 aos-cube 环境后,按以下方式执行干净构建: + +```bash +cd Ai-Thinker-Open_RTL8710BX_ALIOS_SDK + +# WSL 可能注入 NAME;该变量会覆盖旧 Makefile 中的组件 NAME。 +unset NAME +ulimit -s unlimited + +# /usr/bin 必须排在 aos-cube venv 前,使遗留 Make 脚本使用 Python 2; +# aos 命令仍会从后面的 venv 中找到,并由它自己的 Python 3 shebang 启动。 +export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$HOME/.venvs/aos-cube-0.5.11-system/bin + +./build.sh clean smart_outlet +./build.sh example smart_outlet mk3080 MAINLAND ONLINE 0 +``` + +成功后主要产物位于: + +```text +out/smart_outlet@mk3080/ +``` + +其中包括 ELF、MAP、HEX、应用 BIN、OTA BIN 和包含 Boot/ATE 分区的 `all.bin`。 + +完整环境、产物哈希与日志见[真实构建验证](docs/BUILD_VERIFICATION.md)。 + +## 代码入口与运行流程 + +RTL8710BN 的主启动流程为: + +```text +Realtek startup + -> main + -> sys_init_func + -> aos_kernel_init + -> application_start + -> Wi-Fi 获得 IP + -> linkkit_main +``` + +具体文件、行号、符号和最终 ELF 证据见[代码入口说明](docs/CODE_ENTRY.md)。 + +## 示例与配置 + +已验证示例为 `Products/example/smart_outlet`,Board 为 `mk3080`: + +```bash +./build.sh example smart_outlet mk3080 MAINLAND ONLINE 0 +``` + +参数依次表示产品类型、应用、Board、云区域、云环境和 Debug 开关。仓库还包含 `linkkit_gateway`、`living_platform`、`certification` 等示例,但本次没有对这些目标进行完整构建验证。 + +## 使用限制 + +- 本次验证没有连接真实 RTL8710BX/MK3080 硬件。 +- 未验证烧录、启动、Wi-Fi 配网、云端连接、OTA、外设和量产流程。 +- 仓库包含 Python 2、旧版 TLS/网络组件和预编译库;用于新产品前应单独进行安全与许可证审查。 +- 构建成功不等于所有 Board、示例和运行场景都可用。 + +## 问题排查与贡献 + +- 出现乱码或 `UnicodeDecodeError` 时,请确认使用了本仓库兼容后的 `gen_auto_code.py`。 +- `map_parse_gcc.py` 使用 Python 2 语法;请保持 `/usr/bin` 位于 aos-cube 虚拟环境之前。 +- 出现 `stdio.h`、`unistd.h` 或 `nano.specs` 缺失时,请安装 `libnewlib-arm-none-eabi`。 +- 提交改动前请说明目标 Board、完整构建命令、验证结果和未验证范围,并通过独立分支和 Pull Request 合并。 + +机器可读的审查证据见 [`audit/technical-evidence.json`](audit/technical-evidence.json)。 + +## License + +仓库根目录使用 [Apache License 2.0](LICENSE)。仓库中的第三方组件、预编译库和厂商 SDK 可能适用各自的许可证,分发前应同时核对对应目录中的声明。 diff --git a/audit/technical-evidence.json b/audit/technical-evidence.json new file mode 100644 index 00000000..28012038 --- /dev/null +++ b/audit/technical-evidence.json @@ -0,0 +1,98 @@ +{ + "schema_version": "1.0", + "rules_version": "2.0-sdk-technical", + "repositories": { + "Ai-Thinker-Open/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK": { + "code_entry": { + "status": "verified", + "entry_points": [ + "Living_SDK/platform/mcu/rtl8710bn/aos/aos.c:157:main", + "Living_SDK/kernel/init/aos_init.c:267:aos_kernel_init", + "Products/example/smart_outlet/app_entry.c:665:application_start", + "Products/example/smart_outlet/smart_outlet_main.c:623:linkkit_main" + ], + "evidence": [ + "Products/example/smart_outlet/smart_outlet.mk source and component lists", + "out/smart_outlet@mk3080/smart_outlet@mk3080.map", + "ARM nm: application_start, aos_kernel_init and linkkit_main are global text symbols" + ], + "build_linked": true + }, + "architecture": { + "status": "verified", + "modules": [ + "smart_outlet product application", + "LinkKit, NetMgr and OTA frameworks", + "AliOS kernel and system services", + "RTL8710BN platform, HAL and vendor libraries", + "MK3080 board configuration", + "build, link and firmware packaging" + ], + "evidence": [ + "Products/example/smart_outlet/smart_outlet.mk", + "Living_SDK/platform/mcu/rtl8710bn/aos/aos.c", + "Living_SDK/kernel/init/aos_init.c", + "Living_SDK/board/mk3080/mk3080.mk", + "tools/mk3080.sh", + "docs/ARCHITECTURE.md" + ], + "init_flow": [ + "Realtek startup", + "main", + "sys_init_func", + "aos_kernel_init", + "application_start", + "Wi-Fi got IP", + "linkkit_main and aos_loop_run" + ] + }, + "build": { + "status": "passed", + "clean_builds": 2, + "command": "./build.sh example smart_outlet mk3080 MAINLAND ONLINE 0", + "commit": "224b2615371adc1a8b6714fafcc8f821089e5e35", + "validation_commit": "bba690e6a8c6e6c4c6ccd9bd14b320a68957b006", + "repository_base_commit": "27b3e2883d5801551c6919bf405583919d2f3f08", + "source_tree": "0dfc8affd74fe38afd189b20528d7aa9e3bb7140", + "log": "docs/build-logs/RTL8710BX-smart_outlet-clean3.log", + "environment": { + "os": "Ubuntu 22.04.5 LTS on WSL2", + "kernel": "6.18.33.2-microsoft-standard-WSL2", + "aos_cube": "0.5.11", + "python2": "2.7.18", + "python3": "3.10.12", + "compiler": "GNU Arm Embedded GCC 10.3.1", + "newlib": "3.3.0" + }, + "artifacts": [ + { + "path": "out/smart_outlet@mk3080/smart_outlet@mk3080.elf", + "size": 6313968, + "sha256": "1410c192074950a2fb927285cbcf3ce04ee4f02a7246ff1f8dd5d57af21e8e7f" + }, + { + "path": "out/smart_outlet@mk3080/smart_outlet@mk3080.bin", + "size": 606392, + "sha256": "3339d025144990817a93b79b85966e62db4049c033c876a310d658085c600aba" + }, + { + "path": "out/smart_outlet@mk3080/smart_outlet@mk3080.ota.bin", + "size": 606364, + "sha256": "c2d6af49997331bbab238e753fa801b1a904a5a002663277661ac09cf95020b7" + }, + { + "path": "out/smart_outlet@mk3080/smart_outlet@mk3080.all.bin", + "size": 1077968, + "sha256": "ad0de1edfe309b989207c9a7f15a3d9b0639d062c988f55665a77b7b7cc4eac4" + } + ], + "errors": 0, + "warnings": 4, + "hardware_verified": false, + "compatibility_changes": [ + "gen_auto_code.py reads mixed-encoding legacy sources as binary and ignores invalid UTF-8 bytes" + ] + } + } + } +} diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md new file mode 100644 index 00000000..12c3b054 --- /dev/null +++ b/docs/ARCHITECTURE.md @@ -0,0 +1,82 @@ +# RTL8710BX SDK 架构说明 + +本文针对已验证的 `smart_outlet@mk3080` 构建目标说明仓库的主要模块和依赖关系。 + +## 模块分层 + +### 1. 产品应用层 + +路径:`Products/example/smart_outlet/` + +包含应用入口、LinkKit 主循环、厂商板级业务、设备状态、工厂模式、属性上报和消息处理。`smart_outlet.mk` 是该目标的源码与组件清单。 + +### 2. 云与通用框架层 + +路径:`Living_SDK/framework/` + +主要包括 LinkKit SDK/HAL、网络管理、OTA、事件循环、CLI 和公共框架。产品应用通过组件依赖进入最终静态库和固件。 + +### 3. AliOS 内核与系统服务层 + +路径:`Living_SDK/kernel/`、`Living_SDK/utility/` + +提供 Rhino 内核、初始化流程、VFS、KV、事件循环、网络协议与 cJSON 等基础能力。`Living_SDK/kernel/init/aos_init.c` 负责从内核初始化过渡到产品入口。 + +### 4. RTL8710BN 平台层 + +路径:`Living_SDK/platform/mcu/rtl8710bn/` + +包含启动适配、HAL、外设驱动、Wi-Fi 厂商库、链接脚本、镜像处理逻辑和预编译 Realtek 库。`rtl8710bn.mk` 定义平台组件与系统配置。 + +### 5. MK3080 Board 层 + +路径:`Living_SDK/board/mk3080/` + +`mk3080.mk` 将目标绑定到 Cortex-M4 与 `rtl8710bn` MCU family,并提供 Board 源码、Boot/ATE 镜像、设备名称和链接后处理配置。 + +### 6. 构建与固件打包层 + +路径:`build.sh`、`tools/mk3080.sh`、`Service/version/` + +`build.sh` 根据 Board 将 MK3080 路由到 `tools/mk3080.sh`。后者先调用 aos-cube 构建 AliOS 静态库,再构建版本组件与产品应用,最终链接 ELF 并生成 BIN、HEX、OTA 和全分区镜像。 + +## 初始化流程 + +```text +Realtek startup / app_start.c + -> rtl8710bn aos.c::main + -> aos_init + -> create sys_init_func task + -> aos_start + -> sys_init_func + -> board and system initialization + -> aos_kernel_init + -> VFS / CLI / KV / framework initialization + -> application_start + -> NetMgr / vendor / diagnosis / OTA initialization + -> register Wi-Fi and cloud event filters + -> Wi-Fi gets IP + -> create linkkit task + -> linkkit_main + -> aos_loop_run +``` + +## 构建依赖关系 + +```text +smart_outlet + -> LinkKit SDK and HAL + -> NetMgr / common framework / OTA / cJSON / CLI + -> AliOS kernel initialization and Rhino + -> board_mk3080 + -> rtl8710bn platform, HAL and vendor libraries + -> ARM GNU linker scripts and firmware packers +``` + +最终 MAP 文件包含 `smart_outlet`、`kernel_init`、`board_mk3080`、`rtl8710bn`、`libiot_sdk`、`netmgr`、`ota`、`rhino` 等模块,可与上述依赖关系交叉验证。 + +## 架构边界 + +- 本说明只覆盖 `smart_outlet@mk3080`。 +- 仓库中的其他 Board、示例、第三方源码和预编译库没有逐一验证。 +- 静态架构和构建证据不能替代硬件启动、联网、OTA 与外设测试。 diff --git a/docs/BUILD_VERIFICATION.md b/docs/BUILD_VERIFICATION.md new file mode 100644 index 00000000..cce8af29 --- /dev/null +++ b/docs/BUILD_VERIFICATION.md @@ -0,0 +1,79 @@ +# RTL8710BX SDK 构建验证 + +验证日期:2026-08-07(Asia/Shanghai) + +- GitHub 基线提交:`27b3e2883d5801551c6919bf405583919d2f3f08` +- 提交分支源码提交:`224b2615371adc1a8b6714fafcc8f821089e5e35` +- WSL 验证提交:`bba690e6a8c6e6c4c6ccd9bd14b320a68957b006` +- WSL 验证 Tree:`0dfc8affd74fe38afd189b20528d7aa9e3bb7140` +- 验证目标:`example/smart_outlet@mk3080` + +提交分支源码提交与 WSL 验证提交拥有相同 Git tree。它们仅在基线基础上修改 `gen_auto_code.py` 的两处文本读取方式,使混合编码的遗留源码可以由 Python 2/3 安全扫描;产品 C 源码和固件逻辑未改动。 + +## 环境 + +| 项目 | 版本 | +| --- | --- | +| WSL | 2.7.11 | +| Linux 内核 | `6.18.33.2-microsoft-standard-WSL2` | +| 发行版 | Ubuntu 22.04.5 LTS | +| aos-cube | 0.5.11(独立 Python 3 虚拟环境) | +| Python 2 | 2.7.18(遗留 Make/Python 脚本) | +| Python 3 | 3.10.12 | +| ARM GCC | 10.3.1(Ubuntu `gcc-arm-none-eabi`) | +| Newlib | 3.3.0(Ubuntu `libnewlib-arm-none-eabi`) | +| Git | 2.34.1 | + +Python 2.7 已停止安全维护,只用于本地遗留构建脚本,不应作为联网服务环境。 + +## 构建命令 + +```bash +cd Ai-Thinker-Open_RTL8710BX_ALIOS_SDK +unset NAME +ulimit -s unlimited +export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$HOME/.venvs/aos-cube-0.5.11-system/bin + +./build.sh clean smart_outlet +./build.sh example smart_outlet mk3080 MAINLAND ONLINE 0 +``` + +`/usr/bin` 位于 aos-cube venv 之前,使旧 Makefile 的 `which python` 选择 Python 2;`aos` 命令仍从 venv 中找到并由其 Python 3 shebang 启动。`unset NAME` 避免 WSL 主机名环境变量覆盖旧 Makefile 的组件名。 + +## 验证方法与结果 + +1. 将编码兼容修复提交到独立 WSL 验证分支。 +2. 执行仓库提供的 `./build.sh clean smart_outlet`。 +3. 执行完整构建命令。 +4. 检查外层退出码、AliOS 内层 Make 错误、编译错误和 `build failed`。 +5. 重复上述干净构建流程两次。 +6. 检查产物大小、SHA-256、ELF 符号和 MAP 来源。 + +两次提交绑定后的干净构建均满足: + +- 外层退出码 `0`。 +- compiler error `0`。 +- Make error `0`。 +- `SyntaxError` 和 `build failed` 均为 `0`。 +- 每次日志包含 4 条 warning,均为 GNU Make jobserver/并行参数提示。 +- 构建前后 Git 工作区保持干净。 + +最终证据日志:`docs/build-logs/RTL8710BX-smart_outlet-clean3.log` + +## 第二次干净构建产物 + +| 产物 | 字节数 | SHA-256 | +| --- | ---: | --- | +| `out/smart_outlet@mk3080/smart_outlet@mk3080.elf` | 6,313,968 | `1410c192074950a2fb927285cbcf3ce04ee4f02a7246ff1f8dd5d57af21e8e7f` | +| `out/smart_outlet@mk3080/smart_outlet@mk3080.map` | 3,290,249 | `7f5ded68cdf6b67ef430ed44570dcae62dbfc736e53f3e0a4231935057e976af` | +| `out/smart_outlet@mk3080/smart_outlet@mk3080.bin` | 606,392 | `3339d025144990817a93b79b85966e62db4049c033c876a310d658085c600aba` | +| `out/smart_outlet@mk3080/smart_outlet@mk3080.ota.bin` | 606,364 | `c2d6af49997331bbab238e753fa801b1a904a5a002663277661ac09cf95020b7` | +| `out/smart_outlet@mk3080/smart_outlet@mk3080.all.bin` | 1,077,968 | `ad0de1edfe309b989207c9a7f15a3d9b0639d062c988f55665a77b7b7cc4eac4` | + +固件包含编译时间与 Git 信息,不同构建的哈希不要求一致;可重复构建在此表示同一提交和环境能够连续完成干净构建并生成完整产物。 + +## 告警与限制 + +4 条 warning 均为子 Make 的 jobserver 并行模式提示,没有 C/C++ 编译器 warning。后续可以调整父子 Make 的 `+` 和 `-j` 传递方式消除,但不影响本次固件生成。 + +本验证没有连接真实 RTL8710BX/MK3080 硬件,不包含烧录、启动、Wi-Fi、云端、OTA、串口或外设功能验证。 diff --git a/docs/CODE_ENTRY.md b/docs/CODE_ENTRY.md new file mode 100644 index 00000000..2b392926 --- /dev/null +++ b/docs/CODE_ENTRY.md @@ -0,0 +1,59 @@ +# RTL8710BX SDK 代码入口说明 + +本文说明已验证目标 `smart_outlet@mk3080` 的启动入口、应用入口和云业务入口。行号基于原始提交 `27b3e2883d5801551c6919bf405583919d2f3f08` 加编码兼容修复后的源码。 + +## 1. 平台入口 + +文件:`Living_SDK/platform/mcu/rtl8710bn/aos/aos.c` + +- `main`:第 157 行,Realtek 启动代码进入 AliOS 的平台主入口。 +- `main` 在第 173 行创建 `sys_init_func` 初始化任务。 +- `main` 在第 177 行调用 `aos_start` 启动内核调度。 +- `sys_init_func` 在第 146 行调用 `aos_kernel_init`。 + +上游 Realtek 启动文件 `Living_SDK/platform/mcu/rtl8710bn/sdk/component/soc/realtek/8711b/cmsis/device/app_start.c` 最终调用 `main`。 + +## 2. AliOS 内核入口 + +文件:`Living_SDK/kernel/init/aos_init.c` + +- `aos_kernel_init`:第 267 行。 +- 该函数初始化 VFS、CLI、KV、网络与框架服务。 +- 第 334 行调用产品提供的 `application_start`。 + +## 3. 产品应用入口 + +文件:`Products/example/smart_outlet/app_entry.c` + +- `application_start`:第 665 行。 +- 初始化日志级别、设备元数据、网络管理、厂商适配、诊断、OTA、事件过滤器和业务任务。 +- Wi-Fi 事件处理函数 `wifi_service_event` 在获得 IP 后,于第 121 行创建 `linkkit` 任务。 +- `application_start` 最终在第 729 行进入 `aos_loop_run` 事件循环。 + +## 4. LinkKit 业务入口 + +文件:`Products/example/smart_outlet/smart_outlet_main.c` + +- `linkkit_main`:第 623 行。 +- 负责设备元数据、LinkKit 初始化、云端连接及属性/事件业务循环。 + +产品构建清单 `Products/example/smart_outlet/smart_outlet.mk` 明确包含 `app_entry.c`、`smart_outlet_main.c`、厂商适配、状态管理、属性上报和消息处理源码,并依赖 LinkKit、HAL、NetMgr、cJSON 与 OTA 组件。 + +## 5. 最终产物验证 + +在验证提交 `bba690e6a8c6e6c4c6ccd9bd14b320a68957b006` 的最终 ELF 上执行: + +```bash +arm-none-eabi-nm out/smart_outlet@mk3080/smart_outlet@mk3080.elf \ + | grep -E ' (application_start|aos_kernel_init|linkkit_main)$' +``` + +确认三个符号均为全局 Text 符号: + +```text +08020c1c T aos_kernel_init +0801c668 T application_start +0801de04 T linkkit_main +``` + +MAP 文件同时显示它们分别来自 `kernel_init.a(aos_init.o)`、`smart_outlet.a(app_entry.o)` 和 `smart_outlet.a(smart_outlet_main.o)`,因此入口说明不只是文件名推断,而是已链接到最终固件的证据。 diff --git a/docs/build-logs/RTL8710BX-smart_outlet-clean3.log b/docs/build-logs/RTL8710BX-smart_outlet-clean3.log new file mode 100644 index 00000000..ad98a367 --- /dev/null +++ b/docs/build-logs/RTL8710BX-smart_outlet-clean3.log @@ -0,0 +1,666 @@ +ARGS SET AS NULL +---------------------------------------------------------------------------------------------------- +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/fae/.venvs/aos-cube-0.5.11-system/bin:/home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK/Living_SDK/build/compiler/gcc-arm-none-eabi/Linux64/bin/ +OS: Linux +Product type=example app_name=smart_outlet board=mk3080 REGION=MAINLAND ENV=ONLINE CONFIG_DEBUG=0 ARGS= +---------------------------------------------------------------------------------------------------- +do cp +/home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK +make aos sdk: smart_outlet@mk3080 CONFIG_SERVER_REGION=MAINLAND CONFIG_SERVER_ENV=ONLINE CONFIG_DEBUG=0 +aos-cube version: 0.5.11 +Cleaning... +Done +aos-cube version: 0.5.11 +Making config file for first time +processing components: smart_outlet mk3080 platform/mcu/rtl8710bn vcall init auto_component +CONFIG_BOARD_NAME : MK3080 +server region: MAINLAND +server env: ONLINE +APP: smart_outlet Board: mk3080 +host user: fae +branch: codex/wsl-build-validation +hash: bba690e6a8c6e6c4c6ccd9bd14b320a68957b006 +app_version_new:app-1.6.0-20260807.150234 +firmware type: RELEASE +FEATURE_SUPPORT_ITLS != y, so using normal TLS +app_version:app-1.6.0-20260807.150234 +kernel_version:AOS-R-1.3.4 +CONFIG_BOARD_NAME : MK3080 +server region: MAINLAND +server env: ONLINE +APP: smart_outlet Board: mk3080 +host user: fae +branch: codex/wsl-build-validation +hash: bba690e6a8c6e6c4c6ccd9bd14b320a68957b006 +app_version_new:app-1.6.0-20260807.150234 +firmware type: RELEASE +FEATURE_SUPPORT_ITLS != y, so using normal TLS +app_version:app-1.6.0-20260807.150234 +kernel_version:AOS-R-1.3.4 +Build AOS Now +TOOLCHAIN_PATH=/home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK/Living_SDK/build/compiler/gcc-arm-none-eabi/Linux64/bin/ +Components: smart_outlet board_mk3080 rtl8710bn vcall kernel_init auto_component linkkit_sdk iotx-hal netmgr framework cjson ota cli arch_armv7m newlib_stub rhino digest_algorithm net rtl8710bn_SDK rtl8710bn_Peripheral_Drivers log activation chip_code imbedtls kv yloop hal ota_hal ota_transport ota_download ota_verify alicrypto vfs base64 vfs_device +Making iotx-sdk-c +origin_path: /home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK/Living_SDK +comp_path: /home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK/Living_SDK/framework/protocol/linkkit/sdk +host_os Linux64 +MAKE make +make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. +make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. +make[1]: Circular out/smart_outlet@mk3080/binary/smart_outlet@mk3080.bin <- ota_bin dependency dropped. +Compiling smart_outlet +/home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK/Living_SDK/framework/protocol/linkkit/sdk/iotx-sdk-c_clone.pkgs directory removed! +make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. +SELECTED CONFIGURATION: + +VENDOR : rhino +MODEL : make + +Compiling board_mk3080 +Compiling rtl8710bn + +CONFIGURE .............................. [components/tick_notify] +CONFIGURE .............................. [components/timer_service] +CONFIGURE .............................. [examples] +Compiling vcall +Compiling kernel_init +CONFIGURE .............................. [src/infra/log] +Compiling auto_component +CONFIGURE .............................. [src/infra/system] +Compiling iotx-hal +CONFIGURE .............................. [src/infra/utils] +Compiling netmgr +CONFIGURE .............................. [src/protocol/alcs] +Compiling framework +Compiling cjson +CONFIGURE .............................. [src/protocol/coap/cloud] +Compiling ota +CONFIGURE .............................. [src/protocol/coap/local] +Compiling cli +CONFIGURE .............................. [src/protocol/http] +Compiling arch_armv7m +CONFIGURE .............................. [src/protocol/http2] +Compiling newlib_stub +Compiling rhino +CONFIGURE .............................. [src/protocol/mqtt] +CONFIGURE .............................. [src/ref-impl/hal] +CONFIGURE .............................. [src/ref-impl/tls] +CONFIGURE .............................. [src/sdk-impl] +CONFIGURE .............................. [src/services/awss] +Compiling digest_algorithm +Compiling net +CONFIGURE .............................. [src/services/dev_bind] +CONFIGURE .............................. [src/services/dev_diagnosis] +CONFIGURE .............................. [src/services/http2_stream] +CONFIGURE .............................. [src/services/linkkit/cm] +CONFIGURE .............................. [src/services/linkkit/dev_reset] +CONFIGURE .............................. [src/services/linkkit/dm] +CONFIGURE .............................. [src/services/mdal/mal] +CONFIGURE .............................. [src/services/mdal/sal] +CONFIGURE .............................. [src/services/ota] +CONFIGURE .............................. [src/services/shadow] +CONFIGURE .............................. [src/services/subdev] +CONFIGURE .............................. [src/tools/linkkit_tsl_convert] +Compiling rtl8710bn_SDK + +BUILDING WITH EXISTING CONFIGURATION: + +VENDOR : rhino +MODEL : make + +Compiling rtl8710bn_Peripheral_Drivers +Compiling log +Compiling activation +Compiling chip_code +Compiling imbedtls +Compiling kv +Compiling yloop +Compiling hal +Compiling ota_hal +Compiling ota_transport +Compiling ota_download +Compiling ota_verify +Compiling alicrypto +Components: + + + +[..] o components/timer_service [..] +. components/timer_service + + +[..] o components/tick_notify [..] +. components/tick_notify + + +[..] o examples [..] +. examples + + +[..] o src/tools/linkkit_tsl_convert[..] +. src/tools/linkkit_tsl_convert + + +[..] o src/services/linkkit/cm [..] +. src/services/linkkit/cm + + +[..] o src/services/linkkit/dm [..] +. src/services/linkkit/dm + + +[..] o src/services/linkkit/dev_reset[..] +. src/services/linkkit/dev_reset + + +[..] o src/services/http2_stream [..] +. src/services/http2_stream + + +[..] o src/services/awss [..] +. src/services/awss + + +[..] o src/services/shadow [..] +. src/services/shadow + + +[..] o src/services/dev_diagnosis [..] +. src/services/dev_diagnosis + + +[..] o src/services/subdev [..] +. src/services/subdev +Compiling vfs + + +[..] o src/services/ota [..] +. src/services/ota + + +[..] o src/services/dev_bind [..] +. src/services/dev_bind +Compiling base64 +Compiling vfs_device + + +[..] o src/services/mdal/mal [..] +. src/services/mdal/mal + + +[..] o src/services/mdal/sal [..] +. src/services/mdal/sal +Making out/smart_outlet@mk3080/libraries/smart_outlet.a +Making out/smart_outlet@mk3080/libraries/board_mk3080.a +Making out/smart_outlet@mk3080/libraries/rtl8710bn.a +Making out/smart_outlet@mk3080/libraries/vcall.a +Making out/smart_outlet@mk3080/libraries/kernel_init.a +Making out/smart_outlet@mk3080/libraries/auto_component.a +Making out/smart_outlet@mk3080/libraries/iotx-hal.a +Making out/smart_outlet@mk3080/libraries/netmgr.a + + +[..] o src/protocol/http2 [..]Making out/smart_outlet@mk3080/libraries/framework.a +Making out/smart_outlet@mk3080/libraries/cjson.a +Making out/smart_outlet@mk3080/libraries/ota.a + +. src/protocol/http2 +Making out/smart_outlet@mk3080/libraries/cli.a +Making out/smart_outlet@mk3080/libraries/arch_armv7m.a +Making out/smart_outlet@mk3080/libraries/newlib_stub.a +Making out/smart_outlet@mk3080/libraries/rhino.a +Making out/smart_outlet@mk3080/libraries/digest_algorithm.a +Making out/smart_outlet@mk3080/libraries/net.a +Making out/smart_outlet@mk3080/libraries/rtl8710bn_SDK.a +Making out/smart_outlet@mk3080/libraries/rtl8710bn_Peripheral_Drivers.a +Making out/smart_outlet@mk3080/libraries/log.a +Making out/smart_outlet@mk3080/libraries/activation.a +Making out/smart_outlet@mk3080/libraries/chip_code.a +Making out/smart_outlet@mk3080/libraries/imbedtls.a +Making out/smart_outlet@mk3080/libraries/kv.a +Making out/smart_outlet@mk3080/libraries/yloop.a +Making out/smart_outlet@mk3080/libraries/hal.a +Making out/smart_outlet@mk3080/libraries/ota_hal.a +Making out/smart_outlet@mk3080/libraries/ota_transport.a +Making out/smart_outlet@mk3080/libraries/ota_download.a +Making out/smart_outlet@mk3080/libraries/ota_verify.a +Making out/smart_outlet@mk3080/libraries/alicrypto.a +Making out/smart_outlet@mk3080/libraries/vfs.a +Making out/smart_outlet@mk3080/libraries/base64.a +Making out/smart_outlet@mk3080/libraries/vfs_device.a + + +[..] o src/protocol/mqtt [..] +. src/protocol/mqtt + + +[..] o src/protocol/coap/local [..] +. src/protocol/coap/local + + +[..] o src/protocol/coap/cloud [..] +. src/protocol/coap/cloud + + +[..] o src/protocol/http [..] +. src/protocol/http + + +[..] o src/protocol/alcs [..] +. src/protocol/alcs + + +[..] o src/sdk-impl [..] +. src/sdk-impl + + +[..] o src/ref-impl/tls [..] +. src/ref-impl/tls + + +[..] o src/ref-impl/hal [..] +. src/ref-impl/hal + + +[..] o src/infra/utils [..] +. src/infra/utils + + +[..] o src/infra/log [..] +. src/infra/log + + +[..] o src/infra/system [..] +. src/infra/system + +make[2]: warning: -j4 forced in submake: resetting jobserver mode. + +[CC] utils_md5.o <= ... + +[CC] utils_base64.o <= ... + +[CC] utils_hmac.o <= ... + +[CC] utils_sha1.o <= ... + +[CC] utils_sha256.o <= ... + +[CC] json_parser.o <= ... + +[CC] json_token.o <= ... + +[CC] lite-cjson.o <= ... + +[CC] log_report.o <= ... + +[CC] mem_stats.o <= ... + +[CC] string_utils.o <= ... + +[CC] utils_epoch_time.o <= ... + +[CC] utils_event.o <= ... + +[CC] utils_httpc.o <= ... + +[CC] utils_net.o <= ... + +[CC] utils_timer.o <= ... + +[CC] iotx_log.o <= ... + +[CC] aos_support.o <= ... + +[CC] ca.o <= ... + +[CC] event.o <= ... + +[CC] device.o <= ... + +[CC] guider.o <= ... + +[CC] redirect_region.o <= ... + +[CC] report.o <= ... + +[CC] fac_string.o <= ... + +[CC] impl_dynreg.o <= ... + +[CC] impl_linkkit.o <= ... + +[CC] impl_logpost.o <= ... + +[CC] impl_ntp.o <= ... + +[CC] sdk-impl.o <= ... + +[CC] sdk_reset.o <= ... + +[CC] dev_diagnosis.o <= ... + +[CC] dev_errcode.o <= ... + +[CC] dev_offline_ota.o <= ... + +[CC] dev_state_machine.o <= ... + +[CC] diagnosis_offline_log.o <= ... + +[CC] ccronexpr.o <= ... + +[CC] timer_service.o <= ... + +[CC] tick_notify.o <= ... + +[CC] MQTTConnectClient.o <= ... + +[CC] MQTTDeserializePublish.o <= ... + +[CC] MQTTPacket.o <= ... + +[CC] MQTTSerializePublish.o <= ... + +[CC] MQTTSubscribeClient.o <= ... + +[CC] MQTTUnsubscribeClient.o <= ... + +[CC] mqtt_client.o <= ... + +[CC] iotx_ota.o <= ... + +[CC] ota_fetch.o <= ... + +[CC] ota_lib.o <= ... + +[CC] iotx_cm.o <= ... + +[CC] iotx_cm_coap.o <= ... + +[CC] iotx_cm_mqtt.o <= ... + +[CC] dm_api.o <= ... + +[CC] dm_cota.o <= ... + +[CC] dm_fota.o <= ... + +[CC] dm_ipc.o <= ... + +[CC] dm_manager.o <= ... + +[CC] dm_message.o <= ... + +[CC] dm_message_cache.o <= ... + +[CC] dm_msg_process.o <= ... + +[CC] dm_opt.o <= ... + +[CC] dm_ota.o <= ... + +[CC] dm_shadow.o <= ... + +[CC] dm_utils.o <= ... + +[CC] dm_server.o <= ... + +[CC] dm_server_adapter.o <= ... + +[CC] dm_client.o <= ... + +[CC] dm_client_adapter.o <= ... + +[CC] awss_reset.o <= ... + +[CC] awss_reset_statis.o <= ... + +[CC] offline_reset.o <= ... + +[CC] CoAPDeserialize.o <= ... + +[CC] CoAPExport.o <= ... + +[CC] CoAPMessage.o <= ... + +[CC] CoAPNetwork.o <= ... + +[CC] CoAPObserve.o <= ... + +[CC] CoAPPlatform.o <= ... + +[CC] CoAPResource.o <= ... + +[CC] CoAPSerialize.o <= ... + +[CC] CoAPServer.o <= ... + +[CC] awss.o <= ... + +[CC] awss_adha.o <= ... + +[CC] awss_aha.o <= ... + +[CC] awss_ap_scan.o <= ... + +[CC] awss_aplist.o <= ... + +[CC] awss_crypt.o <= ... + +[CC] awss_dev_ap.o <= ... + +[CC] awss_enrollee.o <= ... + +[CC] awss_ht40.o <= ... + +[CC] awss_info.o <= ... + +[CC] awss_info_notify.o <= ... + +[CC] awss_main.o <= ... + +[CC] awss_manufact_ap_find.o <= ... + +[CC] awss_registrar.o <= ... + +[CC] awss_smartconfig.o <= ... + +[CC] awss_smartconfig_mcast.o <= ... + +[CC] awss_statis.o <= ... + +[CC] awss_wifimgr.o <= ... + +[CC] awss_wps.o <= ... + +[CC] connect_ap.o <= ... + +[CC] zconfig_ieee80211.o <= ... + +[CC] zconfig_protocol.o <= ... + +[CC] zconfig_utils.o <= ... + +[CC] zconfig_vendor_common.o <= ... + +[CC] awss_bind.o <= ... + +[CC] awss_bind_statis.o <= ... + +[CC] awss_cmp_coap.o <= ... + +[CC] awss_cmp_mqtt.o <= ... + +[CC] awss_event.o <= ... + +[CC] awss_notify.o <= ... + +[CC] awss_packet.o <= ... + +[CC] awss_report.o <= ... + +[CC] awss_timer.o <= ... + +[CC] passwd.o <= ... + +[CC] sha256.o <= ... + +[CC] os_misc.o <= ... + +[CC] alcs_adapter.o <= ... + +[CC] alcs_api.o <= ... + +[CC] alcs_coap.o <= ... + +[CC] alcs_client.o <= ... + +[CC] alcs_localsetup.o <= ... + +[CC] alcs_mqtt.o <= ... + +[CC] alcs_server.o <= ... + +[AR] libiot_sdk.a <= ... +copy to library path: /home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK/Living_SDK/out/smart_outlet@mk3080/libraries +Making smart_outlet@mk3080.elf + +Making smart_outlet@mk3080.bin +Making smart_outlet@mk3080.hex + + AOS MEMORY MAP +|=================================================================| +| MODULE | ROM | RAM | +|=================================================================| +| activation | 186 | 0 | +| alicrypto | 34657 | 8784 | +| arch_armv7m | 2161 | 0 | +| awss_security | 112 | 0 | +| board_mk3080 | 511 | 16 | +| chip_code | 311 | 256 | +| cjson | 3913 | 20 | +| cli | 6795 | 549 | +| digest_algorithm | 116 | 0 | +| framework | 230 | 12 | +| hal | 394 | 12 | +| imbedtls | 24973 | 88 | +| iotx-hal | 8656 | 228 | +| kernel_init | 1159 | 48 | +| kv | 3206 | 36 | +| libaiotss | 754 | 0 | +| libc_nano | 33718 | 470 | +| libgcc | 3940 | 0 | +| libiot_sdk | 159258 | 8927 | +| lib_platform | 6556 | 3888 | +| lib_rtlstd | 583 | 1073 | +| lib_wlan | 183499 | 22987 | +| log | 581 | 20 | +| net | 42915 | 3363 | +| netmgr | 2201 | 246 | +| newlib_stub | 294 | 0 | +| ota | 1849 | 1 | +| ota_download | 1463 | 12 | +| ota_hal | 767 | 4 | +| ota_transport | 1256 | 24 | +| ota_verify | 2736 | 12 | +| rhino | 16856 | 7737 | +| rtl8710bn | 10413 | 533 | +| rtl8710bn_Peripheral_Drivers | 1084 | 120 | +| rtl8710bn_SDK | 23182 | 4249 | +| smart_outlet | 13991 | 728 | +| vcall | 1864 | 4 | +| vfs | 1845 | 1209 | +| yloop | 1339 | 24 | +| *fill* | 600 | 261 | +|=================================================================| +| TOTAL (bytes) | 600924 | 65941 | +|=================================================================| +Generate out/smart_outlet@mk3080/binary/smart_outlet@mk3080.all.bin ... +606224 +2d329d1e1947d8fc2677fc6430a86db4 +606252 +bd4f83f2510c89fb9cc9a96b85eb1dd3 +Build complete +Making .gdbinit +Check if required tools for mk3080 exist +cp libs and incs... +/home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK +start to build app...... +make version--framework.a example APP_NAME=smart_outlet BOARD=mk3080 ARGS=MAINLAND CONFIG_FIRMWARE_VERSION=app-1.6.0 +/home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK +make app +CONFIG_BOARD_NAME : +server region: SINGAPORE +server env: ONLINE +APP: Board: +host user: fae +branch: codex/wsl-build-validation +hash: bba690e6a8c6e6c4c6ccd9bd14b320a68957b006 +app_version_new:app-1.6.0-20260807.150245 +firmware type: RELEASE +CONFIG_BOARD_NAME : MK3080 +server region: MAINLAND +server env: ONLINE +APP: smart_outlet Board: mk3080 +host user: fae +branch: codex/wsl-build-validation +hash: bba690e6a8c6e6c4c6ccd9bd14b320a68957b006 +app_version_new:app-1.6.0-20260807.150245 +firmware type: RELEASE +BOARD=mk3080 CONFIG_COMPILE_DATE=20260807.150245 +/home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK +/home/fae/work/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK + + AOS MEMORY MAP +|=================================================================| +| MODULE | ROM | RAM | +|=================================================================| +| activation | 186 | 0 | +| alicrypto | 34657 | 8784 | +| arch_armv7m | 2161 | 0 | +| awss_security | 112 | 0 | +| board_mk3080 | 511 | 16 | +| chip_code | 311 | 256 | +| cjson | 3913 | 20 | +| cli | 6803 | 549 | +| digest_algorithm | 116 | 0 | +| framework | 257 | 12 | +| hal | 394 | 12 | +| imbedtls | 24973 | 88 | +| iotx-hal | 8656 | 228 | +| kernel_init | 1159 | 48 | +| kv | 3206 | 36 | +| libaiotss | 754 | 0 | +| libc_nano | 33718 | 470 | +| libgcc | 3940 | 0 | +| libiot_sdk | 159258 | 8927 | +| lib_platform | 6556 | 3888 | +| lib_rtlstd | 583 | 1073 | +| lib_wlan | 183499 | 22987 | +| log | 581 | 20 | +| net | 42915 | 3363 | +| netmgr | 2201 | 246 | +| newlib_stub | 294 | 0 | +| ota | 1849 | 1 | +| ota_download | 1463 | 12 | +| ota_hal | 767 | 4 | +| ota_transport | 1256 | 24 | +| ota_verify | 2736 | 12 | +| rhino | 16856 | 7737 | +| rtl8710bn | 10413 | 533 | +| rtl8710bn_Peripheral_Drivers | 1084 | 120 | +| rtl8710bn_SDK | 23182 | 4249 | +| smart_outlet | 14062 | 728 | +| vcall | 1864 | 4 | +| vfs | 1845 | 1209 | +| yloop | 1339 | 24 | +| *fill* | 606 | 257 | +|=================================================================| +| TOTAL (bytes) | 601036 | 65937 | +|=================================================================| +606336 +509aa8f4da1a88b743680e19184cf328 +606364 +0c82b4364c712dd20111005206ca7e3d +build time is 0min 12s +Firmware smart_outlet@mk3080.bin Size=593K