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
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ idf_component_register(
## 参考项目

robOS 是 TianShanOS 的前身项目,包含已验证的硬件驱动和控制逻辑:
- **仓库地址**:https://github.com/thomas-hiddenpeak/robOS
- **仓库地址**:https://github.com/RMinte-AI/TianshanOS
- **主要分支**:`ThorPlusBattery`(电池/电压保护功能)
- **本地路径**:`/Users/thomas/rm01/robOS`

Expand Down
44 changes: 33 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch matching ESP-IDF cJSON sources for host tests
- name: Fetch matching ESP-IDF cJSON and MbedTLS sources for host tests
run: |
export IDF_PATH="$RUNNER_TEMP/runtime-idf"
echo "IDF_PATH=$IDF_PATH" >> "$GITHUB_ENV"
git clone --depth 1 --branch "$IDF_VERSION" --filter=blob:none --sparse https://github.com/espressif/esp-idf.git "$IDF_PATH"
git -C "$IDF_PATH" sparse-checkout set components/json
git -C "$IDF_PATH" submodule update --init --depth 1 components/json/cJSON
git -C "$IDF_PATH" sparse-checkout set components/json components/mbedtls
git -C "$IDF_PATH" submodule update --init --recursive --depth 1 components/json/cJSON components/mbedtls/mbedtls
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: bash tests/runtime/run_all.sh
- run: bash tests/ws_subscriptions/run_operation_adapter.sh
- run: bash tests/fan_monitor/run_host.sh
- name: Fan output and decay regressions
run: |
python3 tests/fan_review/run_host.py --check --cjson-dir "$IDF_PATH/components/json/cJSON" --output "$RUNNER_TEMP/fan-review.jsonl"
node tests/fan_review/test_ui.cjs "$RUNNER_TEMP/fan-review.jsonl"
python3 tests/fan_decay/run_host.py --csv "$RUNNER_TEMP/fan-decay.csv"
node tests/fan_decay/test_ui.cjs
- name: CSR subject signing and parsing regression
run: |
cmake -S "$IDF_PATH/components/mbedtls/mbedtls" -B "$RUNNER_TEMP/mbedtls" -DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF
cmake --build "$RUNNER_TEMP/mbedtls" --parallel 2
cc -std=c11 -g -fsanitize=address,undefined -Itests/certificate/stubs -Icomponents/ts_cert/include \
-I"$IDF_PATH/components/mbedtls/mbedtls/include" \
tests/certificate/test_subject.c components/ts_cert/src/ts_cert_subject.c \
"$RUNNER_TEMP/mbedtls/library/libmbedx509.a" "$RUNNER_TEMP/mbedtls/library/libmbedcrypto.a" \
-lm -o "$RUNNER_TEMP/csr-subject"
"$RUNNER_TEMP/csr-subject"

build:
name: Build ESP32-S3 Firmware
Expand All @@ -90,18 +107,23 @@ jobs:
with:
path: |
~/esp/esp-idf
~/.espressif
key: esp-idf-${{ env.IDF_VERSION }}-${{ runner.os }}
~/.espressif/tools
~/.espressif/dist
# Python virtual environments embed runner/interpreter paths. Cache
# reusable tools only; create the active Python environment per run.
key: esp-idf-tools-${{ env.IDF_VERSION }}-${{ runner.os }}-v1
restore-keys: |
esp-idf-${{ env.IDF_VERSION }}-
esp-idf-tools-${{ env.IDF_VERSION }}-${{ runner.os }}-

- name: Install ESP-IDF
if: steps.cache-idf.outputs.cache-hit != 'true'
- name: Install ESP-IDF tools and matching Python environment
run: |
mkdir -p ~/esp
cd ~/esp
git clone -b ${{ env.IDF_VERSION }} --depth 1 --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
if [ ! -d ~/esp/esp-idf ]; then
git clone -b ${{ env.IDF_VERSION }} --depth 1 --recursive https://github.com/espressif/esp-idf.git ~/esp/esp-idf
fi
cd ~/esp/esp-idf
# Cached tools may have been installed with a different Python.
# install.sh creates/checks the environment for the active Python.
./install.sh ${{ env.TARGET }}

- name: Setup ESP-IDF environment
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build-root-reset/
!build/www.bin
!build/ota_data_initial.bin
!build/flasher_args.json
!build/firmware-manifest.json
!build/bootloader/
build/bootloader/*
!build/bootloader/bootloader.bin
Expand Down Expand Up @@ -63,3 +64,7 @@ frontend_emoji_list.md

# Local regression dependencies
tests/prompts/node_modules/

# Local browser traces and validation/build snapshots
.playwright-cli/
output/
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

[English](README_EN.md) | [中文](README.md)

[![Build Status](https://github.com/thomas-hiddenpeak/TianshanOS/actions/workflows/build.yml/badge.svg)](https://github.com/thomas-hiddenpeak/TianshanOS/actions/workflows/build.yml)
[![Build Status](https://github.com/RMinte-AI/TianshanOS/actions/workflows/build.yml/badge.svg)](https://github.com/RMinte-AI/TianshanOS/actions/workflows/build.yml)
![Lighthouse Performance](https://img.shields.io/badge/Lighthouse-97-brightgreen?logo=lighthouse&logoColor=white)
[![License](https://img.shields.io/github/license/thomas-hiddenpeak/TianshanOS)](LICENSE)
[![License](https://img.shields.io/github/license/RMinte-AI/TianshanOS)](LICENSE)
![ESP-IDF](https://img.shields.io/badge/ESP--IDF-v5.5+-green?logo=espressif)
![C](https://img.shields.io/badge/C-99-blue?logo=c)
![ESP32-S3](https://img.shields.io/badge/ESP32--S3-supported-blue?logo=espressif)
Expand Down Expand Up @@ -94,9 +94,12 @@ TianshanOS/

### 快速开始

本地最新 **0.6.1** 固件位于 `build/`:`TianShanOS.bin`、`www.bin`、`bootloader/bootloader.bin`、`partition_table/partition-table.bin`、`ota_data_initial.bin`。
`build/firmware-manifest.json` 记录版本、构建标识和文件 SHA-256。刷写时读取同目录的 `flasher_args.json`,不要混用历史构建目录中的镜像。

```bash
# 克隆项目
git clone https://github.com/thomas-hiddenpeak/TianshanOS.git
git clone https://github.com/RMinte-AI/TianshanOS.git
cd TianshanOS

# 设置 ESP-IDF 环境
Expand All @@ -117,7 +120,7 @@ idf.py -p /dev/ttyACM0 flash monitor

### 预编译固件

从 [Releases](https://github.com/thomas-hiddenpeak/TianshanOS/releases/latest) 下载预编译固件,使用 esptool 烧录:
从 [Releases](https://github.com/RMinte-AI/TianshanOS/releases/latest) 下载预编译固件,使用 esptool 烧录:

```bash
esptool.py --chip esp32s3 -p /dev/ttyACM0 write_flash \
Expand Down
11 changes: 7 additions & 4 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

[English](README_EN.md) | [中文](README.md)

[![Build Status](https://github.com/thomas-hiddenpeak/TianshanOS/actions/workflows/build.yml/badge.svg)](https://github.com/thomas-hiddenpeak/TianshanOS/actions/workflows/build.yml)
[![Build Status](https://github.com/RMinte-AI/TianshanOS/actions/workflows/build.yml/badge.svg)](https://github.com/RMinte-AI/TianshanOS/actions/workflows/build.yml)
![Lighthouse Performance](https://img.shields.io/badge/Lighthouse-97-brightgreen?logo=lighthouse&logoColor=white)
[![Release](https://img.shields.io/github/v/release/thomas-hiddenpeak/TianshanOS)](https://github.com/thomas-hiddenpeak/TianshanOS/releases/latest)
[![License](https://img.shields.io/github/license/thomas-hiddenpeak/TianshanOS)](LICENSE)
[![Release](https://img.shields.io/github/v/release/RMinte-AI/TianshanOS)](https://github.com/RMinte-AI/TianshanOS/releases/latest)
[![License](https://img.shields.io/github/license/RMinte-AI/TianshanOS)](LICENSE)
![ESP-IDF](https://img.shields.io/badge/ESP--IDF-v5.5+-green?logo=espressif)
![C](https://img.shields.io/badge/C-99-blue?logo=c)
![ESP32-S3](https://img.shields.io/badge/ESP32--S3-supported-blue?logo=espressif)
Expand Down Expand Up @@ -87,9 +87,12 @@ TianshanOS/

### Quick Start

The latest local **0.6.1** firmware is under `build/`: `TianShanOS.bin`, `www.bin`, `bootloader/bootloader.bin`, `partition_table/partition-table.bin`, and `ota_data_initial.bin`.
`build/firmware-manifest.json` records the version, build identifier, and file SHA-256 values. Use `flasher_args.json` from the same directory; do not mix images from historical build directories.

```bash
# Clone the repository
git clone https://github.com/thomas-hiddenpeak/TianshanOS.git
git clone https://github.com/RMinte-AI/TianshanOS.git
cd TianshanOS

# Set up ESP-IDF environment
Expand Down
Binary file modified build/TianShanOS.bin
Binary file not shown.
Binary file modified build/bootloader/bootloader.bin
Binary file not shown.
33 changes: 33 additions & 0 deletions build/firmware-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "0.6.1",
"build_version": "0.6.1+73069d24d.10090811",
"idf_version": "5.5.2",
"source_base_commit": "73069d24da043a124d89028d25a5e4659d736652",
"source_inputs_sha256": "62e8ba896b9dff39133cecebf677da7c662b850d18981bd1323c0b053e7b1f2d",
"files": {
"TianShanOS.bin": {
"bytes": 2202336,
"sha256": "15f99d11092b91255d8fa24b632316b217d6efeb3acc3e20ed290e0e9fd54378"
},
"www.bin": {
"bytes": 3145728,
"sha256": "feb4bc6f737aff611e534ca439990c99233b7a8879485d65a6e47e82bf075111"
},
"ota_data_initial.bin": {
"bytes": 8192,
"sha256": "7d2c7ac4888bfd75cd5f56e8d61f69595121183afc81556c876732fd3782c62f"
},
"flasher_args.json": {
"bytes": 1169,
"sha256": "5288d74c7e3ee9e0369f93f9418802ad2b455159cae42f6261c29be818034cc9"
},
"bootloader/bootloader.bin": {
"bytes": 22496,
"sha256": "ac6d47f0b046fe2cb91b0bc86f9924885c8ac96d20da87b4d9841ec8c14ee3d8"
},
"partition_table/partition-table.bin": {
"bytes": 3072,
"sha256": "973dfb7f44bdd42d525e53fcc1eb06ac5745687dddc1c73223715df841d785e5"
}
}
}
Binary file modified build/www.bin
Binary file not shown.
Loading
Loading