This page chronicles some of my experiences getting this and that piece of software running under DamnSmallLinux (DSL). Of most immediate use is probably the final *.dsl and *.tar.gz packages for use with your own DSL installation, but perhaps you may find some help in my notes on how I got various extensions to compile just right and how to build your own extensions.
On This Page:
- MyDSL Extensions
- mDNSResponder
- libusb
- libusbJava
- rxtxSerial
- apache-ant
- fastjar
- Java 6 (JDK/JRE)
- jikes
- How to Make Your Own Extensions
MyDSL Extensions
MyDSL extensions can be loaded automatically at boot time or as you
desire with the mydsl-load command. To load automatically
at boot time, simply put the .dsl or .tar.gz file in
the mydsl directory on your "recovery" media, and reboot.
"Recovery media" is the term sometimes used to refer to, perhaps, the
USB flash drive that contains all your personal settings and so forth.
This is where DSL puts the backup.tar.gz file as well.
mDNSResponder
Download mDNSResponder-107.6.dsl
About mDNSResponder
The Zeroconf technology, which Apple calls
"Bonjour"
(formerly "Rendezvous"), is the only real "must have" for DSL on this page.
In fact I think this ought to be included standard with DSL.
Perhaps the most important feature that mDNSResponder provides is easy identification of your DSL machine on a network when you don't know the machine's IP address — a typical scenario with DHCP and embedded systems.
I may be missing some other components of Zeroconf, but the three major features that Zeroconf implementations provide are these:
- Identify self on network as mydslhostname.local.
- Look up other hosts on the network using othername.local.
- Announce presence of services on the network (such as, "I'm running a web server on port 80, if anyone cares!")
Usage
A default DSL machine has the hostname box (which you can change with the boot time parameter host=newname). After booting your DSL box, perhaps headless if you're using it as I am in an embedded fashion, you can access your DSL machine remotely like so:
ssh dsl@box.local.
The .local. (yes there's an extra period at the end) is the Zeroconf way of looking up machines on a local network even without other name services being provided (even w/o DHCP).
Some Unix-y distros including Mac OS X have the ability to resolve .local. names already. If you have Windows, you'll probably want to install Apple's Bonjour for Windows (you'll also get the added benefit of a handy network printer discovery tool). For some reason that eludes me, on other machines and with other software I sometimes see .local without the trailing dot. If you know what the distinction is, or if it's just carelessness, please let me know — I'm curious.
To announce the presence of a server, use the LOOK THIS UP I FORGET tool (located in /usr/blahblahblah). You may want to modify some of your /etc/init.d scripts to include these announcements so that other clients on the network can easily find your DSL box (if you want other clients to find your box). This is the sort of service announcement that printer manufacturers jumped on long ago and enable easy printer-finding on a network (unless you have Windows — then you need to get Apple's Bonjour for Windows to have the good life). For kicks you may want to try some Zeroconf browsers to see just who else on your network is announcing itself. You might be surprised.
- JmDNS: Java tools for mDNS
- Bonjour Browser: A nice Mac OS X tool
Compile and Install Notes
In order for DSL to be able to resolve .local. addresses, I needed to modify the /etc/nsswitch.conf file. This was a problem at first because the file is a symbolic link to the read-only KNOPPIX filesystem. Putting a real file in its place did not work because when backup.tar.gz was unpacked, it could not overwrite a symbolic link. Sigh. I discovered that you could clobber such a link with another symbolic link, so mDNSResponder.dsl includes the file /etc/I FORGET THE NAME and a new symbolic link /etc/nsswitch.conf that points to the I FORGET THE NAME file.
The following files are installed:
./usr/lib/libdns_sd.so.1 ./usr/lib/libdns_sd.so ./usr/sbin/mdnsd ./usr/include/dns_sd.h ./usr/share/man/man5/nss_mdns.conf.5 ./usr/share/man/man8/libnss_mdns.8 ./usr/share/man/man8/mdnsd.8 ./usr/bin/mDNSResponderPosix ./usr/bin/mDNSResponder-107.6.tar.gz ./usr/bin/mDNSProxyResponderPosix ./usr/bin/mDNSNetMonitor ./usr/bin/mDNSIdentify ./usr/bin/mDNSClientPosix ./usr/bin/dns-sd ./etc/rc0.d/K16mdns ./etc/rc2.d/S52mdns ./etc/rc3.d/S52mdns ./etc/rc4.d/S52mdns ./etc/rc5.d/S52mdns ./etc/init.d/mdns ./lib/libnss_nisplus.so.2 ./lib/libnss_nisplus-2.3.2.so ./lib/libnss_nis.so.2 ./lib/libnss_nis-2.3.2.so ./lib/libnss_mdns_minimal.so.2 ./lib/libnss_mdns6_minimal.so.2 ./lib/libnss_mdns6.so.2 ./lib/libnss_mdns4_minimal.so.2 ./lib/libnss_mdns4.so.2 ./lib/libnss_mdns.so.2 ./lib/libnss_hesiod.so.2 ./lib/libnss_hesiod-2.3.2.so ./lib/libnss_files.so.2 ./lib/libnss_files-2.3.2.so ./lib/libnss_dns.so.2 ./lib/libnss_dns-2.3.2.so ./lib/libnss_compat.so.2 ./lib/libnss_compat-2.3.2.so
libusb
Download libusb-0.1.12.dsl
About libusb
Libusb seems to be the primary way that Linux talks to USB devices, and I needed it in order to use libusbJava (below), a Java wrapper for USB access. I don't see how DSL doesn't have libusb installed already, and maybe it does, but I couldn't get any other apps to compile on DSL without adding libusb myself.
Compile and Install Notes
I had to compile libusb to reside in /usr/lib instead of /usr/local/lib as I would have by default because it seemed libusbJava and libptp wanted it to be there. I wonder if DSL has libusb there in some form, but perhaps I had to have all the headers and such also installed to get the other apps to compile. Whatever oddness it was, things work now.
The following files are installed:
usr/lib/libusb-0.1.so.4 usr/lib/libusb-0.1.so.4.4.4 usr/lib/libusb.a usr/lib/libusb.la usr/lib/libusb.so usr/lib/libusbJava.so (woops, these two shouldn't be here) usr/lib/libusbJava.so.0.2.2 usr/lib/libusbpp-0.1.so.4 usr/lib/libusbpp-0.1.so.4.4.4 usr/lib/libusbpp.a usr/lib/libusbpp.la usr/lib/libusbpp.so usr/include/usb.h usr/include/usbpp.h usr/lib/pkgconfig/libusb.pc