The purpose of this Tutorial is to communication how I was able to boot OpenBSD on a BananaPI BPI-R3.
Nice board! Ultimately, I failed, but I got quite far! So, here is a little help for the next poor soul attempting to do so. The board requires a multistage boot with ARM trusted Firmware. Which is not trivial.
And when booting from an SD Card, it requires a certian partition layout.
So what I did was to start of with a working image, and compiled U-Boot, ARM Trusted Firmware from scratch, and set up an OpenBSD partition.
Afterwards, I loaded the EFI loader into memory, and ran it to start the bsd.rd kernel.
BEWARE: I wrote most of this from memory, so there might be some hickups.
-
CAVEATS There are three major problems with my approach:
a. I had to use a template image for the SD card from Frank W. I was not able to create my own (setting up the partition table etc). b. One step in building the second stage bootloader bl2.img involved a black box: there is a binary-only tool in the arm-trusted-firmware repository, which adds a header and a 256 Bit signature to the bl2.bin file. c. I was unable to compile a useable .dtb file myself, so I had to borrow one. (Even though I know now how it came to be. )
-
PREREQUISITES
1.1 Hardware I used a BananaPI BPI-R3, a PL2303 TTL for UART connection, a 32GByte SD card and an SD Card writer. I compiled everything on a Laptop which has a Ubuntu/OpenBSD dualboot.
1.2 Software I used Ubuntu 22.04 for this, as well as OpenBSD 7.5. On my Linux machine, I installed the following packages:
sudo apt install opencu
sudo apt install build-esstential
sudo apt install dtc
sudo apt install bison
sudo apt install ncurses-dev
sudo apt install gcc-aarch64-linux-gnu
sudo apt install gcc-aarch64-linux-binutils
- DOWNLOADING I downloaded the following:
wget -c https://raw.githubusercontent.com/frank-w/u-boot/r3-atf/gpt_sdmmc_100m6g.img
git clone https://github.com/u-boot/u-boot
git clone https://github.com/mtk-openwrt/arm-trusted-firmware
wget -c https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz
tar xvfJ linux-6.5.tar.xz
(
mkdir Boot
cd Boot/
wget -c https://ftp.debian.org/debian/dists/stable/main/installer-arm64/current/images/netboot/netboot.tar.gz
wget -c https://ftp.openbsd.org/pub/OpenBSD/7.5/arm64/bsd.rd
wget -c https://ftp.openbsd.org/pub/OpenBSD/7.5/arm64/BOOTAA64.EFI
)
- BUILDING
Before you build you need to unpack the configuration. I took the liberty of adding them to the appendix of this file.
(
cd u-boot
cp ../config-u-boot .config
make CROSS_COMPILE=aarch64-linux-gnu- V=1 clean
yes "" | make CROSS_COMPILE=aarch64-linux-gnu- V=1
)
cp u-boot/u-boot.bin arm-trusted-firmware
(
cd arm-trusted-firmware
mkdir build
cp ../config-arm-trusted-firmware build/.config
make CROSS_COMPILE=aarch64-linux-gnu- V=1 clean
yes "" | make CROSS_COMPILE=aarch64-linux-gnu- V=1
)
cpp -I linux-6.5/include/ -I linux-6.5/arch/arm64/boot/dts/mediatek/ linux-6.5/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | dtc -I dts - -O dtb -o mt7986a-bananapi-bpi-r3.dtb
THE LAST STEP FAILS, btw. The .dtb IS NOT CORRECT. I downloaded a better dtb file from the OpenBSD packages later. (See chapter 6)
- COLLECTING THE ARTIFACTS
Now I almost had everything
mkdir -p Sdcard Boot
cp gpt_sdmmc_100m6g.img Sdcard/
cp arm-trusted-firmware/build/mt7986/release/bl2.img Sdcard/
cp arm-trusted-firmware/build/mt7986/release/fip.bin Sdcard/
cp u-boot/arch/arm/dts/mt7986a-bpi-r3-sd.dtb Boot/
cp mt7986a-bananapi-bpi-r3.dtb Boot/
- WRITING IT ON THE SDCARD (Danger!!)
SDCARD="/dev/sdc"
dd if=Sdcard/gpt_sdmmc_100m6g.img of=$SDCARD bs=1M
gdisk $SDCARD
(Change the type of partition 6 to A600)
dd if=Sdcard/bl2.img of=$SDCARD"1" bs=1M
dd if=Sdcard/fip.bin of=$SDCARD"4" bs=1M
yes | mkfs.msdos $SDCARD"5"
yes | mkfs.ext4 $SDCARD"6"
mount $SDCARD"5" /mnt/
cp Boot/BOOTAA64.EFI /mnt/
cp Boot/bsd.rd /mnt/
cp Boot/mt7986a-bpi-r3-sd.dtb /mnt/
cp Boot/mt7986a-bananapi-bpi-r3.dtb /mnt/
cp Boot/
(
cat Boot/netboot.tar.gz | ( cd /mnt ; tar xvfz - )
)
umount /mnt/
********** BOTH OF THE .dtb FILES ARE WRONG! ******
I used the one from the OpenBSD dtb package.
- PREPARING OPENBSD
I rebooted my computer into OpenBSD. There, dmesg told me that my SD Card was device sd4. So I ran disklabel -E /dev/sd4
add a a
w
q
Now I had a 6GB partition.
newfs /dev/rsd4a
mount /dev/sd4a /mnt
wget -O /mnt/bsd.rd https://ftp.openbsd.org/pub/OpenBSD/7.5/arm64/bsd.rd
umount /mnt
Then I patched the Device Tree Binary with a working one:
mount.msdos /dev/sd4l /mnt
(I am not sure if it was sd4l or sd4mā¦ The one with the MSDOS file system!)
pkg_add dtb
cp /usr/local/share/dtb/mediatek/mt7986a-bananapi-bpi-r3.dtb /mnt/mt7986a-bananapi-bpi-r3.okay.dtb
umount /mnt
- BOOTING THE INSTALLER
I connected the PL2303 to the BananaPI, (GND Black to GND, TX green to RX, RX white to TX). Put the SD Card in, moved all the DIP switches to the upper position.
On the console, I ran
cu -l /dev/ttyU0 -s 115200
Switched on the BananaPI and waited for the BPI prompt.
fatload mmc 0:5 0x46000000 /BOOTAA64.EFI
fatload mmc 0:5 0x47000000 /mt7986a-bananapi-bpi-r3.okay.dtb
bootefi 0x46000000 0x47000000
Then came the boot prompt.
boot bsd.rd
The last line was garbage, because the booted installer changed the baud rate. So I closed the terminal, and started a new one
cu -l /dev/ttyU0 -s 230400
Pressed enter, and was greeted by the familiar
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
dettus AT dettus DOT net
-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x
APPENDIX: CONFIGURATION (base64 encoded)
echo "
/Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4JqrIbBdABGCgJLNlBI6IyIfgw6SjuZvks2f3y3nKa3A
ecfqzkrhG6Tw9/Aoznf97xifKRChF2rQR5rf0KKnePvSpEso+W5EEckQv9lmhaDvPojy1Q9VH3xS
eKfQda5pnU6UXRf5Oo0yGZQFZNgJuog3uSdhkI9ubwAmB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IqJPp53UkD5pxKWEFIN
koYaiRm244UDaejcFitLQ5R8IdLgY4nf9fYvust1710xv8gmtduVwgcRrCyEcLdH3uLQYllE/XMn
HKq2NhlYuLF05g9OHOhG8iiAgPTdFgvBqFVNSxTnHF92Sm/I5B6+qzQ7yZPTwWSndFduBuFQe25A
tj45xAXCesifA3mE39WW7xvQhkhXzMFCCy4XHKTJBLh/gzwDFtQIS/yaRr4gKQVLTPUofdRRBi/E
NrG5SH5OQU1BgtiDHzweSKyohySCnvENsua1uF/CuME3jJNe7KCNaqbanGTKDhysMXwgMiBFlqP7
r8bHEXtbRaKZepG66x3TdyK5damzMgL7xHEXz2Nqp03AKVqM1UxCpDaaRc4iOIb9+EMFRoIqb/db
KrkqVuLaFVah/ZoXPZou/8Ov8J5aLrEmJ1JbHdEiLVCgrHFQPwn4kLVrHghRnrAV1XrTIE46T7t8
qAREviqC+V4sT+2LSYI+DyPrCzXVyj/Ca4i8XH+UhtIbR/7YBDb+8PIMXikqjPJS6/4AAAAAMFAD
tbr0p8gAAesEuw4AAM19u4qxxGf7AgAAAAAEWVo=" | \
base64 -d >config-arm-trusted-firmware.xz
xz -d config-u-boot.xz
xz -d config-arm-trusted-firmware.xz
You can verify that it was decoded correctly:
md5sum config-u-boot config-arm-trusted-firmware
68851815fc3343889558072ca3b1c82d config-u-boot
b55786845230bba7786fa3dee532896f config-arm-trusted-firmware