I said I'd never blog

DeforaOS, NetBSD, reverse-engineering and stuff

Older stuff...

DeforaOS on the Openmoko
Wed Sep 3 15:07:41 CEST 2008

As mentioned earlier, DeforaOS is now running on the Openmoko. Not that it does anything useful yet (especially without a keyboard), but it works on flash memory or from an SD card.

This is probably good to know:

  • unlike devfs, udev is basically implemented as a tmpfs that requires initialization;
  • unlike NetBSD, /dev/std{in,out,err} do not need to be explicitely opened by the init process;
  • the default u-boot environment may give the "regular_boot" argument to the init process; when it's a shell and the file does not exist, this obviously fails;
  • the "init=/etc/startup" kernel parameter from u-boot is either silently truncated, ignored, or the kernel falls back on other programs:
    bootargs=roofstype=ext2 root=/dev/mmcblk0p2 console=tty0 console=ttySAC2,115200 loglevel=8 mtdparts=physmap-flash:-(nor);neo1973-nand:0x00040000(u-boot),0x00040000(u-boot_env),0x00800000(kernel),0x000a0000(splash),0x00040000(factory),0x0f4c0000(rootfs) init=/etc/startup
    

You can temporarily get the flash image here. I repeat: this is the first one that works, and it is neither polished nor useful yet.

Bridging VLANs on NetBSD
Tue Sep 2 14:04:07 CEST 2008

Before I forget, I found the explanation for a problem I've been facing while setting up bridging on a NetBSD-based firewall:

  • the bridge(4) driver has a fixed MTU of 1500
  • 802.1q (Ethernet bridging) has an overhead of 4 bytes at the network layer
  • the bridge(4) driver does not support underlying interfaces not matching its own MTU
  • the sip(4) driver (among others) cannot raise MTU above 1500...

This is the reason behind the cryptic error message from brconfig:

brconfig: add vlan1: Invalid argument

which is not really helpful. Something like "Operation not supported" would already be better. I think I'll file a PR some time.

To put it in a sentence, I should raise the Ethernet MTU to 1504, and pray for every equipement, driver and Operating System present to support it (switches included), so that the VLAN's MTU would match the one from the bridge interface.

It is then unlikely to work on this Soekris 4801 box, since the network chips cannot be replaced...

Come back...
Creative Commons License