April 2015 Archives

Thu Apr 30 01:59:00 CEST 2015

J names/locatives/locales and how they evolved

Wrote http://juggle.gaertner.de/bnp/locale-history.html, an overview how J identifiers/names and name scopes evolved since the beginnings 25 years ago.


Posted by neitzel | Permanent link | File under: done, j

Thu Apr 23 20:24:05 CEST 2015

second test with new old ral(4) fails

Visited my Dad's network with my new ral(4) driver and had no luck to associate with the access point. So, what different from my home AP? Both are running mixed 802.11b+g mixed mode and using WEP (yes, I know) for encryption. The only obviously different is the key length: 40 vs 104 bits.

Anyway: there's certainly more work needed, such as integrating all those 60+ patches made by the OpenBSD guys.


Posted by neitzel | Permanent link | File under: bsd

Tue Apr 21 19:02:19 CEST 2015

nguyen back on air

Finally done: updated /usr/src/sys on nguyen.marshlabs.gaertner.de on its netbsd-6 stable branch and adopted the old ral(4) code as used with netbsd-5 to the changed BPF interface of netbsd-6.

This work turned out to be rather easy: /usr/src/sys/dev/ic/rt26{61,80}.c have so much identical code that I could essentially transfer what happened on the NetBSD-maintained rt2661.c to the OpenBSD source rt2680.c. Likewise for rt2680var.h.

Generating a new kernel with the changes based on

config NGYUEN
cd ../compile/NGUYEN
make depend; make

wouldn't succeed though. The updated kernel also required a new userland for a newer ACPI compiler. D'uh, 15 hours of serious work for nguyen but in the end:

ral0 at pci3 dev 0 function 0: vendor 0x1814 product 0x0781 (rev. 0x00)
ral0: MAC/BBP RT2872 (rev 0x0200), RF RT2720 (1T2R)

Those 15 hours are disgraceful. Two things which still bug me:

  1. Even though I use build.sh with -u, i.e. in upgrade mode, the entire toolchain and entire world get rebuilt. This doesn't feel right. Maybe USETOOLS=never in /etc/mk.conf would help?

  2. The only reason for having X11 sources at all is that I like my xterm(1) compiled with the DABBREV feature enabled. Maybe MKX11=no would help? One would think so but hey surprise, that's the default setting anyway according to mk.conf(5).

Summary:

The interactions of mk.conf and build.sh are still a mystery to me, but I can do WLAN again now with netbsd on the netbook.


Posted by neitzel | Permanent link | File under: done, marshlabs, bsd

Sun Apr 19 03:52:16 CEST 2015

Recapulating old {Net,Open}BSD stuff

Much work for properly integrating the OpenBSD ral(4) extensions into NetBSD-6/-7:

  • Read basics about 802.11 and PCI on Wikipedia.

  • Read ral(4) device driver sources (essentially two C files) en detail in order to understand how the device gets initialized and how the interface hooks into the packetfilter.

  • Understood the seperation into PCI frontend and actual device driver.

  • Finally understood the removal of / replacements for the #if NBPFILTER > 0 conditionals between NetBSD-5 and -6; should be able to apply the patches now properly.

  • Checked the evolution of the ral driver across old, current, and upcoming versions of both NetBSD and OpenBSD. (Lots of cvs diff and cvs log.) Looks like I'll have to compile separate patchkits for both NetBSD-6 and -7, even though I can use the latest ral(4) version from OpenBSD in both cases.

Not really related:

I decided to give my PPC-MacMini another spin, booting it into the OpenBSD system I had installed along with the OSX-10.5.8 upgrade four years ago. It took me an hour to figure out the magic incantations required to boot into OpenBSD. So, before I forget them again:

  1. While powering on, keep the 4 keys Option-Command-O-F (that's letters Oh-Eff as in "Open Firmware") pressed until the OK prompt appears.

  2. boot hd:,ofwboot /bsd

This turned out to be OpenBSD version 4.9. It needed an update to its interface configuration for the network I am now using since... three years now. Unfortunately, it has to share name and address with its OSX cousin; my /26 is already fully used again.

(There is another 2G partition reserved, suitable for, say, a NetBSD installation.)


Posted by neitzel | Permanent link | File under: learned, done, marshlabs, bsd

Sat Apr 18 17:02:30 CEST 2015

If he only had known...

Back in the 90s I had a gray-scale printout of a PostScript picture hanging in my office which was slightly doctored. (The picture, not the office. Nor me.)

When I left academia, I took that picture with me, eventually framed it, and it still decorates my desk at home.

However, I never had the PostScript file, and for the last twenty years, I have been looking through various old disks / systems and googling the Intarwebs for it. No dice.

But this morning, after an entire night of wading through files and directories, I finally found it. On the old DECsystem ips I had saved from being scrapped in 2007, in a sub sub sub directory of Bernd Witte, the UNIX admin who tought me a lot when I was just a user, there it was: /usr/users/infbsps0/witte.old/dsm/qms/psexec18/nurse.ps.

This was a sample file coming with a QMS laser printer we had in the basement (you guessed it: gray-scale only), and is the untampered version, still advertising "The Adobe Illustrator might have saved him".

I installed the ghostview suite on my ARM board alexis, and with a little bit help from sed(1), we are back to the not-so-original version. So without further ado, here is a low-quality jpeg rendering:

rtfm nurse

(This is the first time I see this in color.)

I blatantly removed the Adobe copyright notice, too. Hey, I DON'T CARE! I'D RATHER SINK -- THAN CALL ADOBE FOR PERMISSION!.


Posted by neitzel | Permanent link | File under: done

Fri Apr 17 05:47:12 CEST 2015

Work on hackett (more than planned)

While I was busy reading all those packetfilter man pages, hackett was busy compiling itself (kernel + entire userland). This went all smooth but I ended up with the 376M / root partition being full.

After some emergency rms and back to 4% free space, I identified /var to be a good candidate to be segrageted from /. However, I had no extra LVM space left and needed another 5GB virtual disk first. In the end:

# lvm pvs
PV         VG   Fmt  Attr PSize  PFree
/dev/rld0f vg0  lvm2 a-   12.13g    0
/dev/rld1d vg0  lvm2 a-    4.88g 2.88g

# df -h / /var
Filesystem             Size       Used      Avail %Cap Mounted on
/dev/ld0a              376M        54M       303M  15% /
/dev/mapper/vg0-var    2.0G       283M       1.6G  14% /var

In addition to the seldom used lvm commands, this was also a good opportunity to exercise cpio(1).

Half of the /var space was actually wasted on /var/db/pkgin/cache pkg files. Good riddance!:

# pkgin clean
# df -h /var
Filesystem             Size       Used      Avail %Cap Mounted on
/dev/mapper/vg0-var    2.0G       127M       1.7G   6% /var

NetBSD provides a nice /var/run/rc.log about the entire "init" stage /etc/rc has some nifty trickery to ensure that this file is written late enough, after /var has been mounted, too.


Posted by neitzel | Permanent link | File under: done, marshlabs, bsd

Fri Apr 17 00:57:07 CEST 2015

reading on packet filters, old and new

Read:

  • intro(9), pfil(9), bpf(4) [NetBSD]
  • packetfilter(4), pfstat(8), pfopen(3), pfconfig(8c) [ULTRIX]

Posted by neitzel | Permanent link | File under: learned, bsd

Wed Apr 15 23:49:01 CEST 2015

nawk(1) fixed

The nawk(1) man page on ips terminated early, right after the parting words:

String constants are quoted, as in "x". Escape sequences accepted in literal strings are:

Fix by switching from GROFF /usr/local/bin/gtbl to ULTRIX /usr/bin/tbl as table formatter, and running man -c nawk to create a new, preformatted cat page.


Posted by neitzel | Permanent link | File under: done, bsd

Tue Apr 14 22:49:20 CEST 2015

More i915drmkms work

another update of kernel sources (incl. changes to both drm and acpi stuff), another kernel build, and finally the report to the -current list that things still don't work for the EeePC.


Posted by neitzel | Permanent link | File under: done, bsd

Mon Apr 13 01:31:53 CEST 2015

eddie updates

Work on eddie:

LVM filesystems newfs'ed, /usr/src/sys copied and cvs -q upd -dPAed, new kernel built.

Boot attempt with i915drmkms enabled, will still blank the screen but now I can ssh into eddie and grab the error messages from dmesg. Patch for the kernel from the mailing list didn't improve things. Also built a kernel with the netbsd-6 i915drm driver (now classified as "legacy"). Can run X11 but it won't figure out the size of the 1024x600 display; it uses 800x600 instead.

Starting from the wmieeepc0 device in the boot messages, I found src/sys/dev/acpi/wmi/wmi_eeepc.c and think that it may be straight forward to add a few hotkeys which are not recognized as of now. And, one day later, I found /usr/src/sys/dev/acpi/asus_acpi.c which holds those key definitions, too. Both drivers are documented and part of the generic kernel. An asus0 device doesn't show up in the boot messages, though.

Looks like I should learn a few basics about this new-fangled ACPI stuff.


Posted by neitzel | Permanent link | File under: done, marshlabs, bsd

Sat Apr 11 11:37:14 CEST 2015

Let's do the time warp!

I finally figured out how to force arbitrary dates for my blog entries. (Read: fake them a few days/weeks later whenever I was too lazy to document what I did right then.)

Don't be too confused about some new entries made just now (with the fixed calendar layout) for old events which happened whithin the past few months.


Posted by neitzel | Permanent link | File under: learned

Thu Apr 9 23:12:00 CEST 2015

space hacking

When doing the first things with eddie it turned out that its space bar was defective: hitting it on the left side would seldomly make it into a key event. Very annoying.

A first attempt at prying the keycap off and putting it back wasn't successful but --as so often-- low-tech approaches go a long mile. In this case, one of my adhesive color labels (bought around 1980) did the job:

space hacking

Works great again!

Whenever doing such keyboard operations, be sure to wear protection against accidental input:

null

Time required to repair this:

  • One entertaining hour researching YouTube how others tackled such keyboard issues.
  • 15 minutes of actual fixing.
  • One not so entertaining hour searching for my camera's USB cable to document this for you.

And speaking of cameras: eddie has its own one:

eddie webcam

Which begs the question:

Would it have been possible for eddie to make a selfie of its spacebar?

Enquiring minds want to know!


Posted by neitzel | Permanent link | File under: done, marshlabs

Wed Apr 8 10:26:49 CEST 2015

eddie initial setup

Initial setup work on eddie:

  • group: =uid in /etc/usermgmt.conf
  • extra groups for my user (operator to do shutdowns, disk management, and tcpdumps (I chgrp operator /dev/bpf*)).
  • a few dot files and ssh key material.
  • LVM PV/VG/LV setup with partitions for /usr/local, /usr/home, and /usr/src. Hey, I forgot about /scratch! Nevermind, there's still plenty of LVM space left. Sizes are modelled from previous NetBSD setups.
  • A handful of extra packages, most notably:
    • screen (not that I'm against tmux from base, but running tmux nested inside a frontend screen session is a bit awkward.)
    • tcsh (just because standard /bin/csh uses ESC for filename expansion while my fingers got wired to TAB from too much bash usages).
    • pkgin (to be able to search for packages)

Next up: moving stuff into the LVM filesystems, updating syssrc.


Posted by neitzel | Permanent link | File under: done, marshlabs, bsd

Wed Apr 8 02:12:34 CEST 2015

Welcome, eddie!

New in da house: eddie.marshlabs.gaertner.de

eddie

This is one more ASUS Eeepc 1000H netbook (Atom N270, 1GB RAM, 160GB spinning harddisk), just like the old one bootable into {ngyuen,robert,stanley,joni}.marshlabs.gaertner.de.

Why yet another one? The new netbook will be used to (re-)port OpenBSD's extensions for more chipsets in the Ralink wireless ral(4) driver into NetBSD-7 (aka -current at the moment). Patches already existed (and worked!) for adding the OpenBSD driver code into NetBSD-5.x but with NetBSD-6 too much infrastructure changed to do that again.

I was able to install NetBSD-current last night after finally figuring out what made the video go blank during kernel loading.

userconf disable i915drmkms

got me going. (There had been reports on the current-users mailing list with trouble in the area starting early March; now someone's dmesg output provided some clues about what drivers could be disabled.)

Thanks to sonnenschein for letting go of her hardware for really cheap instead of letting it rot in some shelf.


Posted by neitzel | Permanent link | File under: done, marshlabs, bsd

Mon Apr 6 10:32:54 CEST 2015

Yippiee, wieder blogs!

FUZxxl fixed the blog software: The first days of the month are now properly indented.

Thanks FUZxxl!

Certainly related, here some messing around with J's box characters:

   saved_boxchars=. 9!:6 ''

   9!:7 'abcdefghijk'
   3 4 $ <'FUZ',:'XXL'
akkkbkkkbkkkbkkkc
jFUZjFUZjFUZjFUZj
jXXLjXXLjXXLjXXLj
dkkkekkkekkkekkkf
jFUZjFUZjFUZjFUZj
jXXLjXXLjXXLjXXLj
dkkkekkkekkkekkkf
jFUZjFUZjFUZjFUZj
jXXLjXXLjXXLjXXLj
gkkkhkkkhkkkhkkki

   9!:7 ] 11#' '
   3 4 $ <'FUZ',:'XXL'

 FUZ FUZ FUZ FUZ 
 XXL XXL XXL XXL 

 FUZ FUZ FUZ FUZ 
 XXL XXL XXL XXL 

 FUZ FUZ FUZ FUZ 
 XXL XXL XXL XXL 

   9!:7 saved_boxchars
   NB. SEE ALSO:  9!:16 17

Posted by neitzel | Permanent link | File under: tests, friends, done