Ox64
The Ox64 is a RISC-V based Single Board Computer powered by Bouffalo Lab BL808 C906 64-Bit RISC-V CPU, 32-Bit CPU, embedded 64MB PSRAM memory and build-on 3 radio RF (Wifi, BT, Zigbee). It provides breadboard friendly form factor, MicroSD Card slot, USB 2.0, and many other peripheral interfaces for makers to integrate with sensors and other devices.
Software Releases
Quick Links to the Source of OS Images Build
There is a community effort to bring updated kernels, peripherals and buildroot - Lots of communication happening in the #ox64-nutcracker channel.
- buildroot bringing all the work below together with a bootable kernel and updated filesystem images for SD cards
- U-Boot and OpenSBI work by Smauel
- Kernel IRQChip, SDCard, and (WIP) USB by arm000, Alexander Horner and others
- OpenBouffalo Firmware low_load drivers by Fishwaldo and others
Original Linux Images provided by Bouffalo - Very basic alpha build which are only fit for board bring up and testing purposes.
- Linux for BL808
- Installation Instructions for Linux on BL808 (Chinese)
- Installation Instructions for Linux on BL808 (English Auto-Translation)
Toolchain:
- elf_newlib_toolchain/bin/riscv64-unknown-elf-gcc (Xuantie-900 elf newlib gcc Toolchain V2.2.5 B-20220323) 10.2.0
- linux_toolchain/bin/riscv64-unknown-linux-gnu-gcc (Xuantie-900 linux-5.10.4 glibc gcc Toolchain V2.2.4 B-20211227) 10.2.0
- cmake version 3.19.3
Software Development Kits
- BL808 MCU SDK
- BLDevCube Flashing Tool for Windows, macOS and Ubuntu x64
- Ox64 UART Flashing Guide, see the notes
- BL808 Demo Firmware: bl808_demo_event.bin, see the notes
- BL808 UART Log Firmware: whole_flash_data.bin, see the notes
- BL808 DVK Quick Start
- OpenSBI for BL808
- Rust Peripheral Access Crate (PAC) for BL808
- System View Description (SVD) for BL808
SoC and Memory Specification
Based on the Bouffalo Lab BL808
CPU Architecture
T-Head C906 480MHz 64-bit RISC-V CPU:
- Supports RISC-V RV64IMAFCV instruction architecture
- Five-stage single-issue sequentially executed pipeline
- Level-1 instruction and data cache of Harvard architecture, with a size of 32 KB and a cache line of 64B
- Sv39 memory management unit, realizing the conversion of virtual and real addresses and memory management
- jTLB that supports 128 entries
- Supports AXI 4.0 128-bit master interface
- Supports core local interrupt (CLINT) and platform-level interrupt controller (PLIC)
- With 80 external interrupt sources, 3 bits for configuring interrupt priority
- Supports BHT (8K) and BTB
- Compatible with RISC-V PMP, 8 configurable areas
- Supports hardware performance monitor (HPM) units
- See here
T-Head E907 320MHz 32-bit RISC-V CPU:
- Supports RISC-V RV32IMAFCP instruction set
- Supports RISC-V 32-bit/16-bit mixed instruction set
- Supports RISC-V machine mode and user mode
- Thirty-two 32-bit integer general purpose registers (GPR) and thirty-two 32-bit/64-bit floating-point GPRs
- Integer (5-stage)/floating-point (7-stage), single-issue, sequentially executed pipeline
- Supports AXI 4.0 main device interface and AHB 5.0 peripheral interface
- 32K instruction cache, two-way set associative structure
- 16K data cache, two-way set associative structure
- See here
T-Head E902 150MHz 32-bit RISC-V CPU:
- See here
System Memory
- Embedded 64MB PSRAM
Board Features
Network
- 2.4GHz 1T1R WiFi 802.11 b/g/n
- Bluetooth 5.2
- Zigbee
- 10/100Mbps Ethernet (optional, on expansion board)
Storage
- On-board 16Mb (2MB) or 128Mb (16MB) XSPI NOR flash memory
- MicroSD - supports SDHC and SDXC (only 128Mb version)
Expansion Ports
- USB 2.0 OTG port
- 26 GPIO Pins, including SPI, I2C and UART functionality. Possible I2S and GMII expansion
- Dual lane MiPi CSI port, located at USB-C port, for camera module
Audio
- Microphone (optional, on camera module)
- Speaker (optional, on camera module)
Board Information, Schematics and Certifications
- Baseboard Dimensions: 51mm x 21mm x 19mm x 3.5mm (Breadboard friendly)
- Input Power: 5V 0.5A microUSB or USB-C port
Production version schematic:
- Ox64 Schematic 20221018 v1.1
- Ox64 PCB Component placement(ToP) 20221018 v1.1
- Ox64 PCB Component placement(Bottom) 20221018 v1.1
Prototype (dispatched to developers) schematic:
- Ox64 Schematic 20221007 v1.0
- Ox64 PCB Component placement(ToP) 20221007 v1.0
- Ox64 PCB Component placement(Bottom) 20221007 v1.0
Certifications:
- Disclaimer: Please note that PINE64 SBC is not a "final" product and in general certification is not necessary.
- Not yet available
Datasheets for Components and Peripherals
Bouffalo BL808 SoC information:
SPI NOR Flash information:
Power Regulator information:
MicroSD socket information:
Compatible UARTs when in bootloader mode
When the Ox64 is in bootloader mode, some UARTs are unable to communicate with it. When this is the case, utilities such as BLDevCube are unable to actually program the device. If you see "Shake hand fail" and an empty ack, and your device is in bootloader mode, then it is likely an incompatible UART.
The below devices have been tested and verified as working:
- Raspberry Pi Pico - running the following UART firmware (GP4 and GP5 are used for port 0, GP12 and GP13 for port 1)
- Compiled binary for Pi Pico and connectivity diagram is here
- ESP32 with CP210x - bridge the EN pin to ground to disable the ESP32 itself, and then connect the TX on the esp32 to 14 on the Ox64 and RX to pin 15. Note that only baud rate 115200 works, and this doesn't seem to work for everyone)
- Stand-alone CP2102 dongle works at 115200 baud. Brand used was HiLetgo.
- STM32F401 BlackPill - running the Black Magic Debug firmware
- STM32F103C8T6 BluePill - running Black Magic Debug.
- Some UART adapters based on the FT232H (note that the FT232RL does not work, and neither does the Pine 64 JTAG)
- Some CH340G based adapters work and some don't.
Resources
- A video on how to connect to, flash and boot the Ox64 as at 2023-02 (15min) can be found here.
- Another video that covers soldering pins, connecting via Pi Pico and flashing Linux (inc u-boot, as of 2023-Mar-3) posted here.
- First Batch of Ox64 won't appear as USB Serial Port
- First Batch of Ox64 tested OK with CH340C/G
- First thoughts on the (a)symmetry of Bouffalo Labs BL808 as in Pine64’s Ox64
- The $8 linux computer (with picoprobe-rp2040 programming instructions)
- Building the Xuantie GNU Toolchain for Ox64 on macOS and Apple Silicon
Git repositories:
- Community made Arduino Core specifically for the Bouffalo Labs BL808 RISC-V MCU (Initial development has been postponed until further notice.)
Development Efforts
- Ox64 boots Linux successfully
- Brennan Ashton is porting Apache NuttX RTOS and OpenAMP (Asymmetric Multiprocessing) to BL808
- Phone Concept for BL808
Flashing Ox64 SBC and SD Card for Newbies
This section explains how to flash Ox64 board and the SD card to boot the system. It's very low level for newbies.
Prepare the Enviroment
You need a linux machine, a Uart module, the Ox64 board and a SD card.
Start a terminal session and set the working directory
cd ~/Downloads mkdir ox64 mkdir ox64/devcube183 cd ~/Downloads/ox64/devcube183
Get flasher DevCube 1.8.3 from one of mirrored servers and decompress it from:
- # https://dev.bouffalolab.com/media/upload/download/BouffaloLabDevCube-v1.8.3.zip # this link is broken
- https://hachyderm.io/@mkroman/110787218805897192 > https://pub.rwx.im/~mk/bouffalolab/BouffaloLabDevCube-v1.8.3.zip # SHA256SUMS: e6e6db316359da40d29971a1889d41c9e97d5b1ff1a8636e9e6960b6ff960913
- https://we.tl/t-eJWShQJ4iF # SHA1: 0f2619e87d946f936f63ae97b0efd674357b1166
- https://cdn.discordapp.com/attachments/771032441971802142/1145565853962735639/BouffaloLabDevCube-v1.8.3.zip
wget https://cdn.discordapp.com/attachments/771032441971802142/1145565853962735639/BouffaloLabDevCube-v1.8.3.zip unzip BouffaloLabDevCube-v1.8.3.zip chmod u+x BLDevCube-ubuntu
Download compressed file from https://github.com/openbouffalo/buildroot_bouffalo/releases/ and decompress it. (in case you prefer, the compressed the file link is https://github.com/openbouffalo/buildroot_bouffalo/releases/download/v1.0.1/bl808-linux-pine64_ox64_full_defconfig.tar.gz)
cd ~/Downloads/ox64 wget https://github.com/openbouffalo/buildroot_bouffalo/releases/download/v1.0.1/bl808-linux-pine64_ox64_full_defconfig.tar.gz tar -xvzf bl808-linux-pine64_ox64_full_defconfig.tar.gz
Yuo'll gett this structure |_ firmware/ |_ firmware/m0_lowload_bl808_m0.bin |_ firmware/bl808-firmware.bin |_ firmware/d0_lowload_bl808_d0.bin |_ firmware/sdcard-pine64_ox64_full_defconfig.img.xz
Flash Ox64
Connect the the Uart module (i.e Raspberry Pico Pi) for serial communicate from PC to Ox64
ls /dev/ttyACM*
I can see two new ports to choose from : /dev/ttyACM0 /dev/ttyACM1
minicom -b 2000000 -D /dev/ttyACM0
Set ox64 board to programming mode
- Press BOOT button when reseting
- Apply power
- Release BOOT button
Open a new terminal window to run DevCuve flasher
cd ~/Downloads/ox64/devcube183 ./BLDevCube-ubuntu
Select chip [BL808], press Finish and switch to [MCU] tab
M0 Group[group0] Image Addr [0x58000000] [PATH to m0_lowload_bl808_m0.bin] D0 Group[group0] Image Addr [0x58100000] [PATH to d0_lowload_bl808_d0.bin] Interface: Uart Port/SN: /dev/ttyACM1 Uart rate 2000000 UART TX is physical pin 1/GPIO 14. UART RX is physical pin 2/GPIO 15. Click 'Create & Download' and wait until it's done
Switch to [IOT] tab
Enable 'Single Download', set Address with 0x800000, choose [PATH to bl808-firmware.bin] Click 'Create & Download' again and wait until it's done Close DevCube
Flash SD Card
Insert SD card into PC, find address [/dev/sdb], erase initial space and flash sdcard.xxxx.img file.
cd ~/Downloads/ox64/firmware xz -v -d -k sdcard-pine64_ox64_full_defconfig.img.xz sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 sudo dd if=~/Downloads/ox64/firmware/sdcard-pine64_ox64_full_defconfig.img of=/dev/sdb bs=1M status=progress conv=fsync
First Booting
Insert SD card into Ox64
Set a tty connection to Ox64 board
- Serial Console access:
- UART TX is physical pin 32/GPIO 16.
- UART RX is physical pin 31/GPIO 17.
- Baud 2000000.
minicom -b 2000000 -D /dev/ttyACM0
Re-Apply power to ox64
Enjoy the boot!
PS. To investigate running services
pstree | head -5 init-+-dhcpcd---3*[dhcpcd] |-dropbear |-klogd |-login---sh-+-head | `-pstree