hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
[20081229] Catching up: BusyBox-alikes, softdep EOL, 32bit pkgsrc on 64bit platforms
I've been slacking^Wterribly busy again, so there have been a few things to mention in NetBSD-land in the mean time:
  • iMil (of pkg_select fame) has started work on BeastieBox, which is a BusyBox-like system for NetBSD. The goal is to provide a single binary that can be used for many things, usually (hard)linked to various names, to be as space efficient as possible.

    NetBSD has provided a very good build mechanism for such binaries that run as a single statically linked binary for several programs via crunchgen(8) - a notable example of such a program can be found in NetBSD's /rescue. Note that all the files in there are hardlinks to a single file on disk, which contains all that's needed to run, no extra shared libs etc. are needed!

    What's new/different in BeastieBox from crunchgen is that there three modes available: ``a semi-static mode, where all commands will be statically linked to the main executable, still dynamically linked over libc and libm, a full static mode, where the produced binary is statically linked over all needed libraries, and a dynamic mode, where commands are available as shared objects. As an example, when using dynamic mode, "beastiebox" binary will load when invoking the ifconfig command.''

    See iMil's email to tech-userlevel and the thread following it for more information.

  • In a similar line as crunchgen and BeastieBox is Brian Seklecki's Cauldron Project: ``The Cauldron Project (formally bsd-appliance) is derived from work done at Collaborative Fusion, Inc. with the goal of developing a scalable and manageable enterprise-class BSD-based appliance platform. [...]

    The current framework is ideal for bona-fide network appliances: Routers, Firewalls (Policy Routers), Set Top Boxes, Console Servers, RAS Terminal Concentrators, Wireless Access Points (APs), Load Balancers / Application Switches, IDS Sensors, Network Cameras, Environmental Sensors , as well as other heavyweight appliances NAS Storage, Proxy Servers, E-mail SPAM Filters, DNS Slaves.

    ISVs, Small-Medium size businesses, OEMs, and Individuals alike will also find the system useful for systems such as Set Top Boxes, Point of Sale (POS) Terminals,

    In theory the framework could also be used in embedded applications such as micro-firmware for Printers, Scientific Instruments, Phones and other mobile communications and multimedia devices. '' The project's looking for active developers, so if this is something that may be of use to you, join in!

  • The NetBSD operating system supports a wide range of hardware platforms, among them 32bit and 64bit platforms. In that context, "32bit" and "64bit" usually describe the width of data words used in various system APIs. A "32bit" usually uses 32bit (4 Bytes) wide data types for integers, pointers and C "long" datatypes, which is why it is also referred to more precisely as "ILP32 platform". In contrast, on 64bit platforms, C "long" and pointer datatypes are usually 64bit (8 bytes) - note that integers usually remain at 32bit. Now with C APIs using all those data types back and forth, it's clear that exchange of data between a 32bit application and a 64bit operating system is not so easy, as quite some conversion work needs to be done. This is what NetBSD's compat32 is all about - binary compatiblity.

    When compiling a program on a 64bit system, it will of course use the 64bit interfaces. Building a 32bit binary on a 64bit system is usually not so easy, and effectively ends up in setting up much of a crosscompiler environment. All this is enabled in NetBSD 5.0 by default (or will be, once 5.0 is released ;-) under the "multilib" keyword.

    In order to make it easy to build 32bit binaries on a 64bit platform, Jared McNeill has posted a howto for building 32-bit packages on 64-bit platforms with pkgsrc. Enjoy! :-)

    (BTW: building sparc binaries on a sparc64 system should work in a similar fashion).

  • Last, an end-of-life notice for soft-dependencies from Andrew Doran: ``Soft dependencies, also known as soft updates or softdep, is a method of maintaining file system integrity across an unscheduled system shutdown. It improves file system performance by allowing metadata writes to the file system to take place asynchronously. Soft dependencies was introduced with NetBSD 1.5.

    The upcoming 5.0 release of NetBSD will include an alternative technology contributed by Wasabi Systems Inc.: Write Ahead Physical Block Logging, or logging. Logging will provide a feature set and performance profile superior to soft dependencies. One compelling advantage is that file systems using it need not be checked with the fsck utility after an unscheduled system shutdown.

    In NetBSD 5.0 both soft dependencies and an experimental, preview implementation of logging will be available. From NetBSD 6.0 onwards, soft dependencies will no longer be shipped as part of the system and logging will be the preferred method of maintaining file system integrity with FFS file systems.''

Last but not least, I'd like to wish belated seasons greetins to all my blog readers, and also best wishes for 2009 in advance!

[Tags: , , , , ]

Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 35210038
Copyright (c) Hubert Feyrer