-
Software
- The OpenBSD arm64 installer image. I used 7.2/arm64/miniroot72.img.
- The u-boot image gracefully provided here .
¶What I did Plug the network cable, the HDMI screen and the USB keyboard to the HC4. And turn it on.
Remove Petitboot from the internal HC4 eMMC. Booting OpenBSD from Petitboot is not possible as of today. Booting OpenBSD requires using U-boot. When the Petitboot prompt appears, select Exit to shell and issue:
# flash_eraseall /dev/mtd0
# flash_eraseall /dev/mtd1
# flash_eraseall /dev/mtd2
# flash_eraseall /dev/mtd3
Then, turn the HC4 off. If you wish / need to restore Petitboot, check at the end of this post for a recovery procedure.
A few steps are required to get a bootable OpenBSD installer. They involve both the stock OpenBSD installer and the U-boot binary image. The setup can be done from any computer, I used my OpenBSD laptop. Insert the MicroSD card into the computer, copy the OpenBSD installer onto it. Then add some bits from the U-boot image.
- erase disk
# dd if=/ev/zero of=/dev/sda bs=1M status=progress
- prepare microSD on opi516G, from ~/Download
# dd if=miniroot75.img of=/dev/sda bs=1M status=progress
504+0 records in
504+0 records out
528482304 bytes transferred in 118.498 secs (4459824 bytes/sec)
# dd if=u-boot.bin.sd.bin of=/dev/sda bs=512 skip=1 seek=1 status=progress
2227+1 records in
2227+1 records out
1140592 bytes transferred in 3.278 secs (347929 bytes/sec)
# dd if=u-boot.bin.sd.bin of=/dev/sda bs=1 count=444 status=progress
444+0 records in
444+0 records out
444 bytes transferred in 0.005 secs (82760 bytes/sec)
The OpenBSD installer seem to expect you to use a serial console with arm64 machine. Hopefully, the HC4 can use an HDMI screen and a USB keyboard for operating. This requires telling the installer to rather use the framebuffer to print stuff.
# mount /dev/sda4 /mnt
mount: /mnt: unknown filesystem type 'ufs'.
root@opi516G:/home/alexlai/Downloads# mount /dev/sda1 /mnt
root@opi516G:/home/alexlai/Downloads# cat /mnt/config.txt
arm_64bit=1
enable_uart=1
dtoverlay=disable-bt
kernel=u-boot.bin
root@opi516G:/home/alexlai/Downloads# mkdir /mnt/etc
root@opi516G:/home/alexlai/Downloads# echo "set tty fb0" > /mnt/etc/boot.conf
Remove Petitboot from the internal HC4 eMMC. Booting OpenBSD from Petitboot is not possible as of today. Booting OpenBSD requires using U-boot. When the Petitboot prompt appears, select Exit to shell and issue:
# flash_eraseall /dev/mtd0
# flash_eraseall /dev/mtd1
# flash_eraseall /dev/mtd2
# flash_eraseall /dev/mtd3
uart-2 , I used raspi 3 model B
# cu -s 115200 -l /dev/ttyU0 ---> erase char shift+backspace
- Answer
- Install, vt220, hv4, dwge0, autoconf, none, done,b23nnnnnn, sshd-> yes, user-> alexlai, Alex Lai, alexnnnn, ssh root login no, sda0, nocrypt, http,
System hostname = odroid-hc4 Which network interface do you wish to configure = dwge0 IPv4 address for dwge0 = autoconf IPv6 address for dwge0 = none Which network interface do you wish to configure = done Start sshd(8) by default = yes Setup a user = alexlai Full name for user alexlai = Alex Lai Allow root ssh login = prohibit-password Which disk is the root disk = sd0 Use (W)hole disk or (E)dit the MBR = whole Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout = e Which disk do you wish to initialize = done Location of sets = http HTTP proxy URL = none HTTP Server = cdn.openbsd.org Server directory = pub/OpenBSD/7.5/arm64 Set name(s) = done Location of sets = done What timezone are you in = Europe/Paris Asia/Taipei
cdn.openbsd.org --> http server
Take the MicroSD card out of the HC4 and plug it back to the computer. Then copy the U-boot image on it:
# dd if=Téléchargements/u-boot.bin.sd.bin of=/dev/sd2c bs=1M
The OpenBSD installer seem to expect you to use a serial console with arm64 machine. Hopefully, the HC4 can use an HDMI screen and a USB keyboard for operating. This requires telling the installer to rather use the framebuffer to print stuff.
# mount /dev/sd2a /mnt/usb
# mkdir /mnt/usb/etc
# echo "set tty fb0" > /mnt/usb/etc/boot.conf
# umount /mnt/usb