Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:add airbox en docs #68

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
sidebar_position: 4
---

# Radxa Fogwise AirBox

<Tabs queryString="target">

<TabItem value="Radxa Fogwise AirBox" label="Radxa Fogwise AirBox">

## Products

Radxa Fogwise AirBox is an embedded AI micro-server with arithmetic power up to 32TOPS@INT8, supports multiple precision (INT8, FP16/BF16, FP32), supports private GPT, text-to-image, and other mainstream AI model deployments, and is equipped with an aluminum alloy casing for deployment in harsh environments.

#### Characterization

| module | Radxa Fogwise AirBox |
| :------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **sizes** | 104 mm × 84 mm × 50.2 mm |
| **processing unit** | SOPHON SG2300X SoC,octa-core Arm® Cortex®-A53 (ARMv8) @ 2.3GHz |
| **tensor processing unit** | Tensor Processing Unit, computational power: up to 32TOPS (INT8), 16TFLOPS (FP16/BF16) and 2TFLOPS (FP32)<br/>Support for major deep learning frameworks including TensorFlow, Caffe, PyTorch, Paddle, ONNX, MXNet, Tengine and DarkNet. |
| **memory** | 16GB LPDDR4X |
| **storage** | 64GB eMMC<br/>16MB SPI Flash<br/>High Speed SD Card Slot Available |
| **multimedia** | Supports decoding 32 channels of H.265/H.264 1080p@25fps video<br/>Fully handles 32 channels of HD 1080p@25fps video, including decoding and AI analytics<br/>Supports encoding 12 channels of H.265/H.264 1080p@25fps video <br/>JPEG: 1080p@600fps, max. Support 32768 x 32768<br/>Support video post-processing, including image CSC, resize, crop, fill, border, font, contrast and brightness adjustment |
| **interface** | 2 Gigabit Ethernet ports (RJ45)<br/>1 M.2 M-key slot for NVMe SSDs. |
| **operating temperature** | 0°C to 40°C |
| **housings** | Corrosion-resistant aluminum alloy housing |
| **radiator** | PWM speed control fan with custom heat sink |

#### Photograph of sth.

![Fogwise AirBox Overview](/img/airbox/radxa_fogwise_airbox.webp)

### Chip block diagram

![SG2300X Block Diagram](/img/aicore-sg2300x/sg2300x-block-diagram.webp)

### System block diagram

![Fogwise AirBox Block Diagram](/img/airbox/airbox-block-diagram.webp)

</TabItem>

</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 25
---

# CasaOS

This section mainly introduces the CasaOS system, the installation of local AI large model applications within the CasaOS system, and the construction of large model applications in CasaOS.

<DocCardList />
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 3
---

# Build Custom Large Model Software on CasaOS

import Casaosappbuild from '../../../common/ai/\_casaos_app_build.mdx';

<Casaosappbuild />
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 2
---

# Deploy AI Large Models on CasaOS

import Casaosappinstall from '../../../common/ai/\_casaos_app_install.mdx';

<Casaosappinstall />
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 1
---

# CasaOS Introduction

import Casaosintro from '../../../common/ai/\_casaos_intro.mdx';

<Casaosintro />
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 10
---

# Getting Started

<DocCardList />
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
sidebar_position: 4
title: Resource Download
---

### Hardware Design

### Quality Certification
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
sidebar_position: 2
title: System Installation
---

This document describes how to install an OS image into AirBox.

## Preparation

- 1x microSD card (capacity >=16GB, read/write speed >= class10)
- 1x microSD card reader
- 20V power adapter (system image installed under the whole machine, 20V power supply for the whole machine)
- One usb type-a to type-c cable (log output)

## Image Download

Please go to [Resources Download](/sophon/airbox/getting-started/download.md) Download the corresponding image file.

## System Installation

### 1.Flash the image

Balena Etcher is a cross-platform and user-friendly image burning tool that we recommend you to use.

1. Download [Etcher](https://etcher.balena.io/#download-etcher/) and installed.

![](/img/common/etcher/rock5a-step1.webp)

2. Open Etcher and click `Flash from file` to select the image you want to write to.

![](/img/common/etcher/rock5a-step2.webp)

3. Click `Select target` to select the device, please be careful with the selection.

![](/img/common/etcher/rock5a-step3.webp)

4. Click `Flash!` to start writing, then wait for the write progress bar to complete.

![](/img/common/etcher/rock5a-step4.webp)

5. When writing the image is successful, Etcher will display `Flash Complete!`.

![](/img/common/etcher/rock5a-step5.webp)

**If you get an error flashing the OS image, try again manually.**

### 2.SD Card Brush

Please power off the Fogwise AirBox, insert the SD card, and connect the serial terminal (use usb type-a to type-c cable, type-c connects to the debug port of the Fogwise AirBox, type a connects to the computer, the baud rate is set to 115200, and the location of the debug port is in the [hardware-interface](/sophon/airbox/hardware-design/hardware-interface.md) to find it, then power up the whole machine. You will see
The SG2300X automatically enters the flashing process:

```
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
fs reading /boot.scr
891 bytes read in 5 ms (173.8 KiB/s)
## Executing script at 300040000
Setting bus to 1
LED 'status' not found (err=-19)
LED 'error' not found (err=-19)
update SPI flash
fs reading //boot_spif.scr
746 bytes read in 5 ms (145.5 KiB/s)
## Executing script at 300040000
fs reading //spi_flash.bin
5385980 bytes read in 673 ms (7.6 MiB/s)
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
chip_type=bm1684x
device 0 offset 0x0, size 0x200000
0 bytes written, 2097152 bytes skipped in 2.844s, speed 754032 B/s
SPI flash update done
update eMMC
```

Flashing usually takes about 3 minutes, after finishing, you will see a prompt to unplug the SD card and reboot the SG2300X, please follow the steps below
Please follow the instructions:

```
eMMC update done
bm savelog 449 bytes written in 10 ms (43 KiB/s)
all done
LED 'status' not found (err=-19)
LED 'error' not found (err=-19)
LED 'status' not found (err=-19)
Please remove the installation medium, then reboot
LED 'status' not found (err=-19)
```

:::tip
If the burning process fails, usually caused by the chip is hot, then please wait for the chip to cool down to a certain degree and then re-power into the brush process!
:::

## System Startup

- After successfully burning the image to emmc as described above, remove the microSD card and power up the Fogwise AirBox.

## Precautions

It is recommended that you use the sudo poweroff command when shutting down your computer, and try to avoid direct power off to avoid file system corruption.
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
sidebar_position: 1
---

# Preparation

## power supply

AirBox Powered by Type-C connector, needs 20V / 65W power input.

## Access to equipment

The default user name and password for the system are as follows:

User one:

```
username: linaro
password: linaro
```

User two:

```
username: admin
password: admin
```

### Serial Login

Use the USB Type-A to Type-C cable to connect the Debug port of the whole machine and the PC side, the baud rate is set to 115200, the connection diagram:

![](/img/airbox/connection-diagram-1.webp)

#### Serial port usage under WIndows

Serial port driver is required under WIndows:[Installation of Serial Driver](/sophon/airbox/getting-started/serial-driver-install.md)

After you have installed it, illustrated with the Putty tool:

1. Launch the application Putty on a Windows PC and set it up as follows:

- Select Session in the left column, set the serial line to COM1, the baud rate to 115200, and the connection type to Serial.
- Write the name you want to set in the Saved Sessions column and press Save.

![](/img/airbox/putty-setting-1.webp)

2. Select Serial at the bottom in the left column and configure it according to the following parameters:

![](/img/airbox/putty-setting-2.webp)

3. After the settings are completed, click Open to open the serial port.

#### Serial port usage under Linux

Illustrated with the Picocom tool:

1. Install Picocom:

```
sudo apt-get update

sudo apt-get install picocom
```

2. Turn on Picocom:

```
sudo picocom -b 115200 /dev/ttyUSBX
```

X is a different device, usually 0.

### SSH Login

#### Via WAN port

Connection schematic:

![](/img/airbox/connection-diagram-2.webp)

First, use Angryip to find the IP.

Use this method to look up the ip address when you cannot operate the motherboard directly to obtain the ip address without a screen or remotely.

- First the host PC needs to download [Angryip](https://angryip.org/download/), Then make sure that the host PC and the board are on the same LAN.

- Open Angryip, select the IP range, which is in the range of 192.168.2.0 - 192.168.2.255 (select the network segment where the host computer is located with the motherboard), and click Start as shown in the figure.

- ![](/img/airbox/angryip-settion.webp)

- Press Ctrl + F to look for the `bm1684` keyword to find the IP address of the board.

After obtaining the board IP:

##### Debian/Ubuntu

```
ssh [username]@[hostname]
or
ssh [username]@[IP address]
example:
ssh [email protected]
```

##### Windows

Windows has a number of SSH tools, Here is [Mobaxterm](https://mobaxterm.mobatek.net/) to show you how to connect.

Click `Session` in the upper left corner to create a new SSH connection, enter the board's IP in the `Remote host` field, check `Specify usernema` and fill in the logged-in user, double-click the session to start the connection and enter the login password to connect.

![](/img/airbox/angryip.webp)

#### Via LAN port

Connection schematic:

![](/img/airbox/connection-diagram-3.webp)

This way does not need to get the IP first, LAN port fixed IP for 192.168.150.1, after knowing the IP for 192.168.150.1 and WAN port using the same method can SSH login system, but we need to change the computer's IP to 150 network segment, for example, set our computer's IP to 192.168.150.5.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
sidebar_position: 3
---

# Installation of Serial Driver

On Windows PC, AirBox needs to install the serial driver of CP210, the driver download address:https://www.silabs.com/documents/public/software/CP210x_Universal_Windows_Driver.zip

Download the zip file and unzip it and then refer to the following picture to install it.

![](/img/airbox/serial-driver-install-1.webp)

After the installation is complete, open the device manager, view the following, you can see the corresponding device appears at the port.

![](/img/airbox/serial-driver-install-2.webp)

Just see the corresponding device at the port.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 35
---

# hardware development

Introduces hardware information, such as hardware interfaces, supported accessories, etc.

<DocCardList />
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
sidebar_position: 4
---

# Hardware Interface Description

<!-- The following interfaces are deleted if they are not present, and added if there are interfaces that are not listed. -->

## Interface Overview

![](/img/airbox/radxa_fogwise_airbox.webp)

##

**Supports 20V / 65W power input.**

## Debugging Serial Ports

Use USB Type-A to Type-C cable to connect the Debug port of the whole machine to the PC, baud rate 115200.

## MicroSD

Supports hot-swapping. Samsung and SanDisk SD cards are currently recommended.

## Wired Network Port

One is a WAN port and one is a LAN port.

## Inside view of bottom cover

![](/img/airbox/mark_fogwise_airbox_02.webp)

As shown above, M-KEY can connect to PM991 NVME SSD. E-KEY can connect to Intel 7265NGW and Intel AX210 WIFI & BT modules.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 26
---

# Local AI Model Deployment

This section mainly introduces the usage of AI model deployment tools, deployment of large AI models, and deployment of computer vision models in the model zoo.

<DocCardList />
Loading
Loading