Re: Banana Pi BPI-M2 Berry

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 04 Mar 2023 20:13:31 UTC
On Mar 4, 2023, at 07:45, Jack Raats <mlist@jarasoft.net> wrote:

> I'm looking for a FreeBSD image for the Banana Pi BPI-M2 Berry.
> The generic arm 7 doesn't work.

The generic image normally requires adding U-Boot to
the media via dd (to a fixed place outside any file system).
The likes of RPi*'s are unusual in having such material
inside a msdosfs on the media instead, along with RPi* or
whatever firmware. (The generic armv7 image does have some
such no-extra-dd-use-required material in place already.)

There is the port:

/usr/ports/sysutils/u-boot-bananapim2/

(I'm guessing at the match to "Banana Pi BPI-M2 Berry".)

Its pkg-descr indicates . . .

# more /usr/ports/sysutils/u-boot-bananapim2/pkg-descr 
U-Boot loader for Banana Pi M2.

To install this bootloader on an sdcard just do :
dd if=$LOCALBASE/share/u-boot/u-boot-bananapim2/u-boot-sunxi-with-spl.bin of=/path/to/sdcarddevice bs=1k seek=8 conv=sync

This version is patched so that:
 * API features are enabled.
 * A boot.scr (U-Boot script) that loads ubldr.bin and execute it is included

For information about running FreeBSD on Allwinner boards, see
https://wiki.freebsd.org/FreeBSD/arm/Allwinner


NOTE: I'm not sure if a boot.scr and ubldr.bin is really still
involved or not. That may just be old text that was not removed.


The installed port (or package) normally would end up with
the file to use in dd being at:

/usr/local/share/u-boot/u-boot-bananapim2/u-boot-sunxi-with-spl.bin


There is also the possibility that the U-Boot port could be broken.
I've no general clue what U-Boot ports are tested when U-Boot ports
are updated vs. which are not. If u-boot-sunxi-with-spl.bin appears
to be broken, report it to the list.


Note:
FreebBSD has many /usr/ports/sysutils/u-boot-* ports but
comparatively few prebuilt snaphots or releases. So most
of the ports require such steps to enable booting the
matching board(s).

===
Mark Millard
marklmi at yahoo.com