From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 5251db9b for ; Fri, 9 Aug 2019 06:44:01 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 793BF9BB87; Fri, 9 Aug 2019 16:44:00 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 3EC6C9BA8B; Fri, 9 Aug 2019 16:43:25 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=kev009.com header.i=@kev009.com header.b="tKD9Z2o6"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 4E9509BA8B; Fri, 9 Aug 2019 16:43:22 +1000 (AEST) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) by minnie.tuhs.org (Postfix) with ESMTPS id 570249BA7E for ; Fri, 9 Aug 2019 16:43:21 +1000 (AEST) Received: by mail-ot1-f44.google.com with SMTP id l15so128751333otn.9 for ; Thu, 08 Aug 2019 23:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O6NwgT66CLgswj/PYL6JlBQcNqEGIEvl8vyNK+9Az0Q=; b=tKD9Z2o6vn4bOqgBgw3a0eFw87jOnGObkMdJzbYPWO6NwbfpjrOCZyEFmI4V+SniQ0 x7TcEM4+of9RClQ33JyWAgAU1aKgewMy2gL3F33rINm4a/rjz/6ZqYSTzIgdfhhOTJAQ J9Vb10PgIjQIIaKbQgNKoxlf8NmwynoTn/Ji4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O6NwgT66CLgswj/PYL6JlBQcNqEGIEvl8vyNK+9Az0Q=; b=CxO8+UUmoO3FNSaRHkzD71Hr+alifDNS6dLvY1Rshmq6VOJH+uJwPeNgAwwXFGssCy WGSsnuSQ/BK/bZazhDW99smaOR40spKjycgKdpBKHNrUMTUr4XaJeOV4wG6QGvEw2X7r f04TADdr0RieU7r26MNaSCYVyUObuXpwokcKiP3njMilJCtb1rJywvsCwt398eu+ajFx RTHOrMASXfT/HM4EOszRDEXumtWQae4dTos+6c8VQqOOB33y6FJA09i5+D2rcD8wOG59 SeXYgZNYXjLQHYFuPhdkn0+nqEeV49CV2SuDxnOjy8YTF4D/k9QjTf263Ct5iRDc6q03 EOJw== X-Gm-Message-State: APjAAAVjPgzcWHH7y/w0w7J9B/TnRAGUd7uKTIDcp6+4x3JdDvnA3Aru yYspRdVLMqmrZuU0AYNp1UEq3/jQzHyLhYH25XUe8rge7sl9Tg== X-Google-Smtp-Source: APXvYqzXuvwEUGQ9SUDXzZBT0Y3DxId9BTCBGgY95WVJp7eRk/5bvVYAlKpkgPQ/hG0i3iDdeXDRXo0NU/dip5R6aYI= X-Received: by 2002:a6b:7909:: with SMTP id i9mr18885277iop.8.1565333000383; Thu, 08 Aug 2019 23:43:20 -0700 (PDT) MIME-Version: 1.0 References: <7236c9d4-40af-bc49-8aee-5c32d869d2eb@spamtrap.tnetconsulting.net> <94138535-c502-109d-752d-5ef7a6d53b23@spamtrap.tnetconsulting.net> In-Reply-To: From: Kevin Bowling Date: Thu, 8 Aug 2019 23:43:09 -0700 Message-ID: To: Warner Losh Content-Type: multipart/alternative; boundary="0000000000007196e2058fa97d90" Subject: Re: [TUHS] Pre-init initialization X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list , Grant Taylor Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --0000000000007196e2058fa97d90 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Aug 8, 2019 at 7:16 PM Warner Losh wrote: > > > On Thu, Aug 8, 2019, 7:47 PM Grant Taylor via TUHS > wrote: > >> On 8/7/19 7:04 AM, Clem Cole wrote: >> > FWIW: V7 had /stand which was a funky UNIX-like standalone system that >> > some applications could be compiled. >> >> I've seen /stand on a few systems (I think SCO OpenServer and / or >> UnixWare) but never really knew what it was for. I think I had naively >> assumed it was associated with the kernel and / or booting. >> >> Now I'm somewhat more curious what it was. Was it a simplified version >> of the OS with minimal utilities with fewer dependencies so that the >> system could boot and load more features. >> > > Yes. There was a library that implemented much of the unix API in a > simplified way that ran on bare metal. > > I thought that Linux's initramfs / initrd had the usual suspect files / >> utilities copied from /. So the idea that a utility in /stand would be >> different from the same utility in / seems strange to me. >> > > They are because there was no kernel for them to run under. They were > similar, but if you go look at the sources, they are different. > > > The problem was that it was a little different so you would end up >> > seeing #ifdef STAND in code for things like fsck, fsdb, even cat. >> > At Masscomp we ended up with three target environments for a couple of >> > the system maintenance utilities: the OS, /stand and the boot ROMS. >> > This was expensive/a PITA to maintain and keep straight, and in the >> > case of the boot ROM, space was a huge problem. >> >> Ya. I can see how that would be a PITA to maintain. >> > > FreeBSD, NetBSD and OpenBSD all implement some version of this. FreeBSD > has it in src/stand in honor of V7 stand. I did that when I integrate / > rewrote the GSoC project to bring Lua scripting to the boot loader. The > other BSDs have it split between sys/boot and lib/libs. FreeBSD uses it t= o > implement the rich boot loader which knows how to load off a lot of > different file systems and BIOS interfaces. Net/OpenBSD use it more > modestly in their boot loaders, but have a few standalone programs for > things like bootstrapping VAXen. > Yeah NetBSD has little gadgets in the ports stand directory for booting odd hardware. It would be preferable to have something like FreeBSD=E2=80=99s = loader everywhere, but that would be hard to cover to the swath of ports NetBSD has, and would still require chain loading gadgets for many platforms. > --0000000000007196e2058fa97d90 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Aug 8, 2019 at 7:16 PM Warner Losh <imp@bsdimp.com> wrote:
<= div>


On Thu, Aug 8, 2019, 7:47 PM Grant Taylor via TUHS <tuhs@minnie.tuhs.org> = wrote:
On 8/7/19 7:04 AM, Clem Cole= wrote:
> FWIW: V7 had /stand which was a funky UNIX-like standalone system that=
> some applications could be compiled.

I've seen /stand on a few systems (I think SCO OpenServer and / or
UnixWare) but never really knew what it was for.=C2=A0 I think I had naivel= y
assumed it was associated with the kernel and / or booting.

Now I'm somewhat more curious what it was.=C2=A0 Was it a simplified ve= rsion
of the OS with minimal utilities with fewer dependencies so that the
system could boot and load more features.

Yes. There was a library that impl= emented much of the unix API in a simplified way that ran on bare metal.

I thought that Linux's initramfs / initrd had the usual suspect files /=
utilities copied from /.=C2=A0 So the idea that a utility in /stand would b= e
different from the same utility in / seems strange to me.
<= /div>

They are because t= here was no kernel for them to run under. They were similar, but if you go = look at the sources, they are different.=C2=A0

<= /div>
> The problem was that it was a little different so you would end up > seeing #ifdef STAND in code for things like fsck, fsdb, even cat.
> At Masscomp we ended up with three target environments for a couple of=
> the system maintenance utilities: the OS, /stand and the boot ROMS. > This was expensive/a PITA to maintain and keep straight, and in the > case of the boot ROM, space was a huge problem.

Ya.=C2=A0 I can see how that would be a PITA to maintain.
<= /div>

FreeBSD, NetBSD an= d OpenBSD all implement some version of this. FreeBSD has it in src/stand i= n honor of V7 stand. I did that when I integrate / rewrote the GSoC project= to bring Lua scripting to the boot loader. The other BSDs have it split be= tween sys/boot and lib/libs. FreeBSD uses it to implement the rich boot loa= der which knows how to load off a lot of different file systems and BIOS in= terfaces. Net/OpenBSD use it more modestly in their boot loaders, but have = a few standalone programs for things like bootstrapping VAXen.
<= /blockquote>

Yeah NetBSD has l= ittle gadgets in the ports stand directory for booting odd hardware.=C2=A0 = It would be preferable to have something like FreeBSD=E2=80=99s loader ever= ywhere, but that would be hard to cover to the swath of ports NetBSD has, a= nd would still require chain loading gadgets for many platforms.
<= /blockquote>
--0000000000007196e2058fa97d90--