Compare commits

..
11 changed files with 94 additions and 88 deletions

No files matched your search

+3 -3
View File
@@ -1,10 +1,10 @@
# Build output
/build/
# Firmware images (allow tracked official stock baselines)
# Firmware images (allow tracked official stock baselines in assets/)
*.img
!Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img
!NEBULA_ota_img_V1.1.0.30.img
!assets/Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img
!assets/NEBULA_ota_img_V1.1.0.30.img
# Python cache & temporary files
__pycache__/
+6 -6
View File
@@ -4,19 +4,19 @@ Differences, release milestones, and architecture changes across this workspace.
---
## 1.0.0 — OpenKE Stock USB Installer (2026-09-24)
## 1.0.0 — RosetteOS Stock USB Installer (2026-09-24)
### New Features & Architecture Transformation
* **Transformed Repo into OpenKE Installer**: Repurposed workspace from a stock pre-root patcher into a full-featured stock-compatible installer generator for **OpenKE** (Linux 6.6-rt + Klipper/Moonraker/GuppyScreen).
* **Zero-Disassembly / Single-USB Install**: Users can install OpenKE directly from an unmodified stock printer or Nebula Pad via the touchscreen UI without needing Ingenic mask-ROM recovery mode, cloner tools, or prior root access.
* **Transformed Repo into RosetteOS Installer**: Repurposed workspace from a stock pre-root patcher into a full-featured stock-compatible installer generator for **RosetteOS** (Linux 6.6-rt + Klipper/Moonraker/GuppyScreen).
* **Zero-Disassembly / Single-USB Install**: Users can install RosetteOS directly from an unmodified stock printer or Nebula Pad via the touchscreen UI without needing Ingenic mask-ROM recovery mode, cloner tools, or prior root access.
* **Dual Target Hardware Profiles**:
* **Ender-3 V3 KE** (Board target `F005`)
* **Creality Nebula Smart Kit / Nebula Pad** (Board target `NEBULA`)
* **Standalone Build Script (`build_openke_image.sh`)**:
* **Standalone Build Script (`build_rosetteos_image.sh`)**:
* Automates preflight checks, asset selection, packaging, and validation.
* Supports `--target {ke,nebula,all}`, `--version`, `--artifacts`, and `--output`.
* **Direct OpenKE Packager (`tools/pack_openke.py`)**:
* Directly encapsulates production OpenKE `xImage` and `rootfs.squashfs` without requiring SquashFS re-compression.
* **Direct RosetteOS Packager (`tools/pack_rosetteos.py`)**:
* Directly encapsulates production RosetteOS `xImage` and `rootfs.squashfs` without requiring SquashFS re-compression.
* Validates hardware partition budgets: Kernel $\le$ 8 MiB (5.54 MiB used), Rootfs $\le$ 500 MiB (330.85 MiB used).
* Validates SHA256 checksums against `build-manifest.txt`.
* Generates 1 MiB payload chunks, MD5 hash sidecars, and Creality manifests.
+10 -10
View File
@@ -8,8 +8,8 @@ This document contains technical reference information on stock firmware layouts
| Target | Official Baseline Image | Version | Board Name | Derived 7z Encryption Password |
| :--- | :--- | :--- | :--- | :--- |
| **Ender-3 V3 KE** | `Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img` | `V1.1.0.17` | `F005` | `$1$cxswfile$ZFd0RWFYkJQugbtKVGL9y0` |
| **Nebula Pad** | `NEBULA_ota_img_V1.1.0.30.img` | `V1.1.0.30` | `NEBULA` | `$1$cxswfile$XG7ANbYX3bq2H2xmmwrka.` |
| **Ender-3 V3 KE** | `assets/Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img` | `V1.1.0.17` | `F005` | `$1$cxswfile$ZFd0RWFYkJQugbtKVGL9y0` |
| **Nebula Pad** | `assets/NEBULA_ota_img_V1.1.0.30.img` | `V1.1.0.30` | `NEBULA` | `$1$cxswfile$XG7ANbYX3bq2H2xmmwrka.` |
### Password Derivation Algorithm
```bash
@@ -17,7 +17,7 @@ openssl passwd -1 -salt cxswfile "${BOARD_NAME}C3_7e_bz"
```
Or in Python:
```python
derive_creality_password(board_name) # implemented in tools/pack_openke.py
derive_creality_password(board_name) # implemented in tools/pack_rosetteos.py
```
---
@@ -26,7 +26,7 @@ derive_creality_password(board_name) # implemented in tools/pack_openke.py
Creality's X2000 partition table enforces hard upper bounds on flashable images:
| Sub-Payload | Target Partition | Hardware Limit | OpenKE Payload Size | Headroom |
| Sub-Payload | Target Partition | Hardware Limit | RosetteOS Payload Size | Headroom |
| :--- | :--- | :--- | :--- | :--- |
| **`xImage`** (Linux kernel) | `kernel` (`p5`) / `kernel2` (`p6`) | **8 MiB** (8,388,608 B) | **5.54 MiB** (5,541,952 B) | +2.71 MiB (66.1% used) |
| **`rootfs.squashfs`** | `rootfs` (`p7`) / `rootfs2` (`p8`) | **500 MiB** (524,288,000 B) | **330.85 MiB** (346,923,008 B) | +169.15 MiB (66.2% used) |
@@ -38,15 +38,15 @@ Both kernel and rootfs fit comfortably with substantial safety margins.
## 3. Tooling Overview
* **[`build_openke_image.sh`](file:///root/Development/OpenKE/DarKE/build_openke_image.sh)**:
Top-level script for building ready-to-flash OpenKE `.img` files directly from build artifacts.
* **[`tools/pack_openke.py`](file:///root/Development/OpenKE/DarKE/tools/pack_openke.py)**:
* **[`build_rosetteos_image.sh`](build_rosetteos_image.sh)**:
Top-level script for building ready-to-flash RosetteOS `.img` files directly from build artifacts.
* **[`tools/pack_rosetteos.py`](tools/pack_rosetteos.py)**:
Core Python packager. Validates partition budgets, verifies SHA256 against `build-manifest.txt`, slices payloads into 1 MiB chunks with MD5 sidecars, derives board passwords, and compresses encrypted 7z envelopes.
* **[`assets/zero.bin`](file:///root/Development/OpenKE/DarKE/assets/zero.bin)**:
* **[`assets/zero.bin`](assets/zero.bin)**:
Cached RTOS binary for the Ender-3 V3 KE (`F005`).
* **[`assets/zero_nebula.bin`](file:///root/Development/OpenKE/DarKE/assets/zero_nebula.bin)**:
* **[`assets/zero_nebula.bin`](assets/zero_nebula.bin)**:
Cached RTOS binary for the Nebula Smart Kit / Nebula Pad (`NEBULA`).
* **[`tools/ke_firmware.py`](file:///root/Development/OpenKE/DarKE/tools/ke_firmware.py)**:
* **`tools/ke_firmware.py`** (historical):
Legacy utility for extracting stock images, overlaying files onto stock rootfs, and repacking pre-rooted stock images.
---
+22 -22
View File
@@ -1,8 +1,8 @@
# OpenKE Stock USB Installer & Firmware Workspace
# RosetteOS Stock USB Installer & Firmware Workspace
A standalone utility to package **[OpenKE](https://github.com/coreflake1/OpenKE)** (Linux 6.6-rt + Klipper/Moonraker/GuppyScreen) directly into stock CrealityOS-supported OTA update (`.img`) containers.
A standalone utility to package **RosetteOS** (Linux 6.6-rt + Klipper/Moonraker/GuppyScreen) directly into stock CrealityOS-supported OTA update (`.img`) containers.
This enables a **zero-disassembly, single-USB installation of OpenKE straight from an unmodified stock printer or Nebula Pad touchscreen** without requiring Ingenic mask-ROM recovery mode, cloner utilities, or prior root access.
This enables a **zero-disassembly, single-USB installation of RosetteOS straight from an unmodified stock printer or Nebula Pad touchscreen** without requiring Ingenic mask-ROM recovery mode, cloner utilities, or prior root access.
---
@@ -10,8 +10,8 @@ This enables a **zero-disassembly, single-USB installation of OpenKE straight fr
| Device | Board Identifier | Official Stock Baseline | Generated OTA Installer Package |
| :--- | :--- | :--- | :--- |
| **Creality Ender-3 V3 KE** | `F005` | `Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img` | [`build/Ender-3_V3_KE_F005_ota_img_V1.1.0.34.img`](build/Ender-3_V3_KE_F005_ota_img_V1.1.0.34.img) |
| **Creality Nebula Pad** | `NEBULA` | `NEBULA_ota_img_V1.1.0.30.img` | [`build/NEBULA_ota_img_V1.1.0.34.img`](build/NEBULA_ota_img_V1.1.0.34.img) |
| **Creality Ender-3 V3 KE** | `F005` | [`assets/Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img`](assets/Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img) | [`build/Ender-3_V3_KE_F005_ota_img_V1.1.0.34.img`](build/Ender-3_V3_KE_F005_ota_img_V1.1.0.34.img) |
| **Creality Nebula Pad** | `NEBULA` | [`assets/NEBULA_ota_img_V1.1.0.30.img`](assets/NEBULA_ota_img_V1.1.0.30.img) | [`build/NEBULA_ota_img_V1.1.0.34.img`](build/NEBULA_ota_img_V1.1.0.34.img) |
---
@@ -37,21 +37,21 @@ This enables a **zero-disassembly, single-USB installation of OpenKE straight fr
Build for **Ender-3 V3 KE** (default):
```bash
./build_openke_image.sh --target ke
./build_rosetteos_image.sh --target ke
```
Build for **Nebula Pad**:
```bash
./build_openke_image.sh --target nebula
./build_rosetteos_image.sh --target nebula
```
Build for **Both Devices in One Run**:
```bash
./build_openke_image.sh --target all
./build_rosetteos_image.sh --target all
```
By default, the script automatically:
1. Locates OpenKE build artifacts in `../OpenKE/artifacts/buildroot-halley5-v30-image/`.
1. Locates RosetteOS build artifacts in `../RosetteOS/artifacts/buildroot-halley5-v30-image/`.
2. Validates partition budgets:
- `xImage`: 5.54 MiB / 8 MiB (66.1% capacity, 2.71 MiB free).
- `rootfs.squashfs`: 330.85 MiB / 500 MiB (66.2% capacity, 169.15 MiB free).
@@ -64,10 +64,10 @@ By default, the script automatically:
```bash
# Custom artifacts directory and custom version
./build_openke_image.sh --target nebula --artifacts /path/to/artifacts --version 1.1.0.35
./build_rosetteos_image.sh --target nebula --artifacts /path/to/artifacts --version 1.1.0.35
# Or invoke the Python packager directly
python3 tools/pack_openke.py --target nebula --artifacts-dir ../OpenKE/artifacts/buildroot-halley5-v30-image
python3 tools/pack_rosetteos.py --target nebula --artifacts-dir ../RosetteOS/artifacts/buildroot-halley5-v30-image
```
---
@@ -86,18 +86,18 @@ python3 tools/pack_openke.py --target nebula --artifacts-dir ../OpenKE/artifacts
- Flash `rootfs.squashfs` to `rootfs2` (`/dev/mmcblk0p8`).
- Flash `zero.bin` to `rtos2` (`/dev/mmcblk0p4`).
- Set the bootloader marker in `/dev/mmcblk0p1` to `ota:kernel2`.
- Automatically reboot into OpenKE.
7. On first boot, OpenKE seeds `/usr/data/openke/` and starts Klipper, Moonraker, and GuppyScreen.
- Automatically reboot into RosetteOS.
7. On first boot, RosetteOS seeds `/usr/data/rosetteos/` and starts Klipper, Moonraker, and GuppyScreen.
---
## 3. Safety & Dual-Slot A/B Architecture
* **Non-Destructive Install**: The stock CrealityOS operating system resides permanently in **Slot 1** (`mmcblk0p5`/`p7`) and is **never overwritten**. OpenKE is installed cleanly into **Slot 2** (`mmcblk0p6`/`p8`).
* **Persistent Data Isolation**: Both operating systems share `/usr/data`, but OpenKE isolates its entire runtime in `/usr/data/openke/`. Stock Creality configs (`/usr/data/creality/`), printer calibrations, and WiFi credentials remain completely untouched.
* **Non-Destructive Install**: The stock CrealityOS operating system resides permanently in **Slot 1** (`mmcblk0p5`/`p7`) and is **never overwritten**. RosetteOS is installed cleanly into **Slot 2** (`mmcblk0p6`/`p8`).
* **Persistent Data Isolation**: Both operating systems share `/usr/data`, but RosetteOS isolates its runtime in `/usr/data/rosetteos/`. Stock Creality configs (`/usr/data/creality/`), printer calibrations, and WiFi credentials remain untouched.
* **Instant Reversion to Stock**: If you ever want to revert to stock CrealityOS, simply toggle the boot marker back to Slot 1:
```bash
# From OpenKE SSH shell:
# From the RosetteOS SSH shell:
echo -n "ota:kernel" > /dev/mmcblk0p1 && sync && reboot
```
@@ -116,7 +116,7 @@ For in-depth architectural and developer documentation:
* **[Firmware Notes](FIRMWARE_NOTES.md)**:
Official baselines, derived encryption keys, partition budgets, and tool usage notes.
* **[Firmware Changelog](FIRMWARE_CHANGELOG.md)**:
Project history from DarKE v0.0.1 pre-root to OpenKE USB Installer v1.0.0.
Project history from DarKE v0.0.1 pre-root to the RosetteOS USB Installer v1.0.0.
---
@@ -124,14 +124,14 @@ For in-depth architectural and developer documentation:
```
DarKE/
├── Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img # Stock CrealityOS baseline for Ender-3 V3 KE (F005)
├── NEBULA_ota_img_V1.1.0.30.img # Stock CrealityOS baseline for Nebula Pad (NEBULA)
├── build_openke_image.sh # Automated build wrapper script
├── build_rosetteos_image.sh # Automated build wrapper script
├── README.md # Workspace overview & quickstart
├── FIRMWARE_NOTES.md # Architecture notes & encryption keys
├── FIRMWARE_CHANGELOG.md # Version changelog & release milestones
├── requirements.txt # Python dependencies (`py7zr`)
├── assets/ # Standalone RTOS binaries
├── assets/ # Vendor baseline images & RTOS binaries
│ ├── Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img # Stock CrealityOS baseline for Ender-3 V3 KE (F005)
│ ├── NEBULA_ota_img_V1.1.0.30.img # Stock CrealityOS baseline for Nebula Pad (NEBULA)
│ ├── zero.bin # Stock RTOS for Ender-3 V3 KE (F005)
│ └── zero_nebula.bin # Stock RTOS for Nebula Pad (NEBULA)
├── docs/ # In-depth technical documentation
@@ -139,7 +139,7 @@ DarKE/
│ ├── A_B_PARTITION_MODEL.md # GPT partition layout & slot mechanics
│ └── TROUBLESHOOTING.md # USB diagnostics & common issues
├── tools/
│ └── pack_openke.py # OpenKE stock OTA packager
│ └── pack_rosetteos.py # RosetteOS stock OTA packager
└── build/ # Generated OTA installer images
├── Ender-3_V3_KE_F005_ota_img_V1.1.0.34.img
└── NEBULA_ota_img_V1.1.0.34.img
File renamed without changes.
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
#
# build_openke_image.sh
# build_rosetteos_image.sh
#
# Generates a stock-compatible CrealityOS OTA firmware (.img) directly from
# OpenKE build artifacts. The resulting file can be placed on a FAT32 USB drive
# and flashed via the stock touchscreen UI to install OpenKE to Slot 2.
# RosetteOS build artifacts. The resulting file can be placed on a FAT32 USB drive
# and flashed via the stock touchscreen UI to install RosetteOS to Slot 2.
#
# Supports:
# - Ender-3 V3 KE (Target F005)
@@ -17,7 +17,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${SCRIPT_DIR}"
# Defaults
DEFAULT_ARTIFACTS="${SCRIPT_DIR}/../OpenKE/artifacts/buildroot-halley5-v30-image"
DEFAULT_ARTIFACTS="${SCRIPT_DIR}/../RosetteOS/artifacts/buildroot-halley5-v30-image"
DEFAULT_VERSION="1.1.0.34"
DEFAULT_TARGET="ke"
@@ -30,23 +30,23 @@ usage() {
cat << EOF
Usage: $(basename "$0") [OPTIONS]
Packages OpenKE kernel and rootfs into a stock CrealityOS-supported update .img.
Packages the RosetteOS kernel and rootfs into a stock CrealityOS-supported update .img.
Options:
-t, --target TARGET Target hardware profile:
ke - Ender-3 V3 KE (F005) [Default]
nebula - Creality Nebula Pad (NEBULA)
all - Build images for both devices
-a, --artifacts DIR Directory containing OpenKE build artifacts (xImage, rootfs.squashfs)
(Default: ../OpenKE/artifacts/buildroot-halley5-v30-image)
-a, --artifacts DIR Directory containing RosetteOS build artifacts (xImage, rootfs.squashfs)
(Default: ../RosetteOS/artifacts/buildroot-halley5-v30-image)
-v, --version VER Package version for Creality updater (Default: 1.1.0.34)
-o, --output FILE Output .img file path (single target only)
-h, --help Show this help message and exit
Examples:
./build_openke_image.sh # Builds for Ender-3 V3 KE
./build_openke_image.sh --target nebula # Builds for Nebula Pad
./build_openke_image.sh --target all # Builds both KE and Nebula images
./build_rosetteos_image.sh # Builds for Ender-3 V3 KE
./build_rosetteos_image.sh --target nebula # Builds for Nebula Pad
./build_rosetteos_image.sh --target all # Builds both KE and Nebula images
EOF
exit 0
}
@@ -80,7 +80,7 @@ while [[ $# -gt 0 ]]; do
done
echo "=================================================================="
echo " OpenKE Stock OTA Firmware Generator"
echo " RosetteOS Stock OTA Firmware Generator"
echo "=================================================================="
echo " Target Device: ${TARGET}"
echo " Artifacts Directory: ${ARTIFACTS_DIR}"
@@ -98,24 +98,30 @@ fi
# Ensure assets are present
mkdir -p "${SCRIPT_DIR}/assets"
if [[ ! -f "${SCRIPT_DIR}/assets/zero.bin" && -f "${SCRIPT_DIR}/Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img" ]]; then
KE_STOCK_IMG="${SCRIPT_DIR}/assets/Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img"
[[ ! -f "${KE_STOCK_IMG}" && -f "${SCRIPT_DIR}/Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img" ]] && KE_STOCK_IMG="${SCRIPT_DIR}/Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img"
if [[ ! -f "${SCRIPT_DIR}/assets/zero.bin" && -f "${KE_STOCK_IMG}" ]]; then
echo "[*] Extracting assets/zero.bin from KE stock image..."
7z e -p'$1$cxswfile$ZFd0RWFYkJQugbtKVGL9y0' -r "${SCRIPT_DIR}/Ender-3_V3_KE_F005_ota_img_V1.1.0.17.img" 'zero.bin*' -o"${SCRIPT_DIR}/assets" -y >/dev/null
7z e -p'$1$cxswfile$ZFd0RWFYkJQugbtKVGL9y0' -r "${KE_STOCK_IMG}" 'zero.bin*' -o"${SCRIPT_DIR}/assets" -y >/dev/null
cp "${SCRIPT_DIR}/assets/zero.bin.0000."* "${SCRIPT_DIR}/assets/zero.bin" 2>/dev/null || true
rm -f "${SCRIPT_DIR}/assets/zero.bin.0000."*
fi
if [[ ! -f "${SCRIPT_DIR}/assets/zero_nebula.bin" && -f "${SCRIPT_DIR}/NEBULA_ota_img_V1.1.0.30.img" ]]; then
NEBULA_STOCK_IMG="${SCRIPT_DIR}/assets/NEBULA_ota_img_V1.1.0.30.img"
[[ ! -f "${NEBULA_STOCK_IMG}" && -f "${SCRIPT_DIR}/NEBULA_ota_img_V1.1.0.30.img" ]] && NEBULA_STOCK_IMG="${SCRIPT_DIR}/NEBULA_ota_img_V1.1.0.30.img"
if [[ ! -f "${SCRIPT_DIR}/assets/zero_nebula.bin" && -f "${NEBULA_STOCK_IMG}" ]]; then
echo "[*] Extracting assets/zero_nebula.bin from Nebula stock image..."
7z e -p'$1$cxswfile$XG7ANbYX3bq2H2xmmwrka.' -r "${SCRIPT_DIR}/NEBULA_ota_img_V1.1.0.30.img" 'zero.bin*' -o"${SCRIPT_DIR}/assets" -y >/dev/null
7z e -p'$1$cxswfile$XG7ANbYX3bq2H2xmmwrka.' -r "${NEBULA_STOCK_IMG}" 'zero.bin*' -o"${SCRIPT_DIR}/assets" -y >/dev/null
cp "${SCRIPT_DIR}/assets/zero.bin.0000."* "${SCRIPT_DIR}/assets/zero_nebula.bin" 2>/dev/null || true
rm -f "${SCRIPT_DIR}/assets/zero.bin.0000."*
fi
# Check OpenKE artifacts
# Check RosetteOS artifacts
if [[ ! -d "${ARTIFACTS_DIR}" ]]; then
echo "ERROR: Artifacts directory not found: ${ARTIFACTS_DIR}" >&2
echo "Please build OpenKE first or specify --artifacts <dir>." >&2
echo "Please build RosetteOS first or specify --artifacts <dir>." >&2
exit 1
fi
@@ -140,7 +146,7 @@ if [[ -n "${OUTPUT}" ]]; then
ARGS+=("--output" "${OUTPUT}")
fi
python3 "${SCRIPT_DIR}/tools/pack_openke.py" "${ARGS[@]}"
python3 "${SCRIPT_DIR}/tools/pack_rosetteos.py" "${ARGS[@]}"
echo
echo "Build complete! Output files are located in build/"
+6 -6
View File
@@ -8,7 +8,7 @@ This document details the eMMC physical partition layout, the hardware A/B slot
The onboard eMMC is partitioned with a standard GPT partition table:
| Partition | Label | Fixed Capacity | Mount / Role | Active Slot 1 (Stock) | Active Slot 2 (OpenKE) |
| Partition | Label | Fixed Capacity | Mount / Role | Active Slot 1 (Stock) | Active Slot 2 (RosetteOS) |
| :--- | :--- | :--- | :--- | :--- | :--- |
| `/dev/mmcblk0p1` | `ota` | **1 MiB** | Boot marker storage | Stores `ota:kernel` or `ota:kernel2` | Shared |
| `/dev/mmcblk0p2` | `sn_mac` | **1 MiB** | Factory serial & MAC addresses | Read-only identity | Shared |
@@ -28,7 +28,7 @@ The onboard eMMC is partitioned with a standard GPT partition table:
The bootloader (U-Boot) reads the 1 MiB `ota` partition (`/dev/mmcblk0p1`) on power-up to decide which kernel and rootfs to mount. The partition contains a simple ASCII string:
* `ota:kernel` $\rightarrow$ Boots **Slot 1** (Stock CrealityOS: kernel `p5`, rootfs `p7`).
* `ota:kernel2` $\rightarrow$ Boots **Slot 2** (Custom / OpenKE: kernel `p6`, rootfs `p8`).
* `ota:kernel2` $\rightarrow$ Boots **Slot 2** (Custom / RosetteOS: kernel `p6`, rootfs `p8`).
### How Stock OTA Updater Flashes to Slot 2
@@ -39,7 +39,7 @@ When you run a USB update from the stock Creality touchscreen:
- Flashes `rootfs.squashfs` to `rootfs2` (`mmcblk0p8`).
- Flashes `zero.bin` to `rtos2` (`mmcblk0p4`).
3. Calls `local_set_next_boot_device`, which writes `ota:kernel2` into `mmcblk0p1`.
4. Reboots into OpenKE.
4. Reboots into RosetteOS.
> [!NOTE]
> Stock firmware in Slot 1 (`mmcblk0p5` and `mmcblk0p7`) is **never overwritten** by this process.
@@ -55,14 +55,14 @@ When you run a USB update from the stock Creality touchscreen:
├── creality/ # Stock CrealityOS files (gcode, logs, userdata, factory data)
│ ├── userdata/
│ └── printer_data/
└── openke/ # OpenKE isolated runtime
└── rosetteos/ # RosetteOS isolated runtime
├── apps/ # Mutable checkouts (klipper, moonraker, mainsail)
├── envs/ # Python virtual environments
├── system/ # Boot logs, activation state, machine configs
└── printer_data/ # Klipper config (printer.cfg), macros, Moonraker DB
```
Because OpenKE namespaces all its data under `/usr/data/openke/`, flashing OpenKE does not erase or corrupt stock print history, WiFi credentials, or factory calibration files.
Because RosetteOS namespaces its data under `/usr/data/rosetteos/`, flashing it does not erase or corrupt stock print history, WiFi credentials, or factory calibration files.
---
@@ -70,7 +70,7 @@ Because OpenKE namespaces all its data under `/usr/data/openke/`, flashing OpenK
If you ever wish to return to stock CrealityOS, you do not need to reflash. You simply toggle the boot marker back to Slot 1:
### From OpenKE Shell (SSH)
### From a RosetteOS shell (SSH)
```bash
echo -n "ota:kernel" > /dev/mmcblk0p1
sync
+3 -3
View File
@@ -35,7 +35,7 @@ openssl passwd -1 -salt cxswfile "${BOARD_NAME}C3_7e_bz"
| **Creality K1** | `CR4CU220812S12` | `CR4CU220812S12C3_7e_bz` | Board-derived key |
> [!TIP]
> `tools/pack_openke.py` includes a pure-Python implementation of Unix MD5-crypt, making password derivation completely cross-platform without external tools.
> `tools/pack_rosetteos.py` includes a pure-Python implementation of Unix MD5-crypt, making password derivation completely cross-platform without external tools.
---
@@ -150,7 +150,7 @@ sequenceDiagram
LU->>BL: Streams zero.bin chunks -> mmcblk0p4 (rtos2)
LU->>BL: Writes "ota:kernel2" to /dev/mmcblk0p1
LU->>MS: Returns success
MS->>User: Reboots printer into OpenKE
MS->>User: Reboots printer into RosetteOS
```
### The Critical Folder-Name Matching Rule
@@ -165,4 +165,4 @@ ota_site_config=$ota_site/ota_config.in
```
> [!IMPORTANT]
> If the archive file is named `NEBULA_ota_img_V1.1.0.34.img`, `OTA_UNZIP_FILE_NAME` evaluates to `NEBULA_ota_img_V1.1.0.34`. The root directory inside the 7z archive **must match that exact string**. If the archive has a different folder name (e.g. `OpenKE_...`), `cp -f $ota_site_config` fails and the update aborts immediately.
> If the archive file is named `NEBULA_ota_img_V1.1.0.34.img`, `OTA_UNZIP_FILE_NAME` evaluates to `NEBULA_ota_img_V1.1.0.34`. The root directory inside the 7z archive **must match that exact string**. If the archive has a different folder name, `cp -f $ota_site_config` fails and the update aborts immediately.
+3 -3
View File
@@ -1,6 +1,6 @@
# Troubleshooting & USB Flashing Diagnostics
This document covers common issues when flashing OpenKE via USB OTA, root causes, and diagnostic steps.
This document covers common issues when flashing RosetteOS via USB OTA, root causes, and diagnostic steps.
---
@@ -29,7 +29,7 @@ The screen detects the update, you click "Update Now", the progress bar appears
### Root Cause:
* Creality's updater extracts the 7z archive to a temporary directory and looks for `ota_config.in` in `<TEMP_DIR>/<UNZIP_FOLDER>/ota_config.in`.
* If the root directory inside the 7z archive does not match the `.img` filename (without `.img`), `cp -f $ota_site_config` fails.
* **Resolution**: The updated `build_openke_image.sh` / `tools/pack_openke.py` guarantees this alignment automatically. Ensure you use images built with the latest packager.
* **Resolution**: The updated `build_rosetteos_image.sh` / `tools/pack_rosetteos.py` guarantees this alignment automatically. Ensure you use images built with the latest packager.
---
@@ -48,7 +48,7 @@ The UI says the firmware is already up-to-date or newer.
* If your device is running `1.1.0.30` and the package version is `1.1.0.30` or lower, it refuses to flash.
* **Fix**: Pass a higher version number when running the build script:
```bash
./build_openke_image.sh --target nebula --version 1.1.0.35
./build_rosetteos_image.sh --target nebula --version 1.1.0.35
```
---
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
"""
OpenKE Firmware Packager for Ender-3 V3 KE and Creality Nebula Pad.
RosetteOS Firmware Packager for Ender-3 V3 KE and Creality Nebula Pad.
Packages OpenKE kernel (xImage) and rootfs (rootfs.squashfs) along with the board-specific
Packages the RosetteOS kernel (xImage) and rootfs (rootfs.squashfs) along with the board-specific
RTOS firmware (zero.bin) into a stock CrealityOS-supported encrypted 7z OTA (.img) update.
CRITICAL REQUIREMENT (from /etc/ota_bin/local_ota_update.sh):
@@ -33,7 +33,7 @@ RTOS_PART_MAX_BYTES = 4 * 1024 * 1024 # 4 MiB (mmcblk0p3 / mmcblk0p4)
CHUNK_SIZE = 1024 * 1024 # 1 MiB
DEFAULT_VERSION = "1.1.0.34"
DEFAULT_OPENKE_ARTIFACTS = Path("..") / "OpenKE" / "artifacts" / "buildroot-halley5-v30-image"
DEFAULT_ROSETTEOS_ARTIFACTS = Path("..") / "RosetteOS" / "artifacts" / "buildroot-halley5-v30-image"
# Target profiles
# NOTE: Filenames must follow Creality's native pattern so master-server and local_ota_update.sh
@@ -255,7 +255,7 @@ def verify_archive(archive_path: Path, password: str) -> None:
print(" [+] Archive verification passed: 100% valid encrypted 7z envelope.")
def build_openke_ota_image(
def build_rosetteos_ota_image(
ximage_path: Path,
rootfs_path: Path,
zero_path: Path,
@@ -265,9 +265,9 @@ def build_openke_ota_image(
password: str,
target_desc: str = "Creality Display",
) -> Path:
"""End-to-end packaging function for OpenKE OTA .img."""
"""End-to-end packaging function for RosetteOS OTA .img."""
print("=" * 65)
print(f" OpenKE Firmware Packager: {target_desc}")
print(f" RosetteOS Firmware Packager: {target_desc}")
print("=" * 65)
if not ximage_path.exists():
@@ -310,7 +310,7 @@ def build_openke_ota_image(
if archive_name.endswith(".img"):
archive_name = archive_name[:-4]
with tempfile.TemporaryDirectory(prefix="openke_ota_stage_") as tmpdir:
with tempfile.TemporaryDirectory(prefix="rosetteos_ota_stage_") as tmpdir:
stage_dir = Path(tmpdir)
staging_root = stage_dir / archive_name
version_dir = staging_root / f"ota_v{version}"
@@ -364,7 +364,7 @@ def build_openke_ota_image(
verify_archive(output_img, password)
print("=" * 65)
print(" SUCCESS: OpenKE OTA Image Created Successfully!")
print(" SUCCESS: RosetteOS OTA Image Created Successfully!")
print(f" Target Image: {output_img}")
print(f" Size: {output_img.stat().st_size:,} bytes ({output_img.stat().st_size / (1024*1024):.2f} MiB)")
print(f" Package Ver: {version}")
@@ -374,16 +374,16 @@ def build_openke_ota_image(
print(f" 2. Copy '{output_img.name}' to the root of the USB drive.")
print(" 3. Insert the USB drive into the printer / Nebula Pad front USB port.")
print(" 4. On the touchscreen: Settings -> Firmware Update -> Local Update.")
print(" 5. Select the update and confirm. The device will flash OpenKE to")
print(" 5. Select the update and confirm. The device will flash RosetteOS to")
print(" Slot 2, point the bootloader to ota:kernel2, and automatically reboot.")
print(" 6. First boot will seed /usr/data/openke and launch Klipper & Moonraker.")
print(" 6. First boot will seed /usr/data/rosetteos and launch Klipper & Moonraker.")
print("=" * 65)
return output_img
def parse_args(argv: Sequence[str] | None = None) -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Package OpenKE build artifacts into stock CrealityOS-compatible USB update (.img) packages."
description="Package RosetteOS build artifacts into stock CrealityOS-compatible USB update (.img) packages."
)
parser.add_argument(
"--target",
@@ -395,10 +395,10 @@ def parse_args(argv: Sequence[str] | None = None) -> argparse.Namespace:
"--artifacts-dir",
type=Path,
default=None,
help="Path to OpenKE build artifacts directory (contains xImage, rootfs.squashfs, and build-manifest.txt)",
help="Path to RosetteOS build artifacts directory (contains xImage, rootfs.squashfs, and build-manifest.txt)",
)
parser.add_argument("--ximage", type=Path, default=None, help="Explicit path to OpenKE xImage")
parser.add_argument("--rootfs", type=Path, default=None, help="Explicit path to OpenKE rootfs.squashfs")
parser.add_argument("--ximage", type=Path, default=None, help="Explicit path to the RosetteOS xImage")
parser.add_argument("--rootfs", type=Path, default=None, help="Explicit path to the RosetteOS rootfs.squashfs")
parser.add_argument("--manifest", type=Path, default=None, help="Explicit path to build-manifest.txt")
parser.add_argument(
"--zero-bin",
@@ -430,8 +430,8 @@ def main(argv: Sequence[str] | None = None) -> int:
artifacts_dir = args.artifacts_dir
if artifacts_dir is None and (args.ximage is None or args.rootfs is None):
if DEFAULT_OPENKE_ARTIFACTS.exists():
artifacts_dir = DEFAULT_OPENKE_ARTIFACTS
if DEFAULT_ROSETTEOS_ARTIFACTS.exists():
artifacts_dir = DEFAULT_ROSETTEOS_ARTIFACTS
ximage = args.ximage
rootfs = args.rootfs
@@ -484,7 +484,7 @@ def main(argv: Sequence[str] | None = None) -> int:
output = output.resolve()
try:
build_openke_ota_image(
build_rosetteos_ota_image(
ximage_path=ximage,
rootfs_path=rootfs,
zero_path=zero_bin,