1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
dnl $OpenBSD: prep,v 1.10 2020/04/19 23:41:19 sthen Exp $
Please be aware that OpenBSD support for this platform is far from
complete.
To perform an installation you must be able to interact with the serial
console of the machine. USB OTG ports such as the one found on the
BeagleBone will not function as a console. You need to be able to
interact with the firmware on the console. Often this requires a 3.3V
TTL level adapter connected to pins or a header on the board.
Firmware which provides an UEFI interface with a Device Tree Blob
(DTB) file or ACPI support is required to boot. In most cases this is
provided by images of U-Boot 2016.07 or newer on SD/MMC devices or in
SPI flash. If the miniroot images are used, U-Boot and DTB files are
distributed as part of the miniroot disk images.
OpenBSD can be installed onto a disk by copying the miniroot for your
board "miniroot{:--:}OSrev.fs" image to an SD card.
Booting from an SD card:
To use the miniroot image you will need another machine to plug the
SD card in to. Any machine type will do, as long as it supports SD card
storage devices. Under OpenBSD, it will appear as a ``sd'' device, for
example sd1.
Use the dd(1) utility to copy the miniroot to the SD card.
The command would likely be, under OpenBSD:
dd if=miniroot{:--:}OSrev.fs of=/dev/rsd1c bs=1m
When you have connected the serial to your computer, a command such
as "cu -l cuaU0 -s 115200" (assuming cuaU0 is your serial port device)
should connect you to the board's console.
Running EFI payloads with U-Boot:
If the U-Boot target supports "distro_bootcmd" efiboot will automatically
be loaded by placing bootaa64.efi into /efi/boot/bootaa64.efi on a FAT
filesystem. With dtb files placed in in /vendor/, /dtbs/vendor/, or
/dtb/current/vendor/.
If the U-Boot target supports bootefi but not automatically finding it with
"distro_bootcmd" then it must be loaded manually or by U-Boot commands or
script.
=> run findfdt
=> load mmc 0:1 ${fdt_addr_r} ${fdtfile}
=> load mmc 0:1 ${kernel_addr_r} efi/boot/bootaa64.efi
=> bootefi ${kernel_addr_r} ${fdt_addr_r}
The bootloader will then run and try to load sd0a:/bsd off an FFS
filesystem after a timeout.
Install on Raspberry Pi 4:
You will need a microSD card (only a small one is needed), a USB
storage device, a TTL serial interface adapter (e.g. CP2102 USB-UART
converter), and a cable to attach this to the TXD/RXD/GND pins on the
https://pinout.xyz/ header on the board.
Follow the installation instructions at https://github.com/pftf/RPi4
to install UEFI firmware to a FAT-formatted microSD card.
Use the dd(1) utility to copy the miniroot to the USB storage device.
The command would likely be, under OpenBSD:
dd if=miniroot{:--:}OSrev.fs of=/dev/rsd1c bs=1m
When you have connected the serial to your computer, a command such
as "cu -l cuaU0 -s 115200" (assuming cuaU0 is your serial port device)
should connect you to the board's console.
Shortly after powering the board, you should see messages on the serial
console starting with "Initialising SDRAM" followed by messages from the
UEFI firmware. If you have a monitor connected to the HDMI port, you
should see a multi-coloured screen followed by UEFI firmware output.
If you do not see this, re-check your UEFI firmware installation.
OpenBSD should boot automatically soon after loading the UEFI firmware.
If a monitor is connected you will see messages from the boot loader,
but after the kernel has started running you will only see output on
the serial console.
Install on systems without a supported miniroot:
If a miniroot is not available for your system you will have to modify
an existing image before booting it.
To do so first install the u-boot-aarch64 and dtb packages. Write the
provided miniroot image to an SD card:
dd if=miniroot{:--:}OSrev.fs of=/dev/rsdXc bs=1m
Add a board specific DTB file (Allwinner and Rockchip U-Boot images
come with a default DTB):
mount /dev/sdXi /mnt
mkdir /mnt/vendor
cp /usr/local/share/dtb/arm64/vendor/board.dtb /mnt/vendor/
umount /mnt
For systems based on Allwinner Axx Socs:
dd if=/usr/local/share/u-boot/board/u-boot-sunxi-with-spl.bin \
of=/dev/sdXc bs=1024 seek=8
For systems based on Rockchip RK33xx SoCs:
dd if=/usr/local/share/u-boot/board/idbloader.img \
of=/dev/sdXc seek=64
dd if=/usr/local/share/u-boot/board/u-boot.itb \
of=/dev/sdXc seek=16384
|