Re: Integrating UFS read-only code into my boot loader

From: Kyle Evans <kevans_at_freebsd.org>
Date: Tue, 25 Jan 2022 03:23:57 UTC
On Mon, Jan 24, 2022 at 9:17 PM Lee D <embaudarm@gmail.com> wrote:
>
> Hi,
>
> I am using my own bootloader to directly boot the FreeBSD 13 kernel on
> my custom Zynq (ARM) board.
>
> Currently, I load the kernel from a small DOS partition.
>
> I would like to try to integrate UFS into my bootloader so that I can
> read the kernel, modules and configuration directly from the UFS
> partition.  It only needs to read, not write.
>
> In FreeBSD 11.0.1 there was file called: /src/sys/boot/common/ufsread.c
>
> That file seemed to be a complete UFS reader in a small, self
> contained package.  It was deleted from the tree a long time ago
> though.
>

Moved- it was moved to stand/libsa/ufsread.c

> Is this file still good for use with a UFS filesystem created with FreeBSD 13?
>
> I saw the whole package of files under /src/sys/ufs/, but those are
> deeply integrated into the world of the FreeBSD kernel and seem
> difficult to extract for use in a standalone, bare-metal bootloader
> program.
>
> Also open to other suggestions for how I might integrate UFS into my bootloader.
>
> Thanks,
>
> Lee
>