From nobody Tue Jan 25 03:23:57 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 00F74198E048 for ; Tue, 25 Jan 2022 03:24:09 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JjXJS4KtBz3wPr for ; Tue, 25 Jan 2022 03:24:08 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643081048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8oGGs5myaYMgDRh9+NeRwzGdqTW+F0Yv8TliYOzsVjE=; b=rE7GMlc8UrldnX2bqhxony+FeYAFOOxEgJ5flDdX5QKgzZReAOWSCvyzQffmm0bbS0Wa6n b7nU2OxPku37++4xj5GG0aNiUKU5o294fPFh3suyDjp0zqxPDr3d8WL8Z6MbjEaOUBha2D 6dOhegQxvALnRcmXOl0Oebe6Y8bUJHUbOkBoRAUXAi3NCqntIalBIcJEHUvtr9mUS+Qr4P quGK0nife+DrAHhB2D9wCueLM0yAALu4icA43mO8ZSPXeHbtn3UkYN8AxBmGSuD1xvo+ad JNYskVD/UtypOsPIW36VhezTO0inGmcx5Co6dsxFW4Ckur3omvA6SloEBxicDA== Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 71FD255B3 for ; Tue, 25 Jan 2022 03:24:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f175.google.com with SMTP id h4so1563239qtm.2 for ; Mon, 24 Jan 2022 19:24:08 -0800 (PST) X-Gm-Message-State: AOAM5324W/yqSsBwd5KS5oTgs7wwoGQmfjfohL/je4DYX2dEHvmYT28s FcMw+GfNPY+6VjG0sHf2G/E1Q8QI9MMoVvD01RQ= X-Google-Smtp-Source: ABdhPJwJFvBCjV2aWCvYweqbvZfjWlo1YVuHA1wdFFlsSxHOAlvklcl3i/ZTqFv4CtvHE9zs1OuyIAabQjekk4RjkOM= X-Received: by 2002:a05:622a:148d:: with SMTP id t13mr15008869qtx.86.1643081048117; Mon, 24 Jan 2022 19:24:08 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Kyle Evans Date: Mon, 24 Jan 2022 21:23:57 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Integrating UFS read-only code into my boot loader To: Lee D Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643081048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8oGGs5myaYMgDRh9+NeRwzGdqTW+F0Yv8TliYOzsVjE=; b=ljz3eWJGcAEc6yYAd7ji5+Oo9zQFvnblCYBR6+Qi16o34m1RHGOV8pEd+IdW1wvFyLadeG 21430iNk9hoRnYVzEragF8bhJLyylXNIqm3cVb0IAEVgKY3WC9oxkz4xFo8lZlm94+nzMj 9uGoGZecrl++dFDiaYsZX4VWy12UQ2RAeR6paxvkpecOWBmTMyt/lL8Y+6/ClYsNZR7H8g mEbQdNfybwyu4OnOVCxyGt5wGaOjVjlyjgDJifUpB/MPRFC2kXpDvoCO0DIwJ10QMuUp7j gPsahUnfhMZr7e1d77ESwm1pHLO0vdGjvQnQacprGJiL0JEHQXkVHwv13xofsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643081048; a=rsa-sha256; cv=none; b=wfLw40gZlRlDSxTNOxPKjbqA3hD/2JOz25pQP2xA0CGb+JRpub091WduSfEi5KyHWuKcyd sAR54J0AJe78LO9qokdBYuSvnmNjfZEoXlLnJ5YNvJ8rD6Vxd917n0JjmIbN5gnY9Oc8nU t1RnP42xpbuG/3KHMZdoYFF/SWvRtlZKUWReX8wrjg0yCCN+vw6T1JztwRENSbTRJSeirl JHSFPaqIGgG0JmCQgJt/SGwnNt7lXaL2S4+7JpADIp/1n415aZONP3AGEwJ+XU3IWwTQOj gFpaKC3qstV4EU5nq/78/G6pybFGrSdj/XsMTD2JB2/QFCIsqcmcfKWDyR15CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Mon, Jan 24, 2022 at 9:17 PM Lee D 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 >