Skip to content

Commit

Permalink
update build os doc and optimize all doc title
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Aug 15, 2024
1 parent ce09aa1 commit 9ede45f
Show file tree
Hide file tree
Showing 114 changed files with 224 additions and 239 deletions.
2 changes: 1 addition & 1 deletion docs/doc/en/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Quick Start
title: MaixCAM MaixPy Quick Start
---

<div style="font-size: 1.2em;border: 2px solid green; border-color:#c33d45;padding:1em; text-align:center; background: #c33d45; color: white">
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/ai_model_converter/maixcam.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Convert ONNX Model to a Format Usable by MaixCAM (MUD)
title: Convert ONNX Model to a Format Usable by MaixCAM / MaixPy (MUD)
---

## Introduction
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/audio/play.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Playback Audio
title: MaixCAM MaixPy Playback Audio
update:
- date: 2024-05-20
author: lxowalle
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/audio/record.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Audio Record
title: MaixCAM MaixPy Audio Record
update:
- date: 2024-05-20
author: lxowalle
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/basic/app.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: App development and app stores
title: MaixCAM MaixPy App development and app stores
---

## Introduction to Application Ecosystem
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/basic/app_usage.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Application User Guide
title: MaixCAM MaixPy Application User Guide
---

After powering on, it will automatically enter the application selection interface, where various built-in applications are available in the [MaixHub App Store](https://maixhub.com/app). Here you can find descriptions and instructions for using each corresponding application.
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/basic/maixpy_upgrade.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Update MaixPy.
title: MaixCAM Update MaixPy.
---

There are two methods to begin with. If you are new to this and want to keep things simple, you can try using the pre-installed MaixPy firmware on the TF card that comes with the device. You can consider updating it later.
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/basic/maixvision.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixVision -- MaixPy Programming IDE + Graphical Block Programming
title: MaixVision -- MaixCAM MaixPy Programming IDE + Graphical Block Programming
---

## Introduction
Expand Down
4 changes: 2 additions & 2 deletions docs/doc/en/basic/os.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Upgrade and burn system.
title: MaixCAM MaixPy Upgrade and burn system.
---

## Introduction
Expand All @@ -24,5 +24,5 @@ Alternate link:

## Burning the System Image to MaixCAM

Refer to the [MaixCAM System Burning](https://wiki.sipeed.com/hardware/zh/maixcam/os.html) tutorial. Note that if the conditions for `USB Burning` are met, it is recommended to use the `USB Burning` method. The USB burning method does not require removing the TF card.
Refer to the hardware documentation [MaixCAM System Burning](https://wiki.sipeed.com/hardware/zh/maixcam/os.html) tutorial. Note that if the conditions for `USB Burning` are met, it is recommended to use the `USB Burning` method. The USB burning method does not require removing the TF card.

2 changes: 1 addition & 1 deletion docs/doc/en/basic/python_pkgs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Add extra Python packages.
title: MaixCAM MaixPy Add extra Python packages.
---

## Introduction
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/basic/view_src_code.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: How to Find the Source Code Corresponding to MaixPy API
title: MaixCAM MaixPy How to Find the Source Code Corresponding to MaixPy API
---

## Introduction
Expand Down
4 changes: 2 additions & 2 deletions docs/doc/en/faq.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: MaixPy FAQ (Frequently Asked Questions)
title: MaixCAM MaixPy FAQ (Frequently Asked Questions)
---

This page lists common questions and solutions related to MaixPy. If you encounter any issues, please search for answers here first.
If you cannot find an answer on this page, you can post your question with detailed steps on the [MaixHub Discussion Forum](https://maixhub.com/discussion).

If you use MaixCAM, you can also refer to [MaixCAM FAQ](https://wiki.sipeed.com/hardware/zh/maixcam/faq.html)
If you use MaixCAM, you can also refer to [MaixCAM Hardware Documentation FAQ](https://wiki.sipeed.com/hardware/zh/maixcam/faq.html)

## MaixVision cannot find the device?

Expand Down
8 changes: 8 additions & 0 deletions docs/doc/en/modules/acc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: MaixCAM MaixPy 读取加速度计和姿态解算
---

对于 MaixCAM-Pro,板载了一个 6 轴加速度计,可以******

TODO:

2 changes: 1 addition & 1 deletion docs/doc/en/modules/temp_humi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Reading Temperature and Humidity Sensors with MaixPy
title: Reading Temperature and Humidity Sensors with MaixCAM MaixPy
---

## Introduction
Expand Down
6 changes: 6 additions & 0 deletions docs/doc/en/modules/thermal_cam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Using Thermal Infrared Image Sensors with MaixCAM and MaixPy

Currently, the official hardware product is not yet available. If you only need low resolution, you can purchase a serial or I2C module from online platforms like Taobao and drive it yourself. This document will be updated when the official high-resolution module is released.

For thermal infrared camera modules, you might consider options such as [K210 + MLX90640 Infrared Thermal Imager](https://neucrack.com/p/189) or [Heimann HTPA 32x32d Thermal Infrared](https://neucrack.com/p/199).

5 changes: 5 additions & 0 deletions docs/doc/en/modules/tof.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Using TOF Modules for Distance Measurement and Terrain Detection with MaixCAM and MaixPy

Sipeed offers [two additional TOF modules](https://wiki.sipeed.com/hardware/zh/maixsense/index.html) that can be used for distance measurement. These modules can be purchased and used with serial communication for your projects.


2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/adc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Using ADC in MaixPy
title: Using ADC in MaixCAM MaixPy
update:
- date: 2024-06-11
author: iawak9lkm
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/gpio.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MaixPy Using GPIO
# MaixCAM MaixPy Using GPIO

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/i2c.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Using I2C with MaixPy
title: Using I2C with MaixCAM MaixPy
---

> Note: Requires MaixPy image and firmware >= 4.2.1
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/pinmap.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Using PINMAP in MaixPy
title: Using PINMAP in MaixCAM MaixPy
update:
- date: 2024-06-11
author: iawak9lkm
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/pwm.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Using PWM in MaixPy
# Using PWM in MaixCAM MaixPy

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/spi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Using SPI in MaixPy
title: Using SPI in MaixCAM MaixPy
update:
- date: 2024-06-11
author: iawak9lkm
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/wdt.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Using Watchdog Timer in MaixPy
# Using Watchdog Timer in MaixCAM MaixPy

## Introduction

Expand Down
94 changes: 32 additions & 62 deletions docs/doc/en/pro/compile_os.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,51 @@
---
title: Building the System for MaixCAM
title: Compiling a System for MaixCAM MaixPy
---

## Customizing and Compiling the System
## Why Customize the System?

You can download the latest system suitable for MaixCAM from [https://github.com/sipeed/MaixPy/releases](https://github.com/sipeed/MaixPy/releases).
Typically, you can download the latest system for MaixCAM directly from [this link](https://github.com/sipeed/MaixPy/releases). However, there are some scenarios where you might need to customize the system:

For the latest base system, download it from [https://github.com/sipeed/LicheeRV-Nano-Build/releases](https://github.com/sipeed/LicheeRV-Nano-Build/releases). Please note that this system cannot be directly flashed to MaixCAM as it may damage the screen.
* For example, if you are mass-producing 1,000 products and want each to have your own application that automatically starts on boot, without configuring each one individually, you can modify the `builtin_files` and package a system. Once this system is flashed onto the boards, they will all include your custom files, eliminating the need to copy them again after booting.
* If the official system does not include the software packages or drivers you need, you can compile your own system and select the packages you want to include.

For system source code and compilation instructions, refer to [https://github.com/sipeed/LicheeRV-Nano-Build](https://github.com/sipeed/LicheeRV-Nano-Build). It is recommended to use the Docker compilation method mentioned in the README to avoid compilation issues (note that the compiled system cannot be directly flashed to MaixCAM as it may damage the screen).
## Obtaining the Base System

## Copying Files for MaixCAM

After compilation, you will get an img file. For MaixCAM, additional files need to be added to this img file. Download the [compressed package](https://github.com/sipeed/MaixPy/releases/download/v4.3.2/sys_builtin_files_2024.6.19.tar.xz), extract it, and save the script from the appendix as `update_img.sh`. Copy the `img` file, then execute `./update_img.sh path_to_sys_builtin_files path_to_copied_img`. This `img` can now be used for flashing to MaixCAM.

However, note that the compressed package is of version `v4.3.2` and not the latest version. Adjust its contents according to your needs. Additionally, MaixPy is in the `usr/lib` directory, which can also be manually updated.

## Appendix `update_img.sh`:

```shell
#!/bin/sh

set -e

source_dir=$1
img_file=$2
mount_root=img_root
The principle is to use a system from [this link](https://github.com/sipeed/LicheeRV-Nano-Build/releases) as the base (note that this system cannot be directly flashed onto MaixCAM as it may damage the screen), then copy the MaixCAM-specific files into the base system and repackage it into a system usable by MaixCAM.

img_file=$(readlink -f "$img_file")
THISDIR=$(dirname $(realpath $0))
If you don't need to customize the base system, you can directly download the latest system image from [here](https://github.com/sipeed/LicheeRV-Nano-Build/releases).

if [ -z $img_file ]
then
echo "usage: $0 new_rootfs_dir image_file"
fi
If the base system doesn't meet your requirements, such as needing to add or remove some software packages and drivers, follow the instructions in the [LicheeRV-Nano-Build repository](https://github.com/sipeed/LicheeRV-Nano-Build) README to compile the system. It's recommended to use Docker for compilation to avoid environment issues and to use `bash` instead of `zsh`.

if [ ! -e $mount_root ]
then
mkdir -pv $mount_root
fi
Remember, the compiled system should not be flashed directly onto MaixCAM, as it might damage the screen.

set -eux

PART=2

PART_OFFSET=$(partx -s $img_file | head -n 3 | tail -n 1 | awk '{print $2}')
PART_OFFSET=$((PART_OFFSET * 512)) # sector size is 512
## Copying Files for MaixCAM

echo "PART: $PART"
echo "PART OFFSET: $PART_OFFSET"
Prepare the following:

# some old version fuse2fs not support offset
$THISDIR/fuse2fs -o fakeroot -o offset=$PART_OFFSET $img_file $mount_root
* The base system, which is a `.img` or `.img.xz` file.
* Additional files for MaixCAM can be downloaded from the [MaixPy release page](https://github.com/sipeed/MaixPy/releases). Download the latest `builtin_files.tar.xz`.
> If you need to add custom files to the system, you can extract the files and add them to the appropriate directory. For example, if you want a `cat.jpg` file to be in the `/root` directory after flashing, simply place `cat.jpg` in the `root` directory.
* Download or clone the MaixPy source code locally.
* Compile MaixPy to obtain the `.whl` installation package, or you can download the latest installation package from the [MaixPy release page](https://github.com/sipeed/MaixPy/releases).

# copy root files
echo "copy root files now"
find $source_dir -mindepth 1 -maxdepth 1 -type d ! -name "boot" -exec cp -r {} $mount_root \;
sync
echo "copy root files done"
In the `MaixPy/tools/os` directory, run the following command:

# umount
umount $mount_root
```shell
./gen_os.sh <base_os_filepath> <maixpy_whl_filepath> <builtin_files_dir_path> <os_version_str> [skip_build_apps]
```

echo "copy boot files now"
# Change to source directory
cd "$source_dir/boot" || exit
Here’s what each parameter means:
* **base_os_filepath**: The path to the base system, in `.img` or `.img.xz` format.
* **maixpy_whl_filepath**: The MaixPy package, in `.whl` format.
* **builtin_files_dir_path**: The custom files for MaixCAM, which can be downloaded from the MaixPy release page.
* **os_version_str**: The system version, which should follow a format like `maixcam-2024-08-16-maixpy-v4.4.21`.
* **skip_build_apps**: Skip compiling built-in applications. Set to 1 to skip, otherwise it will compile and copy apps from MaixCDK and MaixPy into the system.

# Iterate through all files in the source directory
for file in *; do
# Check if the file is a regular file
if [ -f "$file" ]; then
# Copy individual file to the target directory
mcopy -o -i "$img_file@@1s" "$file" ::/
echo "Copied $file to $img_file boot partition"
fi
done
Example command:

sync
echo "copy boot files done"
```shell
./gen_os.sh '/home/xxx/.../LicheeRV-Nano-Build/install/soc_sg2002_licheervnano_sd/images/2024-08-13-14-43-0de38f.img' ../../dist/MaixPy-4.4.21-py3-none-any.whl '/home/xxx/.../sys_builtin_files' maixcam-2024-08-15-maixpy-v4.4.21
```

After waiting for the built-in apps to compile and copy, you should find a `maixcam-2024-08-15-maixpy-v4.4.21.img.xz` system image in the `MaixPy/tools/os/tmp` directory.
2 changes: 1 addition & 1 deletion docs/doc/en/projects/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Practical Projects with MaixPy, Introduction and Collection
title: Practical Projects with MaixCAM MaixPy, Introduction and Collection
---

## Introduction
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/projects/face_tracking.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Face Tracking 2 axis servo gimbal
title: MaixCAM MaixPy Face Tracking 2 axis servo gimbal
update:
- date: 2024-06-11
author: iawak9lkm
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/projects/line_tracking_robot.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Line Tracking Robot (/Car)
title: MaixCAM MaixPy Line Tracking Robot (/Car)
update:
- date: 2024-05-09
author: lxowalle
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/source_code/add_c_module.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Adding a C/C++ Module to MaixPy
title: Adding a C/C++ Module to MaixCAM MaixPy
---

## Introduction
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/source_code/build.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy develop source code guide
title: MaixCAM MaixPy develop source code guide
---

## Get source code
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/source_code/contribute.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Contributing to MaixPy Documentation Modification and Code Contribution
title: Contributing to MaixCAM MaixPy Documentation Modification and Code Contribution
---

## Contributing to MaixPy Documentation Modification
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/source_code/faq.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MaixPy Source Code FAQ
MaixCAM MaixPy Source Code FAQ
===

## subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/source_code/maixcdk.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Switching to MaixCDK for C/C++ Application Development
title: MaixCAM Switching to MaixCDK for C/C++ Application Development
---

In addition to developing with MaixPy, there is also a corresponding C/C++ SDK available, called [MaixCDK](https://github.com/sipeed/MaixCDK).
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/video/jpeg_streaming.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Video Stream JPEG Streaming / Sending Images to Server
title: MaixCAM MaixPy Video Stream JPEG Streaming / Sending Images to Server
update:
- date: 2024-04-03
author: neucrack
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/video/record.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Video Record
title: MaixCAM MaixPy Video Record
update:
- date: 2024-05-20
author: lxowalle
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/video/rtmp_streaming.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Video Streaming RTMP Push Streaming
title: MaixCAM MaixPy Video Streaming RTMP Push Streaming
update:
- date: 2024-05-31
author: lxowalle
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/video/rtsp_streaming.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Video Streaming RTSP Push Streaming
title: MaixCAM MaixPy Video Streaming RTSP Push Streaming
update:
- date: 2024-05-20
author: lxowalle
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/vision/ai.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Basic Knowledge of AI Vision
title: MaixCAM MaixPy Basic Knowledge of AI Vision
update:
- date: 2024-04-03
author: neucrack
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/vision/apriltag.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Apriltag Recognition
title: MaixCAM MaixPy Apriltag Recognition
update:
- date: 2024-04-03
author: lxowalle
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/vision/body_key_points.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Title: MaixPy Human Keypoint Pose Detection
# MaixCAM MaixPy Human Keypoint Pose Detection

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/vision/camera.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MaixPy Camera Usage
title: MaixCAM MaixPy Camera Usage
update:
- date: 2024-04-03
author: neucrack
Expand Down
Loading

0 comments on commit 9ede45f

Please sign in to comment.