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

Speedtest

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

not working properly :(

get MiniRoot

ftp https://ftp.hostserver.de/pub/OpenBSD/7.2/arm64/miniroot72.img

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
dtb-5.14p1

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

Files:
/usr/local/share/dtb/arm/aks-cdu.dtb
/usr/local/share/dtb/arm/alphascale-asm9260-devkit.dtb
/usr/local/share/dtb/arm/alpine-db.dtb
/usr/local/share/dtb/arm/am335x-baltos-ir2110.dtb
/usr/local/share/dtb/arm/am335x-baltos-ir3220.dtb
/usr/local/share/dtb/arm/am335x-baltos-ir5221.dtb
/usr/local/share/dtb/arm/am335x-base0033.dtb

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
u-boot-aarch64-2021.10p4
u-boot-arm-2021.10p4
u-boot-riscv64-2021.10p4

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

Files:
/usr/local/share/u-boot/a64-olinuxino/sunxi-spl.bin
/usr/local/share/u-boot/a64-olinuxino/u-boot-sunxi-with-spl.bin
/usr/local/share/u-boot/bananapi_m64/sunxi-spl.bin
/usr/local/share/u-boot/bananapi_m64/u-boot-sunxi-with-spl.bin
/usr/local/share/u-boot/firefly-rk3399/idbloader.img
/usr/local/share/u-boot/firefly-rk3399/u-boot-rockchip.bin
/usr/local/share/u-boot/firefly-rk3399/u-boot.itb

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 ..


Any Comments ?

sha256: 81c25823c0122fefcbf40fdca74e224ac3afaf27bfc2e6d8c346aca8beaa56a0