hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
 
[20091018] When updating your kernel, remember ...
... to also install new kernel modules if you run NetBSD-current, else your system will not boot any more:

How? Either unpack modules.tgz set so you get modules matching your kernel in /stand, or run "make install USETOOLS=no DESTDIR=/" in src/sys/modules.

[Tags: ]


[20090927] Looking at the new kernel modules in NetBSD-current
In contrast to the current and previous NetBSD releases, NetBSD-current and the next major release (6.0) uses a new system for kernel modules. Unlike the "old" loadable kernel modules (LKMs), the new module framework supports dependencies between modules, and loading of kernel modules on demand.

Today, I've found time to install NetBSD-current/i386, and configure things that I use here - /kern, /proc, and some NFS, in addition to a local disk. Now, looking at the list of loaded kernel modules reveals:

% modstat 
NAME            CLASS   SOURCE  REFS    SIZE    REQUIRES
compat          misc    builtin 0       -       -
coredump        misc    filesys 1       3067    -
exec_elf32      misc    filesys 0       7225    coredump
exec_script     misc    filesys 0       1187    -
ffs             vfs     boot    0       166292  -
kernfs          vfs     filesys 0       11131   -
nfs             vfs     filesys 0       145345  -
procfs          vfs     filesys 0       28068   -
ptyfs           vfs     filesys 0       8975    - 
Interesting points here are that nfs, kernfs and procfs are just listed in /etc/fstab, and the related filesystem modules are loaded automatically, without a need to worry if they are needed or not. In fact I just assumed NFS is in the GENERIC kernel. Seems it's loaded as module! ;)

Another interesting module is "coredump", which is loaded by the module to execure 32bit ELF programs, exec_elf32. This is an example of module dependencies, and again no manual intervention was needed.

So what modules are there? First, let's remember that kernel modules are object code that implements facilities for the running kernel, and which interfaces closely with the running kernel. As such, they need to match the kernel version, ideally. When one of the kernel's API or ABI interfaces changes, it's best to rebuild all modules. For NetBSD, the kernel's version is bumped e.g. from 5.99.15 to 5.99.16 for such an interface change, which helps tracking those changes.

Back to the question of what modules are there. Now that we know kernel modules are closely tied to the version of the kernel (which still is in the file /netbsd, btw), associated modules -- for the example of NetBSD/i386 5.99.15 -- can be found in /stand/i386/5.99.15/modules:

% cd /stand/i386/5.99.15/modules
% ls -F
accf_dataready/     drm/                lfs/                ptyfs/
accf_httpready/     efs/                mfs/                puffs/
adosfs/             exec_aout/          miniroot/           putter/
aio/                exec_elf32/         mqueue/             radeondrm/
azalia/             exec_script/        msdos/              smbfs/
cd9660/             ext2fs/             nfs/                sysvbfs/
coda/               fdesc/              nfsserver/          tmpfs/
coda5/              ffs/                nilfs/              tprof/
compat/             filecore/           ntfs/               tprof_pmi/
compat_freebsd/     fss/                null/               udf/
compat_ibcs2/       hfs/                overlay/            umap/
compat_linux/       i915drm/            portal/             union/
compat_ossaudio/    kernfs/             ppp_bsdcomp/        vnd/
compat_svr4/        ksem/               ppp_deflate/
coredump/           layerfs/            procfs/

% ls */*.kmod
accf_dataready/accf_dataready.kmod      layerfs/layerfs.kmod
accf_httpready/accf_httpready.kmod      lfs/lfs.kmod
adosfs/adosfs.kmod                      mfs/mfs.kmod
aio/aio.kmod                            miniroot/miniroot.kmod
azalia/azalia.kmod                      mqueue/mqueue.kmod
cd9660/cd9660.kmod                      msdos/msdos.kmod
coda/coda.kmod                          nfs/nfs.kmod
coda5/coda5.kmod                        nfsserver/nfsserver.kmod
compat/compat.kmod                      nilfs/nilfs.kmod
compat_freebsd/compat_freebsd.kmod      ntfs/ntfs.kmod
compat_ibcs2/compat_ibcs2.kmod          null/null.kmod
compat_linux/compat_linux.kmod          overlay/overlay.kmod
compat_ossaudio/compat_ossaudio.kmod    portal/portal.kmod
compat_svr4/compat_svr4.kmod            ppp_bsdcomp/ppp_bsdcomp.kmod
coredump/coredump.kmod                  ppp_deflate/ppp_deflate.kmod
drm/drm.kmod                            procfs/procfs.kmod
efs/efs.kmod                            ptyfs/ptyfs.kmod
exec_aout/exec_aout.kmod                puffs/puffs.kmod
exec_elf32/exec_elf32.kmod              putter/putter.kmod
exec_script/exec_script.kmod            radeondrm/radeondrm.kmod
ext2fs/ext2fs.kmod                      smbfs/smbfs.kmod
fdesc/fdesc.kmod                        sysvbfs/sysvbfs.kmod
ffs/ffs.kmod                            tmpfs/tmpfs.kmod
filecore/filecore.kmod                  tprof/tprof.kmod
fss/fss.kmod                            tprof_pmi/tprof_pmi.kmod
hfs/hfs.kmod                            udf/udf.kmod
i915drm/i915drm.kmod                    umap/umap.kmod
kernfs/kernfs.kmod                      union/union.kmod
ksem/ksem.kmod                          vnd/vnd.kmod

% find . -type f -print | wc -l
      58 
There are directories with major kernel subsystems in the named directory, each one containing various files with the ".kmod" extension, for kernel modules. Subsystems include kernel accept filters, various file systems, compatibility modules, execution modules for various binary formats, and many others. Currently there are 58 kernel modules, and I guess we can expect more in the future.

P.S.: I've seen one confusion WRT systems that use kernel modules to whatever extent, as they shrink the size of the actual kernel binary: Even with kernel modules, an operating system is still a monolithic kernel: The modules are tied in closely into the system once loaded, ending in a monolithic system. In contrast, a "microkernel" is something very different, and it doesn't have anything to do with kernel modules. :-)

[Tags: , , ]


[20090116] Catching up on NetBSD source changes - Sep'08 to early Jan'09
OK, I'll try to catch up source-changes a bit more frequently in the future (new years resolutions... don't we all have some?), but here's what I've missed by now, from between September 2008 until now (early January 2009):
  • In preparation of the NetBSD 5.0 release, a lot of documentation updates were made, esp. in the release notes. Also, many manual pages were added to the system, documenting existing userland tools, library, system and internal interfaces.

  • Following some re-organization of binary packages on ftp.NetBSD.org some time ago, the official URLs are now:
    • ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/{MACHINE}/{VERSION}/All
    • ftp://ftp.NetBSD.org/pub/NetBSD/packages/current-packages/NetBSD/{MACHINE}/{VERSION}/All
    Both should have the same results, the latter is more safe on mirrors that don't carry /pub/pkgsrc. Adjust your PKG_PATHs!

  • Syntax for /etc/rc.conf's ifconfig_xxN variables and /etc/ifconfig.xxN was changed to also allow line breaks via ';'s. This allows something like ifconfig_wi0="ssid 'my network'; dhcp"

  • Martin Schuette's work on syslogNG from Google Summer of Code 2008 is now available in NetBSD's syslog

  • X.org integration is advancing in big steps. It's on by default on a number of platforms (including alpha, i386, macppc, shark, sparc and sparc64), and instead of using the (now obsolete) MKXORG build variable it can be build with "build.sh -x".

  • Old-style LKMs are dead, welcome to the new module framework! (XXX Documentation???) In the process, more and more kernel subsystems are being changed to be loadable as a module, e.g. POSIX AIO and semaphores, File System Snapshots, emulations, exec formats, coredump, NFS client and server, http and data accept filters, ppp compressors, and others.

    Hooks into UVM have been added to unload unused kernel modules if memory is scarce.

  • MAKEVERBOSE now has two new levels, 3 and 4. The complete list is now:
    • 0 Minimal output ("quiet")
    • 1 Describe what is occurring
    • 2 Describe what is occurring and echo the actual command
    • 3 Ignore the effect of the "@" prefix in make commands
    • 4 Trace shell commands using the shell's -x flag
    The default remains MAKEVERBOSE=2, you can also set this via build.sh's -N switch.

  • A POSIX conformant tabs(1) utility was added

  • The haad-dm branch was merged to NetBSD-current. This adds Logical Volumen Management (LVM) functionality to the base NetBSD system. It uses Linux LVM2 tools and our BSD licensed device-mapper driver.

  • The wrstuden-revivesa branch was merged into NetBSD-current, bringing Scheduler Activation based threading back to NetBSD, and giving NetBSD 5.0 and up both SA and 1:1 threads.

  • Support for the ARM-based Cortina Systems SL3516 eval board was added to NetBSD/evbarm

  • patch(1) got a major overhaul, based on DragonflyBSD and OpenBSD. There's better detection of double applied patches, rejected diffs remain in unified diff format, and and less limitation e.g. on line length.

  • pxeboot now understands boot.cfg

  • Boot CD ISO creation has been greatly overhauled, accomodating changes in boot.cfg, and moving away from a ramdisk-based system to using a file system on the cd-rom, which helps reduce RAM usage. Also, the GENERIC kernel can be used there.

  • makefs(8)'s ISO-9660 (cdrom) support was enhanced to write RISC OS data. This allows to make bootable CDs for acorn{26,32} directly, without copying the bootloader to a native file system.

  • The christos-time_t branch has been merged into NetBSD-current. This gives 64bit time_t and dev_t types (no more year 2038-problem!!!).

    Many related places like timeval and timespec were adjusted, kernel and userland APIs were touched, and shared library major versions (including libc) were bumped for this fairly exhaustive change.

    See src/UPDATING's entry on 20090110 for the full update path!

  • New/updated drivers:
    • jme(4) for JMicron Technologies JME250 Gigabit Ethernet and JME260 Fast Ethernet PCI Express controllers
    • u3g(4) provides better support for 3G datacards than ugensa
    • dbcool(4) for dbCool(tm) family of Thermal Monitor and Fan Controller
    • ataraid(4) now supports Intel MatrixRAID and JMicron RAID
    • bwi(4) for Broadcom BCM4302 wlan controllers, otherwise known as Airport Extreme
    • alipm(4) for the Acer Labs M7101 Power Manage- ment controller
    • admtemp(4) for the Analog Devices ADM1021, Analog Devices ADM1023, Analog Devices ADM1032, Genesys Logic GL523SM, Global Mixed-mode Technology G781, Maxim 1617, and Xeon embedded temperature sensors
    • ipw(4),iwi(4),wpi(4),iwn(4): We ship the firmware now, but users have to accept the Intel license manually by setting sysctls like hw.ipw.accept_eula=1. The latter is also offered by sysinst.
    • nsp(4) adds support for the NSP2000 cryptographic processor which does crypto, hashing and arbitrary precision arithmetics in hardware, and which hooks into the opencrypto(9) interface.
    • pseye(4) makes the Sony Playstation Eye USB webcam usable with the new video(4) framework
    • ath(4) now uses the recently-released source-based version of the Atheros HAL, no more binary blob!
Whee... I should really do this more often to cut things down.

[Tags: , , , , , , , , , , , , , , , , , , ]


Tags: , 2bsd, 34c3, 3com, 501c3, 64bit, acl, acls, acm, acorn, acpi, acpitz, adobe, adsense, advocacy, Advocacy, advogato, aes, afs, aiglx, aio, airport, alereon, alex, alix, alpha, altq, am64t, amazon, amd64, anatomy, ansible, apache, apm, apple, arkeia, arla, arm, art, Article, Articles, ascii, asiabsdcon, aslr, asterisk, asus, atf, ath, atheros, atmel, audio, audiocodes, autoconf, avocent, avr32, aws, axigen, azure, backup, balloon, banners, basename, bash, bc, beaglebone, benchmark, bigip, bind, blackmouse, bldgblog, blog, blogs, blosxom, bluetooth, board, bonjour, books, boot, boot-z, bootprops, bozohttpd, bs2000, bsd, bsdca, bsdcan, bsdcertification, bsdcg, bsdforen, bsdfreak, bsdmac, bsdmagazine, bsdnexus, bsdnow, bsdstats, bsdtalk, bsdtracker, bug, build.sh, busybox, buttons, bzip, c-jump, c99, cafepress, calendar, callweaver, camera, can, candy, capabilities, card, carp, cars, cauldron, ccc, ccd, cd, cddl, cdrom, cdrtools, cebit, centrino, cephes, cert, certification, cfs, cgd, cgf, checkpointing, china, christos, cisco, cloud, clt, cobalt, coccinelle, codian, colossus, common-criteria, community, compat, compiz, compsci, concept04, config, console, contest, copyright, core, cortina, coverity, cpu, cradlepoint, cray, crosscompile, crunchgen, cryptography, csh, cu, cuneiform, curses, curtain, cuwin, cvs, cvs-digest, cvsup, cygwin, daemon, daemonforums, daimer, danger, darwin, data, date, dd, debian, debugging, dell, desktop, devd, devfs, devotionalia, df, dfd_keeper, dhcp, dhcpcd, dhcpd, dhs, diezeit, digest, digests, dilbert, dirhash, disklabel, distcc, dmesg, Docs, Documentation, donations, draco, dracopkg, dragonflybsd, dreamcast, dri, driver, drivers, drm, dsl, dst, dtrace, dvb, ec2, eclipse, eeepc, eeepca, ehci, ehsm, eifel, elf, em64t, embedded, Embedded, emips, emulate, encoding, envsys, eol, espresso, etcupdate, etherip, euca2ools, eucalyptus, eurobsdcon, eurosys, Events, exascale, ext3, f5, facebook, falken, fan, faq, fatbinary, features, fefe, ffs, filesystem, fileysstem, firefox, firewire, fireworks, flag, flash, flashsucks, flickr, flyer, fmslabs, force10, fortunes, fosdem, fpga, freebsd, freedarwin, freescale, freex, freshbsd, friendlyAam, friendlyarm, fritzbox, froscamp, fsck, fss, fstat, ftp, ftpd, fujitsu, fun, fundraising, funds, funny, fuse, fusion, g4u, g5, galaxy, games, gcc, gdb, gentoo, geode, getty, gimstix, git, gnome, google, google-soc, googlecomputeengine, gpio, gpl, gprs, gracetech, gre, groff, groupwise, growfs, grub, gumstix, guug, gzip, hackathon, hackbench, hal, hanoi, happabsd, hardware, Hardware, haze, hdaudio, heat, heimdal, hf6to4, hfblog, hfs, history, hosting, hotplug, hp, hp700, hpcarm, hpcsh, hpux, html, httpd, hubertf, hurd, i18n, i386, i386pkg, ia64, ian, ibm, ids, ieee, ifwatchd, igd, iij, image, images, imx233, imx7, information, init, initrd, install, intel, interix, internet2, interview, interviews, io, ioccc, iostat, ipbt, ipfilter, ipmi, ipplug, ipsec, ipv6, irbsd, irc, irix, iscsi, isdn, iso, isp, itojun, jail, jails, japanese, java, javascript, jetson, jibbed, jihbed, jobs, jokes, journaling, kame, kauth, kde, kerberos, kergis, kernel, keyboardcolemak, kirkwood, kitt, kmod, kolab, kvm, kylin, l10n, landisk, laptop, laptops, law, ld.so, ldap, lehmanns, lenovo, lfs, libc, license, licensing, linkedin, links, linksys, linux, linuxtag, live-cd, lkm, localtime, locate.updatedb, logfile, logging, logo, logos, lom, lte, lvm, m68k, macmini, macppc, macromedia, magicmouse, mahesha, mail, makefs, malo, mame, manpages, marvell, matlab, maus, max3232, mbr95, mbuf, mca, mdns, mediant, mediapack, meetbsd, mercedesbenz, mercurial, mesh, meshcube, mfs, mhonarc, microkernel, microsoft, midi, mini2440, miniroot, minix, mips, mirbsd, missile, mit, mixer, mobile-ip, modula3, modules, money, mouse, mp3, mpls, mprotect, mtftp, mult, multics, multilib, multimedia, music, mysql, named, nas, nasa, nat, ncode, ncq, ndis, nec, nemo, neo1973, netbook, netboot, netbsd, netbsd.se, nethack, nethence, netksb, netstat, netwalker, networking, neutrino, nforce, nfs, nis, npf, npwr, nroff, nslu2, nspluginwrapper, ntfs-3f, ntp, nullfs, numa, nvi, nvidia, nycbsdcon, office, ofppc, ohloh, olimex, olinuxino, olpc, onetbsd, openat, openbgpd, openblocks, openbsd, opencrypto, opendarwin, opengrok, openmoko, openoffice, openpam, openrisk, opensolaris, openssl, or1k, oracle, oreilly, oscon, osf1, osjb, paas, packages, pad, pae, pam, pan, panasonic, parallels, pascal, patch, patents, pax, paypal, pc532, pc98, pcc, pci, pdf, pegasos, penguin, performance, pexpect, pf, pfsync, pgx32, php, pie, pike, pinderkent, pkg_install, pkg_select, pkgin, pkglint, pkgmanager, pkgsrc, pkgsrc.se, pkgsrcCon, pkgsrccon, Platforms, plathome, pleiades, pocketsan, podcast, pofacs, politics, polls, polybsd, portability, posix, postinstall, power3, powernow, powerpc, powerpf, pppoe, precedence, preemption, prep, presentations, prezi, Products, products, proplib, protectdrive, proxy, ps, ps3, psp, psrset, pthread, ptp, ptyfs, Publications, puffs, puredarwin, pxe, qemu, qnx, qos, qt, quality-management, quine, quote, quotes, r-project, ra5370, radio, radiotap, raid, raidframe, rants, raptor, raq, raspberrypi, rc.d, readahead, realtime, record, refuse, reiserfs, Release, releases, Releases, releng, reports, resize, restore, ricoh, rijndael, rip, riscos, rng, roadmap, robopkg, robot, robots, roff, rootserver, rotfl, rox, rs323, rs6k, rss, ruby, rump, rzip, sa, safenet, san, sata, savin, sbsd, scampi, scheduler, scheduling, schmonz, sco, screen, script, sdf, sdtemp, secmodel, Security, security, sed, segvguard, seil, sendmail, serial, serveraptor, sfu, sge, sgi, sgimips, sh, sha2, shark, sharp, shisa, shutdown, sidekick, size, slackware, slashdot, slides, slit, smbus, smp, sockstat, soekris, softdep, softlayer, software, solaris, sony, sound, source, source-changes, spanish, sparc, sparc64, spider, spreadshirt, spz, squid, ssh, sshfs, ssp, statistics, stereostream, stickers, storage, stty, studybsd, subfile, sudbury, sudo, summit, sun, sun2, sun3, sunfire, sunpci, support, sus, suse, sushi, susv3, svn, swcrypto, symlinks, sysbench, sysctl, sysinst, sysjail, syslog, syspkg, systat, systrace, sysupdate, t-shirt, tabs, talks, tanenbaum, tape, tcp, tcp/ip, tcpdrop, tcpmux, tcsh, teamasa, tegra, teredo, termcap, terminfo, testdrive, testing, tetris, tex, TeXlive, thecus, theopengroup, thin-client, thinkgeek, thorpej, threads, time, time_t, timecounters, tip, tk1, tme, tmp, tmpfs, tnf, toaster, todo, toolchain, top, torvalds, toshiba, touchpanel, training, translation, tso, tty, ttyrec, tulip, tun, tuning, uboot, ucom, udf, ufs, ukfs, ums, unetbootin, unicos, unix, updating, upnp, uptime, usb, usenix, useradd, userconf, userfriendly, usermode, usl, utc, utf8, uucp, uvc, uvm, valgrind, vax, vcfe, vcr, veriexec, vesa, video, videos, virtex, virtualization, vm, vmware, vnd, vobb, voip, voltalinux, vpn, vpnc, vulab, w-zero3, wallpaper, wapbl, wargames, wasabi, webcam, webfwlog, wedges, wgt624v3, wiki, willcom, wimax, window, windows, winmodem, wireless, wizd, wlan, wordle, wpa, wscons, wstablet, X, x.org, x11, x2apic, xbox, xcast, Xen, xen, xfree, xfs, xgalaxy, xilinx, xkcd, xlockmore, xmms, xmp, xorg, xscale, youos, youtube, zaurus, zdump, zfs, zlib

'nuff. Grab the RSS-feed, index, or go back to my regular NetBSD page

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

Access count: 35110262
Copyright (c) Hubert Feyrer