OpenBSD - Rock4C+

Page content

How to get OpenBSD on OKdo Rock 4C+

got a new Toy and i’d like to put puffy on it

Mount SD Card on APU/existing HW

dmesg |grep sd1
sd1 at scsibus2 targ 1 lun 0: <Generic-, Multi-Card, 1.00> removable serial.0bda0309201209010309
sd1: 58911MB, 512 bytes/sector, 120649728 sectors


dd if=/dev/random of=/dev/rsd1c bs=1m count=512
dd: /dev/rsd1c: Device not configured

not working properly :(

get MiniRoot


and write to SD Card

dd if=miniroot72.img of=/dev/rsd1c bs=1m
43+0 records in
43+0 records out

find the dtb Device Tree Blobs)

pkg_info -Q dtb

install Package

pkg_add dtb-5.14p1
quirks-6.42 signed on 2023-02-15T16:16:12Z
dtb-5.14p1 (extracting)|************************

List Content

pkg_info -L dtb |head -10
Information for inst:dtb-5.14p1


find the correct blob for our HW

ls -la /usr/local/share/dtb/arm64/rockchip/rk3399-rock-pi-4c.dtb 
-rw-r--r--  1 root  bin  56478 Sep 29 04:32 /usr/local/share/dtb/arm64/rockchip/rk3399-rock-pi-4c.dtb

Mount Partition & Install Blob

mount /dev/sd1i /mnt/
mkdir /mnt/rockchip
cp /usr/local/share/dtb/arm64/rockchip/rk3399-rock-pi-4c.dtb /mnt/rockchip/
umount /mnt

find the BootCode Package

pkg_info -Q u-boot

and install it

pkg_add u-boot-aarch64

Show Content

pkg_info -L u-boot-aarch64 |head
Information for inst:u-boot-aarch64-2021.10p4


why aarch64 and not arm ? arm = arm32 ?

Write BootBlocks

dd if=/usr/local/share/u-boot/rock-pi-4-rk3399/idbloader.img of=/dev/sd1c seek=64
dd if=/usr/local/share/u-boot/rock-pi-4-rk3399/u-boot.itb of=/dev/sd1c seek=16384

put SD Card to Rock

Mount SD Card and give a try … need a special USB Serial Cable for the Board. Ordered one and have to wait a few days ..

sha256: 81c25823c0122fefcbf40fdca74e224ac3afaf27bfc2e6d8c346aca8beaa56a0