Skip to content
Open
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
9 changes: 9 additions & 0 deletions boards/h616/yuzuki-h616/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.o
*.depend
Make.dep
libboard.a
tags
cscope.*
.built
etctmp.c
etctmp
23 changes: 23 additions & 0 deletions boards/h616/yuzuki-h616/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ##############################################################################
# boards/h616/yuzuki-h616/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################

set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/dramboot.ld")

add_subdirectory(src)
12 changes: 12 additions & 0 deletions boards/h616/yuzuki-h616/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

config ARCH_BOARD_YUZUKI_H616
bool "Allwinner H616 based Yuzuki board"
depends on ARCH_CHIP_H616
---help---
NuttX port for the Allwinner H616 based Yuzuki board.
On-board peripherals: 1GB/2GB/4GB DDR3L, eMMC (HS400 on 4-bit
bus), 4x 16550 UART, USB, HDMI.
74 changes: 74 additions & 0 deletions boards/h616/yuzuki-h616/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Yuzuki Chameleon (H616) Board Support for openvela

\[ English | [简体中文](README_zh-cn.md) \]

## Overview

This directory provides the openvela board support package (BSP) for the
**Yuzuki Chameleon** development board (Allwinner H616 platform).

Key hardware specifications:

- **SoC**: Allwinner H616, quad-core Arm Cortex-A53 (SMP, 4 cores online)
- **Memory**: 1 GB DDR3 (2 GB/4 GB variants exist)
- **Storage**: on-board eMMC (29 GB on the tested board), 4-bit bus with
interrupt-driven CIU + IDMAC transfers
- **Console**: 16550 UART0, 115200 8N1, with optional DMA on Tx/Rx
- **Interfaces**: 4x 16550 UART, USB, HDMI, GPIO

The port boots NuttX from DRAM: the board's boot0/U-Boot (or the FEL
boot chain) loads `nuttx.bin` into DRAM and jumps to it, so the port does
not depend on any on-board bootloader bits.

> **Note**: this board depends on the Allwinner H616 chip support
> (`arch/arm64/src/h616`) contributed to the openvela nuttx repository.
> Please make sure your nuttx source tree contains the H616 chip port
> before building this board.

## Directory Structure

```
yuzuki-h616/
├── Kconfig # Board-level Kconfig options
├── include/ # Board headers (board.h)
├── src/ # Board bring-up sources (init, reset, eMMC slot, etc)
├── scripts/ # Linker script and build rules (Make.defs, dramboot.ld)
└── configs/ # Build configurations
└── nsh # NSH shell configuration (SMP 4 cores, eMMC at /mnt)
```

## Build

The `build.sh` script at the openvela project root is the unified build
entry point:

```bash
# Optional: only needed when switching configs or after menuconfig changes
./build.sh vendor/allwinnertech/boards/h616/yuzuki-h616/configs/nsh -j8 distclean

# Build
./build.sh vendor/allwinnertech/boards/h616/yuzuki-h616/configs/nsh -j8
```

The resulting image is `nuttx/nuttx.bin`.

## Firmware Packaging and Deployment

The board boots `nuttx.bin` directly from DRAM. Wrap it with the
Allwinner boot chain (boot0/U-Boot) into a `boot.img` and flash it over
FEL, or load it over the FEL/UART download path. For the general
porting and flashing flow, refer to:

- [Development Board adaptation cases](https://github.com/open-vela/docs/blob/dev-ai-contest-2026/en/dev_board/Development_Board.md)
- [Chip Porting guide](https://github.com/open-vela/docs/blob/dev-ai-contest-2026/en/chip_porting/porting_guide.md)

## Verified behaviour

- SMP: `ps` shows CPU0..CPU3 idle threads, affinity mask 0x0f.
- eMMC: FAT filesystem on `/dev/mmcsd0p1` mounted at `/mnt`; files
persist across reboots; sequential write ~15 MB/s, read ~75 MB/s.
- Console: UART0, 115200 8N1; boot log also available via `dmesg`.

## License

Files in this directory follow the license declared in each file's header.
68 changes: 68 additions & 0 deletions boards/h616/yuzuki-h616/README_zh-cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# 百变龙 Yuzuki Chameleon(H616)开发板对 openvela 的支持

\[ [English](README.md) | 简体中文 \]

## 简介

本目录为 **Yuzuki Chameleon**(全志 H616 平台)开发板提供 openvela 板级支持(BSP)。

主要硬件规格:

- **主控**:全志 H616,四核 Arm Cortex-A53(SMP,4 核在线)
- **内存**:1 GB DDR3(另有 2 GB/4 GB 版本)
- **存储**:板载 eMMC(实测板为 29 GB),4-bit 总线,中断驱动 CIU + IDMAC 传输
- **控制台**:16550 UART0,115200 8N1,Tx/Rx 可选 DMA
- **接口**:4 路 16550 UART、USB、HDMI、GPIO

本移植从 DRAM 启动 NuttX:板载 boot0/U-Boot(或 FEL 下载链)将
`nuttx.bin` 载入 DRAM 后跳转执行,不依赖任何板载 bootloader 专用位。

> **注意**:本板依赖提交到 openvela nuttx 仓库的全志 H616 芯片层支持
> (`arch/arm64/src/h616`)。编译本板前,请确认 nuttx 源码树中已包含
> H616 芯片移植。

## 目录结构

```
yuzuki-h616/
├── Kconfig # 板级 Kconfig 选项
├── include/ # 板级头文件(board.h)
├── src/ # 板级 bring-up 源码(初始化、复位、eMMC 插槽等)
├── scripts/ # 链接脚本与构建规则(Make.defs、dramboot.ld)
└── configs/ # 编译配置
└── nsh # NSH 命令行配置(SMP 4 核,eMMC 挂载于 /mnt)
```

## 编译

openvela 工程根目录的 `build.sh` 是统一编译入口:

```bash
# 可选:仅在切换配置或修改 menuconfig 后需要清理
./build.sh vendor/allwinnertech/boards/h616/yuzuki-h616/configs/nsh -j8 distclean

# 编译
./build.sh vendor/allwinnertech/boards/h616/yuzuki-h616/configs/nsh -j8
```

编译产物为 `nuttx/nuttx.bin`。

## 固件打包与部署

本板直接从 DRAM 启动 `nuttx.bin`:可将其与全志启动链
(boot0/U-Boot)封装为 `boot.img` 后经 FEL 烧录,或经 FEL/UART
下载路径载入。通用移植与烧录流程请参考:

- [开发板适配案例](https://github.com/open-vela/docs/blob/dev-ai-contest-2026/zh-cn/dev_board/Development_Board.md)
- [芯片移植(Chip Porting)章节](https://github.com/open-vela/docs/blob/dev-ai-contest-2026/zh-cn/chip_porting/porting_guide.md)

## 已验证行为

- SMP:`ps` 显示 CPU0..CPU3 idle 线程,affinity 掩码 0x0f。
- eMMC:`/dev/mmcsd0p1` 上的 FAT 文件系统挂载于 `/mnt`;文件重启后
保留;顺序写约 15 MB/s,读约 75 MB/s。
- 控制台:UART0,115200 8N1;启动日志可通过 `dmesg` 回看。

## 许可协议

本目录下文件遵循各自文件头部声明的许可协议。
110 changes: 110 additions & 0 deletions boards/h616/yuzuki-h616/configs/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_FACTORY_TEST is not set
# CONFIG_NSH_DISABLE_DATE is not set
CONFIG_16550_ADDRWIDTH=32
CONFIG_16550_REGINCR=4
CONFIG_16550_UART0=y
CONFIG_16550_UART0_BASE=0x05000000
CONFIG_16550_UART0_CLOCK=24000000
CONFIG_16550_UART0_DMA=y
CONFIG_16550_UART0_DMA_RX=1
CONFIG_16550_UART0_DMA_RXBUFSIZE=4
CONFIG_16550_UART0_DMA_TX=0
CONFIG_16550_UART0_IRQ=32
CONFIG_16550_UART0_RX_TRIGGER=0
CONFIG_16550_UART0_SERIAL_CONSOLE=y
CONFIG_16550_UART1=y
CONFIG_16550_UART1_BASE=0x05000400
CONFIG_16550_UART1_CLOCK=24000000
CONFIG_16550_UART1_IRQ=33
CONFIG_16550_UART2=y
CONFIG_16550_UART2_BASE=0x05000800
CONFIG_16550_UART2_CLOCK=24000000
CONFIG_16550_UART2_IRQ=34
CONFIG_16550_UART3=y
CONFIG_16550_UART3_BASE=0x05000c00
CONFIG_16550_UART3_CLOCK=24000000
CONFIG_16550_UART3_IRQ=35
CONFIG_16550_UART=y
CONFIG_ARCH="arm64"
CONFIG_ARCH_ARM64=y
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../vendor/allwinnertech/boards/h616/yuzuki-h616"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="nsh"
CONFIG_ARCH_BOARD_YUZUKI_H616=y
CONFIG_ARCH_CHIP="h616"
CONFIG_ARCH_CHIP_H616=y
CONFIG_ARCH_EARLY_PRINT=y
CONFIG_ARCH_INTERRUPTSTACK=4096
CONFIG_ARCH_IRQPRIO=y
CONFIG_BCH_READAHEAD=64
CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_LATE_INITIALIZE=y
CONFIG_BOARD_LOOPSPERMSEC=116524
CONFIG_BUILTIN=y
CONFIG_DEBUG_ASSERTIONS=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_TASK_STACKSIZE=8192
CONFIG_ETC_ROMFS=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXAMPLES_MMCDIAG=y
CONFIG_EXPERIMENTAL=y
CONFIG_FAT_LFN=y
CONFIG_FRAME_POINTER=y
CONFIG_FS_BINFS=y
CONFIG_FS_FAT=y
CONFIG_FS_PROCFS=y
CONFIG_FS_ROMFS=y
CONFIG_FS_TMPFS=y
CONFIG_H616_DMA=y
CONFIG_H616_SDHCI=y
CONFIG_H616_SDMMC_IRQ=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=8192
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
CONFIG_MMCSD=y
CONFIG_MMCSD_CHECK_READY_STATUS_WITHOUT_SLEEP=y
CONFIG_MMCSD_MULTIBLOCK_LIMIT=4096
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CMDOPT_DD_STATS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_PTHREAD_STACK_MIN=8192
CONFIG_RAMLOG=y
CONFIG_RAMLOG_BUFSIZE=32768
CONFIG_RAMLOG_SYSLOG=y
CONFIG_RAM_SIZE=1073741824
CONFIG_RAM_START=0x40000000
CONFIG_RAW_BINARY=y
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_BACKTRACE=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=192
CONFIG_SERIAL_UART_ARCH_MMIO=y
CONFIG_SMP=y
CONFIG_STACK_COLORATION=y
CONFIG_START_MONTH=9
CONFIG_START_YEAR=2026
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSLOG_DEFAULT=y
CONFIG_SYSLOG_MAX_CHANNELS=2
CONFIG_SYSLOG_TIMESTAMP=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_SYSTEM=y
CONFIG_SYSTEM_TIME64=y
CONFIG_TESTING_GETPRIME=y
CONFIG_USEC_PER_TICK=1000
61 changes: 61 additions & 0 deletions boards/h616/yuzuki-h616/include/board.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/****************************************************************************
* boards/h616/yuzuki-h616/include/board.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/

#ifndef __BOARDS_ARM64_H616_YUZUKI_H616_INCLUDE_BOARD_H
#define __BOARDS_ARM64_H616_YUZUKI_H616_INCLUDE_BOARD_H

/****************************************************************************
* Included Files
****************************************************************************/

#include <nuttx/config.h>

/****************************************************************************
* Pre-processor Definitions
****************************************************************************/

/* Clocking *****************************************************************/

#define BOARD_SYSCLK_FREQUENCY 1008000000 /* CPU 1.008GHz (default) */

/* UART0 (console) **********************************************************/

#define BOARD_UART0_BASE 0x05000000 /* H616 UART0, DW 16550 */
#define BOARD_UART0_IRQ 32 /* GIC SPI 0 + 32 */
#define BOARD_UART0_CLOCK 24000000 /* OSC24M */

/* LED definitions **********************************************************/

/* Yuzuki H616 has a power LED; no user LED by default. */

#define LED_STARTED 0
#define LED_HEAPALLOCATE 0
#define LED_IRQSENABLED 0
#define LED_STACKCREATED 0
#define LED_INIRQ 0
#define LED_SIGNAL 0
#define LED_ASSERTION 0
#define LED_PANIC 0

/****************************************************************************
* Public Function Prototypes
****************************************************************************/

#endif /* __BOARDS_ARM64_H616_YUZUKI_H616_INCLUDE_BOARD_H */
Loading
Loading