AVRDUDE 6.3 and Arduino 1.0.6

For the Arduino framework to work on FreeBSD, load the linux module. (Arduino Release Notes.)

To make the Arduino Uno work, install the device comms/uarduno, in my setup (as of 21th July 2011), use the patch found in FreeBSD PR, load the uarduno device.

For the Arduino Duemilanove, load the uftdi device.

Command line uploads with avrdude, in the examples below the blink.c object code blink.hex is uploaded.

The hex code from the Arduino IDE (after it is compiled/verified), is placed in "/tmp/build*/*.cpp.hex".

Arduino Duemilanove:
avrdude -V -F -c stk500v1 -p m328p -b 57600 -P /dev/cuaU0 -U flash:w:blink.hex
Arduino Uno:
avrdude -V -F -c stk500v1 -p m328p -b 115200 -P /dev/cuaU0 -U flash:w:blink.hex
To get the serial communication to the USB/Serial port, use "cu":
cu -l /dev/cuaU0 -s 9600

FreeBSD Image to USB stick

Set the kern.geom.debugflags sysctl to be able to write a master boot record to the target device.

# sysctl kern.geom.debugflags=16

The .img file is not a regular file you copy to the memory stick. It is an image of the complete contents of the disk. This means that you cannot simply copy files from one disk to another. Instead, you must use dd(1) to write the image directly to the disk:

# dd if=FreeBSD-8.2-RELEASE-i386-memstick.img of=/dev/da0 bs=64k

FreeBSD on Laptop

pkg_info.txt, pkg_info listing

ImageMagick Screendump

$> sleep 15; import -window root MyScreenshot3.png

CD Image

dd the CD to an image file, i.e. BIG_CD.img.

Mount the cd image:

mount_cd9660 /dev/`mdconfig -f dskimg/BIG_CD.img` mnt


Initiate a RAID1 with one volume, and then insert next volume (which will be re-build). The "Intel" option is the metadata format, several others are available (graid(8)).

# graid label Intel hmj_data RAID1 /dev/da0p1 NONE
..or if both are existing:
# graid label Intel hmj_data RAID1 NONE NONE

This one got the "array" name (or Geom name: Intel-82bbbb27) "Intel-82bbbb27" and "label" "hmj_data", so when adding the next missing volume, use:

# graid insert Intel-82bbbb27 /dev/da1p1

The "Geom name" and "label" can be found by

# graid list

Then mount the raid area:

# mount /dev/raid/r0 /mnt

SSD with FreeBSD

Start with single user or rescue disc:

# gpart create -s gpt ada0
# gpart add -t freebsd-boot -s 512k -a4k -l ssdboot ada0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 ada0
# gpart add -t freebsd-ufs -l ssdrootfs -b 1m -s 2g ada0
# gpart add -t freebsd-ufs -l ssdvarfs -a 1m -s 2g ada0
# gpart add -t freebsd-ufs -l ssdusrfs -a 1m ada0
# newfs -U -t /dev/gpt/ssdrootfs
# newfs -U -t /dev/gpt/ssdvarfs
# newfs -U -t /dev/gpt/ssdusrfs

..and then the fstab:

# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/gpt/ssdrootfs      /               ufs     rw              1       1
/dev/gpt/ssdvarfs       /var            ufs     rw              2       2
tmpfs                   /tmp            tmpfs   rw,mode=01777   0       0
/dev/gpt/ssdusrfs       /usr            ufs     rw              2       2

..and then swap area:

# mkdir /usr/swap
# dd if=/dev/zero of=/usr/swap/swap bs=128k count=32768

..and the rc.conf:


..all from Warren Block, see this link.

Regarding the UEFI BIOS... it might be necessary to activate the boot disk with:

gpart set -a active adaX

FreeBSD Default Sound Unit "0"

Headset device on Asus B85M-G is the default unit 0 (back), to set speaker sound unit to 1 (front):

# sysctl hw.snd.default_unit=1

FreeBSD with Claws-mail and GPG

Install gnugpg, gpgme, enchant, pinentry and claws-mail-pgp.

FreeBSD with Claws-Mail and hunspell

Install hunspell, dictionary en-hunspell and find the da.dic + da.aif on stavekontrolden, both to be placed in /usr/local/share/hunspell/

FreeBSD with radeonkms graphics driver.

Check the FreeBSD Wiki

FreeBSD with Nikon DSLR.

Add a line to /etc/devfs.rules:
add path 'usb/*' mode 0660 group operator

SQLite3 Compiler.

Use the gcc compiler, clang will not work... also add -lsqlite3 to the command line.

Claws-Mail Spell Checking.

Use hunspell and get the danish dictionaries, search for hunspell-da.

DVB Radio NooElec

Add a line to /etc/devfs.rules:
add path 'dvb/*' mode 0660 group operator

rtl_sdr to sound file

Pipe to file /tmp/wbfm.wav:
rtl_fm -f 88700000 -M wbfm - | \
ffmpeg -f s16le -ar 17000 -ac 2 -i - /tmp/wbfm.wav

OpenBSD dump/restore

To restore from a dump file that has several volumes, volume 1 with file name vol_01:

restore -i -f vol_01

..when asked for volume, start with 1:

Specify next volume #: 1

..the volume "vol_01" is read and at next request for volume #, supply next in the sequence, this time 2:

Specify next volume #: 2

..and add "vol_02", see below:

Mount tape volume 2
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: vol_01) vol_02

..remember to add directory as specified in the default path.

Internet Radio

Yamaha CD-NT670D

FreeBSD localization UTF-8 / Danish

For the terminal with messages in english, edit .login_conf:


For Lynx browser, add environment variabel (here tcsh) to .tcshrc:

setenv LYNX_CFG ~/.lynxrc

... and then create .lynxrc with minimum following:


For shell scripts (sh) to supply correct locale if called from cron, add the LANG variabel to the shell script:


GPSBABEL Export Wahoo and Karoo GPS Data for Import to Garmin


$ gpsbabel -i garmin_fit -f inputfile.fit -o gpx,gpxver=1.1 -F outfile.gpx

Firmware Upgrade nanoVNA

First, make device enter DFU mode by one of following methods.

Jumper BOOT0 pin at powering device
...or Select menu Config->DFU (needs recent firmware)

Then, flash firmware using dfu-util via USB.

$ dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/ch.bin

FreeBSD Initial Steps after Installation.

As root:

# freebsd-update fetch install
# mkdir /usr/local/etc/pkg
# mkdir /usr/local/etc/pkg/repos
# cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/
# sed -i '' -e 's/quarterly/latest/g' /usr/local/etc/pkg/repos/FreeBSD.conf



edit SideBar

Skin Blix

Blix theme adapted by David Gilbert, powered by PmWiki