Thursday, February 14, 2008

Hamcation!

Yeah, we went camping at Hamcation again this year, and it was a good time except that I forgot to bring my sleeping bag and pillow. This year, we started a day early and drove over on Thursday about noon and checked-in after a quick side trip to Skycraft. Arriving at Hamcation early this year was pretty nice, but we had a little pressure getting the campsite set up due to impending storms which, fortunately, never materialized. Compared to last year, the temperature was warmer and it was a great time for all of us (KI4OFU (me), KG4YNI, KI4EFN, AF1RE, KI4OFV (my wife)). I didn't find any cheap Soekris SBCs this year, dang it all, but I did pick up a few goodies. The biggest was a new ICOM IC-2820H with the D-Star/GPS board. This is a beautiful radio, and now I get to learn all about how D-Star works. I also picked up a TRSB for my Buddipole, as well as the Rotating Arm Kit. Other miscellaneous goodies from here and there filled out the annual shopping spree, and it was a lot of fun. Let me take a minute to tell you how much I like ICOM. Not necessarily the radios, though I do adore my IC-7000 and I think the same will be true for this IC-2820H pretty soon, but the company itself. I have a young son, 2.5 years old, and the comic books that ICOM publishes are a great way for me to read to my son about amateur radio and get him interested in it. I know it's smart business for them to appeal to a younger generation for the future of the hobby and consequently future hardware sales for them, but they stand out because they are doing that and I don't see a hint of that kind of youth-oriented material from either Yaesu or Kenwood. Go ICOM! Our club had a swap table set up again this year with tons of junk on it, both donated to the club and also consigned by club members. I would say that about 1/2 of it was sold and the other 1/2 given to other vendors on Sunday afternoon because we didn't want to haul any of it back to Lakeland. Either way, it was good revenue for the club. I think that when Hamcation 2009 comes around, we will probably still camp but might do it in the travel trailer rather than in the tent. Also, staying on Saturday night, which we didn't do in 2007, was not optimal this year since by mid-morning on Sunday most of the vendors were packing up and getting ready for the trip home. Yeah, I think that next year we may pack up camp when we get up on Saturday morning and then make one final good day of it before heading home. We'll see.

Wednesday, February 6, 2008

NanoBSD - part 1

Wow, where do I start. Last year, I picked up a few Soekris net4521 boards from the Orlando Hamcation. The guy didn't know what he had and sold them to me for $10 each. Nice. I tinkered around with them a little bit last year and got some help with kernel, world, and package building for the NanoBSD image from Bruce Mah. I had built up a nice image on a 512MB CF card and played for a bit, but then life came charging back in and I had to shelve the project for a while.

Now I am back, and here is some stuff to chew on. First, here is a short shell script that I wrote and dropped into /usr/src/tools/tools/nanobsd to evaluate the packages in /usr/src/tools/tools/nanobsd/Pkg and determine if there were any missing dependencies before starting the image building process.

#!/bin/sh
#
# make packages for /usr/src/tools/tools/nanobsd/Pkg:
# if the port is already installed:
# cd /usr/src/tools/tools/nanobsd/Pkg && pkg_create -vyb netcat-1.10_2
# if the port is not installed:
# cd /usr/ports/net/netcat && make package && mv \
# /usr/ports/packages/All/dnsmasq-2.38.tbz /usr/src/tools/tools/nanobsd/Pkg/
#
#
# next, run this script to ensure that you aren't missing any deps for the packages
# you want in your image.
#
# after that, you can run `sh nanobsd.sh -c nanobsd-soekris.conf` to build a new image
#
# or, if you are just adding/removing packages to the existing image, you can
# run `sh nanobsd.sh -b -c nanobsd-soekris.conf` to save the time of building world
# and kernel.
#

cd /usr/src/tools/tools/nanobsd

rm -f pkg_deps.list

cd /usr/src/tools/tools/nanobsd/Pkg

for each in *.tbz;
do
pkg_info -r ${each} | grep Dependency | cut -d' ' -f2 | while read dep
do
/bin/ls -1 | grep ${dep} >/dev/null || echo "${each} needs ${dep}" >>/usr/src/tools/tools/nanobsd/temp.$$
done
done

cd /usr/src/tools/tools/nanobsd

[ -f temp.$$ ] && (cat temp.$$ | sort | uniq >pkg_deps.list && rm -f temp.$$)

That works pretty well. After ensuring that my package list was good to go, I started the build process and it went well. Much thanks need to go to Poul-Henning Kamp for his work on the NanoBSD infrastructure, it's just simply wonderful.

Right now, I am using a Soekris net4521 as my firewall, running off of a little 12v DC wall-wart, instead of the old power-sucking 400w AC-powered tower that I was using. Saving power and money, which are good things, and now I have moved from using IPFW/IP6FW on that old tower to using PF on this Soekris. More about using PF later!