Tutorial: Install OpenBSD on ROCK64 media board
#21
I have updated the tutorial for OpenBSD 6.7.

https://github.com/krjdev/rock64_openbsd

Biggest change:
- add official solution to install OpenBSD (Using idbloader.img and u-boot.itb).

Please can somebody proof-read my tutorial?

EDIT:
I have also build idbloader.img and u-boot.itb.

Used U-Boot version:

Code:
$ git-describe
v2020.07-rc2-194-gb0b13f4114
$


Used version ATF version:

Code:
$ git-describe
v2.3-55-gf1a1653ce
$

The images can be found here:


https://github.com/krjdev/rock64_openbsd...loader.img
https://github.com/krjdev/rock64_openbsd...u-boot.itb
  Reply
#22
Hi,

I have updated the tutorial for OpenBSD 6.8 and there another fixes:
- Update to U-Boot v2021.01
- Add a U-Boot script for enabling one of the USB-port (This is a workaround as soon as the OpenBSD developers fix this issue.)
- The steps should be correct yet. The device-tree file has been overwritten by the OpenBSD Installer. Now the step is after installing OpenBSD.
- Fix wrong wiring image (USB-UART-TTL).
Code:
/* Beware of bugs in the above code; I have only proved it correct, not tried it */
 Original quote by Donald E. Knuth
  Reply
#23
Just also added a few (initial) BASH scripts for downloading GCC for AArch64 from the ARM homepage, build ARM Trusted Firmware and build U-Boot. You can skip the first steps in the tutorial with these scripts. Smile 

I have tested the BASH scripts. They works on my system (openSUSE Leap 15.2), but if they fails on your systems, please give a feedback.
Code:
/* Beware of bugs in the above code; I have only proved it correct, not tried it */
 Original quote by Donald E. Knuth
  Reply
#24
Is there something I can do to fix the power off not working issue? Just installed OpenBSD 6.9 onto my Rock64 v3, only bump is 'shutdown -p now' doesn't work as expected, 'reboot' works fine though.

Edit: BTW, the other using Rock64 v2 board is working fine with 'shutdown -p now' though, which has been upgraded from 6.8.
  Reply
#25
halt -p
is what I usually use.  I think that worked under OpenBSD too.

If you don't have /sbin in your path neither will work because that's where they are.  In Debian shutdown is a symlink to /bin/systemctl, so is halt.  /sbin isn't in some non-root paths I think, but you can add it.
  Reply
#26
Hi,

I have updated the tutorial to OpenBSD 6.9 and U-Boot v2021.04:


Major changes:

-  Update tutorial to OpenBSD 6.9
-  Update U-Boot to version v2021.04

Minor changes:

-  Add initial description how to use this tutorial with OpenBSD as hostsystem
    (build ATF, U-Boot with OpenBSD)
Code:
/* Beware of bugs in the above code; I have only proved it correct, not tried it */
 Original quote by Donald E. Knuth
  Reply
#27
(05-01-2021, 09:15 PM)ab1jx Wrote: halt -p
is what I usually use.  I think that worked under OpenBSD too.

If you don't have /sbin in your path neither will work because that's where they are.  In Debian shutdown is a symlink to /bin/systemctl, so is halt.  /sbin isn't in some non-root paths I think, but you can add it.

I mean the 'shutdown -p now' did work just the board didn't really poweroff at all, the ethernet port led to the switch is still on and the indicators at the rear are on.

@krjdev,
Thanks for updating your tutorial. Now I am using your u-boot binary installing OpenBSD 6.9, hope this time the poweroff issue will disappear.

BTW, for an already installed disk, is there a way to update u-boot without affecting a working os?
  Reply
#28
Sorry, for my late response.

(05-02-2021, 01:19 PM)Enig123 Wrote: BTW, for an already installed disk, is there a way to update u-boot without affecting a working os?

Of course. Simple build U-Boot and copy the two files (idbloader.img and u-boot.itb) to SD/MMC card where OpenBSD is installed:

Code:
dd if=/path/to/idbloader.img of=/dev/sd0c bs=512 seek=64 conv=sync

Code:
dd if=/path/to/u-boot.itb of=/dev/sd0c bs=512 seek=16384 conv=sync
Code:
/* Beware of bugs in the above code; I have only proved it correct, not tried it */
 Original quote by Donald E. Knuth
  Reply
#29
(05-05-2021, 02:29 PM)krjdev Wrote: Sorry, for my late response.

(05-02-2021, 01:19 PM)Enig123 Wrote: BTW, for an already installed disk, is there a way to update u-boot without affecting a working os?

Of course. Simple build U-Boot and copy the two files (idbloader.img and u-boot.itb) to SD/MMC card where OpenBSD is installed:

Code:
dd if=/path/to/idbloader.img of=/dev/sd0c bs=512 seek=64 conv=sync

Code:
dd if=/path/to/u-boot.itb of=/dev/sd0c bs=512 seek=16384 conv=sync

Thanks. Do you know if OpenBSD support AES instructions on Rock64?
  Reply
#30
(08-28-2021, 05:25 PM)Enig123 Wrote: Thanks. Do you know if OpenBSD support AES instructions on Rock64?
dmesg shows the following:

Code:
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 256KB 64b/line 16-way L2 cache
cpu0: CRC32,SHA2,SHA1,AES+PMULL,ASID16

I think it AES is supported by OpenBSD, according the output from dmesg.

The tutorial is also available in German now on my private homepage:

TUTORIAL: Install OpenBSD on a PINE64 Rock64 media board (German)

Yesterday OpenBSD 7.0 is released. I will modify my tutorial for OpenBSD 7.0.
Code:
/* Beware of bugs in the above code; I have only proved it correct, not tried it */
 Original quote by Donald E. Knuth
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  OpenBSD 6.7 microSD card image krjdev 4 8,587 05-31-2020, 12:46 PM
Last Post: krjdev
  Rock64 ethernet not working during install OpenBSD Enig123 4 6,841 05-25-2020, 02:29 PM
Last Post: Enig123
Information NetBSD for Rock64 Luke 4 8,428 01-14-2020, 10:19 PM
Last Post: fmotsch
  OpenBSD: GPIO with the I2C device PCF8574(A) krjdev 0 3,834 08-09-2018, 06:41 AM
Last Post: krjdev
  AMENDED: OpenBSD, GigE Adapters/Chipsets, and ROCK64 STEREO AUDIO DAC ADD-ON BOARD jovval 1 4,257 08-07-2018, 02:44 AM
Last Post: krjdev

Forum Jump:


Users browsing this thread: 1 Guest(s)