HOME
Shop
  • English
  • 简体中文
HOME
Shop
  • English
  • 简体中文
  • Product Series

    • FPGA+ARM

      • GM-3568JHF

        • Introduction

          • GM-3568JHF Introduction
        • Quick Start

          • Preface
          • Environment Setup
          • Compilation Notes
          • Flashing Guide
          • Debugging Tools
          • Software Update
          • Viewing System Information
          • Test Commands
          • Application Compilation
          • Source Code Access
        • Peripherals & Interfaces

          • USB
          • Display and Touch
          • Ethernet
          • WIFI
          • Bluetooth
          • TF-Card
          • Audio
          • Serial Port
          • CAN
          • RTC
        • Application Development

          • UART Read/Write Demo
          • Key Detection Demo
          • LED Blink Demo
          • MIPI Screen Detection Demo
          • Read USB Device Information Demo
          • FAN Detection Demo
          • FPGA FSPI Communication Demo
          • FPGA DMA Read/Write Demo
          • GPS Debugging Demo
          • Ethernet Test Demo
          • RS485 Read/Write Demo
          • FPGA I2C Read/Write Demo
          • PN532 NFC Card-Reading Demo
          • TF Card Read/Write Demo
        • QT Development

          • ARM64 Cross-Compiler Environment Setup
          • Adding a QT Program to Boot Auto-Start
        • RKNN_NPU Development

          • RK3568 NPU Overview
          • Development Environment Setup
          • Run the Official YOLOv5 Example
        • FPGA Development

          • ARM and FPGA Communication
          • FPGA Development Manual
        • Others

          • Modifying the Root Filesystem
          • System Auto-Start Services
        • Downloads

          • Downloads
      • MB-E30P

        • Introduction

          • MB-E30P Introduction
        • Quick Start

          • Preface
          • Environment Setup
          • Compilation Instructions
          • Flashing Guide
          • Debugging Tools
          • Software Update
          • Viewing Information
          • Test Commands
          • Application Compilation
          • Source Code Acquisition
        • Peripherals & Interfaces

          • USB
          • Display and Touch
          • Ethernet
          • WIFI
          • Bluetooth
          • TF-Card
          • Audio
          • RTC
        • Application Development

          • Key Detection Demo
          • LED Blink Demo
          • MIPI Screen Detection Demo
          • Read USB Device Information Demo
          • FAN Detection Demo
          • FPGA FSPI Communication Demo
          • FPGA DMA Read/Write Demo
          • Ethernet Test Demo
          • FPGA IIC Read/Write Demo
          • PN532 NFC Card Reading Demo
          • TF Card Read/Write Demo
        • QT Development

          • ARM64 Cross-Compiler Environment Setup
          • Adding a QT Program to the Boot Auto-Start Service
        • RKNN_NPU Development

          • RK3568 NPU Overview
          • Development Environment Setup
          • Run the Official YOLOv5 Example
          • Model Conversion In Detail
          • Run Custom Models on the Board
        • FPGA Development

          • ARM and FPGA Communication
          • FPGA Development Manual
        • Others

          • Modifying the Root Filesystem
          • System Auto-Start Service
        • Downloads

          • Downloads
    • ShimetaPi

      • M4-R1

        • Introduction

          • M4-R1 Introduction
        • Quick Start

          • OpenHarmony Overview
          • Image Burning
          • Application Development Quick Start
          • Device Development Quick Start
        • Application Development

          • ArkUI

            • ArkTS Language Overview
            • UI Components - Row Container Introduction
            • UI Components - Column Container Introduction
            • UI Components - Text Component
            • UI Components - Toggle Component
            • UI Components - Slider Component
            • UI Components - Animation Component & Transition Component
          • Documentation

            • OpenHarmony Official Materials
          • Development Notes

            • Full-SDK Replacement Tutorial
            • Introducing and Using Third-Party Libraries
            • HDC Debugging
            • Restore Factory Mode via Command Line
            • Upgrade App to System Permission
          • First App

            • Build Your First ArkTS Application - HelloWorld
          • Demos

            • Serial-Debug-Assistant Application Demo
            • Writing-Board Application Demo
            • Digital Clock Application Demo
            • Wi-Fi Information Acquisition Application Demo
        • Device Development

          • Ubuntu Development

            • Environment Setup
            • Download Source Code
            • Compile Source Code
          • DevEco Device Tool

            • Tool Introduction
            • Development Environment Construction
            • Import the SDK
            • HUAWEI DevEco Tool Function Introduction
        • Kernel Peripherals & Interfaces

          • Guide
          • Device Tree Introduction
          • NAPI Introduction
          • ArkTS Introduction
          • NAPI Development Hands-on Demo
          • GPIO Introduction
          • I2C Communication
          • SPI Communication
          • PWM Control
          • UART Communication
          • TF Card (MicroSD)
          • Screen (Display)
          • Touch
          • Ethernet
          • M.2 SSD
          • Audio
          • WIFI & BT
          • Camera
        • Downloads

          • Downloads
      • M5-R1

        • Introduction

          • M5-R1 Development Docs
        • Quick Start

          • Image Burning
          • Environment Setup
          • Download Source Code
        • Peripherals & Interfaces

          • Raspberry Pi Interfaces
          • GPIO Interface
          • I2C Interface
          • SPI Communication
          • PWM Control
          • Serial Port Communication
          • TF Card
          • Display
          • Touch
          • Audio
          • RTC
          • Ethernet
          • M.2
          • MINI-PCIE
          • Camera
          • WIFI & BT
        • Downloads

          • Downloads
      • Pico-G1

        • Product Overview

          • Product Introduction
          • SDK Version Information
        • Quick Start

          • Development Environment Setup
          • Image Build
          • Image Flashing
          • System Login
          • Network Configuration
          • File Transfer
          • SDK Directory Structure
          • Deploying Your First Application
          • Deploying Your First Driver
          • Mounting an SD Card
        • Peripherals & Interfaces

          • GPIO Control
          • UART Serial Communication
          • I2C Communication
          • SPI Communication
        • MPP Media Development

          • MPP Media Processing Software
          • Image Processing Chain
          • Video Input
          • Image Encoding
        • NPU & AI

          • NPU Driver and Runtime Library Architecture
          • .xmm Model Loading
          • SVP Video Processing
          • AI Noise Reduction (AI_NR)
        • Application Samples

          • Encryption/Decryption Application
          • ADC Acquisition Application
          • Low-Power Application
          • Audio Processing Application
          • Video Encoding Application
          • Video Input Application
          • Video Graphics Subsystem (VGS) Application
          • 08 Region Overlay Application
          • 09 Intelligent Video Engine Application
          • 10 UVC Webcam Application
          • 11 All-in-One Quickstart Application
          • 12 FPN Correction Application
          • 13 Regional Motion Detection Application
          • 14 MTCNN Face Detection Application
        • Expansion Board Peripheral Examples

          • 00 - Pico Expansion Board Peripheral Examples Overview
          • 01 - OLED Display Application
          • 02 - TFT Display Application
          • 03 - MPU6050 Gyroscope Application
          • 04 - ADC Acquisition Application
          • 05 - Passive Buzzer Application
          • 06 - MQ Gas Sensor Application
          • 07 - GPS Positioning Application
          • 08 - SHT20 Temperature & Humidity Application
          • 09 - Ultrasonic Ranging Application
          • 10 - SpO2 Sensor Application
          • 11 - DC Motor Control Application
          • 12 - Servo Control Application
    • OpenHarmony

      • SC-3568HA

        • Introduction

          • SC-3568HA Overview
        • Quick Start Guide

          • OpenHarmony Overview
          • Image Flashing
          • Setting Up the Development Environment
          • Hello World Application and Deployment
        • Application Development

          • ArkUI

            • Introduction to ArkTS Language
            • Introduction to UI Components and Practical Applications (Part 1)
            • Introduction to UI Components and Practical Applications (Part 2)
            • Introduction to UI Components and Practical Applications (Part 3)
          • Expand

            • Getting Started Guide
            • Referencing and Using Third-Party Libraries
            • Application Compilation and Deployment
            • Command-Line Factory Reset
            • System Debugging -- HDC Debugging
            • APP Stability Testing
            • Chapter 7 Application Testing
        • Device Development

          • Environment Setup
          • Download Source Code
          • Compiling Source Code
        • Peripheral And Interface

          • Raspberry Pi interface
          • GPIO Interface
          • I2C Interface
          • SPI communication
          • PWM (Pulse Width Modulation) control
          • Serial port communication
          • TF Card
          • Display Screen
          • Touch
          • Audio
          • RTC
          • Ethernet
          • M.2
          • MINI-PCIE
          • Camera
          • WIFI&BT
          • Raspberry Pi expansion board
        • Downloads

          • Downloads
      • M-K1HSE

        • Introduction

          • M-K1HSE Introduction
        • Quick Start

          • Development environment construction
          • Source code acquisition
          • Compilation Notes
          • Burning Guide
        • Application Development

          • Application Development Environment Setup
          • First Application - Hello World
        • Peripherals and interfaces

          • 01 Audio
          • 02 RS485
          • 03 Display
        • System customization development

          • System transplant
          • System customization
          • Driver Development
          • System Debugging
          • OTA Update
        • Downloads

          • Downloads
    • HVS Camera

      • Quick Start

        • SDK Overview
        • Downloads
        • Your First C++ Program
        • Python Data Analysis
        • MultiVision Studio
      • Development

        • Programming Guides

          • Open Camera
          • Read Events
          • Recording & Replay
          • Event Processing (Denoising)
          • Display & Visualization
          • Tuning
          • Capture APS Image
        • Toolkit SDK

          • Hybrid Vision Toolkit
          • Quick Start
          • C++ API
          • Python API
        • Algorithm

          • Hybrid Vision Algo
          • Hybrid Vision Algo API
          • Windows Algo SDK
        • Samples Overview
        • Applications
      • Fundamentals

        • Event Camera Fundamentals
        • HVS Hybrid Vision
        • Event Visualization
        • Data Formats Reference
        • Glossary
        • Bias & Tuning
        • Video Tutorials
      • USB Cameras

        • HVS Camera Quick Start
        • Networking Capabilities

          • HVS Camera System Architecture
          • EVS Network Server
          • EVS Time Sync
          • Web Window
        • HVS Camera Compatibility Matrix
        • FAQ & Troubleshooting Guide
        • Products

          • CF-NRS1 (Lingguang No.1 Hybrid Vision Camera)
      • MIPI Modules

        • MIPI Module Quick Start
        • Carrier Boards

          • RDK X5 Carrier Board Adaptation
          • Raspberry Pi Carrier Board Adaptation
          • Digua Pi Carrier Board Adaptation
          • ShimeTai Board Carrier Board Adaptation
        • MIPI Module Compatibility Matrix
        • Products

          • EVS_003 Sensor Module
    • AI-model

      • 1684XB-32T

        • Introduction

          • AIBOX-1684XB-32 Introduction
        • Quick Start

          • First Use
          • Network Configuration
          • Disk Usage
          • Memory Allocation
          • Fan Control Strategy
          • Firmware Upgrade
          • Cross Compilation
          • Model Quantization
        • Application Development

          • Development Overview

            • Sophgo SDK Development
            • Sophgo Demo Introduction
          • Large Language Models

            • Deploying Llama3 Example
            • Sophon LLM_api_server Development
            • Deploying MiniCPM-V-2_6
            • Qwen-2-5-VL Image and Video Recognition Demo
            • Qwen3-chat Demo
            • Qwen3-Qwen Agent-MCP Development
            • Qwen3-langchain-AI Agent
          • Deep Learning

            • ResNet (Image Classification)
            • LPRNet (License Plate Recognition)
            • SAM (General Image Segmentation Foundation Model)
            • YOLOv5 (Object Detection)
            • OpenPose (Human Keypoint Detection)
            • PP-OCR (Optical Character Recognition)
        • Downloads

          • Downloads
      • 1684X-416T

        • Introduction

          • AIBOX-1684X-416 Introduction
        • Demo Quick Guide

          • ShimeTai Intelligent Monitoring Demo Quick Usage Guide
      • RDK-X5

        • Introduction

          • RDK-X5 Hardware Introduction
        • Quick Start

          • RDK-X5 Quick Start
        • Application Development

          • AI Online Model Development

            • Experiment 01 - Access Volcengine Doubao AI
            • Experiment 02 - Image Analysis
            • Experiment 03 - Multimodal Visual Analysis & Localization
            • Experiment 04 - Multimodal Image-Text Comparison
            • Experiment 05 - Multimodal Document/Table Analysis
            • Experiment 06 - Camera-based AI Visual Analysis
          • Large Language Models

            • Experiment 01 - Speech Recognition
            • Experiment 02 - Voice Conversation
            • Experiment 03 - Multimodal Image Analysis - Voice
            • Experiment 04 - Multimodal Image Comparison - Voice
            • Experiment 05 - Multimodal Document Analysis - Voice
            • Experiment 06 - Multimodal Vision Application - Voice
          • ROS2 Basics

            • Experiment 01 - Environment Setup
            • Experiment 02 - Create & Build a Workspace Package
            • Experiment 03 - Run ROS2 Topic Communication Node
            • Experiment 04 - ROS2 Camera Application
          • 40-pin IO Development

            • Experiment 01 - GPIO Output (LED Blink)
            • Experiment 02 - GPIO Input
            • Experiment 03 - Button-controlled LED
            • Experiment 04 - PWM Output
            • Experiment 05 - Serial Output
            • Experiment 06 - I2C Experiment
            • Experiment 07 - SPI Experiment
          • USB Module Usage

            • Experiment 01 - USB Voice Module Usage
            • Experiment 02 - Sound Source Localization Module
          • Machine Vision Practice

            • Experiment 01 - Open USB Camera
            • Experiment 02 - Color Recognition
            • Experiment 03 - Gesture Recognition
            • Experiment 04 - YOLOv5 Object Detection
      • RDK-S100

        • Introduction

          • RDK-S100 Hardware Introduction
        • Quick Start

          • RDK-S100 Quick Start
        • Application Development

          • AI Online Model Development

            • Experiment 01 - Access Volcengine Doubao AI
            • Experiment 02 - Image Analysis
            • Experiment 03 - Multimodal Visual Analysis & Localization
            • Experiment 04 - Multimodal Image-Text Comparison
            • Experiment 05 - Multimodal Document/Table Analysis
            • Experiment 06 - Camera-based AI Visual Analysis
          • Large Language Models

            • Experiment 01 - Speech Recognition
            • Experiment 02 - Voice Conversation
            • Experiment 03 - Multimodal Image Analysis - Voice
            • Experiment 04 - Multimodal Image Comparison - Voice
            • Experiment 05 - Multimodal Document Analysis - Voice
            • Experiment 06 - Multimodal Vision Application - Voice
          • ROS2 Basics

            • Experiment 01 - Environment Setup
            • Experiment 02 - Create & Build a Workspace Package
            • Experiment 03 - Run ROS2 Topic Communication Node
            • Experiment 04 - ROS2 Camera Application
          • 40-pin IO Development

            • Experiment 01 - GPIO Output (LED Blink)
            • Experiment 02 - GPIO Input
            • Experiment 03 - Button-controlled LED
            • Experiment 04 - PWM Output
            • Experiment 05 - Serial Output
            • Experiment 06 - I2C Experiment
            • Experiment 07 - SPI Experiment
          • USB Module Usage

            • Experiment 01 - USB Voice Module Usage
            • Experiment 02 - Sound Source Localization Module
          • Machine Vision Practice

            • Experiment 01 - Open USB Camera
            • Experiment 02 - Image Processing Basics
            • Experiment 03 - Object Detection
            • Experiment 04 - Image Segmentation
      • RK1828

        • Introduction

          • M5-182X-A1 AI Edge Box - Product Introduction
          • M5-182X-A1 Hardware Specifications
          • M5-182X-A1 Usage & Safety
        • Quick Start

          • M5-182X-A1 Image Flashing
          • RK182X Hardware Installation & Verification
          • RK182X Development Environment Quick Setup
          • RK182X SDK Overview
          • RK182X Environment Setup in Detail
          • RK182X Quick Start
          • Vendor SDK Data Extraction Record
        • Development Guide

          • ClawChips Architecture and Principles
          • SKILL User Manual
          • RK182X Series LLM Inference (RK1828 Model)
          • RK182X Series CNN Inference (RK1828 Model)
          • Model Conversion
          • RK182X AI Agent Application Development Guide
          • RK182X Industrial Anomaly Detection Application
        • SDK Reference

          • RKNN3-SDK Overview

            • RKNN3 SDK Overview
          • RKNN3-Toolkit

            • RKNN3 Toolkit Installation and Usage
          • RKLLM

            • RKLLM On-Device LLM Inference
          • RK182X Series NPU Overview and Architecture (RK1828 Model)
          • RK182X INT8 Quantized Inference Deployment
          • RK182X MPP Multimedia Framework
          • MPP Details

            • RK182X Video Decoding
            • RK182X Video Encoding
          • NPU Details

            • RKNN Model Conversion
            • RK182X NPU INT8 Quantized Inference
            • RK182X Multi-Model Parallel Inference
          • RGA Details

            • RK182X RGA 2D Graphics Acceleration
          • VPU Details

            • RK182X VPU Codec
        • Hardware Reference

          • RK182X Series Hardware Architecture Overview (RK1828 Model)
          • RK182X Pin Definitions and Multiplexing Configuration
          • RK182X Pin Definitions
          • RK182X Power Management
          • RK182X Clock and PLL Configuration
          • RK182X Clock and Frequency Configuration
        • Tutorials

          • Hello World
          • Hello RK1828 - The First Program
          • RTSP Streaming
          • RTSP Streaming + AI Analysis
          • ShiMetaPi AI Lobster One-Click Deployment
          • PaddleOCR-VL Text Recognition
          • Qwen3-1.7B LLM Text Chat
          • AI Multi-View Inspection (Qwen3-VL Wrapper)
          • YOLOv5 Object Detection
        • Downloads

          • Downloads
        • FAQ

          • FAQ
    • Core-Board

      • C-3568BQ

        • Introduction

          • C-3568BQ Overview
      • C-3588LQ

        • Introduction

          • C-3588LQ Overview
      • GC-3568JBAF

        • Introduction

          • GC-3568JBAF Overview
      • C-K1BA

        • Introduction

          • C-K1BA Overview
    • Software Platform

      • ShiMetaPi Workbench

        • Introduction

          • Product Overview
          • Core Architecture
          • Feature Entries
          • Supported Hardware
          • Release Notes
        • Quick Start

          • Install & Login
          • Connect the Device
          • Set Up the Environment
          • Connect to AIHub
          • First Inference
        • User Guide

          • Workspace Overview
          • Device Manager
          • Model Market
          • One-Click Deploy
          • Vision — SVP
          • Vision - Custom Models
          • shimeta-py IDE
          • Terminal
          • Agent Debug Assistant
          • Settings and Resources
        • FAQ

          • Installation & Login
          • Device Connection
          • Models & Deployment
          • Vision & Runtime
          • Settings & Other
      • ShimetaPi Repository

        • Introduction

          • ShimetaPi Software Repository
        • Pico G1 (GK7206)

          • Quick Start

            • Installation & First Inference
            • shimeta_infer — Image Inference
            • shimeta_camera — Real-time Camera Inference
            • SVP Scene Detection
            • File Transfer & Built-in Model Reference
            • FAQ
          • HTTP API & Python SDK

            • HTTP API Reference
      • Model Fine-tuning Platform

        • Introduction

          • Model Training Platform
        • Quick Start

          • Register & Login
          • Create Your First Model (30-Minute Quick Experience)
        • Training Guide

          • Data Preparation & Annotation
          • Training Parameter Configuration
          • Start & Monitor Training
          • Model Evaluation & Testing
        • Model Deployment

          • Export Model
          • Deploy to Edge Device

System customization

UI Customization

Change the boot logo

The Boot logo can be placed in 2 locations:

The boot logo shared by all schemes is placed at:

device/soc/spacemit/k1/kernel/boot/bootfs is as follows:

|-- boot_logo_spacemit_0.bmp
|-- boot_logo_spacemit_180.bmp
|-- boot_logo_spacemit_270.bmp
`-- boot_logo_spacemit_90.bmp

There are 4 images of the same boot logo, divided into 4 directions. Each plan selects a logo in different directions according to needs. Generally, a 0° logo image is selected.

The customized boot logo for a specific solution is placed at:

device/board/spacemit/xxx/kernel/boot/bootfs

as follows:

|-- boot_logo_ry_270.bmp

The image requirement for bootlogo is a 32-bit bmp image. Place the new boot logo in the above directory, then modify the build_kernel.sh file in device/board/spacemit/smt001/kernel and copy the boot logo to the packaging path.

cp ${OHOS_SOURCE_ROOT}/device/soc/${DEVICE_BOARD}/k1/kernel/boot/bootfs/boot_logo_spacemit_0.bmp ${OHOS_IMAGES_DIR}/bootfs/bianbu.bmp

Change kernel logo

The kernel logo is the logo displayed after the boot logo and between the boot animation. The purpose is to avoid a long black screen between the boot logo and the boot animation. Generally, the pattern of the kernel logo is consistent with the boot logo.

kernel_logo is placed in

device/board/spacemit/common/kernel_logo is as follows:

|-- kernel_logo_ry_270.ppm
|-- kernel_logo_spacemit_0.ppm
|-- kernel_logo_spacemit_180.ppm
|-- kernel_logo_spacemit_270.ppm
`-- kernel_logo_spacemit_90.ppm

After adding the new kernel logo, modify the build_kernel.sh file in device/board/spacemit/smt001/kernel and copy the kernel logo to the kernel compilation path.

cp -rf ${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/common/kernel_logo/kernel_logo_spacemit_0.ppm ${KERNEL_BUILD_ROOT}/drivers/video/logo/

logo_linux_clut224.ppm bmp to ppm Install the conversion tool sudo apt-get install netpbm Execute the script, and xxx.ppm will be generated in the current directory. ./bmp2ppm.sh xxx.bmp The script content is as follows:

 #!/bin/bash
 if [ " $1" == " " ];
 then
     echo "usage:$0 bmp_file"
     exit 0
 fi

 if [ -f "$1" ]
 then
     echo $1
 else
     echo "no find file [$1]"
     exit 0
 fi
 name=${1%%.*}
 bmptopnm $1 > $name.pnm
 pnmquant 224 $name.pnm > $name.clut224.pnm
 pnmtoplainpnm $name.clut224.pnm > $name.ppm
 rm $name.pnm $name.clut224.pnm

Change boot animation

There are two ways to change the boot animation. One is to change the native boot animation, and the other is to add a custom animation. The following are the two ways:

Replace native animation

The native boot animation is bootpic.zip in foundation/graphic/graphic_2d/frameworks/bootanimation/data, which can replace this zip package.

The boot animation zip package includes:

|-- config.json
`-- OH_bootAni compressed
    |-- OH_bootAni_00000.jpg
    |-- OH_bootAni_00001.jpg
    |-- OH_bootAni_00002.jpg
    |-- OH_bootAni_00003.jpg
    |-- ...
    |-- OH_bootAni_00146.jpg
    |-- OH_bootAni_00147.jpg
    |-- OH_bootAni_00148.jpg
    `-- OH_bootAni_00149.jpg
	
The content of config.json is:

{
        "Remark": "FrameRate Support 30, 60 frame rate configuration",
        "FrameRate": 30
}

To customize your own boot animation, you need to follow the above format and content.

Adding custom animations

In the vendor/spacemit/xxx directory, add the bootanimation_custom_config.json configuration file and configure the path of the custom animation as follows:

{
        "cust.bootanimation.pics": "/sys_prod/etc/bootanimation/cust_bootpic.zip",
        "cust.bootanimation.sounds": "/sys_prod/etc/bootanimation/cust_bootsound.wav",
        "cust.bootanimation.video": "/sys_prod/etc/bootanimation/cust_bootvideo.mp4"
}

And put the customized boot animation in the path corresponding to the above file.

Change the startup music

There are two ways to change the startup music. One is to change the original startup music, and the other is to add custom music. The following are the two ways:

Replace original music

The native boot music is bootsound.wav in foundation/graphic/graphic_2d/frameworks/bootanimation/data. You can replace this wav file. The music does not need to be too long.

Add custom music

In the vendor/spacemit directory, add the bootanimation_custom_config.json configuration file and configure the path of the custom music as follows:

{
        "cust.bootanimation.pics": "/sys_prod/etc/bootanimation/cust_bootpic.zip",
        "cust.bootanimation.sounds": "/sys_prod/etc/bootanimation/cust_bootsound.wav",
        "cust.bootanimation.video": "/sys_prod/etc/bootanimation/cust_bootvideo.mp4"
}

And put the customized startup music in the path corresponding to the above file.

Change boot video

There are two ways to change the boot video. One is to change the native boot video, and the other is to add a custom video. The following are the two ways:

Replace the original video

The native boot video is bootvideo.mp4 in foundation/graphic/graphic_2d/frameworks/bootanimation/data. You can replace this mp4 file and ensure that the video encoding format of the boot video is H.264 and the aspect ratio of the video is consistent with the aspect ratio of the screen.

Add a custom video

Under the vendor/spacemit directory, add a bootanimation_custom_config.json configuration file, which configures the path to the customized video as follows:

{
        "cust.bootanimation.pics": "/sys_prod/etc/bootanimation/cust_bootpic.zip",
        "cust.bootanimation.sounds": "/sys_prod/etc/bootanimation/cust_bootsound.wav",
        "cust.bootanimation.video": "/sys_prod/etc/bootanimation/cust_bootvideo.mp4"
}

And put the customized startup video in the path corresponding to the above file.

Application customization

Pre-built applications

Place hap in applications/standard/hap

Modify the configuration of applications/standard/hap/BUILD.gn as follows (taking browser hap as an example):

diff --git a/BUILD.gn b/BUILD.gn
index c9ea451..87ed7aa 100755
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -407,6 +407,13 @@ ohos_prebuilt_etc("tetris_hap") {
   subsystem_name = "applications"
 }

+ohos_prebuilt_etc("broswer_hap") {
+  source = "Broswer.hap"
+  module_install_dir = "app/ohos.samples.browser"
+  part_name = "prebuilt_hap"
+  subsystem_name = "applications"
+}
+
 group("hap") {
   deps = [
     ":calendarData_hap",
@@ -464,6 +471,7 @@ group("hap") {
     "//applications/standard/hap:wuziqi_hap",
     "//applications/standard/hap:deviceinfo_hap",
     "//applications/standard/hap:tetris_hap",
+    "//applications/standard/hap:broswer_hap",
   ]
   if (defined(product_name) && product_name == "watchos") {
     deps -= [

Modify the vendor/spacemit/xxx/preinstall-config/install_list.json configuration for installation, as shown below:

diff --git a/smt001/preinstall-config/install_list.json b/smt001/preinstall-config/install_list.json
index dd859c2..0107e85 100755
--- a/smt001/preinstall-config/install_list.json
+++ b/smt001/preinstall-config/install_list.json
@@ -220,6 +220,10 @@
             "app_dir": "/system/app/ohos.samples.game2048",
             "removable": false
         },
+        {
+            "app_dir": "/system/app/ohos.samples.label",
+            "removable": false
+        },
         {
             "app_dir": "/system/app/com.example.Digital_Huarong_Road",
             "removable": false

Deleting Pre-installed Applications

Deleting an application is the reverse operation of adding an application. You can refer to the above section and delete the corresponding hap configuration in vendor/spacemit/xxx/preinstall-config/install_list.json.

Replace system apps

By Ability, system applications can be divided into the following two categories:

UIAbility, such as Settings, Photos, Camera, etc., these system applications can be displayed on the desktop. ExtensionAbility, such as Launcher, SystemUI, Settingsdata, etc., some of these system applications create windows to display the interface, while others are pageless resident services to provide corresponding capabilities. Therefore, the traditional hdc install command and IDE automatic installation cannot be installed normally. At this time, the replacement of system applications is needed.

Taking Launcher as an example, the steps to replace system applications are as follows:

Find the Launcher preset hap path /system/app/com.ohos.launcher, you can see there are 2 haps under this path: Launcher.hap and Launcher_Settings.hap. Execute the following command

hdc shell "mount -o remount,rw /"
hdc shell "rm -rf /data/*"
hdc file send Launcher.hap /system/app/com.ohos.launcher/Launcher.hap
hdc file send Launcher_Settings.hap /system/app/com.ohos.launcher/Launcher_Settings.hap
hdc shell "reboot"

You can replace and install the Launcher you built normally

Photo Album

Push video

Prepare xxx.mp4 video

Push the video into the machine via hdc

D:\>hdc file send D:\xxx.mp4 /storage/media/100/local/files/Videos/

Triggering a media scan


D:\>hdc shell

Open the photo app and play the video. If there is no video, delete the photo app in the background and re-enter the push image to prepare xxx.jpg or xxx.png images. Push the images to the machine through hdc.

D:\>hdc file send D:\xxx.jpg /storage/media/100/local/files/Pictures/

Triggering a media scan

D:\>hdc shell
# scanner
#

Open the photo app and display the pictures. If there are no pictures, delete the photo app in the background and re-enter the app.

Launcher

Replace background image

The location of the background image is: applications/standard/launcher/product/phone/src/main/ets/common/pics/img_wallpaper_default.jpg

After replacing the image, recompile Launcher, put the newly generated Launcher.hap into the applications/standard/hap folder, and generate a new img.

Lock screen

Remove lock screen

Remove the lock screen application related code in the applications/standard/hap/BUILD.gn file as follows:

diff --git a/BUILD.gn b/BUILD.gn
index e213683..7382b97 100755
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -463,7 +463,6 @@ group("hap") {
     "//applications/standard/hap:note_hap",
     "//applications/standard/hap:notificationManagement_hap",
     "//applications/standard/hap:photos_hap",
-    "//applications/standard/hap:screenLock_hap",
     "//applications/standard/hap:screen_shot_hap",
     "//applications/standard/hap:settingsData_hap",
     "//applications/standard/hap:settings_faceauth_hap",
@@ -518,7 +517,6 @@ group("hap") {
       "//applications/standard/hap:navigationBar_hap",
       "//applications/standard/hap:notificationManagement_hap",
       "//applications/standard/hap:photos_hap",
-      "//applications/standard/hap:screenLock_hap",
       "//applications/standard/hap:screen_shot_hap",
       "//applications/standard/hap:settingsData_hap",
       "//applications/standard/hap:settings_faceauth_hap",

Remove the detection of the lock screen application status at boot time in the foundation/systemabilitymgr/safwk/etc/profile/foundation.cfg file as follows:

diff --git a/etc/profile/foundation.cfg b/etc/profile/foundation.cfg
index f2573fa..1a21510 100644
--- a/etc/profile/foundation.cfg
+++ b/etc/profile/foundation.cfg
@@ -25,7 +25,6 @@
             "name" : "services:restartfoundation",
             "cmds" : [
                 "unset_bootevent bootevent.appfwk.ready",
-                "unset_bootevent bootevent.lockscreen.ready",
                 "unset_bootevent bootevent.launcher.ready",
                 "reset appspawn",
                 "reset accountmgr",
@@ -141,7 +140,6 @@
             "bootevents": [
                 "bootevent.wms.fullscreen.ready",
                 "bootevent.appfwk.ready",
-                "bootevent.lockscreen.ready",
                 "bootevent.launcher.ready",
                 "bootevent.wms.ready"
             ],

Remove the window controller's response to the lock screen signal; because here we only remove the lock screen application, but the mechanism for triggering the lock screen is still there, such as key triggering and remote control triggering, but there is no actual response. If it is not removed, when the mechanism for entering the lock screen is triggered again, the application interface may freeze. Modify the foundation/window/window_manager/wmserver/src/window_controller.cpp file as follows:

diff --git a/wmserver/src/window_controller.cpp b/wmserver/src/window_controller.cpp
index 32c6a60ec..98df12ffc 100644
--- a/wmserver/src/window_controller.cpp
+++ b/wmserver/src/window_controller.cpp
@@ -783,8 +783,8 @@ void WindowController::NotifyDisplayStateChange(DisplayId defaultDisplayId, sptr
     WLOGFD("NotifyDisplayStateChange start: %{public}u", type);
     switch (type) {
         case DisplayStateChangeType::BEFORE_SUSPEND: {
-            isScreenLocked_ = true;
-            windowRoot_->ProcessWindowStateChange(WindowState::STATE_FROZEN, WindowStateChangeReason::KEYGUARD);
+            //isScreenLocked_ = true;
+            //windowRoot_->ProcessWindowStateChange(WindowState::STATE_FROZEN, WindowStateChangeReason::KEYGUARD);
             break;
         }
         case DisplayStateChangeType::BEFORE_UNLOCK: {

Side Effect: No drop-down menu

System customization

Power management customization

Mainly modify vendor/spacemit/xxx/power_config/power_mode_config.xml as follows:

<!--
    Power Mode Definitions:
    MODE_NORMAL = 600,
    MODE_POWER_SAVE = 601,
    MODE_PERFORMANCE = 602,
    MODE_EXTREME_POWER_SAVE = 603,
-->
<!--
    Action Definitions:
    DisplayOffTime = 101,
    SystemAutoSleepTime = 102,
    AutoAdjustBrightness = 103,
    AutoWindowRotation = 107,
    SystemBrightness = 115,
    VibratorsState = 120,
-->
<switch_proxy version="1">
    <proxy id="600">
        <switch id="101" value="300000" recover_flag="0"/>
        <switch id="102" value="0" recover_flag="0"/>
        <switch id="103" value="-1" recover_flag="0"/>
        <switch id="107" value="1" recover_flag="0"/>
        <switch id="115" value="76" recover_flag="0"/>
        <switch id="120" value="1" recover_flag="0"/>
    </proxy>
    <proxy id="601">
        <switch id="101" value="10000" recover_flag="0"/>
        <switch id="102" value="5000" recover_flag="0"/>
        <switch id="103" value="-1" recover_flag="0"/>
        <switch id="107" value="-1" recover_flag="0"/>
        <switch id="115" value="50" recover_flag="0"/>
        <switch id="120" value="-1" recover_flag="0"/>
    </proxy>
    <proxy id="602">
        <switch id="101" value="-1" recover_flag="0"/>
        <switch id="102" value="-1" recover_flag="0"/>
        <switch id="103" value="-1" recover_flag="0"/>
        <switch id="107" value="1" recover_flag="0"/>
        <switch id="115" value="255" recover_flag="0"/>
        <switch id="120" value="1" recover_flag="0"/>
    </proxy>
    <proxy id="603">
        <switch id="101" value="5000" recover_flag="0"/>
        <switch id="102" value="1000" recover_flag="0"/>
        <switch id="103" value="-1" recover_flag="0"/>
        <switch id="107" value="-1" recover_flag="0"/>
        <switch id="115" value="25" recover_flag="0"/>
        <switch id="120" value="-1" recover_flag="0"/>
    </proxy>
</switch_proxy>

This file mainly defines several power management modes, including normal/power saving/performance/super power saving, etc., as well as the parameters of the corresponding management modes, including screen off time, standby time, etc.

The default system is in MODE_NORMAL mode, and you can switch to other modes through commands. For example, if you don't want the system to go into sleep mode, you can switch to performance mode as follows:

power-shell setmode 602

Window management customization

Mainly modify display_manager_config.xml and window_manager_config.xml in the vendor/spacemit/smt001/window_config path

display_manager_config.xml
 <Configs>
    <!--Window display dpi, valid range is 80~640, use 0 if no configuration is requeired-->
    <dpi>240</dpi>
    <!-- Indicate the deviation between the default device display direction and the direction -->
    <!-- of the sensor. Use 0 in default, available values are {0, 90, 180, 270} -->
    <defaultDeviceRotationOffset>0</defaultDeviceRotationOffset>
    <!-- Svg path for cutout, use empty string if there is not cutout on the screen -->
    <!-- format: string -->
    <!-- default value: empty string -->
    <!-- sample: M 100,100 m -75,0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 z -->
    <defaultDisplayCutoutPath></defaultDisplayCutoutPath>
    <!-- Indicates the boundary of the curved screen, each value corresponds to the px from each edge -->
    <!-- format: number(left) number(top) number(right) number(bottom) -->
    <!-- default value: 0 0 0 0 -->
    <!-- sample: 150 150 0 0 -->
    <curvedScreenBoundary>0 0 0 0</curvedScreenBoundary>
    <!-- Indicates whether the built-in display is a waterfall display -->
    <!-- format: boolean -->
    <!-- default value: false -->
    <!-- sample: false -->
    <isWaterfallDisplay enable="false"></isWaterfallDisplay>

    <!-- Indicate whether to enable display area compression for waterfall display when displayed in landscape -->
    <!-- or landscape_inverted mode. -->
    <!-- This configuration item takes effect only when isWaterfallDisplay above is true -->
    <!-- format: boolean -->
    <!-- default value: false -->
    <isWaterfallAreaCompressionEnableWhenHorizontal enable="false"></isWaterfallAreaCompressionEnableWhenHorizontal>

    <!-- Indicate the size of both sides of the waterfall display which to be compressed when displayed in landscape -->
    <!-- or landscape_inverted mode. -->
    <!-- This configuration item takes effect only when isWaterfallDisplay above is true -->
    <!-- format: uint32_t, the unit is vp. -->
    <!-- default value: 0 -->
    <waterfallAreaCompressionSizeWhenHorzontal>0</waterfallAreaCompressionSizeWhenHorzontal>

    <!-- Indicates orientation of the built-in screen -->
    <!-- 0: Orientation::UNSPECIFIED -->
    <!-- 1: Orientation::VERTICAL         2: Orientation::HORIZONTAL-->
    <!-- 3: Orientation::REVERSE_VERTICAL 4: Orientation::REVERSE_HORIZONTAL -->
    <buildInDefaultOrientation>0</buildInDefaultOrientation>
 </Configs>

The main modified configurations are:

dpi: pixel density, the larger the dpi, the smaller the icon buildInDefaultOrientation: desktop rotation angle configuration window_manager_config.xml is mainly used to configure window animations, effects, etc., and there are not many modifications

Network management customization

Wi-Fi Customization

Driver debugging

The debugging function is mainly performed by iteration to ensure that the driver layer functions normally and can compile ko.

Copy ko (taking rtl8852bs as an example)

Copy it in build_kernel.sh of device/board/spacemit/xxx/kernel as follows:

function cp_ko(){
  # cp ko to userspace
  cp ${KERNEL_BUILD_ROOT}/drivers/usb/typec/typec.ko ${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/${DEVICE_NAME}/kernel/ko
  cp ${KERNEL_BUILD_ROOT}/drivers/usb/typec/husb239.ko ${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/${DEVICE_NAME}/kernel/ko
  cp ${KERNEL_BUILD_ROOT}/drivers/net/wireless/realtek/rtl8852be/8852be.ko ${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/${DEVICE_NAME}/kernel/ko
  cp ${KERNEL_BUILD_ROOT}/drivers/net/wireless/realtek/rtl8852bs/8852bs.ko ${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/${DEVICE_NAME}/kernel/ko
}

After compiling the kernel, copy the ko files in the kernel compilation directory to the OpenHarmony system directory. When compiling OpenHarmony, these ko files will be copied to the vendor partition and packaged.

Load ko (take 8852bs as an example)

Load ko in init.xxx.cfg in device/board/spacemit/xxx/cfg as follows:

{
  "name" : "fs",
    "cmds" : [
      "insmod /vendor/modules/8852bs.ko ifname=wlan0 if2name=p2p0",
      "insmod /vendor/modules/typec.ko",
      "insmod /vendor/modules/husb239.ko"
    ]
},

After booting, these ko files will be loaded in the init process. Use the lsmod command to check whether the loading is successful, as follows:

# lsmod
Module                  Size  Used by
husb239               110592  0
typec                 323584  1 husb239
8852bs              10031104  0

Multimedia system customization

Audio path customization

Add sound card information in vendor\spacemit\xxx\hals\audio\alsa_adapter.json.

{
    "adapters": [
        {
            "name": "primary",
            "cardId": 0,
            "cardName": "sndes8326"
        },
        {
            "name": "usb",
            "cardId": 1,
            "cardName": "C"
        }
    ]
}

Configure the audio properties of different sound cards in vendor\spacemit\xxx\hals\audio\config\riscv64\audio_policy_config.xml, including the sampling rate, number of channels, buffer size, etc. for playback and recording.

        <adapter name="primary" supportSelectScene="0">
            <pipes>
                <pipe name="primary_output" role="output">
                    <paProp lib="libmodule-hdi-sink.z.so" role="sink" fixed_latency="1" render_in_idle_state="1" moduleName="Speaker"/>
                    <streamProps>
                        <streamProp format="s16le" sampleRates="48000" channelLayout="CH_LAYOUT_STEREO" bufferSize="4096"/>
                    </streamProps>
                    <attributes>
                        <attribute name="preload" value="true"/>
                    </attributes>
                </pipe>
                <pipe name="primary_input" role="input">
                    <paProp lib="libmodule-hdi-source.z.so" role="source" moduleName="Built_in_mic"/>
                    <streamProps>
                        <streamProp format="s16le" sampleRates="48000" channelLayout="CH_LAYOUT_STEREO" bufferSize="4096"/>
                    </streamProps>
                </pipe>
            </pipes>
            <devices>
                <device name="Speaker_Out" type="DEVICE_TYPE_SPEAKER" pin="PIN_OUT_SPEAKER" role="output" supportPipes="primary_output"/>
                <device name="Wired_Headset_Out" type="DEVICE_TYPE_WIRED_HEADSET" pin="PIN_OUT_HEADSET" role="output" supportPipes="primary_output"/>
                <device name="Wired_Headphones_Out" type="DEVICE_TYPE_WIRED_HEADPHONES" pin="PIN_OUT_HEADPHONE" role="output" supportPipes="primary_output"/>
                <device name="Builtin_Mic_In" type="DEVICE_TYPE_MIC" pin="PIN_IN_MIC" role="input" supportPipes="primary_input"/>
                <device name="Wired_Headset_In" type="DEVICE_TYPE_WIRED_HEADSET" pin="PIN_IN_HS_MIC" role="input" supportPipes="primary_input"/>
            </devices>
        </adapter>
                <adapter name="usb">
            <pipes>
                <pipe name="usb_output" role="output">
                    <paProp lib="libmodule-hdi-sink.z.so" role="sink" fixed_latency="1" render_in_idle_state="1" moduleName="Usb_arm_speaker"/>
                    <streamProps>
                        <streamProp format="s16le" sampleRates="48000" channelLayout="CH_LAYOUT_STEREO" bufferSize="4096"/>
                    </streamProps>
                    <attributes>
                        <attribute name="preload" value="true"/>
                    </attributes>
                </pipe>
                <pipe name="usb_input" role="input">
                    <paProp lib="libmodule-hdi-source.z.so" role="source" moduleName="Usb_arm_mic"/>
                    <streamProps>
                        <streamProp format="s16le" sampleRates="48000" channelLayout="CH_LAYOUT_STEREO" bufferSize="19200"/>
                    </streamProps>
                </pipe>
            </pipes>
            <devices>
                <device name="Usb_Headset_Out" type="DEVICE_TYPE_USB_HEADSET" pin="PIN_OUT_USB_HEADSET" role="output" supportPipes="usb_output"/>
                <device name="Usb_Headset_In" type="DEVICE_TYPE_USB_HEADSET" pin="PIN_IN_USB_HEADSET" role="input" supportPipes="usb_input"/>
            </devices>
        </adapter>

Kernel customization

Modify kernel defconfig configuration

The kernel defconfig is located at:

kernel/linux/spacemit_kernel-6.6/arch/riscv/configs/k1_defconfig

After the modification, compile the kernel separately and then package it, as follows:

./build.sh --product-name xxx --ccache --prebuilt-sdk -T build_kernel
./build/gen_zip.sh xxx

Modify kernel dts configuration

The kernel's dts configuration is located at:

kernel/linux/spacemit_kernel-6.6/arch/riscv/boot/dts/spacemit

As shown below:

|-- k1-x-camera-reserved-mm.dtsi
|-- k1-x-camera-sdk.dtsi
|-- k1-x-camera-sensor.dtsi
|-- k1-x_deb1.dts
|-- k1-x_deb2.dts
|-- k1-x.dtsi
|-- k1-x-efuse.dtsi
|-- k1-x_evb.dts
|-- k1-x-hdmi.dtsi
|-- k1-x_hs450.dts
|-- k1-x_kx312.dts
|-- k1-x-lcd.dtsi
|-- k1-x_lpi3a.dts
|-- k1-x_milkv-jupiter.dts
|-- k1-x_mingo.dts
|-- k1-x_MINI-PC.dts
|-- k1-x_MUSE-Book.dts
|-- k1-x_MUSE-Card.dts
|-- k1-x_MUSE-N1.dts
|-- k1-x_MUSE-Paper2.dts
|-- k1-x_MUSE-Paper.dts
|-- k1-x_MUSE-Paper-mini-4g.dts
|-- k1-x_MUSE-Pi.dts
|-- k1-x_opp_table.dtsi
|-- k1-x_pinctrl.dtsi
|-- k1-x_SMT001.dts
|-- k1-x_thermal_cooling.dtsi
|-- k1-x_ZT001H.dts
|-- lcd
|   |-- lcd_ft8201sinx101_mipi.dtsi
|   |-- lcd_gc9503v_mipi.dtsi
|   |-- lcd_gx09inx101_mipi.dtsi
|   |-- lcd_icnl9911c_mipi.dtsi
|   |-- lcd_icnl9951r_mipi.dtsi
|   |-- lcd_jd9365dah3_mipi.dtsi
|   |-- lcd_jd9365da_mipi_1280x800.dtsi
|   |-- lcd_lt8911_edp_1920x1080.dtsi
|   |-- lcd_lt8911_edp_1920x1200.dtsi
|   |-- lcd_lt9711_dp_1920x1080.dtsi
|   `-- lcd_orisetech_ota7290b_mipi.dtsi
|-- m1-x_milkv-jupiter.dts
`-- Makefile

After modifying the dts configuration of the corresponding solution, compile the kernel separately and then package it, as follows:

./build.sh --product-name xxx --ccache --prebuilt-sdk -T build_kernel
./build/gen_zip.sh xxx

Add the ko that needs to be loaded

If you need to load the ko file compiled by the kernel when the system starts, you need to modify the configuration of the upper layer of OpenHarmony, which is mainly divided into two steps:

Copy ko

Copy it in build_kernel.sh of device/board/spacemit/xxx/kernel as follows:

function cp_ko(){
  # cp ko to userspace
  cp ${KERNEL_BUILD_ROOT}/drivers/usb/typec/typec.ko ${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/${DEVICE_NAME}/kernel/ko
  cp ${KERNEL_BUILD_ROOT}/drivers/usb/typec/husb239.ko ${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/${DEVICE_NAME}/kernel/ko
  cp ${KERNEL_BUILD_ROOT}/drivers/net/wireless/realtek/rtl8852be/8852be.ko ${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/${DEVICE_NAME}/kernel/ko
  cp ${KERNEL_BUILD_ROOT}/drivers/net/wireless/realtek/rtl8852bs/8852bs.ko ${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/${DEVICE_NAME}/kernel/ko
}

After compiling the kernel, copy the ko file in the kernel compilation directory to the OpenHarmony system directory.

Load ko

Load ko in init.xxx.cfg in device/board/spacemit/xxx/cfg as follows:

{
  "name" : "fs",
    "cmds" : [
      "insmod /vendor/modules/8852bs.ko ifname=wlan0 if2name=p2p0",
      "insmod /vendor/modules/typec.ko",
      "insmod /vendor/modules/husb239.ko"
    ]
},

After booting, these ko will be loaded in the init process.

Patching the kernel

First generate the kernel modifications into a patch, and then place the generated patch in the OpenHarmony configuration directory.

For patches common to all platforms, place them in:

device/board/spacemit/kernel_patches/linux-6.6

For patches specific to a particular platform, place them in:

device/board/spacemit/xxx/kernel/kernel_patch
Inside the build_kernel.sh file located in the device/board/spacemit/xxx/kernel directory, apply the relevant patches as follows:

patch -p1 <${OHOS_SOURCE_ROOT}/device/board/spacemit/kernel_patches/linux-6.6/0001-bounds_checking_function-include.patch
patch -p1 <${OHOS_SOURCE_ROOT}/device/board/spacemit/kernel_patches/linux-6.6/0002-fix-hmdfs-permission.patch
patch -p1 <${OHOS_SOURCE_ROOT}/device/board/${DEVICE_BOARD}/${DEVICE_NAME}/kernel/kernel_patch/0001-kernel-audio.patch
Edit this page on GitHub
Prev
System transplant
Next
Driver Development