You can visit my personal site at which contains more projects not directly related to NetBSD.


  • Add DHCPv6 suppport to dhcpcd(8).
  • Improve net/dhcpcd-gtk for a better user experience.
  • Write a small DHCPv4 + DHCPv6 server.


Posted at lunch time on Tuesday, December 15th, 2009

This wiki was not originally intended to be a replacement for, but given let non-developers contribute content and ?zafer's backing, it's becoming clear that we can and should aim for that target.

There's a lot of content in's MediaWiki. Some of it (but not all) is quite good. schmonz and others feel very strongly that all content worth migrating from must be reviewed by a knowledgeable developer before committing to wikisrc. For content that is already of high quality, this shouldn't take long.

There's more than one way to easily import MediaWiki content into ikiwiki:

  1. Install a third-party input format plugin to process content in MediaWiki format
  2. Import MediaWiki content into git

schmonz doesn't like the first option. While expedient, it's not expedient enough to justify the cost: supporting more than one formatting syntax makes editing harder in the long run. Let's do the work up front and keep life as easy as possible for wiki participants. Assuming the second option works, we'll need to adapt it for CVS.

If we can't get our hands on the MediaWiki source, a tool like textproc/py-html2text could help convert the rendered HTML (see below) to Markdown.

There's on-going conversion project, some information is extracted on demand from available snapshot. Volunteers may contact asau.

Things to be done:

  1. Review articles.
  2. There were many useless articles that were either trivial or repeated manual pages.
  3. Remove useless articles, remove other useless files from snapshot (see below).
  4. Tell me what is to be removed, and I'll update snapshot.
  5. Find out what is to be moved to our official (or soon-to-be official) wiki.


Posted late Friday evening, December 18th, 2009

Add highlight plugin which can be used to get source code highlighting done. --haad

This needs the SWIG Perl bindings from textproc/highlight, which aren't in pkgsrc yet. The package could use an upgrade while we're at it. --schmonz

done --schmonz

Posted at midnight, December 24th, 2009

Recently, generic support for electro-mechanical multi-position keylocks in the kernel has been added to NetBSD. Such locks can be turned into various positions, usually up to three or four position. They come with a set of keys that are different in so far as not all positions can be reached with all keys (which key can go up to which position is called the "locking program"). With the new keylock support, such locks can be used to tinker with the kernel security, much like the traditional securelevel variable...

The number of keylock positions, the current keylock position, and the overall keylock state can be read within the kernel using a set of functions defined in keylock.h and userland can access them through the hw.keylock sysctl hierarchy.

The following components have been added:

  • gpiolock(4) a driver for GPIO attached keylocks. The driver registers with the in-kernel keylock "subsystem". See gpiolock.c.

  • secmodel_keylock, a kauth(9) security model that authorizes based on the keylock "closedness". Wheter the rightmost (default) or leftmost position of the keylock means open can be controlled using the hw.keylock.order sysctl variable. This variable can only be changed if the keylock state is OPEN. See secmodel_keylock.c.

The security model is started when a keylock driver registers and stopped when there is no more keylock driver. The keylock security model is optional, keylock support can be used without the security model as well (e.g. to provide keylock state to a userland applications. Useful e.g. for POS applications).

The keylock state interpretation is done in keylock.c and not in the driver itself. This allows for adding support for multiple keylocks in the future. The hw.keylock.pos and hw.keylock.npos sysctl variable have debugging character, the hw.keylock.state variable reflects the state and should be used.

Currently, the keylock positions are interpreted as follows: There are maximum four positions, OPEN, SEMIOPEN, SEMICLOSE, CLOSE. What exactly that means leaves room for interpretation right now.... (experience will show what makes sense in the end).

To enable the keylock support, the keylock security model, and the gpiolock(4) driver, add the following lines to your kernel configuration file:

options KEYLOCK
options secmodel_keylock
gpiolock* at gpio?

Of course you must have at least one GPIO device in your system for the gpiolock(4) driver to work and the lock must be connected properly.

Please keep in mind that this is an experimental feature...

Posted early Tuesday morning, December 29th, 2009

This is the SandBox, a page anyone can edit to learn how to use the wiki.

Here's a paragraph.

Here's another one with emphasised text.

Emphasized has a z in it.



This is a blockquote.

This is the first level of quoting.

This is nested blockquote.

Back to the first level.

Numbered list

  1. First item.
  2. Another.
  3. And another..

Bulleted list

  • item
  • item


$ echo foo bar baz
foo bar baz


Remember Cyrix:

fnord again

Posted in the wee hours of Tuesday night, December 30th, 2009

(Notes from a little Workshop during HAR 2009)

  • GPIO: LEDs, Switches, Multi-position keylocks, receiving the german DCF77 time signal station (maybe), using GPIO pins to build a 1-Wire bus
  • 1-Wire bus: Digital thermometers

Hardware Notes

Soekris net4801 GPIO pins wrong in manual

The GPIO Pins in the Soekris net4801 manual are utterly wrong (at least there is a manual, unlike for the net5501, although one with many errors...).

JP5 PinPC87366 PinJP5 PinPC87366 PinJP5 PinPC87366 PinJP5 PinC87366 Pin

Connecting a LCD module to the 4801 JP5

This example assumes a DIP162 module.

LCD 4801        Function            PC87366 Pin

1   11      GND
2   2       VCC
3   nc      VEE (Kontrast)
4   12      RS, GPIO8           GPIO4
5   13      RW, GPIO9           GPIO5
6   15      Enable, GPIO10          GPIO13
7   3       D0 Display Data LSB, GPIO0  GPIO16
8   4       D1, GPIO1           GPIO17
9   5       D2, GPIO2           GPIO18
10  6       D3, GPIO3           GPIO19
11  7       D4, GPIO4           GPIO20
12  8       D5, GPIO5           GPIO21
13  9       D6, GPIO6           GPIO22
14  10      D7, GPIO7           GPIO23
15  nc
16  nc
17  nc      LED+
18  nc      LED-

Connecting a DS18B20 to Soekris 5501 JP5

                         |          |
                         | DS18B20  |
       Vin               -----------
          |              1|  2|   3|
          |               |   |    |
          _               o---|----|
         | |              |   |
      4k7|_|            GND   |
          |                   |
          |                   |
uC -------o--------------------

2      = DQ   ----->   Pin X / GPIO x
1      = GND  ----->   Pin 20
3      = Vdd           GND when using parasite power
Vin    = 5V   ----->   Pin 2

External References

In english

In german

Posted mid-morning Wednesday, December 30th, 2009