Through the past few years, I’ve become more and more obsessed with Pine64’s products; buying whatever they put out that even somewhat piques my interest.
My latest purchases were their Pinetab 2 tablet, as I already own their OG Pinetab, but it’s production, and thus overall development was sadly immediately halted due to the pandemic (It runs Sway and makes a great lightweight CLI-only laptop alternative), Pinecil soldering iron, as I’ve always wanted to learn how to solder and have a slightly broken PS2 network adapter in need of a quick solder, Pinebuds Pro, as I’ve always wanted to see what the Airpod-style wireles earbud fuss is about, and finally and most excitedly, their Star64 RISC-V single-board computer.
The Star64 runs the open-source RISC-V CPU instruction set, and I was very interest in just playing around with it. It’s great to have a potential competitor to the ARM and x86 CPU duopoly, and I wanted to follow along, especially with Debian declaring official support for Debian 13. And that’s what I was most interested in getting running on the board.
Out of the box, and skimming the message board and wiki, I was only able to find custom Debian-based Armbian and Fishwaldo’s Yocto builds readily available. But loosely following this guide, earlier this evening I was able to get the stock version of Debian Trixie/Unstable booted up, and wanted to share my findings and loose instructions.
The tl;dr is:
- Flash Fishwaldo’s star64-image-minimal-star64-2.0.wic image from the above link to an SD card
- Mount the ext4 partition labeled ‘root’, and copy /etc/fstab, /etc/apt/trusted.gpg.d/pinix.gpg, /etc/apt/sources.list and /boot/ to a temporary location on your computer
- Now unmount and overwrite this partition, ensuring we keep the label intact:
sudo mkfs.ext4 -m 0 -L root /dev/your_sd_card_p4
- Follow the Bootstrap the root filesystem steps on your own computer of choice (doesn’t have to be on the Star64 itself as it relies on qemu)
- Once
debootstrap --second stage
is complete, copy /etc/fstab, /etc/apt/trusted.gpg.d/pinix.gpg, and /boot/ from their temporary locations into the chroot- Copy /etc/apt/sources.list to somewhere like chroot/etc/apt/sources.list.d/fishwaldo.list
- Then we can skip to the Configure Debian guide, skipping the Install kernel packages, Configure u-boot, and Configure fstab steps, as we’ll be relying on these files from Fishwaldo’s Yocto image. This is also why we do not touch the boot partition.
- Finally, exit the systemd-nspawn container, and copy the chroot to the root partition of the SD card:
sudo cp -a ./riscv-chroot/* /mnt/sdcard/
I know these are very vague instructions, but it mainly boils down to keeping the custom kernel from the Yocto images, but replacing the rootfs with a fresh Debian debootstrap rootfs.
On first boot, you will need to login via TTY and get whatever necessary Ethernet interfaces up and running (dhclient did the trick for me), as well as setup a user in order to SSH, as Trixie does not allow password SSH logins by default.
Wireless likely requires a non-free package, but I haven’t gotten that far.