Contents
- Introduction
- Software Version List
- How to Startup
- How to Check Functions
- Tips
- Known Issues & Restrictions
- Support
Introduction
This is the Debian based BSP page for Sparrow Hawk.
Software Version List
| Software | Version |
|---|---|
| Debian | 12 |
| Linux kernel | 6.12.58 |
| U-Boot | 2025.10 |
| Arm Trusted Firmware | 2.14.0 |
How to Startup
If you want to quickly start, please start 3.1.1. Quick preparation: download binary.
If you want to normally start, please start 3.1.2. Normal preparation: build source code.
Preparation of the software
Quick preparation: download binary
- Download binary from GitHub
- Bootloader: ipl-burning.zip
- BSP: sparrow-hawk-debian-12-based-bsp.img.gz
- Unzip download zip file
unzip ipl-burning.zipNext, jump to 3.2. How to flash.
Normal preparation: build source code
# You need to prepare docker envrionment on your Host PC
./build_image/build_with_docker_sparrow-hawk.sh <DEBIAN_VERSION>
ex.) ./build_image/build_with_docker_sparrow-hawk.sh 12
or
# Note: Build requirements can be confirmed from build_image/Dockerfile.
sudo ./build_image/build_debian_12_for_sparrow-hawk.sh <DEBIAN_VERSION>
ex.) sudo ./build_image/build_debian_12_for_sparrow-hawk.sh 12
Next, jump to 3.2. How to flash.
How to flash
Flashing loader
Run script in ipl-burning directory(Linux: run.sh, Windows: run.bat). If using Linux host PC, please install python3 and pip command on your system before running the script and close other console which uses serial port of the board before executing the script.
Note:
- This script use serial device /dev/ttyUSB* in Linux. But, it cannot be accessed from user without previledged right by default settings. Please use sudo command or add current user into dialout group.
Note:
- Please change the Mode Switch(=SW2) according to the ipl-burning(run.sh or run.bat).
Flashing OS image into SD card
Linux case
gzip -cd sparrow-hawk-debian-12-based-bsp.img.gz | sudo dd of=<device file> bs=1M status=progress && sync
Windows case
- Extract gzip image using 7zip or similer software.
- Flash extracted image into SD card using Etcher, win disk imager, and so on.
How to boot
- Insert the SD card into CN1 which is bottom of the board.
- Open terminal application and open serial device.
- Press SW1 to power on the board.
- After booting U-Boot, please press any key while showing “Hit any key to stop autoboot:” to enter U-Boot shell.
- Input following command into U-Boot shell and press enter key.
env default -a; boot - If command and environment is correct, Linux kernel log will output.
If you want to boot OS image automatically when power on the board, please run following to setup autoboot. Run following command:
env default -a
saveenv
After that, OS image boots automatically when power on the board.
How to Check Functions
Software support list
| Function | Status |
|---|---|
| CAN | Supported |
| Ethernet | Supported |
| Audio(Output/Input) | Supported |
| Display Port | Supported |
| GPIO | Supported |
| I2C | Supported |
| JTAG | Supported |
| USB3.0 | Not supported |
| UART | Supported |
| Thermal | Supported |
| M.2 | Not supported |
| Pi Camera | Supported |
| Pi Display | Supported |
| PCIe Endpoint | Not supported |
| Pi Active Cooler | Supported |
| GPU | Not supported |
| AI Accelerator | Not supported |
| Desktop(GUI) | Not supported |
Note:
- “Supported”: Function scceeded in the simple test as below.
- “Not supported”: Function isn’t supported.
CAN
Loop back
- Connect the following pins of CONN2: Connect Pin1(CAN1L) - Pin2(CAN0L) and Pin5(CAN1H) - Pin6(CAN0H)
- Execute following commands on Linux:
# Setup
sudo apt update
sudo apt install can-utils psmisc
# Test
sudo ip link set can0 up type can restart-ms 100 bitrate 1000000 dbitrate 5000000 fd on
sudo ip link set can1 up type can restart-ms 100 bitrate 1000000 dbitrate 5000000 fd on
sudo candump can0 &
sudo cangen can1 -I i -L i -D i -f -n 16
sudo killall candump
sudo candump can1 &
sudo cangen can0 -I i -L i -D i -f -n 16
sudo killall candump
Audio
- Connect headset/earphone/Speaker to CONN3.
- (if possible) Connect audio output like a smartphone to CONN4.
- Setup(Mix Aux in and Headset mic and setup audio output via CONN3)
sudo amixer set "Headphone" 40% sudo amixer set "Headphone" on sudo amixer set "Mixout Left DAC Left" on sudo amixer set "Mixout Right DAC Right" on sudo amixer set "Aux" on sudo amixer set "Aux" 80% sudo amixer set "Mixin PGA" on sudo amixer set "Mixin PGA" 50% sudo amixer set "ADC" on sudo amixer set "ADC" 80% sudo amixer set "Mixin Left Aux Left" on sudo amixer set "Mixin Right Aux Right" on sudo amixer set "Mic 1" on sudo amixer set "Mic 1" 80% sudo amixer set "Mixin Left Mic 1" on sudo amixer set "Mixin Right Mic 1" on - Test function
- Recording and Playback test(5sec)
sudo arecord -D hw:0,0 -t wav -d 5 -c 2 -r 48000 -f S16_LE | sudo aplay - Only Playback test
sudo speaker-test -c2
- Recording and Playback test(5sec)
GPIO
Toggle GP2_12(Pin11 on Pin Header)
- Connect LED or Oscilloscope to the board
- Execute following command
sudo apt update sudo apt install python3 python3-pip python3-venv python3 -m venv .venv source .venv/bin/activate pip3 install gpiod wget https://raw.githubusercontent.com/rcar-community/meta-sparrow-hawk/refs/heads/scarthgap/recipes-examples/example-apps/files/toggle_gpio_GP2_12.py sudo .venv/bin/python3 toggle_gpio_GP2_12.py
For more examples, please see also https://github.com/brgl/libgpiod/raw/refs/heads/master/bindings/python/examples
I2C
- Detect I2C device
sudo apt update sudo apt install i2c-tools sudo i2c-detect -r 3 sudo i2c-detect -r 4
Please search i2c-tools to use other commands(i2cdump, i2cget, i2cset, i2ctransfer).
UART
Loop back
- Connect UART TX and RX(pin 8 and pin 10) on PinHeader.
- Execute following commands:
sudo stty -F /dev/ttySC2 -echo sudo cat /dev/ttySC2 & echo Hello | sudo tee /dev/ttySC2
Thermal
- Check SoC temperature
sudo cat /sys/class/thermal/thermal_zone*/temp # ex.) 55000 # (Unit is millicelsius => 55.000 °C) -
Thermal throttling
CA76 core temp function ~ 68°C Normal operation 68 ~ 100 °C CPU clock is limited 100 °C System is shutdown forcely -
Measurement point
zone Measurement point thermal_zone0 CR52 thermal_zone1 CNN thermal_zone2 CA76 thermal_zone3 DDR
Pi Camera
Note:
- Currently, Raspberry Pi Camera V2 and Raspberry Pi Camera V3 is only supported.
Note:
- The Raspberry Pi Camera v3 is currently under development on mainline Linux and libcamera, so at this stage the image may appear dark and features such as auto-focus are not yet supported. In addition, recognition may occasionally fail.
- Connect Raspberry Pi Camera V2 to J1 and/or J2 connector.
- The board connector has 22 pin so that you need to prepare pitch convert cable.
- ex.) Raspberry Pi Official Accesary https://www.raspberrypi.com/products/camera-cable/
- Setup for using camera
- Change bootcmd variable on U-Boot shell as follows:
setenv bootcmd "load mmc 0:1 0x58000000 /boot/fitImage && bootm {CONFIG}" -
Cobination of connected cameras
J1 J2 CONFIG V2 - 0x58000000#default#j1-imx219 - V2 0x58000000#default#j2-imx219 V2 V2 0x58000000#default#j1-imx219#j2-imx219 V3 - 0x58000000#default#j1-imx708 - V3 0x58000000#default#j2-imx708 V3 V3 0x58000000#default#j1-imx708#j2-imx708 V2 V3 0x58000000#default#j1-imx219#j2-imx708 V3 V2 0x58000000#default#j1-imx708#j2-imx219 This table shows the results when connecting the Raspberry Pi Camera V2 and Raspberry Pi Camera V3 to either J1 or J2, and to both J1 and J2.
- Change bootcmd variable on U-Boot shell as follows:
- Execute following commands for using libcamera command
git clone https://git.libcamera.org/libcamera/libcamera.git cd libcamera git checkout -B work b9fa6e0e61d3ea605fe4b1201ede5745cd5800e5 wget https://github.com/rcar-community/meta-sparrow-hawk/raw/refs/heads/scarthgap/recipes-multimedia/libcamera/files/0001-libcamera-ipa_manager-Create-IPA-by-name.patch wget https://github.com/rcar-community/meta-sparrow-hawk/raw/refs/heads/scarthgap/recipes-multimedia/libcamera/files/0002-ipa-ipa_module-Remove-pipelineName.patch wget https://github.com/rcar-community/meta-sparrow-hawk/raw/refs/heads/scarthgap/recipes-multimedia/libcamera/files/0003-ipa-meson.build-Remove-duplicated-variable.patch wget https://github.com/rcar-community/meta-sparrow-hawk/raw/refs/heads/scarthgap/recipes-multimedia/libcamera/files/0004-ipa-Allow-pipelines-to-have-differently-named-IPA.patch wget https://github.com/rcar-community/meta-sparrow-hawk/raw/refs/heads/scarthgap/recipes-multimedia/libcamera/files/0005-ipa-rkisp1-Add-settings-for-DreamChip-RPPX1-ISP.patch wget https://github.com/rcar-community/meta-sparrow-hawk/raw/refs/heads/scarthgap/recipes-multimedia/libcamera/files/0006-libcamera-pipeline-Add-R-Car-Gen4-ISP-pipeline.patch wget https://github.com/rcar-community/meta-sparrow-hawk/raw/refs/heads/scarthgap/recipes-multimedia/libcamera/files/0007-ipa-rkisp1-Add-basic-CCM-calibration-for-imx219.patch wget https://github.com/rcar-community/meta-sparrow-hawk/raw/refs/heads/scarthgap/recipes-multimedia/libcamera/files/0008-ipa-CameraSensorHelper-Add-CameraSensorHelperImx708.patch git config --global user.email "you@example.com" git config --global user.name "Your Name" git am *.patch sudo apt update sudo apt install meson build-essential ninja-build cmake libyaml-dev python3-yaml python3-ply python3-jinja2 libevent-dev pkg-config python3-dev python3-pybind11 libdrm-dev meson setup --prefix=/usr/ -Dpipelines=rcar-gen4,rkisp1 -Dipas=rkisp1 -Dcam=enabled -Dpycamera=enabled -Dtest=false -Ddocumentation=disabled build sudo ninja -C build install -
Check camera device is recognized
Raspberry Pi Camera V2
root@sparrow-hawk:~# sudo cam -l (snip) Available cameras: 1: External camera 'imx219' (/base/soc/i2c@e6508000/cam@10) // J1 2: External camera 'imx219' (/base/soc/i2c@e6510000/cam@10) // J2Raspberry Pi Camera V3
root@sparrow-hawk:~# sudo cam -l (snip) Available cameras: 1: External camera 'imx708' (/base/soc/i2c@e6508000/sensor@1a) // J1 2: External camera 'imx708' (/base/soc/i2c@e6510000/sensor@1a) // J2 - Test camera
- Display Output(Need to connect Display)
- using one camera
sudo cam -c 1 -C -D - using two cameras
sudo cam -c 1 -C -D sudo cam -c 2 -C -D
- using one camera
- Display Output(Need to connect Display)
Pi Display
Note:
- Please perform the following “1. Setup” without connecting the AC adapter to the board (USB1).
Note:
- There is a risk of damaging the board or the display, so please connect them with great care.
- Setup
- Connect Raspberry Pi Touch Display 2 cable to the J4 connector.
- Connect the Power (red wire) to pin 2 of CN7 and the Ground (black wire) to pin 6 of CN7.

-
Change bootcmd variable on U-Boot shell as follows:
5 inch
setenv bootcmd "load mmc 0:1 0x58000000 /boot/fitImage && bootm 0x58000000#default#rpi-display-2-5in"7 inch
setenv bootcmd "load mmc 0:1 0x58000000 /boot/fitImage && bootm 0x58000000#default#rpi-display-2-7in" - Display will work correctly after changing above.
Pi Active Cooler
Manual control of fan speed
echo 2 | sudo tee /sys/class/hwmon/hwmon4/pwm1_enable
echo 150 | sudo tee /sys/class/hwmon/hwmon4/pwm1
#1 ~ 255 is acceptable but low speeds are not recommended from thermal perspective.
Tips
- How to expand the rootfs
- Please run the following command on your board. Rootfs is expanded to use whole stor
age.
sudo apt update sudo apt install e2fsprogs parted wget https://raw.githubusercontent.com/rcar-community/meta-sparrow-hawk/refs/heads/scarthgap/recipes-utils/expand-rootfs/files/expand-rootfs.sh sudo bash ./expand-rootfs.sh sudo reboot
- Please run the following command on your board. Rootfs is expanded to use whole stor
age.
Known Issues & Restrictions
- PCIe module outputs error log that firmware is not found in boot process. We are preparing the PCIe firmware, then please ignore it and please wait a moment.
[ 2.629357] pcie-rcar-gen4 e65d0000.pcie: Failed to load firmware (rcar_gen4_pcie.bin): -22
Support
FAQ: https://github.com/orgs/rcar-community/discussions/categories/faq
Q&A Forum: https://github.com/orgs/rcar-community/discussions/categories/q-a

