From: Warner Losh <imp@bsdimp.com>
To: The Unix Heritage Society mailing list <tuhs@tuhs.org>
Subject: Re: [TUHS] Abstractions
Date: Tue, 23 Feb 2021 20:20:55 -0700 [thread overview]
Message-ID: <CANCZdfpia=NOocC4sgrtCYcVbXJ8f=xr_rLOf5VkQmwew0OhsA@mail.gmail.com> (raw)
In-Reply-To: <m1lEkCi-0036x9C@more.local>
[-- Attachment #1: Type: text/plain, Size: 2488 bytes --]
On Tue, Feb 23, 2021, 7:47 PM Greg A. Woods <woods@robohack.ca> wrote:
> At Tue, 23 Feb 2021 16:15:52 -0500, Henry Bent <henry.r.bent@gmail.com>
> wrote:
> Subject: Re: [TUHS] Abstractions
> >
> > It's also worth
> > pointing out that NetBSD, in addition to having a separate /bin and
> > /usr/bin, has /rescue which has a large selection of statically linked
> > binaries.
>
> Indeed. However /rescue is really just a hack to avoid the problems
> that occur when basic tools are dynamic-linked.
>
> My vastly preferred alternative is to static-link everything.
>
> Of course with C libraries these days that means the binaries can be
> rather large -- albiet still relatively small in comparison to modern
> disks.
>
> In any case I've also built NetBSD such that all of the base system
> binaries are linked together into one binary (we call this "crunchgen",
> but Linux usually calls it "Busybox(tm)"). I decided to put all the bin
> directories together into one for the ultimate savings of space and time
> and effort, but it would be trivial to keep the root and /usr split for
> better managing application-specific embedded systems.
>
> This hard-static-linking of everything into one binary results in a
> surprisingly small, indeed very tiny, system. For i386 (32-bit) it
> could probably boot multiuser in about 16mb of RAM.
>
I booted a FreeBSD/i386 4 system, sans compilers and a few other things,
off 16MB CF card in the early 2000s. I did both static (one binary) and
dynamic and found dynamic worked a lot better for the embedded system...
I also did a 8MB PoC router and data logger image that was stripped to the
bone.
PicoBSD fit onto a 1.44MB floppy as lat as FreeBSD 4 and made a good
firewall...
Warner
What I've got so far is a bootable image file of a "complete"
> NetBSD-5/i386 systems that's just a tiny bit over 7Mb. It contains a
> kernel and a ramdisk image with a 12Mb filesystem containing a crunchgen
> binary with almost everything in it (247 system programs, including all
> the networking tools, but no named, and no toolchain, no mailer, and no
> manual pages -- not atypical of what was delivered with some commercial
> unix systems of days gone by, but of course updated with modern things
> like ssh, etc..)
>
> --
> Greg A. Woods <gwoods@acm.org>
>
> Kelowna, BC +1 250 762-7675 RoboHack <woods@robohack.ca>
> Planix, Inc. <woods@planix.com> Avoncote Farms <woods@avoncote.ca>
>
[-- Attachment #2: Type: text/html, Size: 3755 bytes --]
next prev parent reply other threads:[~2021-02-24 3:21 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 19:37 Nelson H. F. Beebe
2021-02-23 21:02 ` Charles H. Sauer
2021-02-23 21:15 ` Henry Bent
2021-02-24 2:47 ` Greg A. Woods
2021-02-24 3:20 ` Warner Losh [this message]
2021-02-24 20:05 ` Greg A. Woods
2021-02-24 1:51 ` Greg A. Woods
2021-02-24 2:23 ` Nelson H. F. Beebe
-- strict thread matches above, loose matches on Subject: below --
2021-02-24 4:18 Rudi Blom
2021-02-21 10:47 Paul Ruizendaal
2021-02-20 23:09 M Douglas McIlroy
2021-02-21 8:15 ` Otto Moerbeek
2021-02-21 11:08 ` Rich Morin
2021-02-21 22:40 ` Dave Horsfall
2021-02-21 23:01 ` Steve Nickolas
2021-02-23 3:31 ` Andrew Warkentin
2021-02-22 0:13 ` Warren Toomey
2021-02-27 2:47 ` Dave Horsfall
2021-02-23 0:25 ` Wesley Parish
2021-02-23 0:38 ` Steve Nickolas
2021-02-23 2:50 ` Theodore Ts'o
2021-02-23 3:19 ` Warner Losh
2021-02-23 1:47 ` Theodore Ts'o
2021-02-21 22:54 ` Clem Cole
2021-02-15 19:56 Jon Steinhart
2021-02-15 21:52 ` Dave Horsfall
2021-02-16 7:13 ` arnold
2021-02-16 8:15 ` Tom Ivar Helbekkmo via TUHS
2021-02-16 10:04 ` Wesley Parish
2021-02-16 19:59 ` Jon Steinhart
2021-02-17 4:01 ` Theodore Ts'o
2021-02-17 6:50 ` Chris Hanson
2021-02-16 12:26 ` Rich Morin
2021-02-16 22:46 ` Steffen Nurpmeso
2021-02-17 12:09 ` David Arnold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANCZdfpia=NOocC4sgrtCYcVbXJ8f=xr_rLOf5VkQmwew0OhsA@mail.gmail.com' \
--to=imp@bsdimp.com \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).